Reference overview: 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
> The game's lists a script or a chat command names things from - items, souls, buffs, meshes, presets, stats and skills, animation clips, every level's doors and containers - plus the weather presets and the built-in chat commands.
Wherever the API takes a key that names something of the game - an item, a soul, a buff, a mesh, a preset, an animation clip, a
door - the thing comes from one of these lists. They are the same for every scripting language; the API pages link into them.
The lists in the first table are **generated from the installed game's own files** - the tables, the animation databases, the
levels - by the same tool that writes the server's tables export, so the **ids** in them are exactly the ids the server resolves.
An id is a row number of a name-sorted export: stable for one export of one game build, shifted by a game patch that adds
things - keep the **name** or the **GUID** in anything durable.
| List | What is in it | The API that takes it |
|---|---|---|
| [Items](/reference/items/) | every item class by category: id, name, English name, weight, price, GUID | [`GivePlayerItem`](/lua/server/functions/giveplayeritem/), [`CreatePickup`](/lua/server/functions/createpickup/), [`GetItemInfo`](/lua/server/functions/getiteminfo/), `/give`, `/item` |
| [Souls](/reference/souls/) | every soul by archetype - horses, dogs, people, animals: id, name, GUID | [`CreateHorse`](/lua/server/functions/createhorse/), [`CreateDog`](/lua/server/functions/createdog/), [`CreateActor`](/lua/server/functions/createactor/), [`SetSpawnInfo`](/lua/server/functions/setspawninfo/)'s appearance, `/horse`, `/dog` |
| [Buffs](/reference/buffs/) | every buff by class: id, name, English name, duration, GUID | [`GivePlayerBuff`](/lua/server/functions/giveplayerbuff/), [`ClaimBuffClasses`](/lua/server/functions/claimbuffclasses/), `[combat] claimed_buffs` |
| [Meshes](/reference/meshes/) | every static mesh of the object files by folder: id, name, path | [`CreateProp`](/lua/server/functions/createprop/), `/prop` |
| [Consumables](/reference/consumables/) | every food, drink, potion, poison and ointment with its health, alcohol, buff and regeneration | [`OnPlayerUseItem`](/lua/server/callbacks/onplayeruseitem/) |
| [Clothing presets](/reference/clothing-presets/) | every outfit by gender, with its pieces and GUID | [`SetSpawnInfo`](/lua/server/functions/setspawninfo/), [`CreateActor`](/lua/server/functions/createactor/), `[spawn] clothing_preset` |
| [Weapon presets](/reference/weapon-presets/) | every set of arms with its weapons and GUID | [`SetSpawnInfo`](/lua/server/functions/setspawninfo/), [`CreateActor`](/lua/server/functions/createactor/), `[spawn] weapon_preset` |
| [Stats and skills](/reference/stats-and-skills/) | the character's stats and skills by name | [`SetPlayerStat`](/lua/server/functions/setplayerstat/), [`SetPlayerSkill`](/lua/server/functions/setplayerskill/) |
| [Animations](/reference/animations/) | every clip of the male animation set by fragment family | [`SetActorAnim`](/lua/server/functions/setactoranim/) |
| [Particle effects](/reference/particle-effects/) | every particle effect by library | [`SpawnEffect`](/lua/server/functions/spawneffect/) |
| [Audio triggers](/reference/audio-triggers/) | every sound trigger by set | [`PlaySound`](/lua/server/functions/playsound/) |
| [Decal materials](/reference/decal-materials/) | every decal material | [`SpawnDecal`](/lua/server/functions/spawndecal/) |
| [Levels, doors and containers](/reference/levels/) | the three levels and every door and stash placed in each, with the key and the position | [`SetDoorState`](/lua/server/functions/setdoorstate/), [`GetContainerItems`](/lua/server/functions/getcontaineritems/), `[server] level` |
Two pages follow the server's code rather than the game's files:
| Page | |
|---|---|
| [Weather](/reference/weather/) | the presets and the level sky profiles they stand for - [`SetWeather`](/lua/server/functions/setweather/), `/weather` |
| [Chat commands](/reference/chat-commands/) | the commands the server answers in every game mode, and who may use each |
The lists are the server's own export of the game: [Exporting the game's tables](/guides/game-tables/) makes the same
file for your server, so the ids here are the ids it resolves. Every key of `server.toml` is on
[Server configuration](/getting-started/server-config/).
# Chat commands
> The chat commands the server answers itself in every game mode - who may use each, what it takes, and how a mode overrides one.
A `/` line typed in the chat is dispatched in this order: the server's own account and fight commands, then the game mode
([`OnPlayerCommandText`](/lua/server/callbacks/onplayercommandtext/) in Lua, `OnPlayerCommand` in C#; `true` = handled), then
the **built-ins** below, then `Unknown command: /x`. A mode overrides any built-in by handling its name; a mode's `/help` that
prints a line and returns `false` is followed by the server's own list. Commands are never echoed to the chat.
`[commands]` in [`server.toml`](/getting-started/server-config/#commands) switches the built-ins: `builtin = false` turns them all off, `disabled`
turns some off by name, `public` names the ones anyone may use - every other built-in answers **admins only** ("Admins only."
to everyone else). Admins are the logged-in owners of `[accounts] admins` or players the mode promoted
([`SetPlayerAdmin`](/lua/server/functions/setplayeradmin/)).
## The server's own
Always answered, before the mode sees the line, whatever `[commands]` says.
| Command | |
|---|---|
| `/register ` | claims the caller's name: from then on it needs the password (at least `[accounts] min_password_length` characters, no spaces). Off when `[accounts] registration = false` |
| `/login ` | proves a registered name; three wrong tries kick. A registered name not logged in within `[accounts] login_grace_seconds` is kicked |
| `/fight ` | starts a fight with that player - both may lock on to each other. Refused when pvp is off |
| `/peace` | ends every fight of the caller |
## Public by default
`[commands] public = ["help", "pos", "players", "items", "uptime"]`.
| Command | |
|---|---|
| `/help` | the commands the caller may use - the mode's line first when it prints one, then this list |
| `/pos` | the server's record of the caller: position, yaw, reports received, ping |
| `/players` | who is online |
| `/items ` | the first eight items whose name, English name or category holds the words, with their ids ([items](/reference/items/)) |
| `/uptime` | how long the caller has been on, and the server tick |
## Admins only by default
| Command | |
|---|---|
| `/give - [count]` | puts items in the caller's inventory - the item by name, id, GUID or English name (several words allowed; a trailing number is the count): `/give duelling longsword 2` |
| `/item
- ` | places one of the item as a pickup in front of the caller, in their virtual world |
| `/tp x y z` \| `/tp ` | teleports the caller to a point (`z` below `0` = on the terrain) or next to a player, following them into their virtual world |
| `/goto ` | the same as `/tp ` |
| `/horse [soul]` | the horse next to the caller, or theirs called over, or a new one; with a soul named ([horses](/reference/souls/horse/), by name, id or GUID) always a new horse of that breed, mounted |
| `/horses ` | the first eight horse breeds whose name holds the words |
| `/dog [soul]` | a dog at the caller's heel ([dogs](/reference/souls/dog/)), on the game's own companion AI; `/dog` again sends it away |
| `/dog stay`, `/dog follow`, `/dog free` | the dog waits where it is, comes along again, or roams ([`SetDogMode`](/lua/server/functions/setdogmode/)) |
| `/prop [scale] [rigid]` | places a static mesh 2.5 m ahead ([meshes](/reference/meshes/) by id, file name or path): `/prop barrel_a`, `/prop 441 1.5 rigid` |
| `/props ` | searches the meshes |
| `/time [hh:mm]` | the world clock: shows it, or sets it for everyone |
| `/rain [0-1 \| off]` | the rain override: shows it, forces an amount, or hands the rain back to the weather |
| `/weather [preset \| profile] [blend seconds]` | alone lists the presets; with one, changes the sky for everyone ([weather](/reference/weather/)) |
| `/heal [player]` | full health and stamina, injuries, bleeding, alcohol and buffs gone - the caller's or the named player's |
| `/kick [reason]` | disconnects the player |
| `/kickban [minutes]` | kicks and bans the name and the address; without minutes, for good |
| `/unban ` | lifts a ban |
| `/reload` | reloads the game mode without a restart |
The example modes add their own: `freeroam.lua` has `/tag`, `/colour`, `/team`, `/actor` (its `heal` arm heals the demo character, `hostile [player]` sets it on you or on the player named), `/hurt [player] [amount]` (takes health off a player without a blow), `/kill [player]` (the server's death without a blow), `/fx [effect]` and `/sfx [trigger]`, and for a server with [world data](/guides/#the-games-data) `/actor come` (the demo character walks to you along the navigation mesh), `/los [name]` (whether the line to that player is clear, or what stands 30 m ahead) and `/ground` (the floor under you against the terrain's height); `duel_arena.lua` has `/duel`,
`/leave`, `/score`, `/queue`, `/arena`. A mode's commands are whatever its `OnPlayerCommandText` answers; the
[getting-started guide](/lua/server/getting-started/#a-command-with-arguments) shows one with typed arguments
(`sscanf`: a player, a number, the rest of the line, in one call).
# Stats and skills
> The game's core stats and skills by name: what SetPlayerStat and SetPlayerSkill take.
The **stats** and **skills** of Kingdom Come: Deliverance II as the game names them (`Libs/Tables/rpg/stat.xml`, `skill.xml`).
`SetPlayerStat(pid, stat, level)` and `SetPlayerSkill(pid, skill, level)` ([Lua](/lua/server/functions/setplayerstat/),
[C#](/csharp/server/)) take the **name** column and a level from 1 to 30; the level is kept on the player's record and
re-applied at every spawn, and the game never lowers a level. `GetPlayerStat` / `GetPlayerSkill` answer the level of record
(0 = never set). The player of the multiplayer level starts at level 5 everywhere; `[spawn] stat_level` in `server.toml` raises
the four core stats for everyone at the spawn.
## Stats
| name | shown as |
|---|---|
| `strength` | Strength |
| `agility` | Agility |
| `vitality` | Vitality |
| `speech` | Speech |
| `prestige` | Blacksmith Prestige |
`prestige` is the blacksmithing prestige of the story game, not a combat stat.
## Skills
A **hidden** skill is one the game's own character screen does not show; the name is still the table's, and whether the
engine takes a level for it is untested.
| name | shown as | category | hidden |
|---|---|---|---|
| `alchemy` | Alchemy | NonCombat | |
| `armourer` | Armourer | NonCombat | yes |
| `bard` | Fox | NonCombat | yes |
| `bowyery` | Bowyery | NonCombat | yes |
| `cooking` | Cooking | NonCombat | yes |
| `craftsmanship` | Craftsmanship | NonCombat | |
| `defense` | Defence | Combat | yes |
| `drinking` | Drinking | NonCombat | |
| `fencing` | Warfare | Combat | |
| `first_aid` | First Aid | NonCombat | yes |
| `fishing` | Fishing | NonCombat | yes |
| `gambling` | | NonCombat | yes |
| `gunsmithing` | Gunsmith | NonCombat | yes |
| `heavy_weapons` | Heavy Weapons | Combat | |
| `horse_riding` | | NonCombat | |
| `houndmaster` | Houndmaster | NonCombat | |
| `marksmanship` | Marksmanship | Combat | |
| `mining` | Mining | NonCombat | yes |
| `scholarship` | Scholarship | NonCombat | |
| `shoemaking` | Cobbler | NonCombat | yes |
| `stealth` | Stealth | NonCombat | |
| `survival` | Survival | NonCombat | |
| `tailoring` | Tailor | NonCombat | yes |
| `thievery` | Thievery | NonCombat | |
| `weapon_dagger` | Dagger | Combat | yes |
| `weapon_large` | Polearms | Combat | |
| `weapon_shield` | Shield | Combat | yes |
| `weapon_sword` | Swords | Combat | |
| `weapon_unarmed` | Unarmed | Combat | |
| `weaponsmithing` | Weaponsmith | NonCombat | yes |
# Weather
> The weather presets a mode or an admin may name and the level sky profiles they stand for.
The sky every client shows is one of the level's **time-of-day profiles** - the same eight on all three levels - and the server
names it for everyone: [`SetWeather`](/lua/server/functions/setweather/) in a mode, `/weather` in the chat, `[world] weather` in
`server.toml` for the start. A **preset** is a friendly name for a profile; a profile name passes through as it is, which also
admits the profiles the game's own quests use (`q_*` names in the level's mission file). Each client blends a change in over
`[world] weather_blend` seconds (10 by default) unless the call names its own blend.
| Preset | Profile | What it looks like |
|---|---|---|
| `clear`, `sunny` | `cloudless_sunny` | a clear sky |
| `fair` | `semicloudy_clear` | a few clouds, clear light |
| `cloudy` | `cloudy_no_rain` | overcast without rain |
| `overcast` | `summer_overcast` | a heavy summer sky |
| `showers` | `cloudy_frequent_showers` | clouds and passing rain |
| `drizzle`, `fog` | `foggy_drizzly` | fog and a fine rain |
| `storm` | `foggy_storm` | a storm with rain |
| `dry_storm` | `foggy_storm_no_rain` | the storm's sky without the rain |
`""` (an empty name) leaves every client's sky as it is - the game's own rotation goes on. The **rain** is a lever on top of the
profile: [`SetRain`](/lua/server/functions/setrain/) (`/rain`, `[world] rain`) forces an amount from `0` to `1` whatever the
profile's own rain probability says; `-1` hands it back. [`GetWeatherPresets`](/lua/server/functions/getweatherpresets/) returns
this table to a mode.