will collision with enemy ships trigger it?
I won't, any impact during the arming time will make it collide with the ship and bounce around.
If it matters, the module slots are currently empty.
I'm fairly sure that's the issue. Didn't dig around in the code but I seem to remember that being a requirement - well, either that, or this may be a special case of "modules in the same slot must have the same hull id when the variant in the slot is changed". Put another way, modules aren't *that* modular; different hulls can't be plugged in at will. Either way, it's definitely worth trying it starting out with the stock variant having empty modules in the slots.
Is there any way to reduce the amount of faction rep you lose when you attack a fleet when your transponder is off?
Also when you defeat expeditions?
For the former, you could provide your own implementation of a ReputationActionResponsePlugin using CampaignPlugin.pickReputationActionResponsePlugin().
For the latter, you can modify PunitiveExpeditionIntel.REP_PENALTY in your ModPlugin.onApplicationLoad() or some such.
I tried adding some luxury commodities, but there seems to be a bug with the player selling them off to a different planet for a large price, but then being able to buy them for a lower price (effectively making an infinite money loop). I tried copying data from other mods that add commodities but it seems the error was not fixed. Am I missing something to prevent this?
Nothing looks immediately wrong, hmm. I just tried it with lobsters at several markets (with/without luxury goods demand) and there as no issue, so probably something *is* missing but I'm not sure what.