Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Cargo and Fuel related mods/ship upgrades  (Read 3883 times)

Affeks

  • Ensign
  • *
  • Posts: 1
    • View Profile
Cargo and Fuel related mods/ship upgrades
« on: May 19, 2017, 12:41:13 AM »

So with the sector increasing in size, much more focus on long ranged travel, commodities needed for salvage/surveying and just much heavier focus on auxiliary fleet tasks I feel its high time to introduce more ways to spec your ships for these tasks.


A pair of suggested solutions:

Cargo and Fuel ship mods (either learned through skills or modspecs) that increases respective capacities depending on hull size

A system similar to how you put extra vents or capacitors on ships


Other than Surveying mod there isn't many industry or trading related customization in the game and it helps put me off auxiliary game play
Logged

TrashMan

  • Admiral
  • *****
  • Posts: 1325
    • View Profile
Re: Cargo and Fuel related mods/ship upgrades
« Reply #1 on: May 19, 2017, 02:27:01 AM »

Something like this?

Code
//fuel extender hullmod
package data.hullmods;

import java.util.HashMap;
import java.util.Map;

import com.fs.starfarer.api.combat.BaseHullMod;
import com.fs.starfarer.api.combat.MutableShipStatsAPI;
import com.fs.starfarer.api.combat.ShipAPI;
import com.fs.starfarer.api.combat.ShipAPI.HullSize;

public class FuelExtender extends BaseHullMod {

private static Map mag = new HashMap();
static {
mag.put(HullSize.FIGHTER, 0f);
mag.put(HullSize.FRIGATE, 5f);
mag.put(HullSize.DESTROYER, 15f);
mag.put(HullSize.CRUISER, 50f);
mag.put(HullSize.CAPITAL_SHIP, 100f);
}

public String getDescriptionParam(int index, HullSize hullSize) {
if (index == 0) return "" + ((Float) mag.get(HullSize.FRIGATE)).intValue();
if (index == 1) return "" + ((Float) mag.get(HullSize.DESTROYER)).intValue();
if (index == 2) return "" + ((Float) mag.get(HullSize.CRUISER)).intValue();
if (index == 3) return "" + ((Float) mag.get(HullSize.CAPITAL_SHIP)).intValue();
return null;
}


public void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id) {

stats.getFuelMod().modifyPercent(id, 20f);
}


}


Code
//crew extension
package data.hullmods;

import java.util.HashMap;
import java.util.Map;

import com.fs.starfarer.api.combat.BaseHullMod;
import com.fs.starfarer.api.combat.MutableShipStatsAPI;
import com.fs.starfarer.api.combat.ShipAPI;
import com.fs.starfarer.api.combat.ShipAPI.HullSize;

public class CrewExtender extends BaseHullMod {

private static Map mag = new HashMap();
static {
mag.put(HullSize.FIGHTER, 0f);
mag.put(HullSize.FRIGATE, 5f);
mag.put(HullSize.DESTROYER, 15f);
mag.put(HullSize.CRUISER, 50f);
mag.put(HullSize.CAPITAL_SHIP, 100f);
}

public String getDescriptionParam(int index, HullSize hullSize) {
if (index == 0) return "" + ((Float) mag.get(HullSize.FRIGATE)).intValue();
if (index == 1) return "" + ((Float) mag.get(HullSize.DESTROYER)).intValue();
if (index == 2) return "" + ((Float) mag.get(HullSize.CRUISER)).intValue();
if (index == 3) return "" + ((Float) mag.get(HullSize.CAPITAL_SHIP)).intValue();
return null;
}


public void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id) {

stats.getMaxCrewMod().modifyPercent(id, 20f);
}

}


Code
//cargo extension
package data.hullmods;

import java.util.HashMap;
import java.util.Map;

import com.fs.starfarer.api.combat.BaseHullMod;
import com.fs.starfarer.api.combat.MutableShipStatsAPI;
import com.fs.starfarer.api.combat.ShipAPI;
import com.fs.starfarer.api.combat.ShipAPI.HullSize;

public class CargoExtender extends BaseHullMod {

private static Map mag = new HashMap();
static {
mag.put(HullSize.FIGHTER, 0f);
mag.put(HullSize.FRIGATE, 10f);
mag.put(HullSize.DESTROYER, 50f);
mag.put(HullSize.CRUISER, 100f);
mag.put(HullSize.CAPITAL_SHIP, 250f);
}

public String getDescriptionParam(int index, HullSize hullSize) {
if (index == 0) return "" + ((Float) mag.get(HullSize.FRIGATE)).intValue();
if (index == 1) return "" + ((Float) mag.get(HullSize.DESTROYER)).intValue();
if (index == 2) return "" + ((Float) mag.get(HullSize.CRUISER)).intValue();
if (index == 3) return "" + ((Float) mag.get(HullSize.CAPITAL_SHIP)).intValue();
return null;
}


public void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id) {

stats.getCargoMod().modifyPercent(id, 20f);

}



}

Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: Cargo and Fuel related mods/ship upgrades
« Reply #2 on: May 19, 2017, 03:26:38 AM »

Hehe. Ship/Weapon Pack, no?
Logged

Toxcity

  • Admiral
  • *****
  • Posts: 561
    • View Profile
Re: Cargo and Fuel related mods/ship upgrades
« Reply #3 on: May 19, 2017, 10:08:43 AM »

Those ware from Ironclads iirc. Though they are a good idea for hullmods, so it makes sens that more than one mod implements them.
Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: Cargo and Fuel related mods/ship upgrades
« Reply #4 on: May 19, 2017, 03:35:43 PM »

Those ware from Ironclads iirc. Though they are a good idea for hullmods, so it makes sens that more than one mod implements them.

Ah, touche.
Logged

Serenitis

  • Admiral
  • *****
  • Posts: 1471
    • View Profile
Re: Cargo and Fuel related mods/ship upgrades
« Reply #5 on: May 19, 2017, 03:53:14 PM »

Add one for fuel efficiency too and that could be something that would maybe oust survey equipment from being an auto-pick for civil shipping.
Logged