OK, here's a weird issue. What would stop a given Weapon from being stocked / created at a Market?
I have a "weapon" that costs 0 OPs and does some Special Stuff.
When I force it into a Market's inventory via a restocking-script, all is well. When I don't, it doesn't generate, even though it's Known to the Faction involved and some Variants require it to be built. It isn't being stocked and those Variants never show up in the game.
Hmm - looking at the code, that might happen if the tier is set too high for what the submarket allows.
What's the best way to record FleetMemberAPI in Persistent Data?
And how to check "FleetMemberAPI" is no longer exists and remove it from the hashmap?
You basically can't - a FleetMemberAPI could be in a fleet, in storage somewhere, or referenced from some other script, either from core or from another mod. So it's impossible to tell if it has "ceased to exist" or not. The best you could do is check the player's fleet and colony storage.
Where could i find the recovery chance for derelicts? Do the cases in pickDerelictCondition from DerelictShipEntityPlugin affect that chance or is it only for loadout, dmods, etc.?
Modifiers go here:
ship.getMutableStats().getDynamic().getMod(Stats.INDIVIDUAL_SHIP_RECOVERY_MOD)
(See ReinforcedBulkheads, for example)
And the base chance is in settings.json, "baseShipRecoveryChance" and "baseOwnShipRecoveryChance"
The number is a probability, i.e. >=1 is 100% chanc to recover.
I made a whole pack of custom images/flags for the player faction (in graphics/factions/custom). How do I make them show up in-game? I don't see the vanilla images referenced in the setting.json
They go into the player.faction file.