packages/library/KenshiModGen
k

KenshiModGen

v0.1.1library

No description provided.

0 stars1 forksUnknownupdated 2 months ago
Open repo

Kenshi Mod Generator

Kenshi Mod Generator (kmg) creates ready-to-build Visual Studio C++ projects for KenshiLib plugins loaded through RE_Kenshi.

Generated projects are configured for the Visual Studio C++ v100 toolset and Release|x64.

Download

Download the latest prebuilt kmg.exe from the Releases page.

Put kmg.exe somewhere on your PATH, or run it from the folder where you downloaded it.

Building from source is optional and requires Odin. See Build from source.

Requirements

To generate and build a KenshiLib plugin project, you need:

  • Visual Studio C++ v100 toolset support
  • KenshiLib headers and libraries
  • Boost 1.60.0 headers and libraries
  • RE_Kenshi installed for loading the plugin in Kenshi

The easiest way to get KenshiLib and Boost dependencies is the KenshiLib_Examples_deps repository.

If you use KenshiLib_Examples_deps, clone it instead of downloading it as a .zip. Some files are stored through Git LFS, and a ZIP download will contain pointer files instead of the actual files.

Quick start

Create config.json:

kmg init

Validate your setup:

kmg check

Create a new plugin project:

kmg new MyMod

Open the generated .sln in Visual Studio, or any other IDE that supports .sln / .vcxproj files, then build Release|x64.

Configuration

kmg init asks for:

output_projects_dir  - where generated projects should be created
kenshi_lib_dir       - folder containing KenshiLib Include/ and Libraries/
boost_root_dir       - Boost 1.60.0 root folder

boost_root_dir should contain both:

boost/
stage/lib/

If you cloned KenshiLib_Examples_deps and ran its setup script, it may have created environment variables. kmg init will detect and offer those paths. Supported variables are:

KENSHILIB_DIR
KENSHILIB_DEPS_DIR
BOOST_ROOT
BOOST_INCLUDE_PATH

Accepted paths are written directly into config.json. Generated projects do not depend on those environment variables being present later.

Run kmg check after editing config.json or moving dependency folders.

Commands

kmg init          Create config.json
kmg check         Validate config and dependencies
kmg new <name>    Create a new KenshiLib plugin project
kmg help          Show help (also -h and --help)

Generated project

kmg new MyMod creates:

MyMod/
  MyMod.sln
  MyMod.vcxproj
  MyMod.vcxproj.filters
  README.md
  src/MyMod.cpp
  bin/MyMod/
    RE_Kenshi.json
    MyMod.mod

Generated projects use the Visual Studio C++ v100 toolset, include only Release|x64, and set WindowsTargetPlatformVersion to 10.0.

Add new .cpp and .h files through your IDE so the .vcxproj and .vcxproj.filters files are updated automatically.

Build from source

Building kmg from source requires Odin.

This project was built and tested with:

version dev-2025-07:861fa4ab6

Build with:

odin build src -out:kmg.exe
Package Info
Version
v0.1.1
License
Unknown
Author
@Casper4041
Type
library
Forks
1
Created
2 months ago
Updated
2 months ago
Health
maintained
has releases
has readme
has license
Activity
last 56 weeks