Repository navigation
KenshiLua v0.3.9-alpha
This release introduces cross-mod script loading via @ModName/path module syntax, an automated in-game test runner and coroutine test harness, exact C++ SDK enum path registration, and improvements to the data-driven Animal Husbandry example.
Downloads
KenshiLua v0.3.9-alpha.zip: the mod. Install it into yourKenshi/mods/directory.KenshiLua-LuaLS-Addon-v0.3.9-alpha.zip: editor definitions for the KenshiLua API. Optional.
Highlights
Cross-Mod Require & Script Loading
Mods can now require modules and load files from other active mods using the @ModName/path syntax in require, dofile, and loadfile:
local sharedLib = require("@OtherMod/lib/math_utils")Module caching is scoped per provider mod to prevent state leaks, and execution is properly sandboxed. Includes full LuaLS path resolution and type definitions.
Automated In-Game Testing Harness
Introduced tools/test/run_kenshi_tests.py, an automated test runner featuring transactional staging of mod assets, unattended Steam and GOG game launcher bypass, and automatic save bootstrapping. Paired with kltest, an in-game coroutine test runner that executes asynchronous test suites inside the engine and exports structured JSON test reports.
Added
- Exact SDK Enum Paths: Registered previously omitted Havok physics and NavMesh constants under their exact SDK C++ typenames and scopes (such as
hkResultEnumandNavMesh::...). Legacy truncated paths remain as compatibility aliases with advisory warnings. - Standardized Singleton Accessors: Refactored binding internals to use
getInstancefor userdata extraction andgetInstanceMethodfor Lua callbacks where engine classes define singleton methods. - Automated Test Suites: Bundled initial test suites covering harness self-verification, cross-mod script loading, world state smoke tests, and core binding integrity.
Fixed & Changed
- Animal Husbandry Example Improvements:
- Converted configuration to be fully data-driven by reading balance constants directly from FCS game data.
- Migrated from one-way breeding pairs to bidirectional shared mating groups.
- Moved hardcoded widget coordinates to a dedicated
.layoutMyGUI XML resource with scrollbar support for large product lists. - Switched button widget skins to
Kenshi_Button2to eliminate text clipping. - Added dynamic market valuation display in the animal sales window.
- Documentation & LuaLS Definitions: Synchronized all reference documents and definitions, maintaining 100.0% coverage across 550 registered binding classes.
Full Changelog: v0.3.8-alpha...v0.3.9-alpha