Skip to content

Script your own server

A KCD:MP server runs one game mode — a script that decides where players spawn, what chat does, which commands exist and what happens in the world. This is its reference, every callback and function on its own page.

Start here

What a server, a game mode and a client script are and which languages write them — Getting started — then the server folder to a running server with your own mode, step by step: Setting up.

Server API

Every callback the world calls and every function a mode calls back — players, chat and HUD, combat, items, entities, zones, the clock and the weather — by topic, each with its syntax, arguments, return value and an example.

Client API

What a client script defines and calls on top of the game’s own Lua, written like a game mode: the callbacks, the functions for events, state bags, the HUD and the UI, the constants and the console commands. Getting started → the index.

The guides

One job per page, for any language: exporting the game’s tables, the terrain, the navigation mesh and the collision geometry from your own copy of the game, and putting a server on the public list. Guides.

The reference lists

Every item, soul, buff, mesh, preset, animation clip, door and container the game has, by the keys the API takes — plus the weather presets and the built-in chat commands. Reference.

C#

Modes are Lua 5.4 scripts or C# plugins. The same API, typed, with the whole of .NET behind it — the native tier Lua is built on: the C# server API.