Skip to content

Releases

KenshiLua v0.3.11-alpha

Choose a tag to compare

@Genpretz Genpretz released this 10 Nov 04:33

Full Changelog: v0.3.10-alpha...v0.3.11-alpha

Will Update Later

KenshiLua v0.3.10-alpha

Choose a tag to compare

@Genpretz Genpretz released this 30 Oct 15:58

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 your Kenshi/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, and Contract_UntilOutOfDanger).
  • Weather & Environment: Bound WeatherSystem, WeatherInstance, WeatherRegion, Season, and fog controls (WeatherSystem_FogValues, WeatherSystem_ZoneFog).
  • Animation & Combat: Bound AnimationData, AnimationEvents, AnimationChoices, SingleAnimation, AnimationLayer, AnimsListsManager, CombatState subclasses, RagdollAnimation, GunClass, and RangedCombatClass.
  • Zone & Rendering: Bound ZoneMapContent, ZoneMapContentOrderLoader, ZoneSmell, ZoneSmell_Smell, Renderer, KingOfRenderThread, and related nested classes.
  • Items & Subsystems: Completed RobotLimbItem bindings with corrected Gear inheritance, SeveredLimbItem, Formation, TownList, Research, SharedKing, LocaleInfo, and LocaleManager.

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, and OIS.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 (default 0.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_SCRIPT with 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_eq and hand:operator_ne type definitions to accept hand | 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 checkObject error messages to name the specific expected C++ type instead of generic argument failures.
  • Inheritance Hierarchy Correction: Corrected RobotLimbItem inheritance to derive from Gear rather than directly from Item.
  • IntelliSense STL Compatibility: Guarded CampaignData struct 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.exit after suite execution.
  • Generator Deduplication: Fixed generator alias resolution for template containers and deduplicated AITaskSytem.orderedGoals registration.
  • Cross-Platform Test Fixtures: Normalized Windows and POSIX URIs in fixture tests and excluded binary assets from workspace scans.

KenshiLua v0.3.9-alpha

Choose a tag to compare

@Genpretz Genpretz released this 17 Oct 10:39

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 your Kenshi/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 hkResultEnum and NavMesh::...). Legacy truncated paths remain as compatibility aliases with advisory warnings.
  • Standardized Singleton Accessors: Refactored binding internals to use getInstance for userdata extraction and getInstanceMethod for 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 .layout MyGUI XML resource with scrollbar support for large product lists.
    • Switched button widget skins to Kenshi_Button2 to 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

KenshiLua v0.3.8-alpha

Choose a tag to compare

@Genpretz Genpretz released this 17 Oct 10:36

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 your Kenshi/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 global LayerManager) and MyGUI.ILayer to control UI layers, widget z-ordering, and layer enumerations.
  • MyGUI Enumerators: Added Gui:getEnumerator(), widget:getEnumerator(), and LayerManager:getEnumerator() implementing MyGUI's next() and current() iterators.
  • Frame Event: Added MyGUI::Gui::eventFrameStart event fired at the start of each frame (including while paused).
  • CharacterStatsWindow Setters: Added writable setters for CharacterStatsWindow.character and all eight *Datapanel fields.
  • Diagnostic Logging: Added executable SHA-256 hash logging at startup when log_level=debug or debug_logging=true is enabled.
  • LuaLS IDE Documentation: Added rich hover descriptions for the KenshiLua table, engine events, global accessors, hand handles, 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.reloadScript now 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 pushWidget and checkWidget<T>, correcting missing argument documentation and return types in BindingsReference.md.
  • Event Deprecation Notice: Deprecated redundant KenshiLua.on and KenshiLua.off aliases with advisory log warnings directing scripts to canonical Events.on and Events.off. Removed the unused KenshiLua.Events table.
  • 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

KenshiLua v0.3.7-alpha

Choose a tag to compare

@Genpretz Genpretz released this 09 Oct 05:06

Full Changelog: v0.3.6-alpha...v0.3.7-alpha

