Chat commands
A / line typed in the chat is dispatched in this order: the server’s own fight commands, then the game mode
(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, and a command a
mode declared secret (SetSecretCommand: its own /login) is masked on the
player’s screen as it is typed.
[commands] in server.toml 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 players the mode promoted (SetPlayerAdmin); the
server keeps no accounts and no admin list. /register and /login are a game mode’s own commands - the shipped freeroam and BasicRP have
them once a database is connected (Databases).
The server’s own
Section titled “The server’s own”Always answered, before the mode sees the line, whatever [commands] says.
| Command | |
|---|---|
/fight <player> |
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, with players and with NPCs (the NPCs stand down) |
Every player’s, unless the mode answers them
Section titled “Every player’s, unless the mode answers them”Anyone may use these, whatever [commands] says; a mode that handles the name answers them itself instead (its own mute
command, a menu - with SetPlayerVoiceMutedFor). The player is named by
their id (the scoreboard’s) or their name; a name two players share asks for the id.
| Command | |
|---|---|
/mute <player> |
the caller no longer hears that player’s voice - only the caller, everyone else still does. The mode may refuse it (OnPlayerVoiceMute). /mute alone lists the players the caller muted |
/unmute <player> |
the caller hears them again |
Public by default
Section titled “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 <part of a name> |
the first eight items whose name, English name or category holds the words, with their ids (items) |
/uptime |
how long the caller has been on, and the server tick |
Admins only by default
Section titled “Admins only by default”| Command | |
|---|---|
/give <item> [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 <item> |
places one of the item as a pickup in front of the caller, in their virtual world |
/tp x y z | /tp <player> |
teleports the caller to a point (z below 0 = on the terrain) or next to a player, following them into their virtual world |
/goto <player> |
the same as /tp <player> |
/horse [soul] |
the horse next to the caller, or theirs called over, or a new one; with a soul named (horses, by name, id or GUID) always a new horse of that breed, mounted |
/horses <part of a name> |
the first eight horse breeds whose name holds the words |
/cart [wagon | cart | remove] |
a free cart 4.5 m ahead, across the caller’s way (its bench at their right hand: the use key there takes the reins) - a wagon, or with cart a two-wheeler; /cart remove takes away the free cart nearest the caller |
/cart parts, /cart part <slot> <part> |
what a cart can be made of (the nearest one’s kind, and what it is); a part of the nearest cart within 12 m changed - body, axle, wheels, load, horse1, horse2 (a two-wheeler: body, wheels, load, horse1), default gives a slot back (personal carts) |
/cartroute new <name> … save |
records a cart route by riding it: point (a point here), auto [metres] (one every so many metres on the move), stop [seconds] [name], undo, mode loop | back, speed <m/s>, carts <n>, kind wagon | cart, part <slot> <part>, then save (it runs and goes into the routes file) or cancel; list, carts <route> <n>, part <route> <slot> <part> and remove <route> for the saved ones (the routes guide) |
/dog [soul] |
a dog at the caller’s heel (dogs), 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) |
/prop <mesh> [scale] [rigid] |
places a static mesh 2.5 m ahead (meshes by id, file name or path): /prop barrel_a, /prop 441 1.5 rigid |
/props <part of a path> |
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 | auto | chances] [blend seconds] |
alone lists the presets; with one, changes the sky for everyone (weather); auto hands it back to the server’s rotation; chances shows how often the rotation rolls each kind (the mode’s SetWeatherChances) |
/heal [player] |
full health and stamina, injuries, bleeding, alcohol and buffs gone - the caller’s or the named player’s |
/kick <player> [reason] |
disconnects the player; only the admin who used it reads a line - a game mode that wants kicks and bans announced does it itself (OnPlayerDisconnect) |
/kickban <player> [minutes] |
kicks and bans the name and the address for that many minutes - 5 when no number (or 0) is given; a ban for good is a game mode’s (Ban) |
/unban <name | address> |
lifts a ban |
/reload |
reloads the game mode without a restart |
/restock here | all | <container key> |
fills the chest from its loot preset again - the nearest one, every one (and the loose items back), or one by key |
/gate [open | close | toggle] [key] |
the nearest gate within 60 m - a portcullis, a drawbridge, the Malesov courtyard gate or the door in Trosky’s south gate - drops, rises, or turns round from where it is (alone: toggle; the last two are at the other end at once); /gate list names the level’s gates and where they stand (SetGateState) |
/layer <name> on | off |
one of the level’s story layers shown or hidden for everyone, by its full name with the GUID - for a server owner trying the layers a mode will switch; /layer list names the ones switched (SetLevelLayer) |
/objectinfo [radius | off] |
for a developer: every door, chest, loose item slot and gate within the radius (50 m; 200 at most; 100 objects) gets a label over it on the caller’s screen for a minute - the kind, a readable name, the distance - and their full keys go to the caller’s chat (the client writes it into its log too): what a mode’s tables and GetNearestDoor work with. Needs the tables export for the positions; off takes the labels down |
The example modes’ own
Section titled “The example modes’ own”The three example modes - freeroam.lua, basicrp.lua and duel_arena.lua - answer commands of their own on top of the
built-ins. They are the mode’s, so [commands] does not switch them, and each says who may use it (an admin is a player the
mode promoted: BasicRP promotes everyone who joins, as shipped). Each mode has a /help of its own: freeroam’s line is followed
by the server’s list, BasicRP’s and the duel arena’s stand alone. A mode’s commands are whatever its OnPlayerCommandText
answers; the getting-started guide shows one with typed arguments
(sscanf: a player, a number, the rest of the line, in one call).
All three modes
Section titled “All three modes”| Command | |
|---|---|
/anim <name> |
an emote for everyone around - what the wheel on G plays; /anim stop ends it, /anim alone lists them (the example is the whole command) |
Freeroam and BasicRP
Section titled “Freeroam and BasicRP”Everyone may use these, except where it says admins.
| Command | |
|---|---|
/seat, /seat <n> |
who sits where in the caller’s cart, or another seat (SetPlayerCartSeat) |
/dice <name> [bet], /dice accept, /dice decline, /dice quit |
the game’s own dice against another player: challenge a player who stands with you at a dice table (the bet in Groschen, 0 or more); they have a minute to accept or decline, and quit gives a running game up. The goal, the time for a move and how far apart the two may stand are the mode’s DICE table (dice) |
/invite <name>, /accept, /decline, /leave |
parties: invite a player (any member may), answer an invitation, leave the party (parties) |
/pkick <name>, /leader <name>, /disband |
the party’s leader removes a member, hands the lead over, or ends the party |
/p <text> |
a line to the party alone, wherever they are |
/skills [name] |
the caller’s stats and skills as their game last reported them, with the perk points not spent yet; with a name, that one with the XP it takes to the next level (stats and skills) |
/setlevel <player> <stat | skill> <level> [xp] |
admins: sets a stat or a skill to exactly that level (0 to 30, lowering too) with the XP gathered toward the next. The main level is refused - the game works it out - and so is warfare, which follows the weapon skills |
/givexp <player> <stat | skill> <xp> |
admins: XP the game’s own way - the level-up notice and the perk points follow; above 0 and at most 100000 |
/perk <player> add | remove <perk> |
admins: gives or takes a perk, by GUID or by name from the perks list |
/perkpoints <player> <stat | skill | mainlevel> <points> |
admins: the perk points not spent yet, exactly (0 or more); mainlevel is the pool that belongs to no stat or skill |
/xprate [rate] |
admins: shows the XP rate the players’ games award by, or sets it from 0 to 100 (1 is the game’s own; both modes start at 1 - SetXPRate) |
BasicRP
Section titled “BasicRP”A plain chat line is spoken: those within 20 m hear “Name says: …”, and it shows over the speaker’s head. A player who is
knocked out or carried can only talk - the speaking commands, /p, /help, /skills and the account commands; the rest answers
“Not while you are knocked out or carried.” (an admin keeps the admin tools, but not the commands that would move or free them).
| Command | |
|---|---|
/register <password>, /login <password> |
the account commands, once a database is connected - the box that asks for the password when a player joins does the same (Databases) |
/look |
the character creator again: face, hair, beard and skin (the character creator) |
/me <action>, /do <description>, /ame <action> |
role-play lines heard within 20 m: /me draws his sword reads “* Name draws his sword”, /do The door is barred. reads “The door is barred. ((Name))”, and /ame shows the first kind over the head alone |
/s <text> (/shout), /b <text> (/ooc) |
a shout heard across 40 m; an out-of-character line within 20 m, in grey |
/horse |
everyone’s, not the admin tool of the same name: the caller’s own horse called to the front of them, or a new one, and up into the saddle (giving a built-in to every player) |
/unstuck |
back to the spawn, a horse with them; once every 5 minutes, and not in a fight, in a cart or while dead |
/createcart, /despawncart |
a window to build a cart of one’s own, which then stands in front of the player; the cart taken away wherever it is (personal carts) |
/horsestat [<stat> <level>] |
admins: the strength, agility, vitality or courage (level 1 to 30) of the horse the caller rides, else their own; alone it lists them. Kept with the horse (SetHorseStat) |
/horsecoat [coat] |
admins: the coat of the horse the caller rides, else their own, one of the horse coats; alone it shows the coat and lists them. Kept with the horse (SetHorseCoat) |
/setenergy [value] [name], /setsleep [value] [name], /sethunger [value] [name] |
admins: the stamina (0 to its maximum), how rested (the energy a bed restores, 0 to 100) and how fed (0 to 100) the caller or the named player is; alone they say the value (SetPlayerStamina, SetPlayerEnergy, SetPlayerNourishment) |
/carry <name>, /putdown |
a knocked-out player within reach (the CARRY table’s range and a metre more) over your shoulder, and what you carry put down. For everyone while the CARRY table is switched on (off as shipped); an admin may always, and carries any player, knocked out or not (the carrying guide) |
/carrying on | off | status |
admins: the players’ own grab of bodies that lie down |
/ko [name] [seconds], /wake [name] |
admins: knock a player out - they drop, their screen goes dark, their health stays - and wake them. Without a time /ko keeps them down for the table’s ko_seconds (120 as shipped; 0 = until /wake) |
/pickpocket on | off | status, /pickpocket admins on | off |
admins: pickpocketing between players, the game’s own “Rob” prompt (off as shipped), and whether an admin’s pockets can be picked too (SetPickpocketing) |
Freeroam
Section titled “Freeroam”| Command | |
|---|---|
/register <password>, /login <password> |
the mode’s own accounts, once a database is connected (Databases) |
/tag [text] |
the label over the caller’s body; alone it gives the name back |
/color [rrggbb] |
the color of that label; alone it goes back to the default |
/team [n] |
puts the caller in team n - its members cannot hurt each other; alone, in no team |
/hurt [player] [amount] |
admins: takes health off a player (30 by default) without a blow |
/kill [player] |
admins: the server’s death, without a blow |
/throw [player] [plain] |
admins: the rider’s game throws them backward off their horse, the fall every player sees; plain drops them where they sit instead (riders thrown) |
/pulldown <victim> [puller] [fail] |
admins: you, or the player named, pull the rider off their horse with the game’s take-down, whatever the rules; fail plays the failed pair |
/pulldowns on | off |
admins: every player online may, or may not, pull riders down - off by default |
/carrying on | off | status |
admins: the players’ own grab of bodies that lie down - off by default (the carrying guide) |
/ko [player] [seconds], /wake [player] |
admins: knock a player out - they drop, their screen goes dark, their health stays - for the seconds given, else until /wake |
/carry <player>, /putdown |
admins: you carry that player over your shoulder - whoever they are, knocked out or not - and put them down |
/pickpocket on | off | status |
admins: pickpocketing between players, the game’s own “Rob” prompt - off by default (pickpocketing) |
/actor [soul] |
admins: a demo NPC character 4 m ahead that walks a square around the caller; clear removes them. Arms: fists (an unarmed brawler set on you), brawl (two armed ones set on each other), stop, come (walks to you along the navigation mesh), sit, wave, bow, nod, pray, chop, sweep, smith (poses), hostile [player] (set on you, or on the player named), peace, hurt, heal, kill, label <text>, color <rrggbb>, light [torch|lantern|lantern_fancy|off] (the first actor’s light) |
/animal <kind> |
admins: an animal 4 m ahead that walks the same square - wolf, boar, wild dog, dog, red deer stag, red deer doe, roe deer buck, roe deer hind, hare, pig, sheep, ram, cow, bull, hen or raven; stop, come, kill and clear act on all of them (CreateAnimal) |
/fx [effect], /sfx [trigger] |
admins: a particle effect 2 m ahead of the caller and a sound at their feet, for everyone in range (the smithy’s smoke and a lightning strike without a name) |
/los [name], /ground |
for a server with world data: whether the line to that player is clear (alone, what stands 30 m ahead), and the floor under the caller against the terrain’s height |
The duel arena
Section titled “The duel arena”| Command | |
|---|---|
/duel |
queues the caller; two at a time are put on the arena’s marks, and nobody else can be hurt |
/leave |
leaves the queue, or gives a duel up |
/score, /queue |
the wins and losses; who fights and who waits |
/arena [x y z [yaw]] |
moves the arena to that point; alone it says where it is |
Giving a built-in to every player
Section titled “Giving a built-in to every player”Everything under “Admins only by default” answers admins alone, which suits a testing server and not a role-play one.
A mode takes any of those names for itself by handling it and returning true — the built-in is then never reached, and
the mode decides who may use it and what it does. basicrp.lua does this with /horse:
function OnPlayerCommandText(pid, cmd, args) if cmd:lower() == "horse" then if GetPlayerMount(pid) then SendClientMessage(pid, COLOR_SERVER, "You are in the saddle already - X gets you off.") return true end local x, y, z = GetPlayerPos(pid) local yaw = GetPlayerYaw(pid) or 0 local rad = math.rad(yaw) local hx, hy = x - math.sin(rad) * 2.5, y + math.cos(rad) * 2.5 -- 2.5 m in front local mount = GetPlayerHorse(pid) -- theirs, called over if mount then SetEntityPos(mount, hx, hy, z, yaw) else mount = CreateHorse(hx, hy, z, yaw, pid) end if mount then MountPlayer(pid, mount) end return true end return falseendThe other way round works too: public = ["help", "pos", "players", "items", "uptime", "horse"] in [commands] opens the
built-in itself to everyone, unchanged. Take the name in the mode when you want your own rules — a price, a cooldown, one
horse per player, a stable a player must stand in — and move it to public when the built-in already does what you want.
/help is worth taking the same way. The built-in lists what the caller may use, which on a role-play server is a list of
admin tools; a mode that answers /help itself and returns true prints its own commands instead. Grouping them under
short headings, a few lines at a time, reads better in the chat than one long line.
The server console
Section titled “The server console”The server also takes commands typed into its own console: the window it runs in, the terminal that started it, or the console
of a game panel. Whoever can type there owns the server, so no admin check applies and no game mode is asked; the answer is a
line in the server’s log, which is what that console shows. The leading / is optional.
| Command | |
|---|---|
announce <text> |
every player on the server reads [SYSTEM]: <text> in the chat, in orange - a warning before a restart, for one |
help |
lists the console commands |
A server started without an input (a background service) simply has no console commands.
