Basically, if any values are set for getHardFluxDissipationFraction via MutableShipStatsAPI, sometimes the Hard Flux gets set to zero all of a sudden (i.e. all in one game-frame, not just "fast").
It can be reproduced pretty easily by giving a ship a fair amount of it like so:
package data.hullmods;
import com.fs.starfarer.api.combat.MutableShipStatsAPI;
import com.fs.starfarer.api.combat.ShipAPI.HullSize;
public class FluxPipeline extends BaseHullMod {
public void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id) {
stats.getHardFluxDissipationFraction().modifyFlat(id,5f);
}
public String getDescriptionParam(int index, HullSize hullSize) {
return null;
}
}
...and then getting shot on purpose a lot. It usually happens when Hard Flux hits zero while Soft Flux is > 0.
While I'm talking about this... can we get an explanation of how that value works in the game's formula?
I've been going off of what was in the source for the character Perk, where it talks about "percentages", but percentages applied how, exactly?
Is a value of 1.0f just the current Flux Dissipation rate derived from all bonuses removed from Hard Flux every second?
If so, no problem, just trying to understand what, exactly, I'm monkeying around with while playing with this stuff, as I probably need to make it scalar, rather than how I have it now, where it's doing flat adding regardless of Flux Dissipation.