• 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.

7star

Private
Feb 20, 2019
15
4
Hello all,

I've been trying to create an updated version of a mod like the TTHalfAmmmo one, which had been usable prior to patch 1.3.

I'm having trouble getting it to work though, and have gotten it to function only in part. Using TTHalfAmmo as a base, I instead created a itemCollection_ammo_all.cvs for injection, along with AmmunitionBoxes based on the existing JK_Variants MG half-ton AmmunitionBox json.

After disabling JK_VariantsCampaign for testing purposes and merging the new itemCollection file and AmmunitionBoxes using my own mod, the MG Half ammo continues to function as expected in shops. However, the others (LRM, SRM, and ACs) are not showing up in their Half-ton form. I've tried a number of things and worked together for a short time with Colobos to try to resolve the issue, to no avail thus far. Prior to speaking to Colobos I had gotten the LRM-half ton ammo box to show up in shop, but then when I tried to apply the final change to all of them it broke again, and now only the MG-half has been viewable or purchasable in shops, regardless of what I try.

I will post the code from one of the AmmunitionBoxes, the mod.json, and the itemCollection file for reference when I get home from work later. Until then, let me know any thoughts, pointers, or if anyone has a working mod for this functionality (adding half-ton ammo to shops.)
 
You can check XLRP, it has half-ton ammo bins for all regular types of ammo which are also available in stores. (If copying my files you may want to remove the custom feature with ExplosionDamagePerAmmo though, since this requires MechEngineer to work.) The ammo bins are located in XLRP\XLRPnewAmmo.

XLRP\StreamingAssets\data\itemCollections\itemCollection_Ammo_all.csv is the file that contains the information for the stores, and all of my half-ton ammo shows up in stores.

You can take what you need and throw the rest out, it should work. :)
 
When you add a new ammo bin it should automatically show up in the Skirmish/Mech Bay/Mech Lab.
Changes to itemCollections require a brand new Campaign/Career Mode to show up.
Code:
itemCollection_Ammo_all          
Ammo_AmmunitionBox_Generic_AC2    AmmunitionBox    0    10
Ammo_AmmunitionBox_Generic_AC5    AmmunitionBox    0    10
Ammo_AmmunitionBox_Generic_AC10    AmmunitionBox    0    10
Ammo_AmmunitionBox_Generic_AC20    AmmunitionBox    0    10
Ammo_AmmunitionBox_Generic_SRM    AmmunitionBox    0    10
Ammo_AmmunitionBox_Generic_LRM    AmmunitionBox    0    10
Ammo_AmmunitionBox_Generic_MG    AmmunitionBox    0    10
Ammo_AmmunitionBox_Generic_SRM_Inferno    AmmunitionBox    0    10
Ammo_AmmunitionBox_Halfton_AC10    AmmunitionBox    0    10
Ammo_AmmunitionBox_Halfton_AC2    AmmunitionBox    0    10
Ammo_AmmunitionBox_Halfton_AC20    AmmunitionBox    0    10
Ammo_AmmunitionBox_Halfton_AC5    AmmunitionBox    0    10
Ammo_AmmunitionBox_Halfton_LRM    AmmunitionBox    0    10
Ammo_AmmunitionBox_Halfton_MG    AmmunitionBox    0    10
Ammo_AmmunitionBox_Halfton_SRM    AmmunitionBox    0    10
Ammo_AmmunitionBox_Halfton_SRM_Inferno    AmmunitionBox    0    10
Ammo_AmmunitionBox_Quarterton_MG    AmmunitionBox    0    10
 
When you add a new ammo bin it should automatically show up in the Skirmish/Mech Bay/Mech Lab.
Changes to itemCollections require a brand new Campaign/Career Mode to show up.

That is not correct. Whenever I keep adding things to my itemCollections - or even add completely new ItemCollections - all I have to do is change systems for the new stuff to show up. Starting a new campaign or career mode every time something is added is not required.
 
@XTRMNTR2K
I’m starting a new Career Mode right now, is there a way to edit all the itemCollections files so that changes show up in the random Start system at once, other than restarting? I'm going on a file by file basis to see if different changes show up in different factions.
 
