• 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.
Cool, be excited to hear if you figure anything out.

I have successfully changed movement rates before, the JSONs you want to modify are the movedefs in the /StreamingAssets/data/movement folder. Specifically these two lines once you open the movedef you want to edit:

"MaxWalkDistance" : XXX.X,
"MaxSprintDistance" : XXX.X,

All the other lines I have not touched and don't know what they do.

It doesn't appear that changing move speed in the chassisdefs does anything to move ranges in game, but rather sets the speed the animations play at (at least according to what I could google).

Oh yea, in the chassisdefs setting the "MaxJumpjets": X, variable does let you set how many jets a Mech can slap on. The rule of thumb is each equipped JJ gives one dot(hex) of max jump distance. Table:
https://docs.google.com/spreadsheet...hw2uCrEaoeN3siK6NSZpGkmPA/edit#gid=1384336201
 
I have looked through the Github files for ModTek, but nothing jumps out as showing how to actually use it with DLC content.
There is nothing past section "A Brief Primer on Developing ModTek Mods". You should not try force ModTek to replace files - just write correct "Manifest" section in your mod.json and reference mechdefs you are trying to mod by id
all ids can be found in VersionManifest.csv
for example mechdefs for FP and UW:
mechdef_javelin_JVN-10F
mechdef_javelin_JVN-10N
mechdef_raven_RVN-1X
mechdef_crab_BSC-27_fp_gladiator
mechdef_crab_CRB-27
mechdef_crab__fp_gladiator_BSC-27
mechdef_cyclops_CP-10-Q
mechdef_cyclops_CP-10-Z
mechdef_hatchetman_HCT-3F
mechdef_hatchetman_HCT-3X

you do not even need to have full json. You can write it only values you want to change, as mentioned in "Merging JSON" section.
 
OK... so I went ahead and did that testing and can confirm that advanced merges work just fine. (Thanks to @KMiSSioN for listing the mechdef IDs... I know how to find them myself, but it's nice that those following along have something to refer to and I didn't have to write it!)

@Delraith mentioning Jump Jets made me realize that's an extremely easy mod to verify, since you can go straight to the Skirmish Mech Bay and see the effect in the summary of the mech without even entering combat. So... I made sure I knew the correct format for the changes I wanted by trying them on a normal mech first... went with the classic Urbie. Once that was all kosher, I just switched the ID to the Javelin and (once I took care of a typo) it worked flawlessly.

So make a folder in your Mods directory with something similar to this (with obvious places you can change) as your mod.json:
Code:
{
    "Name": "TestingJJs",
    "Enabled": true,
    
    "Version": "1.0",

    "Author": "Ron Hatch",

    "DependsOn": [],
    "ConflictsWith": [],

    "Manifest": [
        { "Type": "AdvancedJSONMerge", "Path": "merges.json" }
    ]
}

Then make a merges.json file that has this in it:
Code:
{
    "TargetID": "chassisdef_javelin_JVN-10F",
    "Instructions": [
        {
            "JSONPath": "MaxJumpjets",
            "Action": "Replace",
            "Value": 8
        }
    ]
}

The filename for the merged changes doesn't matter... you just have to point to it in the mod.json. If you specify an entire directory, it will look for any JSON files within that directory. More complicated changes are, of course, possible... but are going to be more work. The ModTek instructions have basic examples to show what's possible.
 
@ronhatch and @KMiSSioN Thank you! This helps. So if I wanted to change the max jump jets on a Hatchetman, I could use an advanced JSON merge with this code to do so, even though the Hatchetman is inside an asset bundle? That is the sort of info I was looking for. Thank you! :)
 
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:

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

cyclopsQ.json looks like this:
code said:
{
"TargetID": "mechdef_cyclops_CP-10-Q",
"Instructions": [
{
"JSONPath": "InitialTonnage",
"Action": "Replace",
"Value": 35.2
}
]
}
 
Last edited:
Well crap, part of my problem might be that my version manifest does not have the mechdefs for my DLC (and yes, I own Flashpoint). gah

Maybe these mechs weren't listed in the version manifest until Urban Warfare? Idk, seems really weird. I've done plenty of file re-verifications through steam and when I search through the VersionManifest.csv there are still zero mechdef or chassisdef entries for any of the Flashpoint mechs
 
Last edited:
@ronhatch and @KMiSSioN Thank you! This helps. So if I wanted to change the max jump jets on a Hatchetman, I could use an advanced JSON merge with this code to do so, even though the Hatchetman is inside an asset bundle? That is the sort of info I was looking for. Thank you! :)
Yep. Just need the right ID... which can sometimes be a problem, as you can see in this next part...

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:

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

cyclopsQ.json looks like this:
I noticed after I did this that the IDs are no longer listed in the VersionManifest after all... not sure where they are now, but when I first tried the Javelin jump jet mod, I accidentally put in a dash where I was supposed to have an underscore (that's the kind of thing that can happen when you aren't copying directly). So not having the ID listed isn't a problem if you can guess the correct ID without seeing it listed. I'd try 10Q for the ID instead of 10-Q... so mechdef_cyclops_CP-10Q for the whole thing. If that doesn't work, we're going to have to figure out where the IDs are coming from now and look it up.
 
