This has thoroughly broiled my noodle; having made some discoveries, I figured they might be useful to others.
Just the observance:
My observance is that Starsector loads mods strictly in descending alphabetical order, A to Z, by the mod's displayed name in the mod list. IE, the "name":"foo", field. It locks in mods, meaning that, for example, if you have a weapon_data.csv with a name of Silverjohn and an ID of mp_silverjohn in two mods; say, one which is named Mighty Pirates and one which is named Overpowered Mighty Pirates, it will lock in the data from the first-loaded weapon_data.csv and discard the later one; in this case, it will ignore your extension-mod Overpowered Mighty Pirates because Overpowered comes later in the alphabet than Mighty.
The general fix for this would be to make the mod name begin with something that comes before M; 0verpowered Mighty Pirates (note that I have used the numeral zero instead of the letter O) would work, or you could also name it 11 Mighty Pirates: Overpowered or any such thing.
The full explanation:
I'm trying to make some very, very tiny (for personal use) mod-mods that modify the behavior of other content-extension mods to make those mods' ordnance weapons behave like the vanilla weapons modified by Missiles & Sundries.
I was getting outright
inconsistent results. The method I've used, in each case, has been:
Make a mod folder, with a mod_info.json. Into that goes a data/weapons folder. Into that folder, I copy the original mod's weapon_data.csv, and open it up with LibreOffice Calc.
I then highlight and delete the whole lines of anything that is not an ordnance weapon receiving a modification, make such number changes as seem appropriate to retarget limited-use-per-deployment ordnance weapons to the Missiles & Sundries regenerating missiles numbers, and save the mod. Then activate both mods.
This method
worked to modify the Ship and Weapon Pack and Sylphon R&D weapons, but it
faied to modify Mayasuran Navy and Arsenal Expansion weapons.
This is an example of the mod_info.json:
{
"id":"zz_sd_Reload_Missiles_Mayasura",
"name":"Reloadable Missiles: Mayasuran Navy",
"utility": "true",
"author":"ShadowDragon8685",
"version":"1",
"description":"Revamps the missiles from Mayasuran Navy to auto-reload in-combat, in the same manner as those from Missiles & Sundries. NOT WORKING AT PRESENT; modified Mayasuran Navy mod directly",
"gameVersion":"0.9.1a",
}
I had thought that mods were loaded in the order of "id":"foo", with later mods by id name overwriting newer ones, but this is demonstrably not the case. I then thought that it was a matter of alphabetical order in the file structure with the first mods' lines "locking-in" and later ones being ignored; I've been naming my folders "sd_foo" to keep all mine together. That comes previous to Ship and Weapon Pack
and Sylphon R&D, but after Arsenal Expansion and Mayasuran Navy, so I tried renaming the folder and ID for my override for Aresenal Expansion to "AA_SD_foo" and even "11_SD_foo" didn't work.
Aaaaand just now, I have tried changing the mod name.
{
"id":"1_sd_Reload_Missiles_Arsenal_Expansion",
"name":"1 Reloadable Missiles: Arsenal Expansion",
"utility": "true",
"author":"ShadowDragon8685",
"version":"1",
"description":"Revamps the missiles from Arsenal Expansion to auto-reload in-combat, in the same manner as those from Missiles & Sundries. NOT WORKING AT PRESENT; modified Arsenal Expansion directly.",
"gameVersion":"0.9.1a",
}
This appears earlier in the mod-list than
"name": "Arsenal Expansion",
My current working hypothesis is thus that Starsector is loading mods strictly in descending alphabetical order, A->Z, with earlier entrants which feature a line "locking in" their entry and ignoring later lines with the same ID.