Modding guide for KCD
The features in this article are available in KCD version 1.9.5 and later.
Mods are loaded from the "Mods" folder in the game's root directory.
- In the STEAM version you can usually find it at:
- In the GOG version you can usually find it at:
If the Mods folder does NOT exist — create it.
To install a mod — move it into the “Mods” folder.
To uninstall a mod — delete it from the “Mods” folder. You can also temporarily disable a mod by using mod_order.txt.
In the Mods folder, each mod has its own subfolder, which replicates the game's directory structure, for example:
All files in a mod are optional; you only have to create the ones you wish to override / patch.
In the mod's root folder: (Mods\mod_name) you can create two special files:
All game data must be stored in .pak files. To make a .pak file, create a zip archive and rename the extension to .pak —.rar, .tar, .7z or other archive types are NOT supported. Most of the Data in the zipped file can be compressed, except videos, which must be stored without compression. In the mod's Data folder you can name your paks however you like. You do not have to mimic the game's pak names. Usually a single mod.pak or mod_name.pak will suffice. Paks have a maximal size of around 2GB. If your mod is larger, you can use multiple paks.
- Levels can be modded by creating pak files in the: "mod_name\Data\Levels\level_name\" folder.
- New levels can be added by creating level.pak in the: "mod_name\Data\Levels\new_level_name\" folder.
When modding localization files, the mod pak name must exactly match the pak name in the game's localization folder.
You can also add new languages by creating “new_language_name_xml.pak” and “new_language_name.pak” files in the mod's localization folder.
When adding a new language, you will have to correctly setand CVars.
If you want to override data from the Engine folder, you have to put your pak in the mod's “Data” folder.
With game versions 1.9.5 and later:
If you're making a mod that overrides a parameter file inside "Tables.pak" — it is now BEST PRACTICE to create mod-specific table files with individual rows — instead of overwriting the whole table.
Simply rename the .xml file to this format: “[Table]__[Mod Name].xml”.
- The original table’s name, followed by 2 underscores.
- Typed completely in lowercase mode.
- Mod name must match the name used in the mod’s respective mod.manifest,for example if the mod’s name appears in the mod manifest as: “This Is My Mod – Average Edition” your .xml file should be named:
- Replace any spaces in the name with underscores, and do not use parentheses.
If everything is correct, you will see the tables patched in the console window (opened by pressing the ` key once the main menu screen appears) when the game is loaded.
Pak loading order:
When a pak file is loaded, it overrides data in previously loaded paks.
Paks are loaded in this order:
Some of the early mods were named zzz_* to ensure that they are loaded last and override all other paks. As you can see, this is not necessary anymore, because paks in Mods\ are now loaded after all other paks.
Mod loading order:
Mods in Mods folder are loaded in alphabetical order by default. You can specify custom mod loading order by creating an optional mod_order.txt file in the Mods folder. For each line in mod_order.txt the game will try to load the mod from the specified folder.
The format of mod_order.txt is:
When the mod_order.txt file exists, it also functions as a whitelist: only the mods mentioned in it will be loaded. This can be used to disable a mod without deleting it, by simply commenting out that line.
For each installed mod the game will try to load the optional “mod.manifest” file in the mod's root. Below is an example of the format of a mod.manifest, from the mod: “Inventoried” by Silencer711:
The game checks that one of the entries in <kcd_version> matches with the game’s current version; (found in wh_sys_version in system.cfg). If no matching version is found, the mod will be disabled.
Since KCD version 1.3.4 you are able to use wildcards like:
The wildcard is implemented as a string comparison up until the "*" character, so the below attempts will not work as expected:
Another optional file in the mod's root is "mod.cfg". When present, it will be loaded after "system.cfg", but before "user.cfg", which means it overrides CVars in "system.cfg", but not in "user.cfg". You can use the "mod.cfg" in simple mods when all you want to do is set some CVars. The order in which "mod.cfg" files are loaded also depends mod load order.
The purpose of paks in Data\_fastload is to reduce disk access during level load. They contain a number of small files: various xml files (.mtl, .animevents, .bspace, .chrparams, .cdf...), smallest mipmaps of splitted dds files and cgf files without render geometry. At the beginning of level loading, all fastload paks are loaded in the memory. Since they are loaded after regular Data paks, they will be searched first, and the game doesn't have to access the disk. At the end of level loading, all fastload paks are unloaded from the memory and are closed.
Some of the early mods required copying the mod paks to both: Mods\ are loaded after the fastload paks.and folders to ensure that the mod properly overrides the game data. This is not necessary anymore, because paks in
A mod can have its own fastload paks in, but for small mods it is unnecessary. For large mods like texture packs with thousands of textures or total conversion mods with hundreds of new geometry creating fastload paks could be beneficial.
Textures and Images:
- https://forum.kingdomcomerpg.com/t/what-we-know-about-modding-so-far/38589 (nice overview of the various file types)
- Guide to Clothing and Armor Tables in Tables.pak
- Attachment System & Character Tool
- Cryengine Converter - convert Cryengine games into .dae and .obj
Kingdom Come Deliverance Modding Guides Tutorials