Version: 0.4.20
Author: Destuur
Game: Kingdom Come: Deliverance 2
KCDUtils is a collection of Lua utilities designed to simplify modding in Kingdom Come: Deliverance 2.
It provides ready-to-use functions, helpers, and a consistent framework for creating Lua-based mods.
- Modular utility scripts organized under
Scripts/Mods/KCDUtils. - Core loader file:
kcdutils.lua. - Helper functions for common gameplay modifications, event handling, and data management.
- Fully structured mod folder with
mod.manifestfor seamless integration. - Namespaced under
KCDUtilsto prevent conflicts with other mods.
-
Download the latest release ZIP.
-
Extract the contents into your
Modsfolder:../KingdomComeDeliverance2/Mods/ -
Folder structure:
kcdutils/ Data/ kcdutils/ Scripts/ Mods/ kcdutils.lua KCDUtils/ (all utility Lua files) mod.manifest
- LuaDB is required only if you want to use database-related utilities. Players using mods depending on KCDUtils with DB functionality must also have LuaDB installed: LuaDB on Nexus Mods.
Important
Before using instantiated KCDUtils functions in your mod, you must register your mod with KCDUtils.RegisterMod().
This ensures that the DB, Logger, Config, and other utility tables are correctly instantiated and namespaced.
-
Set table at the top of your entry .lua file:
{{MODNAME_CLASS}} = {{MODNAME_CLASS}} or { Name = "{{MODNAME_CLASS}}" } -
Register mod right after, and before calling your first function to get instantiated utils:
{{MODNAME_CLASS}}.DB, {{MODNAME_CLASS}}.Logger = KCDUtils.RegisterMod({{MODNAME_CLASS}}) -
Explore the scripts in
KCDUtils/to see available helper functions.
- KCDUtils is standalone, no other dependencies required for general utilities.
- Future updates will include new utility functions and improvements.
This project is released under the MIT License. See the LICENSE file for details.
Please credit the author Destuur and KCDUtils framework when using it in your mods, for example on Nexus Mods.
