So something like this then?
Spoiler
package data.hullmods;
import com.fs.starfarer.api.Global;
import com.fs.starfarer.api.combat.ShipAPI;
import com.fs.starfarer.api.combat.FluxTrackerAPI;
import com.fs.starfarer.api.combat.MutableShipStatsAPI;
public class SlowOverloadedShip extends BaseHullMod {
public final float OverloadReduction = 0.7f;
public void advanceInCombat(ShipAPI ship) {
MutableShipStatsAPI stats = ship.getMutableStats();
if (ship.getFluxTracker().isOverloaded() == 1) {
stats.getMaxSpeed().modifyPercent("SlowOverloadedShip", OverloadReduction);
} else {
stats.getMaxSpeed().unmodify("SlowOverloadedShip");
}
}
}
I'm extremely new to modding this game so I figured this would be something simple to see if I understand the structure correctly.