Skip to content
kromster80 edited this page Sep 27, 2026 · 1 revision

Preface

KP Alpha 13 wip has mod engine in place, but it has been tested and checked only for mapobjects. Other areas may work, but there's no guarantee or proper design for them yet.

The game has a working game mod example - mods\GeometryMapObjects and a working map mod example - \mapsdev\MapWithMods\mods\ModWithBoats. They can be referred to in case of any uncertainties.

Knights Province mods come in 3 flavors:

  • global game mods that can modify whole can in some way
  • campaign mods that will affect all the campaign maps (yet untested, but planned for)
  • mission mods that will affect just one mission

Every time the structure is the same - a mods folder where each mod lives in his own folder.

Mod structure:

mods have to have a certain structure:

  • mapobjects\ folder with map objects assets (other folders for other assets will be allowed for later)
  • text\ folder with texts for the mod localization
  • modinfo.xml description of the mod for the game engine
  • preview.png is a mod preview image, preferably 400x240 pixels
  • readme.txt describing the mod, license, author contact and everything else in plain text format

Examplar modinfo.xml:

<?xml version="1.0" encoding="UTF-8"?>
<Root>
  <ModInfo EngName="geometry_map_objects" Version="0.0.1" Title="title" Author="Krom" GameVersion="0.13.0" Description="description">
</Root>
  • <?xml version="1.0" encoding="UTF-8"?> should be kept as is, it's for parsing the mod correctly
  • <Root> / </Root> is also a standard structural element that should be kept as is
  • ModInfo contains all the good stuff:
  • EngName is a string with EngineName of the mod, it should be alphanumeric English and unique
  • Version is a mod version and should follow the Semantic Versioning format (https://semver.org/). Currently it is not used in meaningful way, but later on it can help players and KP to distinguish between mod versions. Typically not very important for campaign and mission mods, as those always come in "one package", but for game mods this is highly recommended to keep correct.
  • Title alphanumeric reference to the LIBX line (in the text\ folder. Yep, now LIBX use alphanumeric keys
  • A-uthor authors name (not localized)
  • GameVersion game version this mod needs. Not checked at the moment, but will be important later on
  • Description alphanumeric reference to the LIBX line (in the text\ folder

Game specs and assets

The game has everything split into big separate resource chunks. Mapobjects is just one of them and as said earlier - mapobjects mods are checked and tested and given examples of, other resources will follow in the future. Example of: Alerts, Atmosphere, Emitters, Fences, Fonts, Houses, Projectiles, Stockpiles, TerrainSurfaces, TerrainDecals, Units, Wares, Waterfalls, Workplans, and many more.

MapObjects

Mapobjects can be tile-placed and vertice-placed. Generally it is advised that mapobjects reside within 1x1x1 meter space. If you need something bigger - make it not reachable by game units, or split and place it in several separate mapobjects.

Appendix 1 - 3D model format

Golden standard 3D model format for everything in the game is Lightwave 3D LWO. Lightwave 3D has a really nice standalone app called Modeler which has a superb set of tools for lowpoly editing without any extra fluff that apps like Blender have.

image

Second-class citizen model formats are FBX and OBJ, they are basically supported but lack a lot of features compared to LWO. Their parsing has not been fully implemented (meaning that some unusual variations in data can cause corrupt models or games crash).

There are number of ways models can be brought to LWO format, but they might need an additional investigation:

  • if you have access to Lightwave 3D, you can import other formats and bring them up to required level
  • Modo can create and export LWOs
  • perhaps some 3D editing apps can export to LWO
  • there are tools like Deep Exploration that can view and export between number of 3D formats

Some guidelines for the LWO 3D format:

  • standard unit of scale is meters
  • one tile in the game is 1 meter by 1 meter. Typical units height is also ~1meter
  • polygons are supported, no need to split everything into triangles!
  • surface colors are imported well
  • UV maps are supported
  • layers can be used for ease of editing
  • layer named LOD will be used for a lowpoly hittest (cursor interaction in the game)
  • all polygons are treated as double-sided

Clone this wiki locally