About this mod
This tool allows setting any mod-able values using a simple text file, allowing for customization while avoiding compatibility issues with other mods.
- Requirements
- Permissions and credits
- Changelogs
0.1
by adamjmac, Feb 2025
==================================
SUMMARY
-------
This tool create a new mod in place, within the game folder, which applies game data changes listed in text files to existing assets extracted from the base game or other installed mods.
This provides the ability to:
1. Create mods which are compatible with any other mod that uses the same assets.
2. Create and configure mods very easily by editing text files.
This should be run whenever any .pak or .patch files in the folder are changed.
Mod authors can now create new mods which affect common assets by distributing:
1. A .pak file containing assets to overwrite, such as models, textures, and sounds
2. A .patch file listing data changes to common assets, intended to be merged with other mods
INSTRUCTIONS
------------
Instructions:
1. Put all these files in the Paks folder alongside your other ".pak" mods.
2. Download, create, or modify ".patch" files in a text editor and put them in the folder.
3. Run "make_patch.exe".
A new mod "zzzzz_patch_P.pak" will be generated which contains all the referenced assets, extracted from the .pak with the highest load order, with values modified as defined in the .patch files.
If it doesn't work, run within a command line terminal (cmd) to see if there are any errors.
Background
----------
Currently, mods will completely overwrite any assets contained in other mods.
For example, two mods which independently add or modify different weapons can not be used at the same time. In order to ensure compatibility with popular existing mods, new mod authors have needed to create separate versions intended for every possible combination of common pre-existing mods.
This creates an exponentially increasing problem where every mod that affects common data tables (such as item, ammo, or weapon tables) doubles the number of possible configurations that future mod authors must manually support, or else they will be incompatible.
If any base level mod is updated, all of the other mods stacked on top would be overwriting common assets with an older version. Every mod author now would need to extract the newer version of that asset and update their own mods, to maintain compatibility.
This might be manageable while there are currently only a few combinations, especially if the base level mods are rarely updated, but it's a nightmare that does not scale.
I have attempted to address this problem by providing a means to apply changes to the highest priority version of an asset, regardless of what mod that comes from. This way, individual elements in large data tables can be changed without concern for what other mods may have installed.
This also provides an easy way for players to customize mods by simply editing a text file. No longer do we need 6 different versions of the same mod with the only difference being a single value.
Going forward, I hope that mod authors will create small ".patch" files which expose useful variables, so that gameplay can be customized with much greater flexibility, and with less effort required to maintain compatibility as new mods and updates are released.
Development Status
------------------
This is an initial, early release after only a few days of development. Currently it supports Int, Float, MinMaxFloat, and Vector types. I have tested with the following assets:
- DA_PlayerConfig (sprint, stamina, weight capacity, etc.)
- DA_GameConfig (timescale, tide period, etc.)
- DT_AmmoInfos (damage, velocity, armor piercing, etc.)
- DT_WeaponInfos (damage, recoil, fire rate, etc.)
As there are requests to support more data types, I will add more over time. It has hardly been tested, and I fully expect there to be issues which I will try to fix ASAP.
I hope to support creating new elements by first providing a "copy" instruction, so that an existing data block can be copied and renamed, and then modified after. In theory, it should be possible to add, remove, or modify any type supported by UAssetGUI, but it will will take time and effort to scale this up.
The core functionality is based on UAssetGUI's capability to convert assets to/from JSON, which is a format I can freely modify. THANK YOU to ChuckSharts for providing a working example of import/export within his Timescale Configuration tool (https://www.nexusmods.com/intotheradiusvr/mods/243), which demonstrated how repackaging mods was possible from the command line. repak.exe is also included and used to package the final .pak file. I did not create those tools, and I include them as they were distributed in Chuck's mod with the same license.
This concept can likely work for other games, but for now it specifically uses the ITR mapping file and I haven't tried working with any other game.
The program is written in Node.js. It is a framework for running Javascript console applications, similar to Python. I converted the script into an executable using this procedure:
https://nodejs.org/api/single-executable-applications.html
Creating .patch Files
---------------------
Each line is an instruction to modify a single element of a supported type. Multiple patch files are loaded in alphabetical order, and the instructions are processed line by line, in order. Changes which refer to the same element will overwrite each other as they are processed.
Each instruction starts with the path of the asset, followed by the steps through the JSON separated by spaces, with the final element being the value to set.
Int / Float (single number):
IntoTheRadius/Content/ITR/Configurations/Infos/DT_WeaponInfos 3 WeaponParameters AmmoDamage 45
MinMaxFloat (two numbers, designating a range):
IntoTheRadius/Content/ITR/Configurations/Infos/DT_WeaponInfos 3 RecoilParameters VerticalRecoil -8,-12
Vector (xyz coordinates):
IntoTheRadius/Content/ITR/Configurations/Infos/DT_WeaponInfos 3 RecoilParameters RecoilLocationOffset -5,-10,-10