

- Hbs battletech save game editor mod#
- Hbs battletech save game editor Patch#
- Hbs battletech save game editor mods#
- Hbs battletech save game editor code#
What happens when BattleTech loads the JSON is that ModTek intercepts it and "merges" your values onto what was loaded in mod load order. Save the file and your mod is now complete.

Our resulting "partial" JSON file looks something like this: they're not nested in anything), we can simply delete everything except for those entries and edit them to have our values. Since we only want to change these five things and they're all in the first level (i.e. We're looking for five values, AttackPreFireDuration, AttackAfterFireDelay, AttackAfterFireDuration, AttackAfterCompletionDuration and audioFadeDuration which control the things that we want to change. The AudioConstants.json file is pretty big and contains a lot of stuff - I find that the collapsing blocks in my editor help close out things from the file that I don't care about.
Hbs battletech save game editor code#
Then we'll open that file with our favorite text editor (I love Visual Studio Code with the JSON linter!). So we'll just copy the existing file over to our mod folder in the path BATTLETECH/Mods/EliminateAudioDelays/StreamingAssets/data/constants/AudioConstants.json. Additionally, you should not use the StreamingAssets folder for new files, just ones like AudioConstants.json that already exist. Everything in this mirror of the existing files will be loaded without specifying it in the mod.json manifest, if it's in the same place with the same name. Since the file that we want to modify already exists in the game at the path BattleTech_Data/StreamingAssets/data/constants/AudioConstants.json, we'll simply use ModTek's implicit StreamingAssets mirror folder.

"Description": "Get rid of those delays! ", EliminateAudioDelays, making simple changes to an existing JSON fileĪs described in the mod.json article, we'll setup ours to look like this: There is also the game log located at BATTLETECH/BattleTech_Data/output_log.txt that can tell you if something broke in the game. Note: The log file at the path BATTLETECH/Mods/.modtek/ModTek.log is very helpful for figuring out if something has worked or not. Much more in-depth documentation for that is here. Finally we'll add new variants of an existing chassis.įor all of the examples, we will first need to write a mod.json file for ModTek to read. After that, we'll build a mod that changes a hardpoint on a mech chassis. First, we'll make a simple mod that changes the StreamingAssets/data/constants/AudioConstants.json file as suggested by Alec Meer at RockPaperShotgun based on community findings. Uninstalling your mod or updating it is as simple as deleting the existing folder and/or replacing it.ĭeveloping a JSON mod for ModTek is fairly straightforward and in this article/guide, we'll build three different mods. Instead of manually editing existing game files or replacing them with the ones that you provide, they can simply drag and drop your mod folder into the /BATTLETECH/Mods/ directory and ModTek will take care of the rest, both by adding new JSON files into the manifest and by merging JSON that matches existing files onto the game JSON.
Hbs battletech save game editor mods#
ModTek makes mods that change JSON values or add new JSON files far, far better for the end-user. ModTek tries to automatically fix missing commas.
Hbs battletech save game editor Patch#
Before you read any of this, you should know that if HBS' base JSON is invalid (excepting for their comments that they pull out during runtime, and trailing commas, which are ignored), ModTek cannot patch it.
