# KCD Multiplayer (KCD:MP) scripting reference > The scripting reference of KCD:MP (KCD Multiplayer), the multiplayer platform for Kingdom Come: Deliverance II. A server runs one game mode - a Lua 5.4 script - and this is the API that script has: the callbacks the server calls, the functions the script calls back, the client-side API, and the game's own lists of items, souls, buffs, meshes and more, by the keys the functions take. How to read this site: - **To write a game mode, load the abridged documentation (`llms-small.txt`) and nothing else first**: the getting-started pages and the guides, the Lua guides, every server callback and function with its syntax, arguments, return value and an example, the client API, and the map of the reference lists. About 460 KB (~115k tokens). - **The complete documentation (`llms-full.txt`) is 6 MB** - the reference lists are generated from the game's files and are huge. Do not load it whole; take the list you need from the sets below. - **Every page has a Markdown twin**: replace the trailing `/` of its URL with `.md` (`/lua/server/functions/setspawninfo/` → `/lua/server/functions/setspawninfo.md`). Names are lowercase in URLs (`SetSpawnInfo` → `setspawninfo`). Fetch these rather than the HTML pages. - **Only the functions and callbacks the documentation lists exist.** Keys of game things - items, souls, buffs, meshes, presets, animation clips, doors - come from the reference lists; never invent one, and keep the name or the GUID rather than the numeric id, which shifts with game patches. - **The API as Lua language server definitions**: https://docs.kcd-mp.com/KcdMp.d.lua (the game mode API) and https://docs.kcd-mp.com/KcdMp-client.d.lua (the client script API) - every function, callback and constant with its types and documentation, in LuaLS `---@param` / `---@return` form. In a game-mode folder with a `.luarc.json` pointing at it, the language server flags an unknown name or a wrong argument type; the file is also a compact reference to read. - A ready-made `CLAUDE.md` / `AGENTS.md` for a game-mode project is at https://docs.kcd-mp.com/getting-started/ai-assistants/ (Markdown: /getting-started/ai-assistants.md). ## Documentation Sets - [Abridged documentation](https://docs.kcd-mp.com/llms-small.txt): a compact version of the documentation for KCD Multiplayer (KCD:MP) scripting reference, with non-essential content removed - [Complete documentation](https://docs.kcd-mp.com/llms-full.txt): the full documentation for KCD Multiplayer (KCD:MP) scripting reference - [Getting started and guides](https://docs.kcd-mp.com/_llms-txt/getting-started-and-guides.txt): what holds for any language - the server, a game mode and a client script, setting up, every server.toml key, the docs for AI assistants; exporting the game's tables, terrain, navigation mesh and collision geometry, putting a server on the public list - [Lua server API](https://docs.kcd-mp.com/_llms-txt/lua-server-api.txt): the game mode API alone - the guides, every callback and function (about 300 KB) - [Lua client API](https://docs.kcd-mp.com/_llms-txt/lua-client-api.txt): the client script API alone - the `KcdMp` table, its events, state bags and console commands - [Reference overview](https://docs.kcd-mp.com/_llms-txt/reference-overview.txt): the map of the reference lists and the pages that follow the server rather than the game: weather presets, built-in chat commands, stats and skills - [Reference: items](https://docs.kcd-mp.com/_llms-txt/reference-items.txt): every item class by category - id, name, English name, weight, price, GUID - the keys the API takes, one big table; load only when the mode needs one - [Reference: souls](https://docs.kcd-mp.com/_llms-txt/reference-souls.txt): every soul by archetype - horses, dogs, people, animals - the keys the API takes, one big table; load only when the mode needs one - [Reference: buffs](https://docs.kcd-mp.com/_llms-txt/reference-buffs.txt): every buff by class - the keys the API takes, one big table; load only when the mode needs one - [Reference: meshes](https://docs.kcd-mp.com/_llms-txt/reference-meshes.txt): every static mesh by folder - for props - the keys the API takes, one big table; load only when the mode needs one - [Reference: clothing presets](https://docs.kcd-mp.com/_llms-txt/reference-clothing-presets.txt): every outfit by gender, with its pieces - the keys the API takes, one big table; load only when the mode needs one - [Reference: animations](https://docs.kcd-mp.com/_llms-txt/reference-animations.txt): every animation clip by fragment family - the keys the API takes, one big table; load only when the mode needs one - [Reference: particle effects](https://docs.kcd-mp.com/_llms-txt/reference-particle-effects.txt): every particle effect by library - the keys the API takes, one big table; load only when the mode needs one - [Reference: audio triggers](https://docs.kcd-mp.com/_llms-txt/reference-audio-triggers.txt): every sound trigger by set - the keys the API takes, one big table; load only when the mode needs one - [Reference: levels](https://docs.kcd-mp.com/_llms-txt/reference-levels.txt): the three levels and every door and container placed in each - the keys the API takes, one big table; load only when the mode needs one - [C# plugins](https://docs.kcd-mp.com/_llms-txt/c-plugins.txt): the native tier the Lua API maps onto - a plugin compiled against KcdMp.Api ## Notes - The complete documentation includes all content from the official documentation - The content is automatically generated from the same source as the official documentation ## Optional - [kcd-mp.com](https://kcd-mp.com): the mod itself - downloads, the server browser, news - [Forum](https://forum.kcd-mp.com): where scripters ask and answer