Repository navigation
KenshiLua v0.3.8-alpha
This release brings major improvements to UI scripting with first-class MyGUI object returns, over 250 new engine GUI event hooks, MyGUI layer and enumerator bindings, a native C++ extension API, and rich LuaLS hover documentation. It also bundles a complete Animal Husbandry example mod.
Downloads
KenshiLua v0.3.8-alpha.zip: the mod. Install it into yourKenshi/mods/directory.KenshiLua-LuaLS-Addon-v0.3.8-alpha.zip: editor definitions for the KenshiLua API. Optional.
Highlights
Typed MyGUI Widget Returns
127 Kenshi engine methods and fields that previously returned MyGUI widgets as raw pointers (lightuserdata) now return typed MyGUI widget instances (e.g. BaseLayout.mMainWidget, DatapanelGUI.scrollView, DataPanelLine widgets, and InventorySectionGUI:getWidget()). Scripts can now directly manipulate and inspect widgets returned by engine calls, and add custom widgets to existing game windows via wraps::BaseLayout::initialise.
Expanded GUI Engine Events
Added over 250 engine hooks across GUI subsystems (GUIWindow, CharacterStatsWindow, DatapanelGUI, DataPanelLine, and ForgottenGUI). These events enable subscribing to window lifecycle events, button clicks, line callbacks, layout initialization, and destructors.
Versioned C++ Extension API
Native mod authors can now build binary extensions for KenshiLua via include/KenshiLua.h. Third-party C++ DLLs can access the KenshiLua runtime, retrieve the lua_State*, and register native modules.
Animal Husbandry Example Mod
Bundled a full example mod demonstrating custom MyGUI interfaces, dialogue integration, animal breeding, harvesting, and livestock trading.
Added
- MyGUI LayerManager & ILayer: Bound
MyGUI.LayerManager(and globalLayerManager) andMyGUI.ILayerto control UI layers, widget z-ordering, and layer enumerations. - MyGUI Enumerators: Added
Gui:getEnumerator(),widget:getEnumerator(), andLayerManager:getEnumerator()implementing MyGUI'snext()andcurrent()iterators. - Frame Event: Added
MyGUI::Gui::eventFrameStartevent fired at the start of each frame (including while paused). - CharacterStatsWindow Setters: Added writable setters for
CharacterStatsWindow.characterand all eight*Datapanelfields. - Diagnostic Logging: Added executable SHA-256 hash logging at startup when
log_level=debugordebug_logging=trueis enabled. - LuaLS IDE Documentation: Added rich hover descriptions for the
KenshiLuatable, engine events, global accessors,handhandles, and container methods (indexers, snapshot iterators,toTable()). Expanded class inheritance hierarchy in definitions from 56 to 154 classes.
Fixed & Changed
- Script Reloading Path Matching:
KenshiLua.reloadScriptnow matches script paths via filesystem equivalence rather than exact string matching, fixing reload failures caused by mixed path separators. - Binding Reference Docs: Fixed doc generator handling of
pushWidgetandcheckWidget<T>, correcting missing argument documentation and return types inBindingsReference.md. - Event Deprecation Notice: Deprecated redundant
KenshiLua.onandKenshiLua.offaliases with advisory log warnings directing scripts to canonicalEvents.onandEvents.off. Removed the unusedKenshiLua.Eventstable. - Removed Unbound Mutex Accessors: Removed raw mutex accessors that were not safely callable from Lua.
Full Changelog: v0.3.7-alpha...v0.3.8-alpha