I use a Unity Assets Bundle Extractor to get at the files I want to modify... In theory it could do more, but I try to stay on the harder path... bloody morals at all that...

The proper ids and files are...

hatchet_HCT-3F
- movedef_
- mechdef_
- chassisdef_
hatchet_HCT-3X
- mechdef_
- chassisdef_
cyclops_CP-10-Z
- movedef_
- mechdef_
- chassisdef_
cyclops_CP-10-Q
- movedef_
- mechdef_
- chassisdef_
crab_CRB-27
- movedef_
- mechdef_
- chassisdef_

There are a few others as well... all flashpoint specific... not sure what the protocol should be for them...

Hope this helps.
 
Yea, I don't know what we're doing wrong but it still doesn't work.
I have tried ALL of the above IDs and each one still returns the same error where modtek says that the def doesn't exist.
 
We actually positive that modtek can mod bundled assets? I noticed that each asset file, flashpoint, urban warfare, contains its own CVS file and that the main 'version manifest' doesn't contain the mech/chassis/move def files, but does contain just about everything else... and I believe is referencing the packaged CVS file.

Assets/ContentPackSource/Flashpoint/data/chassis/Assets/ContentPackSource/Flashpoint/data/chassis/chassisdef_crab_CRB-27.json
Assets/ContentPackSource/Flashpoint/data/mech/Assets/ContentPackSource/Flashpoint/data/mech/mechdef_crab_CRB-27.json
Assets/ContentPackSource/Flashpoint/data/movement/Assets/ContentPackSource/Flashpoint/data/movement/movedef_crab_CRB-27.json

Those are an example of the data path that these files are hidden within... I extracted the flashpoint.cvs file and found the above perhaps it will help. It seems odd to me that it's doubling it's folder depth, but I'm not a programer.
 
Well, I'm trying with path-jitsu to try and touch these assets and sadly still coming up short.

When I put a mod JSON in the absurdly long file path above, it appears that modtek no longer "sees" it.

I am now 95% certain modtek can't modify bundled assets, that one person who popped in here and told me I wasn't understanding how modtek worked may be holding some secret but I doubt it.

Thanks @Mordray for offering decent suggestions <3
 
We actually positive that modtek can mod bundled assets? I noticed that each asset file, flashpoint, urban warfare, contains its own CVS file and that the main 'version manifest' doesn't contain the mech/chassis/move def files, but does contain just about everything else... and I believe is referencing the packaged CVS file.

Assets/ContentPackSource/Flashpoint/data/chassis/Assets/ContentPackSource/Flashpoint/data/chassis/chassisdef_crab_CRB-27.json
Assets/ContentPackSource/Flashpoint/data/mech/Assets/ContentPackSource/Flashpoint/data/mech/mechdef_crab_CRB-27.json
Assets/ContentPackSource/Flashpoint/data/movement/Assets/ContentPackSource/Flashpoint/data/movement/movedef_crab_CRB-27.json

Those are an example of the data path that these files are hidden within... I extracted the flashpoint.cvs file and found the above perhaps it will help. It seems odd to me that it's doubling it's folder depth, but I'm not a programer.
I was definitely able to mod the Javelin's Jump Jets to allow 8 with the files listed earlier in this thread. (Though I only verified by looking at the mech listing in the Skirmish Mech Bay... still, there was definitely a change there.) Anyone should be able to duplicate my results. FWIW, I'm currently running v1.6.

ModTek does NOT reference the full path, it only uses the ID.

I'm going to go through all of the mechs that don't have IDs listed in the main manifest now and see if I can get them to change.
 
Tested and confirmed IDs for:
chassisdef_crab_CRB-27
mechdef_crab_CRB-27
chassisdef_cyclops_CP-10-Q
mechdef_cyclops_CP-10-Q
mechdef_cyclops_CP-10-Z
chassisdef_hatchetman_HCT-3F
mechdef_hatchetman_HCT-3F
chassisdef_hatchetman_HCT-3X
mechdef_hatchetman_HCT-3X
chassisdef_javelin_JVN-10F
mechdef_javelin_JVN-10F
chassisdef_javelin_JVN-10N
mechdef_javelin_JVN-10N
chassisdef_raven_RVN-1X
mechdef_raven_RVN-1X

The chassisdef_cyclops_CP-10-Z ID did not work, which is particularly odd given that the corresponding mechdef was valid.

None of the movedefs worked (in all cases, ModTek threw an error that it could not resolve the ID). In many cases, when I checked the working chassisdef that was cached by ModTek, it listed one of these IDs as the MovementCapDefID. Specifically, these IDs were not found:
movedef_crab_CRB-27
movedef_cyclops_CP-10-Q
movedef_cyclops_CP-10-Z
movedef_hatchetman_HCT-3F
movedef_hatchetman_HCT-3X
movedef_javelin_JVN-10F
movedef_javelin_JVN-10N
movedef_raven_RVN-1X

