Modsmith by fireundubh
Modsmith is an automated framework for building and packaging redistributable mods.
Modsmith allows you to focus on your projects, improves your productivity, and reduces the time and effort required to update your mods after major game patches.
- Automatically packages Kingdom Come: Deliverance v1.3+ mods for distribution
- Merges modified XML tables with vanilla XML tables at package time
- Generates zero-byte TBL files as needed at package time
Inside the project folder (e.g.,
E:\projects\kingdomcome\More Perks), there should be a Data folder and/or a Localization folder. Modsmith also supports Data-only mods and Localization-only mods (e.g., translations.)
mod.manifestfile should be placed in the root of the project path.
The hierarchy for each folder should imitate the hierarchy needed for your mod (e.g.,
Localization\french_xml.) If you've created mods for Kingdom Come: Deliverance before, this process should already be familiar to you.
Ensure that your XML files contain ONLY the rows your mod adds or changes. With Modsmith, it is no longer necessary to work on massive XML files to create mods. When your mod is packaged, Modsmith will generate new XML files in the Build folder that combine your merged rows with the rows you didn't alter.
Run Modsmith with the appropriate command-line arguments.
Before running Modsmith, you will need to edit
modsmith.conf. Don't worry! There is only one setting.
# configuration file for modsmith [Game] Path = C:\Program Files (x86)\Steam\steamapps\common\KingdomComeDeliverance
Change the value of
Path to wherever you installed Kingdom Come: Deliverance. It must be the game's root path!
There are three command-line arguments:
||This is the absolute path to the root of your project (e.g.,
||This is the file name of the data PAK file (e.g.,
||This is the file name of the redistributable ZIP file (e.g.,
Other Modsmith projects include:
I'll present this example as though you've never used a command-line program before:
cd "C:\Modsmith" modsmith -p "E:\projects\kingdomcome\More Perks" -d "More Perks.pak" -r "More Perks.zip"
If you have multiple editions of a mod:
cd "C:\Modsmith" modsmith -p "E:\projects\kingdomcome\Easy Lockpicking\Cheat" -d "Easy Lockpicking - Cheat.pak" -r "Easy Lockpicking - Cheat.zip"
Modsmith uses a relative path to
modsmith.conf, so if you use an IDE like PyCharm or a .bat file, set the working directory to wherever you installed Modsmith. That's why we're
cd'ing into the Modsmith install folder in these examples.
Modsmith will generate folders and files in the Build folder in your project root.
What do you see?
There is a
Buildfolder, and there is a
More Perkssubfolder in the
Builddirectory. This subfolder is named after the mod, using the file name (without the extension) passed to Modsmith with the
Inside this folder are the
Localizationfolders, which replicate the structure of the project.
There is a PAK file in the
Datafolder, using the file name (without the extension) passed to Modsmith with the
-dargument. This PAK file contains all the files in
Libs\Tables\rpgfolder, there are TBL and XML files. The zero-byte TBL files were generated automatically. Currently, you need these for XML mods to work. These XML files are the product of the packaging process. Compare them with your own in the project
Datafolder and you'll see that while your XML files contain only your modified rows, the XML files in the
Buildfolder contain both your modified rows and all other rows.
There is a PAK file in the
Localizationfolder. Note that Modsmith can generate localization XML files and PAKs for multiple languages simultaneously.
Finally, there is a redistributable ZIP file in the root of the
Buildpath. This ZIP contains only the files necessary for players to install your mod (i.e., folders and PAKs.) You can immediately upload this ZIP to the Nexus, or extract the ZIP to your own Mods folder for testing.