Repository navigation
KenshiLua v0.3.10-alpha
Full Changelog: v0.3.9-alpha...v0.3.10-alpha
This release updates KenshiLua to KenshiLib 0.5.0, expanding binding coverage to 668 classes (+118 classes and 8,784 methods) with extensive AI, weather, animation, rendering, and item bindings. It introduces complete OIS input system enum tables, automated binding inventory and live-subsystem in-game test suites, enhanced LuaLS hover documentation and handle comparison contracts, and major UI and economic improvements to the Animal Husbandry example.
Downloads
KenshiLua v0.3.10-alpha.zip: the mod. Install it into yourKenshi/mods/directory.KenshiLua-LuaLS-Addon-v0.3.10-alpha.zip: editor definitions for the KenshiLua API. Optional.
Highlights
KenshiLib 0.5.0 Upgrade & Core Subsystem Bindings
Upgraded the embedded engine SDK to KenshiLib 0.5.0 and added bindings for 118 new engine classes, achieving 100.0% coverage across 668 registered classes, 8,784 methods, and 3,716 properties:
- AI Subsystem: Complete binding of
AITaskSytem,Blackboard,AIPackage,OrdersReceiver,WaitingStateAI,TargetInfo,TaskRequest, and AI contracts (Contract_DefendPlayerBase,Contract_HiredAlly,Contract_Timed,Contract_UntilExSlave, andContract_UntilOutOfDanger). - Weather & Environment: Bound
WeatherSystem,WeatherInstance,WeatherRegion,Season, and fog controls (WeatherSystem_FogValues,WeatherSystem_ZoneFog). - Animation & Combat: Bound
AnimationData,AnimationEvents,AnimationChoices,SingleAnimation,AnimationLayer,AnimsListsManager,CombatStatesubclasses,RagdollAnimation,GunClass, andRangedCombatClass. - Zone & Rendering: Bound
ZoneMapContent,ZoneMapContentOrderLoader,ZoneSmell,ZoneSmell_Smell,Renderer,KingOfRenderThread, and related nested classes. - Items & Subsystems: Completed
RobotLimbItembindings with correctedGearinheritance,SeveredLimbItem,Formation,TownList,Research,SharedKing,LocaleInfo, andLocaleManager.
OIS Input System Enums
Exposed Object-Oriented Input System (OIS) enum tables directly to Lua:
OIS.KeyCode: Full keyboard keycode mapping (e.g.OIS.KeyCode.KC_SPACE,OIS.KeyCode.KC_ESCAPE).OIS.MouseButtonID: Mouse button constants (MB_Left,MB_Right,MB_Middle, etc.).OIS.Type,OIS.ComponentType,OIS.Keyboard.Modifier,OIS.Keyboard.TextTranslationMode,OIS.OIS_ERROR,OIS.Interface.IType,OIS.InputManager.AddOnFactories,OIS.Effect.EForce,OIS.Effect.EType, andOIS.Effect.EDirection.
Automated Binding & Live Subsystem In-Game Test Suites
Significantly expanded the automated in-game test harness (kltest):
- Added
binding_inventory.lua, an automated test suite introspecting and validating runtime registration across all 668 bound classes and global tables. - Added
kenshilib_050.lua, verifying constructors, methods, and handle behaviors for new KenshiLib 0.5.0 classes. - Added
live_subsystems.lua, querying real-time game world state, weather systems, zone data, and combat subsystems inside a running game session.
Animal Husbandry Example Mod Overhaul
- Responsive UI Reflow: The husbandry interface now adapts to arbitrary resolutions and aspect ratios, restraining growth above 1080p, scaling cleanly from minimum resolutions, and featuring an engine-styled portrait frame.
- Modal Input & Dialogue Handling: Added modal input capture to prevent background clicks during livestock sales, with automatic dismissal when a new conversation starts.
- Economic Rebalance: Added
sales.resaleMultiplier(default0.50), applying Kenshi's standard 50% vendor resale penalty to player-bred animal sales. - Content Expansion: Added new icons, new harvestable animal products (fur, wool, hair, horn, teeth, ganglion), and corrected sex enum mappings (
0 = both,1 = male,2 = female).
Added
- Enum & Constant Additions: Exposed
itemType.LUA_SCRIPTwith integer constant documentation. - Container Enhancements: Added numerical indexing for Ogre unordered maps and sets, and automatic pointer-object wrapping for pointer-valued map entries.
- Handle Comparison Contracts: Updated
hand:operator_eqandhand:operator_netype definitions to accepthand | RootObjectBase | boolean, matching C++ overload semantics. - IDE Documentation Workflow: Added description candidate import tools preserving reviewed metadata and grounding hover text directly in SDK comments.
- CI Version Tagging: Added automated GitHub Actions workflow to tag releases on version bump commits to
main.
Fixed & Changed
- Engine Null Safety: Guarded
AnimationClass:getEvents()to return empty tables when the underlying engine pointer is null, preventing crashes on unloaded or incomplete animation states. - Type Assertion Errors: Improved
checkObjecterror messages to name the specific expected C++ type instead of generic argument failures. - Inheritance Hierarchy Correction: Corrected
RobotLimbIteminheritance to derive fromGearrather than directly fromItem. - IntelliSense STL Compatibility: Guarded
CampaignDatastruct size and member offset assertions under#ifndef __INTELLISENSE__to eliminate false front-end compiler errors under modern Visual Studio STL layouts. - Test Harness Reliability: Improved unattended Steam process discovery when executable paths are protected, and ensured clean game shutdown via
os.exitafter suite execution. - Generator Deduplication: Fixed generator alias resolution for template containers and deduplicated
AITaskSytem.orderedGoalsregistration. - Cross-Platform Test Fixtures: Normalized Windows and POSIX URIs in fixture tests and excluded binary assets from workspace scans.