1
Mods / Re: [0.9.1a] Console Commands v3.0 WIP 7.6 (released 2018-12-07)
« on: August 28, 2019, 12:59:53 AM »
Thank you, I am not sure how I didn't see that.
Starsector 0.9.1a is out! (05/10/19); Blog post: Writing Starsector (12/18/20); Starsector 0.95a In-Development Patch Notes (10/16/20)
public class TestCombatPlugin extends BaseEveryFrameCombatPlugin {
public static float DAMAGE_MISSILES_PERCENT = 200f;
public static float SPEED_MISSILES_PERCENT = 500f;
public static float SPEED_BONUS = 525f;
public static float TURN_BONUS = 20f;
/**
* Set this to true to have the plugin actually do stuff.
*/
private static boolean TEST_MODE = true;
private CombatEngineAPI engine;
public void init(CombatEngineAPI engine) {
this.engine = engine;
}
public void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id) {
stats.getDamageToMissiles().modifyPercent(id, DAMAGE_MISSILES_PERCENT);
stats.getMaxSpeed().modifyPercent(id, SPEED_BONUS);
stats.getBallisticWeaponRangeBonus().modifyFlat(id, 600f);
stats.getBeamWeaponRangeBonus().modifyFlat(id, 300f);
}
@Override
public void advance(float amount, List events) {
//If we're paused or not in combat or whatever, stop here.
if(engine == null
|| engine.isPaused()
|| (!engine.isInCampaign() && !engine.isInCampaignSim() && !engine.isMission() && !engine.isSimulation())){
return;
}
//Get all of the ships currently on the battlefield, iterate through them.
for(ShipAPI ship : engine.getShips()){
}
}