Note that if you're making changes to your mod, but not changing the version number... you'll almost certainly need to delete your .modtek directory since it caches all the files it modifies.

In the screenshot below, you can see the results of the Crab test. It is listed as a stock mech, has zero head armor (my mechdef change), max 1 jump jet (my chassisdef change), and movement is NOT 10m/20m (my attempted movedef change). All of the changes worked correctly on the Atlas before I started trying bundled mechs.
Modded-Crab.png

Oh, and there's actually a good chance that those oddities with not seeing IDs that should be there will simply go away when official mod support comes in 1.8 next week. Definitely one of the tests I'm going to run when the new version drops.
 
Last edited:
Nice!

Note that if you're making changes to your mod, but not changing the version number... you'll almost certainly need to delete your .modtek directory since it caches all the files it modifies.

I've tried deleting my .modtek directory and that hasn't changed any of my luck.

Were all the edits that you confirmed with the these defIDs done via advanced JSON merges? I have tried carbon copying the example mod you put up ~8 posts ago and changing the chassisID to any of the flashpoint mechs and it still doesn't work for me and returns the exact same error:
Error: AdvancedJSONMerge: "TestingJJs\merges.json" could not resolve type for ID: chassisdef_crab_CRB-27. Skipping this merge

I wonder if my issues stem from me not having Urban Warfare because I can add ANY, and I repeat, ANY of the IDs from the base game using your "TestingJJs" or any of my mods and it works without a hitch.
 
Last edited:
Nice!



I've tried deleting my .modtek directory and that hasn't changed any of my luck.

Were all the edits that you confirmed with the these defIDs done via advanced JSON merges? I have tried carbon copying the example mod you put up ~8 posts ago and changing the chassisID to any of the flashpoint mechs and it still doesn't work for me and returns the exact same error:
Error: AdvancedJSONMerge: "TestingJJs\merges.json" could not resolve type for ID: chassisdef_crab_CRB-27. Skipping this merge

I wonder if my issues stem from me not having Urban Warfare because I can add ANY, and I repeat, ANY of the IDs from the base game using your "TestingJJs" or any of my mods and it works without a hitch.
Yeah, the jump jet changes I tested were all using the same file that I posted before, with the only change being that I replaced the 8 with a 1. Well, and I changed the TargetID for each mech to test in turn. The armor change was based on the following file:
Code:
{
    "TargetID": "mechdef_crab_CRB-27",
    "Instructions": [
        {
            "JSONPath": "Locations[?(@.Location == 'Head')]",
            "Action": "ObjectMerge",
            "Value": { "CurrentArmor": 0, "AssignedArmor": 0 }
        }
    ]
}
Not having Urban Warfare should only matter for the Raven. I guess since 1.7 changed the version of Unity, maybe there's some major change in the structure of the asset bundles that is interfering with this?

With some of the modding problems that I heard about in the early days of 1.7, I never did update from 1.6 and at this point I'm just going to wait for 1.8. It will all need to be re-tested then anyway, and hopefull it will all work for everyone with the new modding infrastructure. Oh, and I do recall hearing some mention of the fact that making the bundled mechs moddable in 1.8 was something that took a bit of extra work... which means it was specifically considered and should work with the official support (though how many hoops we have to jump through remains to be seen).
 
We actually positive that modtek can mod bundled assets?
Yes. It's how all the mods that are out there that make use of the DLC mechs are able to make modified versions of them. Otherwise, iirc, whenever the DLC 'mechs are referenced they are overridden by the dlc versions and not what the modder wants.
Not having Urban Warfare should only matter for the Raven. I guess since 1.7 changed the version of Unity, maybe there's some major change in the structure of the asset bundles that is interfering with this?
Pretty sure that even if there was a change in 1.7 to the structure, Modtek v0.7.3 is confirmed 1.7.* compatible and therefore would understand the 1.7 asset bundle structure.
 
Yes. It's how all the mods that are out there that make use of the DLC mechs are able to make modified versions of them. Otherwise, iirc, whenever the DLC 'mechs are referenced they are overridden by the dlc versions and not what the modder wants.
Pretty sure that even if there was a change in 1.7 to the structure, Modtek v0.7.3 is confirmed 1.7.* compatible and therefore would understand the 1.7 asset bundle structure.
... so if it's working what is the correct way to do this?
 
Pretty sure that even if there was a change in 1.7 to the structure, Modtek v0.7.3 is confirmed 1.7.* compatible and therefore would understand the 1.7 asset bundle structure.
I was thinking less along the lines of the underlying format, and more along the lines of where indexes got placed. Originally, the VersionManifest.csv file contained entries for everything in asset bundles, but we aren't seeing those entries now. So where does ModTek get the information about what IDs are active and what they point to?

If that changed in 1.7, it would explain why I'm able to use these simple mods and others aren't. And from what people have said on here, the default explanation of PEBKAC doesn't appear to apply. Regardless, it won't matter in a few days since official mod support is effectively a complete re-write of the code that allows modding.