SkillAgentSearch skills...

KenshiLib

Reconstruction of game structures and methods for Kenshi

Install / Use

/learn @KenshiReclaimer/KenshiLib
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

MOVED

This repo has been moved to: https://github.com/BFrizzleFoShizzle/KenshiLib


KenshiLib

KenshiLib is a library that reconstructs Kenshi's structures, exporting a version-independent API for accessing variables and calling and hooking methods.

KenshiLib is released under the GPLv3, please be aware that this generally means KenshiLib plugins must also be released under the GPLv3. KenshiLib also contains 3rd-party components with additional licenses.

Developing RE_Kenshi/KenshiLib plugins

Example KenshiLib plugins can be found here.

The easiest way to set up standard plugin dependencies is to use the KenshiLib_Examples dependencies repo, which comes with all required KenshiLib includes + precompiled libs for KenshiLib/Ogre/Boost/Etc.

The steps for setting up a new KenshiLib plugin:
Set the compiler toolchain to Visual Studio 2010.
Add KenshiLib's Include dir to your includes.
Add Boost 1.60.0 includes.
Add KenshiLib + OgreMain .lib files to the linker input (OgreMain .lib is in the KenshiLib repo, KenshiLib .lib is included in KenshiLib releases).

Plugin Best-practices

DO use KenshiLib's built-in function hooking system, it is designed to handle multiple plugins hooking the same function.
DON'T use 3rd-party function hooking/detouring libraries as these can cause issues when multiple plugins hook the same function using different libraries.
DON'T access the UI from non-UI threads. Most MyGUI functions are NOT thread-safe, this will cause race conditions that will intermittently crash the game.
If you are exporting functions for other plugins to use, it is wise to make your plugin a Preload Plugin (doccumentation coming) so that it is loaded before other plugins.

Compiling

Requires Visual Studio 2019 or newer and the Visual C++ 2010 x64 compilers. KenshiLib MUST be compiled using the Visual Studio 2010 compiler. Copies of Visual Studio 2010 can be found on the Wayback Machine.

Image

Also requires boost 1.60.0 and the multihook version of MinHook.

Open the project and compile in RELEASE mode. DEBUG is currently broken.

Related Skills

View on GitHub
GitHub Stars27
CategoryDevelopment
Updated4d ago
Forks11

Languages

C++

Security Score

90/100

Audited on Apr 6, 2026

No findings