Hi everyone, first time posting on the forums here, but I've been on the discord for a bit.
I am a huge fan of RC and have been using it since about my third campaign in Starsector - of course, I noticed throughout the time I've spent playing it that not all weapons are included. This is because of the way the starsector API functions - it does not expose SYSTEM tagged weapons (or something like that as far as I understand it).
As has been said, the author of this mod included a file that allows the user to specifically list SYSTEM tagged weapons to be included: RealisticCombat/data/config/WeaponSpecs.json
So, seeing as I love this mod, I decided to go add every system weapon from every faction mod I use to the WeaponSpecs file. I did this without too much trouble by using the regex search function in VSC, which I will explain for anyone who wants to add stuff from factions I don't play with.
To begin with, here are the entries for all of the applicable weapons from every faction and ship pack I play with:
https://pastebin.com/raw/t2LLwUfQHere are the instructions for adding these to your game:
1. Find the list of applicable weapons that is underneath the name of the mod you want to add.
2. Select the entire list and copy it. DO NOT copy the name of the mod with a # symbol in front of it. I only added that to the text file to make it easier to tell which lines were headers.
3. Locate the following lines:
"systemWeapons":[
"lightmortar_fighter",
"clusterbomb",
"annihilator_fighter",
"sabot_fighter",
"ioncannon_fighter",
"irpulse_fighter",
"pdburst_fighter",
"riftlance_minelayer",
"riftbeam_minelayer",
"riftcascade_minelayer",
"interdictorbeam",
],
4. Paste the entries for the weapons you want to add directly underneath the other weapons in the list, inside the brackets. Here is an example of what that should look like:
"systemWeapons":[
"lightmortar_fighter",
"clusterbomb",
"annihilator_fighter",
"sabot_fighter",
"ioncannon_fighter",
"irpulse_fighter",
"pdburst_fighter",
"riftlance_minelayer",
"riftbeam_minelayer",
"riftcascade_minelayer",
"interdictorbeam",
"MSS_big_railgun",
"MSS_big_railgun_nebulosa",
"MSS_small_railgun",
"Iowa_Turret_B",
],
And you're done! Keep in mind that I made the first entry for each mod indented just to help me keep track of them. It doesn't make a difference whether the lines are indented or not.
Okay, now for the more complicated part: adding weapons from mods that aren't on the list. The obvious way to do it is to find every weapon in the mod's weapon_data.csv file that has the SYSTEM tag, copy the weapon's ID and paste it in, right? But try doing that with a mod that has 30 or more SYSTEM weapons and you'll quickly realize what a pain in the ass that is, and that's without even considering that you likely have more than one mod you want to add. So, here's a much less tedious way to accomplish it, using the regex search function in VSC:
1. Find the mod you want to add in your mods folder, open it up, and go to data/weapons/weapon_data.csv
2. Open the file in VSC (not notepad++, not excel, if you don't have VSC, download it) and press ctrl+f to open the search box. Type "system" into the search box to highlight every instance of the word. If you want to add multiple mods at once, open all of their weapon data files at once, and just repeat the steps for each file. Sadly, I have not yet figured out a way to do multi-line edits across documents yet (some day).
3. Click on one of the highlighted instances and press ctrl+shift+L to select all of them at once. Press the end key, then hold shift and press the home key to highlight each line entirely, then press ctrl+c to copy them.
4. Open a new file. Paste what you just copied into the file and press ctrl+f to open the search box again. In the search box, click the regex search button (it looks like an asterisk with a box next to it) and input the following:
This should highlight the first bit of every line up to and including the first comma. Delete those bits, then go back to the search box, and delete the last comma. It should look like this:
5. Click one of the now-highlighted sections and press ctrl+shift+L to select them all, then press ctrl+x to cut them. Delete the rest of the document, then paste what you have. This should give you all the IDs of every weapon, without anything else in the line.
6. Press ctrl+A to select everything, then ctrl+shift+L to place a cursor on each line. This should put the cursors at the end of the line. Type ", then press home and type " then press home again, hold shift, press the end key, and press ctrl+c to copy.
7. Add what you copied to the WeaponSpecs list as previously described. You're done!
Just a note, if at any point you delete the stuff I mentioned from the search box, it might not let you use ctrl+shift+L to select multiple lines at once, so don't do that.
Also, keep in mind that not everything SHOULD be added. Any systems that are purely decorative should be deleted, and you'll have to use your best judgement for anything else.
Happy combatting, captains.
P.S., if you're curious about how regex works, all the parameters are explained on this page:
https://learn.microsoft.com/en-us/visualstudio/ide/using-regular-expressions-in-visual-studio?view=vs-2022