BUILD / Stage 03

Build your first plugin

Compile the official HelloWorld example unchanged, install it, and prove that it loaded in the debug log.

On this page

Choose a section or expose the complete guide.

Official procedureHelloWorld instructions
01

Start with the official KenshiLib example solution and dependencies.

Obtain the examples

Clone the official KenshiLib Examples and KenshiLib Examples dependencies repositories. Complete the environment guide before opening the solution.

Use the upstream HelloWorld project unchanged for the first pass. Its purpose is to prove the build, installation path, loader, and log output before your own code adds another variable.

02

Compile the smallest example with the supported Release and x64 settings.

Build HelloWorld

Open the official example solution, select the Release / x64 configuration, then build the HelloWorld project. Do not switch to the known-broken Debug configuration.

Confirm that the build produces the HelloWorld DLL under the project’s x64/Release output. A compiler error at this stage should be resolved against the environment and dependency instructions before changing the example source.

03

Place the example files where Kenshi can load them.

Install the plugin

Create a mods/HelloWorld directory inside the Kenshi installation. Copy the HelloWorld example’s project folder content as described upstream, then place the built DLL from x64/Release into that mod directory.

Enable HelloWorld in the Kenshi launcher or mod list. Keep other experimental native plugins disabled for this first verification.

04

Use the expected HelloWorld message to prove that native code loaded.

Verify log output

Launch Kenshi and inspect the RE_Kenshi debug log. A successful load emits the HelloWorld example’s expected “Hello World!” message.

That message proves the complete path: compatible environment, successful native build, correct installation location, enabled mod, and plugin loading. Preserve this working state before advancing to a larger example.