This release adds the first Lua Language Server (LuaLS) addon for KenshiLua, a new GUI binding, and fixes for container and list bindings.

Downloads

  • KenshiLua v0.3.7-alpha.zip: the mod. Install it as before.
  • KenshiLua-LuaLS-Addon-v0.3.7-alpha.zip: editor definitions for the KenshiLua API. Optional; see below.

New: LuaLS addon

With the addon, your editor completes KenshiLua globals, classes, methods, enums and event names. It also shows their types and descriptions, and warns about wrong argument types and unchecked nil values. The definitions are generated from KenshiLua's bindings, so they cover the whole registered API (though not everything has descriptions written for them). If you encounter anything that seems like an error please create an Issue or PR.


Screenshot 2026-10-08 221943

The addon is for your editor only. Kenshi never loads it, so do not put it in a mod's scripts folder.

Setup (VS Code):

  1. Install the Lua extension by sumneko.
  2. Extract the addon zip to a folder outside your mods, for example C:/KenshiModding/LuaLS. It contains one folder, kenshilua.
  3. In your mod's root folder (the folder you open in VS Code), create .luarc.json:
{
  "runtime.version": "LuaJIT",
  "workspace.library": [
    "C:/KenshiModding/LuaLS/kenshilua/library"
  ]
}

Open a script and hover over getGameWorld. You should see its type instead of Undefined global.
To use the addon in every mod, add "Lua.workspace.userThirdParty": ["C:/KenshiModding/LuaLS"] to your VS Code user settings. Then enable kenshilua in each mod with Lua: Open Addon Manager. The addon's README.md covers both setups.

Use the addon zip from the same release as your KenshiLua DLL, and replace the kenshilua folder when you upgrade. Definitions from a different release can hide members that exist or list members that don't.

Added

  • ForgottenGUI:createDatapanel, in two forms:

    • createDatapanel(name, win, scrolls) creates a datapanel inside any MyGUI widget.
    • createDatapanel(top, left, width, height, scrolls, layer, window) creates one at screen-relative coordinates on a layer.

    Both return the DatapanelGUI, or nil on failure. Destroy it with ForgottenGUI:destroy before destroying its parent widget.

  • DialogActionEnum values that were missing: CHOOSE_SLAVES_SELLING, CHOOSE_SLAVES_BUYING, CHOOSE_PRISONER_BAIL, CHOOSE_CONSCRIPTION, CHOOSE_RECRUITING, CHOOSE_HIRING_CONTRACT, SURRENDER_NON_HUMANS and CHOOSE_ANIMALS_BUYING.

Fixed

  • lektor.new and ogre_unordered_set.new now accept an element type without *, as documented. For example, lektor.new("Character") previously failed with "unsupported or unknown type".
  • Methods that read or return certain lists no longer crash. Affected methods include ToolTip.setup_stringpairs, DatapanelGUI.setLines, RootObject.getGUIDataCategories, the CharStats tooltip methods, GameData.storeHandleList, GameData.getAllFromList, and the list methods on ForgottenGUI, FactionWarMgr, FarmBatch, FarmBuilding, Faction and CraftingBuilding.
  • Behavior change: UseableStuff.occupantSelection now returns a boolean. It previously returned a handle by mistake. Update scripts that relied on the handle.

KenshiLua v0.3.6-alpha

Choose a tag to compare

@Genpretz Genpretz released this 07 Oct 10:46

KenshiLua v0.3.5-alpha

Choose a tag to compare

@Genpretz Genpretz released this 04 Oct 09:55

Overview

KenshiLua v0.3.5-alpha expands the Lua scripting API with arithmetic and comparison operator overloading, new engine lifecycle constructor events, MyGUI widget factories, and broader gameplay class method bindings.

This release also introduces a dedicated backward compatibility layer in src/Compatibility/LegacyCompat.cpp. This layer addresses breaking changes introduced in recent updates regarding event names, enum tables, and MyGUI APIs, ensuring existing scripts continue running while providing clear paths for migration.


