• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Darian DelFord

Private
16 Badges
Apr 27, 2018
14
0
  • Pillars of Eternity
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Stellaris - Path to Destruction bundle
  • Knights of Honor
  • BATTLETECH
  • Age of Wonders III
  • BATTLETECH - Initiate of the Order
  • Stellaris: Apocalypse
  • BATTLETECH - Beta Backer
  • BATTLETECH - Backer
  • BATTLETECH: Flashpoint
  • Stellaris: Megacorp
  • BATTLETECH: Season pass
  • BATTLETECH: Heavy Metal
  • Stellaris: Federations
Hello;

I am a returning player and I had all this figured out when the game released however it is now not working and I assume the process for doing what I am trying has changed. I have searched a few places but nothing seems to work so here I am.

In essence.....

I am attempting to modify the default LRM's and SRM's and have those modified items appear in the default shops.

I have made backups so I am not worried about it being overwritten or lost. I found originally it was easier this way than trying to make custom json files.

The only thing editted in the files are rarity, price. The file name as remained the same.

I have added the custom weapons to the shopdef_Weapons_base_0 and the shopdef_Weapons_base_1 json files however even after going to a new system it is not loading them.

Is there now a new trick to getting them to load up?

Thanks for any help.
 
The game doesn't seem to use the shopdef files anymore. Or at least not like it used to.

Instead you should head over to the itemCollections folder and look for files called itemCollection_Weapons_'name'.csv, where 'name' is the type of weapon list. For example, there are base, common, uncommon and rare weapon lists, as well as others sorted by manufacturer or faction.

If you are looking to add LRMs and SRMs I'd suggestion having a look at the base/common/uncommon/rare lists first, depending on the quality of your modified weapons.

As for loot, I am not a hundred percent sure, but I think (some of) these lists are also used to generate post-mission loot. Can't confirm that yet, but they definitely work for shops.

EDIT: Oh, and if you aren't using BTML/ModTek to load your mod (but you should!) you may also need to add your added files to the game's VersionManifest.csv. Otherwise the game won't load your files.
 
Last edited:
The game doesn't seem to use the shopdef files anymore. Or at least not like it used to.

Instead you should head over to the itemCollections folder and look for files called itemCollection_Weapons_'name'.csv, where 'name' is the type of weapon list. For example, there are base, common, uncommon and rare weapon lists, as well as others sorted by manufacturer or faction.

If you are looking to add LRMs and SRMs I'd suggestion having a look at the base/common/uncommon/rare lists first, depending on the quality of your modified weapons.

As for loot, I am not a hundred percent sure, but I think (some of) these lists are also used to generate post-mission loot. Can't confirm that yet, but they definitely work for shops.

EDIT: Oh, and if you aren't using BTML/ModTek to load your mod (but you should!) you may also need to add your added files to the game's VersionManifest.csv. Otherwise the game won't load your files.


Thank you for the reply. to be safe I experimented and changed the default Weapon_LRM_LRM5_3-Zeus Rarity and price, and then placed it into the ItemCollection_Components_base file. I added in the 0 and 10 that were identical to the other comps in that .csv file. Saved and loaded a game, jumped to another system and nada.

Just to clarify I am not adding any new files. I am merely changing the zeus 3 variants of the LRM's to be purchasable in a default store. Do I need a special program to be able to save the IC_Collection_base file. Or will a simple edit and then save and close do?
 
Thank you for the reply. to be safe I experimented and changed the default Weapon_LRM_LRM5_3-Zeus Rarity and price, and then placed it into the ItemCollection_Components_base file. I added in the 0 and 10 that were identical to the other comps in that .csv file. Saved and loaded a game, jumped to another system and nada.

That's the wrong file. You need to add the weapon to the base weapons file, I'm not sure what happens if you place weapon type equipment into the components file. The file you want to look at is itemCollection_Weapons_base.csv, and after you're done editing it should look something like this:

Code:
itemCollection_Weapons_base,,,
Weapon_Autocannon_AC2_0-STOCK,Weapon,1,3
Weapon_Autocannon_AC5_0-STOCK,Weapon,1,2
Weapon_Autocannon_AC10_0-STOCK,Weapon,1,1
Weapon_Autocannon_AC20_0-STOCK,Weapon,1,1
Weapon_Flamer_Flamer_0-STOCK,Weapon,1,3
Weapon_Laser_LargeLaser_0-STOCK,Weapon,1,1
Weapon_Laser_MediumLaser_0-STOCK,Weapon,1,2
Weapon_Laser_SmallLaser_0-STOCK,Weapon,1,3
Weapon_LRM_LRM5_0-STOCK,Weapon,1,3
Weapon_LRM_LRM10_0-STOCK,Weapon,1,2
Weapon_LRM_LRM15_0-STOCK,Weapon,1,1
Weapon_LRM_LRM20_0-STOCK,Weapon,1,1
Weapon_MachineGun_MachineGun_0-STOCK,Weapon,1,3
Weapon_PPC_PPC_0-STOCK,Weapon,1,1
Weapon_SRM_SRM2_0-STOCK,Weapon,1,3
Weapon_SRM_SRM4_0-STOCK,Weapon,1,2
Weapon_SRM_SRM6_0-STOCK,Weapon,1,1
Weapon_LRM_LRM5_3-Zeus,Weapon,0,10

