... and I can therefore store data in the hullmod with the ShipVariantAPI as a key
There's only one instance of each HullModEffect *per application session*, and it doesn't go into the savefile, at any rate. I'd say as a general rule, just don't do it period. E.G. if the variant - or whatever data you store keyed off it - references the Sector somewhere down the line, bam, that's a Sector-sized memory leak when you load a game.
If you need to store stuff long-term, use Global.getSector().getMemory() or Global.getSector().getPersistentData(). It's about the same, really, as far as which to use; persistentData is just a straightforward map.
How does economyIntervalnGameDays affect patrols? I noticed that it may have something to do with battles lost.
It used to affect their spawn rate but doesn't anymore. See: averagePatrolSpawnInterval
(You might be looking at some older PatrolFleetManager* classes which are no longer used...)
How are buffs to fighters handled? Right now I'm giving a combat buff to all ships within a fleet using .getFleetData().getMembersListCopy(), which is working for the ships but not the fighters. I've looked at the fighter-specific skills, which led me to the skill effect type but no reference as to how it's affecting fighters.
Fighters don't exist in the campaign in the same way that ships do, so if you're going to buff them, it needs to happen in combat. Probably better to do this for ships, too - what you're doing might be alright, but it's just easier to do something with long-term effects if it's not managed properly. (See: BuffManagerAPI, TempBuff etc...)
For example, using .getFleetData().getMembersListCopy() would only work if you're using that to apply Buffs, not modify stats directly. If you're already doing that, though, and it expires (or doesn't) in the way that you want, you're probably fine.
Also where are derelict ships created after combat (the ones floating through space), and where is ship recovery handled?
See: CoreScript.generateOrAddToDebrisFieldFromBattle()
Also see: ShipRecoverySpecial and SalvageSpecialInteraction
Hello!
Hi!
My question is how would it be possible (if at all) to rename a context menu option (right/left click menu on a Building), or even perhaps remove, change behaviour or add a new option.
Ahh, these really aren't configurable, the upgrading/downgrading works along a pretty set pattern. You might be able to do something with the 2nd building being "upgradeable" to the first, though - then it'd take time to "downgrade" (via an upgrade) so it'd probably be closer to what you want.
But "it takes time to shut down", I can't see how to make work, offhand. Just in general, that menu isn't very configurable, aside from being able to take custom special items.