Backward Compatibility & API Migration (LegacyCompat.cpp)

Recent releases introduced changes to event registration, enum naming conventions, and MyGUI widget access. To prevent breaking existing scripts, src/Compatibility/LegacyCompat.cpp automatically bridges legacy script invocations to their modern equivalents at runtime.

How Existing Scripts Are Affected

  • Non-Breaking Execution: Older scripts run without crashing or requiring immediate code edits. Lookups for legacy event names, deprecated enum tables, and older MyGUI convenience helpers are intercepted and resolved transparently.
  • Advisory Deprecation Logs: Accessing legacy interfaces emits an advisory warning in kenshilua.log detailing the deprecated call and the exact replacement syntax.
  • Migration Timeline: These backward compatibility shims are temporary. Script authors should update their code to canonical APIs, as legacy shims will be phased out in subsequent releases.

1. Event Subscription Migration (registerHandler to Events.on)

Event handling across engine systems has been unified under the global Events table with standard on and off syntax, replacing global registration functions and redundant aliases.

  • Legacy Functions:
    • registerHandler(eventName, handler) (global function)
    • unregisterHandler(handlerId) (global function)
  • Canonical API:
    • Events.on(eventName, handler): Registers an event listener and returns an integer handlerId.
    • Events.off(handlerId): Unregisters the listener by its ID.
  • Event Naming Migration:
    • Legacy shorthand: "onCharacterDeath", "onKeyDown", "onPlayerRecruit", "onBuildingConstructed".
    • Canonical scoped symbols: "Character::declareDead", "InputHandler::keyDownEvent", "PlayerInterface::recruit", "Building::_CONSTRUCTOR".
  • Backward Compatibility: Global registerHandler and unregisterHandler remain available as compatibility wrappers. Deprecated shorthand strings are intercepted by LegacyCompat::ResolveEventName as a fallback, translating them to their canonical C++ symbols and logging an advisory warning.
-- ============================================================
-- Engine Events: Before & After
-- ============================================================

-- Legacy Syntax:
local handlerId = registerHandler("onKeyDown", function(inputHandler, keyCode)
    print("Key pressed:", keyCode)
end)
unregisterHandler(handlerId)

-- Modern Canonical Syntax:
local handlerId = Events.on("InputHandler::keyDownEvent", function(inputHandler, keyCode)
    print("Key pressed:", keyCode)
end)
Events.off(handlerId)

2. MyGUI Widget Callback Migration (registerCallback to widget:on)

UI event handling has undergone the exact same standardization: all widget listener management is now unified on widget:on and widget:off.

  • Legacy Methods:
    • widget:registerCallback(eventType, handler) (deprecated)
  • Canonical API:
    • widget:on(eventType, handler): Attaches an event listener to the widget and returns an integer callbackId.
    • widget:off(idOrEvent): Detaches the listener by its integer callback ID, or detaches all listeners for a given event type string (e.g. widget:off("eventMouseButtonClick")).
  • Canonical Event Names (1:1 with C++ Delegate Members):
    • Widget event names are now strictly 1:1 with MyGUI's C++ delegate member variables (e.g. "eventMouseButtonClick", "eventEditTextChange", "eventWindowButtonPressed", "eventKeyButtonPressed").
  • Backward Compatibility:
    • All legacy shorthand names and aliases (such as "OnClick", "click", "MouseButtonClick", "change", "OnTextChanged", "keyDown") are deprecated and automatically resolved via LegacyCompat::ResolveWidgetEventName, logging an advisory warning in kenshilua.log that points to the canonical event* name.
-- ============================================================
-- MyGUI Widget Events: Before & After
-- ============================================================

-- Legacy Syntax (deprecated, emits log warning):
local button = window:createWidget("Button", "Button", 10, 10, 100, 30, "Align", "MyButton")
local callbackId = button:registerCallback("OnClick", function(sender)
    print("Button clicked!")
end)

