OpenConstructionSet 3.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package OpenConstructionSet --version 3.0.0                
NuGet\Install-Package OpenConstructionSet -Version 3.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OpenConstructionSet" Version="3.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OpenConstructionSet --version 3.0.0                
#r "nuget: OpenConstructionSet, 3.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install OpenConstructionSet as a Cake Addin
#addin nuget:?package=OpenConstructionSet&version=3.0.0

// Install OpenConstructionSet as a Cake Tool
#tool nuget:?package=OpenConstructionSet&version=3.0.0                

The Open Construction Set

The OCS is a modding SDK for Kenshi written in C#

It provides services for dealing with the various folders and data files used by the game. As well as providing a managed context for loading multiple mods for editing (Similar to FCS)

API Docs

A single cs file example patcher for SCAR's pathfinding fix can be found here.

Features

  • Load, edit and save the game's various data files.
  • Read and edit the enabled mods (Ticked in the launcher) and the load order.
  • Locate Steam and Gog installations of the game and their folders. Including Steam's Workshop content folder and the old save folder.
  • Discover the structure of mod and save folders as well as the files contained within.
  • Load multiple base and/or active mods into a ModDataContext for editing and saving.

Thanks

Massive shout out to SCARaw for his help throughout the project.

Introduction

Project Setup

Add the main nuget (https://www.nuget.org/packages/OpenConstructionSet/)

Optionally add the dependency injection nuget (https://www.nuget.org/packages/OpenConstructionSet.DependencyInjection/)

Using Dependency Injection

Once you have a reference to the dependency injection assembly simple add OCS to your services.

services.UseOpenContructionSet();

This will setup the IInstallationService and the IContextBuilder

Using Services directly

Both services can be contructed normally

var installationService = new InstallationService();
var contextBuilder = new ContextBuilder();

Services

  • IInstallationService - Provides functions for locating installations of the game.
  • IContextBuilder - Provides functions for building FCS like Mod Contexts. These allow multiple base and/or active mods to be loaded for editing.
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on OpenConstructionSet:

Package Downloads
OpenConstructionSet.DependencyInjection

The OCS is a modding SDK for Kenshi (https://lofigames.com/) written in C# It provides services for dealing with the various folders and data files used by the game. As well as providing a managed context for loading multiple mods for editing (Similar to FCS)

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
4.0.0 32 2/5/2025
3.0.1 1,244 2/16/2022
3.0.0 1,096 2/13/2022
2.2.0 2,337 11/29/2021
2.1.0 886 11/19/2021
2.0.0 862 11/2/2021
2.0.0-RC2 854 10/23/2021
2.0.0-RC1 738 10/18/2021