An alternate, simpler but more limited solution:
1) Put plugin in the "plugins" section in settings.json, i.e.:
"plugins":{
"aiScript":"data.shipsystems.scripts.ai.VayraFluxOverdriveAI",
}
2) Call Global.getSettings().getNewPluginInstance("aiScript");
Under the hood this does much the same thing as LW's code. The limitation is, of course, that for this to work, the config needs to be in the "plugins" section of the settings file.
Hmm... I know it's possible to make a shipsystem that boosts energy or ballistic
but is it possible to make one that boosts only PD weapons? Or failing that, only small ones?
Stats-wise, yeah. As far as the visual glow, I don't think so - the current "make it glow" code is limited to weapon mount types, i.e. energy/ballistic/missile.
Sometimes when I mouse over a fleet I get a crash and this in the errorlog. Seems to happen also with fleets that aren't form my mod, so I assume this is a core game issue?
Fairly sure this is an issue with invalid fighter wing ids being available to a faction, but not 100%. If you want to make dig in a bit, you can open up:
com.fs.starfarer.api.plugins.impl.CoreAutofitPlugin.fitFighters(CoreAutofitPlugin.java:907)
To line 907 and see what it says; might help point us in the right direction.