• 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.
... so if it's working what is the correct way to do this?
¯\_(ツ)_/¯ Well I don't know for certain about the advanced json merge function, but looking at for example JK_Variants many just do a wholesale "AddToDB" and call it good. If I'm wrong someone if free to correct me.

That said:
Yea! This is the stuff we wanted, thank you very much. :D

Ho dang, so trying to do this with cyclops and modtek returns an error:
Code:
{
"TargetID": "mechdef_cyclops_CP-10-Q",
"Instructions": [
{
"JSONPath": "InitialTonnage",
"Action": "Replace",
"Value": 35.2
}
]
}


Error: AdvancedJSONMerge: "(mod)\cyclopsQ.json" could not resolve type for ID: mechdef_cyclops_CP-10-Q. Skipping this merge

cyclopsQ.json looks like this:
This most likely is not working because you're trying to advanced merge "JSONPath": "InitialTonnage" to the mechdef_ and not the chassisdef_ as chassisdef_ appears to be the only place that JSONPath is called.
 
¯\_(ツ)_/¯ Well I don't know for certain about the advanced json merge function, but looking at for example JK_Variants many just do a wholesale "AddToDB" and call it good. If I'm wrong someone if free to correct me.

That said:
This most likely is not working because you're trying to advanced merge "JSONPath": "InitialTonnage" to the mechdef_ and not the chassisdef_ as chassisdef_ appears to be the only place that JSONPath is called.

*Shrug* I have tried every combo of advanced merge pointing to a directory or a file with either chassisdef or mechdef referenced and none of it worked, so idk. Regardless, I am just going to wait for 1.8 to see how that changes things and what I need to do to accomplish what I want, thanks for the advice though :)
 
Haven't done much testing on 1.8 yet, but an initial look shows that my test mod works for modifying the Atlas but not the Raven... looks like changing DLC mechs is still going to be awkward at best.
 
I have a question about the itemcollection files. I made half-ton incremental Ammo bins in a mod successfully, but I can't add them to the shop. Does this modtek function work for the .csv files, too?
 
I have a question about the itemcollection files. I made half-ton incremental Ammo bins in a mod successfully, but I can't add them to the shop. Does this modtek function work for the .csv files, too?
from the modtek github (from one of the issues):

The mod.json is a JSON file -- you can read more about JSON here. Keep in mind that JSON is just the structure, the names of the fields are ModTek specific.

In your manifest in your mod.json, you can include your .csv files that you would like to append. Lets say that I have a directory called itemCollections that has all of them in it, my mod.json would include something like:
Code:
"Manifest": [
  { "Type": "ItemCollectionDef", "Path": "itemCollections", "ShouldAppendText": true },
]
This "ShouldAppendText" flag is what tells ModTek that these are incomplete files that should simply be tacked on to the existing file. These files only include the lines that you want to appear at the end of the file and should include a newline at the end of the last line

My .csv file for adding a new item (in this case, a half load of MG ammo) would look like this:

Code:
Ammo_AmmunitionBox_Generic_MG_Half,AmmunitionBox,0,10
hope that helps.
 
Last edited:
It really does! Thanks!
But now I am running against the same wall as before in this thread. No matter how I do the json merging, the DLC mechs do not change.
To confirm you're trying to edit, and not make a new variant based on a DLC mech? New variants from what i've looked at can possibly work. As for edited variants, at this point, I think the problem has some of the same issues some of the more advanced mod content is running into. But don't quote me on that.
 
That's a shame. Yeah, I'm trying to edit the existing frames rather than just make new ones. The mods I've been working on include some weapon re-statting, and so a LOT of mechs are underweight as a result. Being able to give a once-over to the DLC chasses would be so good.
 
I still haven't been able to mod anything in the DLCs using the 1.8 built-in loader, but ModTek released a new version today and I was able to get things working using it. I grabbed the files I wanted to change from the official HBS GitHub DLC repository (link is the last one in the first post of the pinned "Mod Support Readme Documentation" thread in this forum). I kept the entire file, even the parts I didn't change, and used the following manifest entry in my mod.json:
Code:
    "Manifest": [
        { "Type": "MovementCapabilitiesDef", "Path": "movement", "AddToDB": true }
    ]

It's entirely possible that other ways of doing it would work, but I spent enough time finding ONE way that worked that I'll be spending time playing my modded game for a while before I start experimenting again. :)

Hopefully this will get some more people on track.
 
I still haven't been able to mod anything in the DLCs using the 1.8 built-in loader,

Just to add on to the current KB on modding DLC content (specifically HM DLC).

I was hitting a problem with LBX ammo bin, and wanted to utilize the HM DLC LBX ammo box but with a different ammo count. What I did was to add a modified ammo box def with merge (IIRC), and ran the mod.

What I got was no errors. And the ammo box still reflecting the HM ammo count... in Skirmish Mechbay, but only on Mechs that I had declared them in the Def (i.e., still not "buyable")

Why this is significant is that usually, whenever you run a merge option on an ID that doesn't exist in the memory space, you'd run into an error stating the ID doesn't exist. I ran into that earlier when I tried the same thing on Gauss ammo after I removed the ID from memory space. But this doesn't complain, so the LBX ammobox apparently exist in memory space.

But, because the ammo count remained the same as the HM DLC value, it seems likely that the order of precedence is Base declaration --> Mod declaration --> DLC declaration. In addition, DLC declaration will likely override earlier declaration. From a HBS perspective, this makes business sense.

To be honest, with the ability to declare separate ammo boxes and weapons, there really isn't a good reason to modify DLC weapons directly. Just spawn an alternative and work from there, is safer IMO.
 
Last edited: