Alternate download link on moddb.com:
Already available since early November 2020 on the “MOD Project” section of this site, I thought it could benefit from a bit of visibility in the “Utilities” section too. So here it goes:
What is this? How does it work?
The GD-DPS or “Grim Dawn Data Patching System”, consist of several .AHK and .BAT files that are designed to operate together. GD-DPS patching operations flows look something like this:
1 - Starting from a working copy of the game, a backup “source” is created. These source archives files, ARC and .ARZ, are then extracted each in their respective, separate folders.
2 - Scripts are then executed to “patch” the game databases, templates or resources contents. These patching scripts determine what is actually changed, or modded, in the game. Using AutoHotkey powerful regular expression evaluator, anything, from changing the attack sound of an item to completely recomputing the attributes bonus from a class mastery, can be done. Resources file too can be manipulated: Textures, Meshes, Conversations, Sound files, etc… Binary patching, by providing an offset from the start of the file and a data buffer, can be done to modify non text files.
3 - During the above process, nothing from the source backup is changed in any way whatsoever. This means that complete restoration of the original game files, or parts of it, can be done at a later time.
4 - Once all the patches are applied, the game archives files are then reconstructed, automatically, from the modified content.
5 - Finally, the game can be played in its new state, with or without additional MODs provided by the community.
How can I get started moding Grim Dawn using this system?
The easiest way would be to familiarize yourself with the way the games Templates, Databases and Resources work together. Trial and error or looking for information on the Grim Dawn official forum are a good ways to learn. Once you have a basic understanding of ARZ and ARC files, then you can start experimenting with GD-DPS.
Double-click on the Windows batch script file named “GD-DPS.bat” from a Windows explorer view. This will open a GD-DPS console window. From there, read the simple instructions provided. Of course, there is a moderate to steep learning curve associated with moding a game, any game. However, a lot can be learned about the intricacies of the GD-DPS by opening the various .BAT and .AHK files in a text editor and inspecting how different command operates. The core patching function of the game are designed with AutoHotkey high level language. DBR, the records that the game use to implement its data structures, are text file. They are, by default, encoded as ANSI with Unix style line endings. Since they are text files, they can be modified easily by a powerful search and replace algorithm known as “Regular Expression” or RegEx for short. GD-DPS comes with some simple functions that leverage RegEx to find, insert and modify DBR entries. Using AutoHotkey, very advanced patch can be scripted, for example, to read a DBR entry, perform arbitrarily complex calculation on its components and replace them with newly computed data.
Resources, sounds, textures, world “levels” to name just three, can also be manipulated. GD-DPS uses compact “Packages” to deliver, delete and/or replace any extracted resources. So, for example, say you would like to add more variety to and replace some of the guns sounds: The creation process is up to you, the moder. You can start with existing sounds or edit new ones with the audio software of your choice. Once you have the new “resources”, the sound files in our example, GD-DPS can handle the rest. First you create a “GD-DPS Package” using the aptly named command “Package.bat”. Simply put, you replace the games assets files that you want to change then you provide the “locations” of these files to “Package.bat” and it does the rest. Should you need to also remove some files from the game resources pool, post-extraction action, POSEXAC, can be programmed into the “package” to perform whatever needs to be done after insertion of any new files. Finally, to deliver that GD-DPS Package in a controlled (hopefully!) manner, there is a core function dedicated to that that can be implemented in an AutoHotkey, or AHK, script file.
Binary patching of a non text file is also possible. This works by providing the target file you want to modify as well as the offset, from the beginning of said file, where you want to overwrite the content with your own provided “array of data”, anything from 1 byte to the whole file length worth of bytes. Again, a core GD-DPS function handle this, both in pure binary form or in text string form. CNV conversation files are good candidate for this operation.
To conclude, GD-DPS can be seen as a tool set. Different tools perform different actions on the game files. Used together, they will allow you to deconstruct, patch records, add new ones, modify the game world, inject new resources or replace default ones and, finally, reconstruct the data into archives files that the game can use. Just like the default ones.
So, this is a “base game” moding system?
Yes. The way Crate designed the default tool set and mod system, creating “custom games” that can be loaded on top of the base game, as many problems. It is great for simple “add-on” type mods but cannot be used, as is, for more advanced moding; You need better tools for this. I believe the GD-DPS toolbox to provide these new, improved tools.