OK, I tested out one of my suggestions (Hard Flux constant drain per Cap) in the last round of feedback; the results were very good (for the AI) and not terribly OP (for the player).
Code used:
Spoiler
//Drains a smallish amount of Hard Flux per second, depending on ship size and total Flux Capacity.
package data.scripts.plugins;
import com.fs.starfarer.api.combat.CombatEngineAPI;
import com.fs.starfarer.api.combat.EveryFrameCombatPlugin;
import com.fs.starfarer.api.combat.ShipAPI;
import com.fs.starfarer.api.combat.ViewportAPI;
import java.util.List;
public class FluxCapHardFluxDrain implements EveryFrameCombatPlugin
{
private CombatEngineAPI engine;
@Override
public void init(CombatEngineAPI engine) {
this.engine = engine;
}
@Override
public void advance(float amount, List events)
{
// Obvious exploits are obvious
if (engine == null) return;
if (engine.isPaused()) return;
float drainFraction = 150f;
for (ShipAPI ship : engine.getShips()){
//Skip all the ships that this shouldn't apply to, like ships that are Phased, Venting, etc., etc.
if(!ship.isAlive() || !ship.isPhased() || ship.getFluxTracker().isOverloadedOrVenting() || ship.getHardFluxLevel() <= 0f) continue;
//If the ship qualifies for a drain, drain now.
//Start by computing the Drain Threshold, which is a ratio of Capacity vs. a number that results in total drain / second.
//Small stuff gets a better (lower) number here, because they get significantly less Capacity per OP, etc.
switch(ship.getHullSize()){
case DESTROYER:
drainFraction = 250f;
break;
case CRUISER:
drainFraction = 350f;
break;
case CAPITAL_SHIP:
drainFraction = 500f;
break;
}
//Now apply the drainThreshold vs Capacity and time elapsed to get the amount of Hard Flux drain this frame
drainFraction = (ship.getMutableStats().getFluxCapacity().getModifiedValue() / drainFraction) * amount * engine.getTimeMult().getModifiedValue();
//How much Hard Flux should we have now?
if (ship.getFluxTracker().getHardFlux() - drainFraction < 0f) {
ship.getFluxTracker().setHardFlux(0f);
} else {
drainFraction = ship.getFluxTracker().getHardFlux() - drainFraction;
//Set it.
ship.getFluxTracker().setHardFlux(drainFraction);
}
}
}
@Override
public void renderInWorldCoords(ViewportAPI vapi) {
}
@Override
public void renderInUICoords(ViewportAPI vapi) {
}
}
Main benefits of this code, when tested:
1. The AI benefits quite a lot from this, just like the AI benefits disproportionately from SO and from Captains w/ level-10 Power Management.
2. Why does the AI benefit so much from anything that provides a drain on Hard Flux, moreso than the player?
A. The player is usually out-numbered, and so there may be multiple foes taking hits for Hard Flux.
B. This drain basically makes the player attempting to kite everything to death much harder, because the player must focus, rather than gradually building up Hard Flux on all nearby foes whilst retreating / Vent-spamming. It's another time-pressure device, in that sense.
C. For larger ships, even though the proportion is lower, the total Capacity is high enough that it's a significant drain vs. low-DPS weapons that are particularly good to kite gradually with.
D. This isn't enough drain to do anything significant to the outcome vs. high-alpha weapons or Kinetics that are focused on kiting outcomes at good tradeoffs, such as Railgun spammers or Light Needler burst-alpha. It's mainly good against slow kiting tactics (i.e., the stuff that the game balance is supposed to prevent) rather than focused alphas (which are Fun).
3. The ability to put a genuinely-useful emphasis on Capacity is nice. It gives ships with high Capacity that are otherwise pretty lame, like the Aurora, a genuine benefit, in terms of survivability.
4. It really doesn't change outcomes with player ships much. This isn't a tool you can use to make a Paragon significantly more invulnerable than it already is with a leveled character, for example; compared to the 20% drain from Combat, this is minor. It's really something that needs to be seen as a fleet-tactics buff more than anything else, because it levels the playing field quite a lot when the AI has more ships than the player.