@XTRMNTR2K
I’m starting a new Career Mode right now, is there a way to edit all the itemCollections files so that changes show up in the random Start system at once, other than restarting? I'm going on a file by file basis to see if different changes show up in different factions.

I'm afraid not. When you enter a system (like at game start), the game generates the items in the store based on the files at the time. If you load the save at a later time, it will still have the same items because they were already generated before. From what I understand, the only way to force the game to generate new items based on your current files is traveling to a different system or starting a new career.
 
So done more tinkering, and here is where I am currently with the attached mod.

MG H-Ammo works, and the 'Mechs from JK_VariantsCampaign correctly use the AmmoBox injected by my mod since I matched the filename and "ID" tag within the json. I also injected a custom weapon into the shops with weight 10 to check if that worked by using itemCollection_Weapons_base, and the item appeared and was purchasable, so everything else seems to be functional so far.

Take a look at my attached files and let me know if anyone has any ideas. Thanks.

PS.
I downloaded XLRP and tried that briefly, but nothing appeared in shops.
 

Attachments

  • WeaponDiversity3025.zip
    230,1 KB · Views: 25
Take a look at my attached files and let me know if anyone has any ideas. Thanks.

Glad you could get it to work!

I had a quick look at the files. If you intend to overwrite or modify existing vanilla files you can simply put these files in your StreamingAssets\data folder. For example you don't need to define your own itemCollectionDef in mod.json if you only intend to modify existing files, like itemCollection_Ammo_all. Instead you could just place it in StreamingAssets\data\itemCollections and it will be loaded by default since you are recreating the vanilla folder structure.

PS.
I downloaded XLRP and tried that briefly, but nothing appeared in shops.

Do you have MechEngineer installed? If not, XLRP won't load at all. Also keep in mind you would need to travel to another system in order generate a new list of store items after activating the mod. An easy way to check if the mod has loaded correctly (aside from the absence of an error message when entering the main menu!) is checking the Skirmish mechbay, since there should be quite a few new variants, and pretty much all of them containing some of the * weapons.
 
I still have not been able to get the Half-ton items into the shops. I should have been clearer, sorry.

Yes, I'm not using ME and understand that, so I copied your jsons and itemCollections file from XLRP and tested them in my mod, but had no additional results.

As it stands, I still only have halfs tons of MG ammo functioning. I originally had the itemCollection bit in StreamingAssets/data within the mod, but during testing Colobos recommended trying it the way you see it in the zip above: in an itemcollectiondef folder with a manifest entry.

Let me know if you have any suggestions to try. I'm going to try putting ammo in the itemCollection_weapon_base to see what happens there. Will report findings.
 
Maybe we should look at this as a 2 step problem, step 1 get the game to recognize your files and step 2 add those files to the campaign.

Step 1:
Are the files showing up in the Skirmish/Mech Bay/Mech Lab?
I removed the "component_type_lostech" tag from my gauss ammo for it to show up in Skirmish.
Did you play a quick 1 mech vs 1 mech with a half-ton ammo and the game loaded as normal?
Did you delete the Modtek cache after you added your files and before you launched the game?

Step 2:
I’m using itemCollection_Ammo_all.csv in StreamingAssets\data\itemCollections.
Did you travel to a new planet or start a new campaign then checked the shops?
I seem to recall after 1.3 came out, that a bug was reported on some forum, where all the files that are added to itemCollections don’t always show up unless you go into Skirmish first and load the Mech Lab, then launch Campaign/Career Mode for new items to show back up. I guess I should test that myself in 1.4.
 
Thanks for the tips, Hopalong.

So apparently it is working. I kinda gave up and just started playing a campaign, and in the 2nd starsystem suddenly I see all the half-tons in the shop, not only the MG Half.

I was originally testing each time by launching a NEW career, and sometimes double-checking by flying to a new system in said new career. It hadn't been working there. I didn't really change anything, not related to ammo at least so maybe it was working all along.

However, even after worknig in my current campaign, it still does NOT show up in a new career (not in the first system anyway).

Strange behavior.