I am trying to make a skill that sets the deployment/logistics cost of the player flagship but I can't seem to find anything in the MutableShipStatsAPI that can modify logistics cost.
I see almost everything else modifiable in the data spreadsheet though and plenty of things that aren't. Was this overlooked or am I missing it?
I want it to look something like this:
public void apply(MutableShipStatsAPI stats, HullSize hullSize, String id, float level) {
stats.getFleetPoints().set(id, SkillData.HELMSMANSHIP_LOGISTICS_COST);
Where HELMSMANSHIP_LOGISTICS_COST = 12 in skilldata
This should make it so that the logistics/deployment cost of the player flagship is always 12 no matter the hull-size correct?
Ok so moving this to the thread so others can see.
Story so far:
Trying to modify the cost of a ship using skills:
This is what I have:
import com.fs.starfarer.api.characters.ShipSkillEffect;
import com.fs.starfarer.api.combat.MutableShipStatsAPI;
import com.fs.starfarer.api.combat.ShipAPI.HullSize;
public class CommandExperiencePerk3 implements ShipSkillEffect {
public void apply(MutableShipStatsAPI stats, HullSize hullSize, String id, float level) {
stats.getBaseValue().modifyPercent(id, -SkillData.COMMAND_EXPERIENCE_SHIP_COST);
}
public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String id) {
stats.getBaseValue().unmodify(id);
}
public String getEffectDescription(float level) {
return "Reduces the cost of ships by " + (int)(SkillData.COMMAND_EXPERIENCE_SHIP_COST) + "%";
}
public String getEffectPerLevelDescription() {
return null;
}
public ScopeDescription getScopeDescription() {
return ScopeDescription.ALL_SHIPS;
}
}
So definitely an amateur coder here. So I assume from what you said that I am trying to use the MutableShipStats class to get the credit value of the ship when it can't actually do that.. because BaseValue isn't defined in that class?
When you said:
You could modify it to be 12 by doing something like stat.modifyFlat(id, 12f - stat.getBaseValue()).
I think I understand what that is doing as far as getBaseSupplyUsePerDay.
But how would it recognize the credit cost of the ship since that isn't defined in any class?