-- Modern Canonical Syntax:
local button = window:createWidget("Button", "Button", 10, 10, 100, 30, "Align", "MyButton")
local callbackId = button:on("eventMouseButtonClick", function(sender)
    print("Button clicked!")
end)

-- Detach listener when no longer needed:
button:off(callbackId)
-- Or detach all click listeners on that widget:
button:off("eventMouseButtonClick")

3. Enum Scoping and Constant Naming

Enums have been aligned 1:1 with literal C++ enum types and scoped constants declared in the KenshiLib SDK.

  • Table Names: Scoped under their declaring classes or full C++ enum typenames (e.g. CrimeEnum, CharacterTypeEnum, Character.CharMessage, BuildingPlacementGroundType.Enum).
  • Member Constants: Retain original C++ prefixes to prevent collisions (e.g. CRIME_MURDER instead of MURDER, OT_CIVILIAN instead of CIVILIAN, BF_RESEARCH instead of RESEARCH).
  • Backward Compatibility: LegacyCompat::InstallEnumCompatibility generates legacy global tables and installs __index metatable forwarders on canonical tables. Legacy accesses resolve to canonical values and log a one-time migration warning.
-- ============================================================
-- Enum Scoping: Before & After
-- ============================================================

-- Legacy (deprecated, emits log warning):
local crime = Crime.MURDER
local charType = CharacterType.CIVILIAN
local func = BuildingFunction.RESEARCH

-- Canonical API:
local crime = CrimeEnum.CRIME_MURDER
local charType = CharacterTypeEnum.OT_CIVILIAN
local func = BuildingFunction.BF_RESEARCH

4. MyGUI Helpers & Widget Properties

MyGUI bindings have been refactored to align with the underlying MyGUI C++ class structure and ForgottenGUI widget creation systems.

  • Global Helpers: Restored legacy global convenience functions on the MyGUI table (MyGUI.resetKeyFocus(), MyGUI.setPointerVisible(), MyGUI.isResourceExist(), MyGUI.loadResource(), and legacy parameter layouts for MyGUI.createWidget()).
  • Widget Properties: Metatable bridges restore property accessors (setFontName, setEditReadOnly, setMinSize, setImageTexture, setPositionReal, setCoordReal, attachToWidget, detachFromWidget) directly across widget instances.

5. Why These Changes Were Made

During the alpha phase, KenshiLua's API has transitioned from experimental, handwritten shorthands to strict 1:1 parity with Kenshi's underlying C++ SDK (KenshiLib) and MyGUI:

  • Predictability & 1:1 SDK Parity: Replacing ad-hoc event names ("onKeyDown") and widget callbacks ("OnClick") with literal C++ symbols ("InputHandler::keyDownEvent", "eventMouseButtonClick") eliminates guesswork. Developers can inspect KenshiLib headers and reference docs directly to know the exact event and delegate names.
  • Collision Prevention & Disambiguation: Scoping enum tables under their true C++ types and retaining SDK prefixes prevents constant collisions and eliminates subtle naming bugs. In legacy tables where prefixes and underscores were stripped, distinct engine values collided into fragile casing differences—such as legacy Stats.FARMING (STAT_FARMING skill) versus Stats.Farming (_Farming work-rate multiplier). Canonical identifiers like StatsEnumerated.STAT_FARMINGand StatsEnumerated._Farming guarantee 1:1 clarity with KenshiLib and eliminate global namespace clutter.
  • Unified Event Lifecycle: Standardizing both engine hooks and widget delegates on symmetrical on and off methods (Events.on/Events.off and widget:on/widget:off) replaces fragmented registration helpers with a single consistent API pattern.
  • Clear Terminology (register vs. on): The previous use of "register" (registerHandler, widget:registerCallback) created confusion. In the Lua C API and throughout KenshiLua's own codebase, "register" exclusively refers to exposing C++ classes, metatables, and functions to the Lua runtime (e.g. luaL_register, registerBinding, registerConstructor). Overloading the word "register" to also mean dynamic event subscription conflated engine setup with runtime script logic. Transitioning to Events.on / Events.off establishes a clear distinction between binding infrastructure and event subscription, while adopting the standard .on() / .off() listener pattern widely used across Node.js (EventEmitter), modern Lua event libraries, and event-driven frameworks.