I am not completely sure about the numbers, but I think the first one is the rarity (0 meaning it will always show up, like heat sinks for example) and the second one the potential quantity (10 being an infinite number available).

Hope that helps!
 
  • 1Like
Reactions:
That's the wrong file. You need to add the weapon to the base weapons file, I'm not sure what happens if you place weapon type equipment into the components file. The file you want to look at is itemCollection_Weapons_base.csv, and after you're done editing it should look something like this:

Code:
itemCollection_Weapons_base,,,
Weapon_Autocannon_AC2_0-STOCK,Weapon,1,3
Weapon_Autocannon_AC5_0-STOCK,Weapon,1,2
Weapon_Autocannon_AC10_0-STOCK,Weapon,1,1
Weapon_Autocannon_AC20_0-STOCK,Weapon,1,1
Weapon_Flamer_Flamer_0-STOCK,Weapon,1,3
Weapon_Laser_LargeLaser_0-STOCK,Weapon,1,1
Weapon_Laser_MediumLaser_0-STOCK,Weapon,1,2
Weapon_Laser_SmallLaser_0-STOCK,Weapon,1,3
Weapon_LRM_LRM5_0-STOCK,Weapon,1,3
Weapon_LRM_LRM10_0-STOCK,Weapon,1,2
Weapon_LRM_LRM15_0-STOCK,Weapon,1,1
Weapon_LRM_LRM20_0-STOCK,Weapon,1,1
Weapon_MachineGun_MachineGun_0-STOCK,Weapon,1,3
Weapon_PPC_PPC_0-STOCK,Weapon,1,1
Weapon_SRM_SRM2_0-STOCK,Weapon,1,3
Weapon_SRM_SRM4_0-STOCK,Weapon,1,2
Weapon_SRM_SRM6_0-STOCK,Weapon,1,1
Weapon_LRM_LRM5_3-Zeus,Weapon,0,10

I am not completely sure about the numbers, but I think the first one is the rarity (0 meaning it will always show up, like heat sinks for example) and the second one the potential quantity (10 being an infinite number available).

Hope that helps!


OK I figured it out..... I was missing a comma in there.

Now hopefully last question, how do I edit the amount of items for the shops? Currently it looks like the base is at 5. Meaning only 5 total individual items show up including ammo. I am sure there is a way, I just can not seem to find the file.

Once again thanks for the assistance.
 
OK I figured it out..... I was missing a comma in there.

Now hopefully last question, how do I edit the amount of items for the shops? Currently it looks like the base is at 5. Meaning only 5 total individual items show up including ammo. I am sure there is a way, I just can not seem to find the file.

Once again thanks for the assistance.

Been looking for any references about that, and the only thing I could find so far is located in simGameConstants/SimGameConstants.json:

Code:
   "Finances" : { 
   ...
        "DefaultShopMaxInventory" : 50,
        "DefaultShopMaxSpecials" : 2,
...
}

Not sure how exactly these values are used to calculate the actual number of items, though.


By the way, regarding missing commas (or extra periods, etc.) I highly recommend using a json validator on top of a formatting-highlighting editor like Notepad++. Here's a json validator that greatly helped me earlier today:

https://jsonformatter.curiousconcept.com/
 
I am not completely sure about the numbers, but I think the first one is the rarity (0 meaning it will always show up, like heat sinks for example) and the second one the potential quantity (10 being an infinite number available).
I believe the first number is actually the quantity (0 being unlimited), and the second number is the weighting for the random number generator (higher numbers have more chances to show up). I think in the special case of all items listing a quantity of 0, they are instead all handed out... but that's getting into areas I need to poke around and test more.
 
I believe the first number is actually the quantity (0 being unlimited), and the second number is the weighting for the random number generator (higher numbers have more chances to show up). I think in the special case of all items listing a quantity of 0, they are instead all handed out... but that's getting into areas I need to poke around and test more.

That makes a lot of sense. Thanks a lot for clarifying that. :)
 
So, anyone know if you can set it to a random quantity? I'd like there to be a good chance of being double heatsinks on sldf planet tags, but not the same quantity.
 
So, anyone know if you can set it to a random quantity? I'd like there to be a good chance of being double heatsinks on sldf planet tags, but not the same quantity.
The file format does not appear to have a direct option for random quantities... but you could try adding multiple lines for the same item, each with a different quantity.