New Features

  • Operator Overloads & Math Bindings: Implemented arithmetic (+, -, *, /, unary -), comparison (<, <=, >, >=), equality (==), and explicit operator_bool across 40+ core math and engine classes (including NxVec3, hkVector4f, TimeOfDay, hand, InstanceID, and CPerfTimer).
  • Engine Lifecycle Hooks: Added _CONSTRUCTOR event hooks across major subsystems (GameData, Tasker, GameWorld, `FactionManag...
Read more

KenshiLua v0.3.4-alpha

Choose a tag to compare

@Genpretz Genpretz released this 28 Sep 02:39

Overview

Major refactoring of event and callback systems, with MyGUI backwards compatibility now integrated natively into C++.

Features

Events Refactoring

  • Refactored hook and callback registrations to use standard C++ symbols (e.g., Character::declareDead, InputHandler::keyDownEvent)
  • Implemented legacy compatability subsystem to dynamically resolve 220+ legacy event aliases with deprecation warnings
  • Added Events.on/off/register/unregister and Widget:on/off namespaces in Lua

Enums

  • Use C++ enum names for all enums and removed all shortened/synthetic enum member aliases
  • Registered nested class enums directly under parent class namespaces

Containers

  • Added script-owned container factories: lektor, ogre_unordered_set, and ogre_unordered_map
  • Implemented Lua-managed object lifecycles via pushObjectOwnedCustom
  • Added extractContainerTypeName for flexible argument resolution
  • Modularized container registration in RegisterBindings.cpp

MyGUI Backwards Compatibility

  • Embedded MyGUI backwards compatibility natively in C++, polyfilling global helpers and 34 monolithic widget property fallbacks
  • Purged obsolete lib/mygui/compat.lua file

Bug Fixes

  • Fixed return value handling for YesNoMaybe types in bindings
  • Removed invalid deallocation in lektor storage for getAllAttackers()
  • Restored underscore prefixes to CharStats properties to prevent name collisions with methods
  • Fixed FactionBinding::getAllActiveSquads return value (was returning 0 instead of 1)

Documentation

  • Updated CallbacksReference.md with C++ event symbol names
  • Updated MyGUIReference.md with Widget:on/off callback attachment syntax
  • Added ContainersReference.md documentation
  • Updated doc generator scripts to match new event and callback structures

Full Changelog: v0.3.3-alpha...v0.3.4-alpha

KenshiLua v0.3.3-alpha

Choose a tag to compare

@Genpretz Genpretz released this 10 Sep 01:02

Full Changelog: v0.3.2-alpha...v0.3.3-alpha

Bug Fixes

  • Fixed BoostUnorderedMapBinding<std::string, float> registration.
    • Corrected an incorrect binding name in DialogueBinding.
    • Resolves freezes or infinite loops when calling pairs() on GameData.fdata.
    • Fixes toTable() failures such as table overflow.
  • Fixed Lua ownership of MedicalSystem::HealthPartStatus values to prevent Lua from incorrectly deleting game-owned objects.
  • Fixed Lua ownership of hand values returned from lektor containers and callbacks.
  • Renamed and reorganized the HealthPartStatus binding to follow nested binding naming conventions.
  • Updated the MyGUI character inspector example to use the current MyGUI binding API.

Compatibility

  • Added mygui.compat, a compatibility module for scripts using the older MyGUI binding API. Legacy scripts can restore compatibility with:
require("mygui.compat")

Documentation

  • Regenerated BindingsReference.md with the latest binding names and signatures.

Other Changes

  • Updated the KenshiLua console font in KenshiLua_Console.layout
  • Updated project and binding registration files to reflect the reorganized bindings.

KenshiLua v0.3.2-alpha

Choose a tag to compare

@Genpretz Genpretz released this 07 Sep 12:54