Rcon Overview and Commands: Difference between revisions
m (Adds GiveAll command output) |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
RCON (Remote | RCON (Remote Console) is the method with which Pavlov VR servers can be controlled from outside of VR. It does not allow for reading server log messages. | ||
---- | |||
== RCON Commands == | |||
=== Placeholders === | |||
Values in [square brackets] are placeholders and must be replaced, or will be replaced by the server in a reply. | |||
[UniqueID] - Player ID (eg. [https://steamid.io/ SteamID64] (PCVR), Oculus Username (Shack)) | |||
[GameMode] - See [[Setting up a dedicated server#Configuring Game.ini|Gamemodes table]] and [[Gamemodes]] | |||
[TeamID] - 0 for blue, 1 for red, if there are teams | |||
[VehicleID] - See [[Vehicles]] | |||
[MapName/ID] - See [[Default Maps|Default maps]] or find the Map ID on Mod.io and append it to "UGC" (Example: https://mod.io/g/pavlov/m/mcdonalds has Resource ID <code>2804322</code>, the MapID to use would be <code>UGC2804322</code>) | |||
[SkinID] - See [[ItemIDs#Skins|Skins]] | |||
[RoleID] - See [[ItemIDs#TTT Roles (Case Sensitive)|TTT Roles]] | |||
[ItemID] - See [[ItemIDs|Items]] | |||
[True/False] - Either "True" to enable or "False" to disable | |||
[Amount] - A number indicating an amount of something | |||
== | === Reply format === | ||
All command replies are formatted as JSON and inherit this base format: | |||
{ | |||
"Command": "[The command name]", | |||
"Comment": "[An optional comment about the command]", | |||
"Successful": "[True/False]" | |||
} | |||
Comment will not exist if the command does not output a comment. | |||
Additional command output is added to the above format. The Example Reply column below only contains this additional command output. | |||
Often, commands will contain a field with its own name and a boolean value. This is a very inconsistent value. For example in <code>SetMaxPlayers</code>, if the amount is set to the same as the current slot count, <code>Successful</code> will be <code>true</code> but <code>SetMaxPlayers</code> will be <code>false</code>. However for <code>SwitchTeam</code> for example, if a player is switched to the same team they are already in, <code>SwitchTeam</code> will be <code>true</code> anyway. | |||
Commands: | === Commands === | ||
{| class="wikitable" | |||
|+RCON Commands | |||
!Command | |||
!Parameters | |||
!Description | |||
!Example Command | |||
!Example Reply | |||
|- | |||
|Help | |||
|none | |||
|Returns the full list of commands and their parameters | |||
| | |||
Help | |||
| | |||
"Help": [ | |||
"AddMapRotation MapID GameMode", | |||
...truncated... | |||
"UpdateServerName ServerName" | |||
], | |||
|- | |||
|AddMapRotation | |||
|[MapName/ID] | |||
[GameMode] | |||
|Adds the specified map with the specified game mode to the bottom of the map rotation. | |||
Writes the map to <code>Game.ini</code>. | |||
| | |||
AddMapRotation sand snd | |||
| | |||
|- | |||
|AddMod | |||
|[UniqueID] | |||
|Adds the specified player to the moderator list, making them an admin. | |||
Allows them to use the admin menu in the pause menu and be immune to being vote-kicked. | |||
Writes the player to <code>mods.txt</code>. | |||
| | |||
AddMod 12345678901234567 | |||
| | |||
"AddMod": true, | |||
"UniqueID": "12345678901234567", | |||
|- | |||
|Ban | |||
|[UniqueID] | |||
|Kicks and permanently bans the specified player from the server. They will not be able to join the server anymore. | |||
Writes the player to <code>blacklist.txt</code>. | |||
| | |||
Ban 12345678901234567 | |||
| | |||
"Ban": true, | |||
"UniqueID": "12345678901234567", | |||
|- | |||
|Banlist | |||
|none | |||
|Lists the currently banned player UniqueIDs from <code>blacklist.txt</code>. | |||
| | |||
Disconnect | Banlist | ||
| | |||
"BanList": [ | |||
"12345678901234567", | |||
"12345678901234568", | |||
...truncated... | |||
"12345678901234569" | |||
], | |||
|- | |||
|ClearEmptyVehicles | |||
|none | |||
|Removes all vehicles that are not occupied by a player. | |||
| | |||
ClearEmptyVehicles | |||
| | |||
|- | |||
|Disconnect | |||
|none | |||
|Forces the server to closes the RCON connection. | |||
| | |||
Disconnect | |||
| | |||
Goodbye | |||
|- | |||
|EnableCompMode | |||
|[True/False] | |||
|Enables or disables competitive mode. | |||
'''Comment''': Comp mode will be changed on map rotation, this updates the config value | |||
Writes to <code>bCompetitive</code> in <code>Game.ini</code>. | |||
| | |||
EnableCompMode true | |||
| | |||
"CompModeState": true, | |||
"EnableCompMode": true, | |||
|- | |||
|EnableVerboseLogging | |||
|[True/False] | |||
|Enables or disables verbose logging. | |||
Writes to <code>bVerboseLogging</code> in <code>Game.ini</code>. | |||
| | |||
EnableVerboseLogging false | |||
| | |||
"VerboseLoggingState": false, | |||
"EnableVerboseLogging": true, | |||
|- | |||
|EnableWhitelist | |||
|[True/False] | |||
|Enables or disables whitelist usage. | |||
When enabled, only players who are listed in <code>whitelist.txt</code> can join the server. | |||
Writes to <code>bWhitelist</code> in <code>Game.ini</code>. | |||
| | |||
| | |||
"WhitelistState": true, | |||
"EnableWhitelist": true, | |||
|- | |||
|Gag | |||
|[UniqueID] | |||
[True/False] | |||
|Gags or ungags the specified player. | |||
When gagged, players can not use voice chat. | |||
| | |||
| | |||
"Gag": true, | |||
"UniqueID": "12345678901234567", | |||
|- | |||
|GiveAll | |||
|[TeamID] | |||
[ItemID] | |||
|Gives an item to all players on a team. | |||
The <code>GiveItem</code> RCON command description elaborates on how items are placed onto the body of the player. | |||
| | |||
| | |||
"GiveAll": true, | |||
"TeamID": "1", | |||
"ItemID": "galul", | |||
|- | |||
|GiveCash | |||
|[UniqueID] | |||
[CashAmount] | |||
|Gives the specified amount of cash to the specified player. | |||
| | |||
GiveCash 12345678901234567 200 | |||
| | |||
"GiveCash": true, | |||
"UniqueID": "12345678901234567", | |||
|- | |||
|GiveItem | |||
|[UniqueID] | |||
[ItemID] | |||
|Equippes the specified item to the specified player to the corresponding item slot. | |||
Primary guns are placed into the players main hand, replacing the held gun, which will drop. | |||
Secondary guns are placed onto the players hip, replacing the holstered gun, which will drop. | |||
Utilities will be placed onto the players chest slots until all slots are full, which will cause given items to be dropped instead. | |||
| | |||
GiveItem 12345678901234567 syringe | |||
| | |||
"GiveItem": true, | |||
"UniqueID": "12345678901234567", | |||
|- | |||
|GiveTeamCash | |||
|[TeamID] | |||
[CashAmount] | |||
|Adds the specified amount of cash to each member of the specified team. | |||
| | |||
GiveTeamCash 0 200 | |||
GiveTeamCash | | | ||
"GiveTeamCash": true, | |||
"TeamID": "0", | |||
|- | |||
|InspectAll | |||
|none | |||
|Returns a list of InspectPlayer blocks for all players on the server. | |||
| | |||
InspectAll | |||
| | |||
"InspectList": [ | |||
{ | |||
"PlayerName": "Username", | |||
"UniqueId": "12345678901234567", | |||
"KDA": "3/1/2", | |||
"Score": "50", | |||
"Dead": false, | |||
"Cash": "3450", | |||
"TeamId": "1", | |||
"Ping": 39.857143402099609, | |||
"Gag": false | |||
}, | |||
...truncated... | |||
], | |||
|- | |||
|InspectPlayer | |||
|[UniqueID] | |||
|Returns a detailed status for the specified player. | |||
The player must be listed in RefreshList. | |||
| | |||
InspectPlayer 12345678901234567 | |||
| | |||
"PlayerInfo": | |||
{ | |||
"PlayerInfo": | |||
{ | |||
"PlayerName": "Username", | |||
"UniqueId": "12345678901234567", | |||
"KDA": "3/1/2", | |||
"Score": "50", | |||
"Dead": false, | |||
"Cash": "3450", | |||
"TeamId": "1", | |||
"Ping": 39.857143402099609, | |||
"Gag": false | |||
}, | |||
|- | |||
|InspectTeam | |||
|[TeamID] | |||
|Returns a list of InspectPlayer blocks for all player on the specified team. | |||
| | |||
InspectTeam 1 | |||
| | |||
"InspectList": [ | |||
{ | |||
"PlayerName": "Username", | |||
"UniqueId": "12345678901234567", | |||
"KDA": "3/1/2", | |||
"Score": "50", | |||
"Dead": false, | |||
"Cash": "3450", | |||
"TeamId": "1", | |||
"Ping": 39.857143402099609, | |||
"Gag": false | |||
}, | |||
...truncated... | |||
], | |||
|- | |||
|ItemList | |||
|none | |||
|Lists all items in the game and the current map. | |||
Custom items built into the map will be listed. | |||
| | |||
ItemList | |||
| | |||
"ItemList": [ | |||
"1911", | |||
"57", | |||
"acog", | |||
"adrenaline", | |||
...truncated... | |||
"ww2knife", | |||
"ww2medkit", | |||
"ww2painkillers", | |||
"ww2syringe" | |||
], | |||
|- | |||
|Kick | |||
|[UniqueID] | |||
|Kicks the specified player from the server. | |||
| | |||
Kick 12345678901234567 | |||
| | |||
"UniqueID": "12345678901234567", | |||
"Kick": true, | |||
|- | |||
|Kill | |||
|[UniqueID] | |||
|Kills the specified player. | |||
| | |||
Kill 12345678901234567 | |||
| | |||
"UniqueID": "12345678901234567", | |||
"Kill": true, | |||
|- | |||
|MapList | |||
|none | |||
|Returns the current map rotation from Game.ini. | |||
| | |||
MapList | |||
| | |||
"MapList": [ | |||
{ | |||
"MapId": "UGC2863450", | |||
"GameMode": "SND" | |||
}, | |||
...truncated... | |||
{ | |||
"MapId": "sand", | |||
"GameMode": "snd" | |||
} | |||
], | |||
|- | |||
|ModeratorList | |||
|none | |||
|Returns a list of UniqueIDs of all moderators from <code>mods.txt</code>. | |||
| | |||
ModeratorList | |||
| | |||
"ModeratorList": [ | |||
"12345678901234567", | |||
...truncated... | |||
"12345678901234568" | |||
], | |||
|- | |||
|RefreshList | |||
|none | |||
|Returns a list of all connected player names and their corresponding UniqueIDs. | |||
| | |||
RefreshList | |||
| | |||
"PlayerList": [ | |||
{ | |||
"Username": "Username", | |||
"UniqueId": "12345678901234567" | |||
}, | |||
...truncated... | |||
{ | |||
"Username": "Username2", | |||
"UniqueId": "12345678901234568" | |||
} | |||
], | |||
|- | |||
|RemoveMapRotation | |||
|[MapName/ID] | |||
[GameMode] | |||
|Removes the first occurrence of the specified map and game mode combination from the map rotation. | |||
[MapName/ID] and [GameMode] are case sensitive to the entries in <code>Game.ini</code> or <code>MapList</code> respectively. | |||
Writes the change to <code>Game.ini</code>. | |||
| | |||
RemoveMapRotation sand snd | |||
| | |||
|- | |||
|RemoveMod | |||
|[UniqueID] | |||
|Removes the specified player from the moderator list. | |||
Writes the change to <code>mods.txt</code>. | |||
| | |||
RemoveMod 12345678901234567 | |||
| | |||
"RemoveMod": true, | |||
"UniqueID": "12345678901234567", | |||
|- | |||
|ResetSND | |||
|none | |||
|Reset the currently running SND match. | |||
All players will have starting cash, no kills, deaths, assists or score. | |||
All players are killed. | |||
0 | The score is reset to 0 all. | ||
| | |||
ResetSND | |||
| | |||
"ResetSND": true, | |||
|- | |||
|PauseMatch | |||
|[Optional Amount] | |||
|Pauses the currently running match for the specified amount of seconds. | |||
The game is frozen and displays a "Game is paused" countdown timer. | |||
The game is unpaused when amount is not specified or 0. | |||
Unpausing starts a countdown timer at 15 seconds before unpausing. | |||
Minimum: 0 | |||
Maximum: 3600 | |||
| | |||
PauseMatch 60 | |||
| | |||
"PauseTime": 60, | |||
"PauseMatch": true, | |||
|- | |||
|RotateMap | |||
|none | |||
|Immediately changes the current map to the next map in the map rotation. | |||
If the current map was changed to using <code>SwitchMap</code>, the next map will be the one after the previously switched map instead of the immediate map after the current one. | |||
| | |||
RotateMap | |||
| | |||
"RotateMap": true, | |||
|- | |||
|ServerInfo | |||
|none | |||
|Returns server information such as server name, player count, current map and mode, and more. | |||
| | |||
ServerInfo | |||
| | |||
"ServerInfo": | |||
{ | |||
"MapLabel": "datacenter", | |||
"GameMode": "snd", | |||
"ServerName": "Server name", | |||
"Teams": true, | |||
"Team0Score": "4", | |||
"Team1Score": "1", | |||
"Round": "6", | |||
"RoundState": "Started", | |||
"PlayerCount": "8/10" | |||
}, | |||
|- | |||
|SetBalanceTableURL | |||
|[GithubURL] | |||
|Sets the balance table to load from the specified URL. | |||
The URL has the format <code>user/repo/branch</code> and must contain a <code>BalancingTable.csv</code>. For example, the [https://github.com/vankruptgames/BalancingTable/blob/Beta_5.1/BalancingTable.csv official balancing table] has the URL <code>vankruptgames/BalancingTable/Beta_5.1</code>. Full URLs (eg. http://...) do not work. | |||
The balance table contains the values for the prices in the buy wheel, how much money is gained from which actions and how much damage is dealt by each weapon including damage falloff and more. | |||
Writes to <code>BalanceTableURL</code> in <code>Game.ini</code>. | |||
| | |||
SetBalanceTableURL vankruptgames/BalancingTable/Beta_5.1 | |||
| | |||
"GithubURL": "<nowiki>https://raw.githubusercontent.com/vankruptgames/BalancingTable/Beta_5.1</nowiki>", | |||
"SetBalanceTableURL": true, | |||
|- | |||
|SetCash | |||
|[UniqueID] | |||
[CashAmount] | |||
|Sets the cash of the specified player to the specified amount. | |||
Minimum: 0 | |||
Maximum: 16000 | |||
| | |||
SetCash 12345678901234567 1000 | |||
| | |||
"SetCash": true, | |||
"UniqueID": "12345678901234567", | |||
|- | |||
|SetLimitedAmmoType | |||
|[AmmoType] | |||
|Sets the ammo limitation type. | |||
0 for unlimited, 1 for limited generic, 2 for limited specific, 3 for custom, 4 for limited special, 5 for boxless. | |||
See [[Setting up a dedicated server#Configuring Game.ini|Limited Ammo Types]] for details. | |||
Writes to <code>LimitedAmmoType</code> in <code>Game.ini</code>. | |||
| | |||
SetLimitedAmmoType 0 | |||
| | |||
"SetLimitedAmmoType": true, | |||
"LimitedAmmoType": "0", | |||
|- | |||
|SetMaxPlayers | |||
|[Amount] | |||
|Sets the amount of slots on the server to the specified amount. | |||
Minimum: 1 | |||
Maximum: 24 (PCVR), 10 (Shack) | |||
Writes to <code>MaxPlayers</code> in <code>Game.ini</code>. | |||
| | |||
SetMaxPlayers 10 | |||
| | |||
"SetMaxPlayers": true, | |||
"MaxPlayers": 10, | |||
|- | |||
|SetPin | |||
|[Optional PinNumber] | |||
|Sets the server pin to the specified pin number. | |||
Supplying a pin number locks the server so that player have to enter a pin to join. | |||
Not supplying a pin number unlocks the server so that players do not have to enter a pin. | |||
PinNumber can be any whole number between 1 and 9999 and may not contain leading zeroes such as <code>0001</code> which would get trimmed to <code>1</code>. | |||
Setting the pin to <code>0</code> or <code>0000</code> does not remove the pin but sets it to <code>0</code>. | |||
< | |||
</ | |||
Writes to <code>Password</code> in <code>Game.ini</code>. | |||
< | | | ||
SetPin 69 | |||
| | |||
|- | |||
</ | |SetPlayerSkin | ||
|[UniqueID] | |||
[SkinID] | |||
|Sets the player skin of the specified player to the specified skin. | |||
The skin is automatically removed if the player leaves the server, switches teams or upon map change. | |||
| | |||
SetPlayerSkin 12345678901234567 kevin | |||
| | |||
"SetPlayerSkin": true, | |||
"UniqueID": "12345678901234567", | |||
|- | |||
|SetTimeLimit | |||
|[Amount] | |||
|Sets the time limit of the current match to the specified amount in seconds. | |||
The match will end once the time limit has counted down to 0. | |||
| | |||
|'''Missing data, please rectify.''' | |||
|- | |||
|ShowNametags | |||
|[True/False] | |||
|Enables or disables name tags above friendly players. | |||
| | |||
ShowNametags true | |||
| | |||
"NametagsEnabled": true, | |||
"ShowNametags": true, | |||
|- | |||
|ShutdownServer | |||
|none | |||
|Immediately shuts down the server. | |||
| | |||
ShutdownServer | |||
| | |||
|- | |||
|Slap | |||
|[UniqueID] | |||
[Amount] | |||
|Deals the specified amount of damage to the specified player. Can be lethal if the amount exceeds the current health of the player. | |||
The damage is dealt directly to health and ignores armor. | |||
| | |||
Slap 12345678901234567 | |||
| | |||
"UniqueID": "12345678901234567", | |||
|- | |||
|SwitchMap | |||
|[MapID] | |||
[GameMode] | |||
|Immediately switches to the specified map and game mode. | |||
TDM is automatically selected if no game mode has been specified. | |||
| | |||
SwitchMap datacenter snd | |||
| | |||
"SwitchMap": true, | |||
|- | |||
|SwitchTeam | |||
|[UniqueID] | |||
[TeamID] | |||
|Kills and moves the specified player into the specified team. | |||
It will be as if the player has just joined (that team) or if they switched themselves, losing all money, kills, deaths, assists, score and gear. | |||
| | |||
SwitchTeam 12345678901234567 1 | |||
| | |||
"SwitchTeam": true, | |||
"UniqueID": "12345678901234567", | |||
|- | |||
|Teleport | |||
|[Source UniqueID] | |||
[Target UniqueID] | |||
|Teleports the specified source player to the position of the specified target player. | |||
Only works when both the source player and the target player are alive. | |||
| | |||
Teleport 12345678901234567 12345678901234568 | |||
| | |||
"MoveUniqueID": "12345678901234567", | |||
"ToUniqueID": "12345678901234568", | |||
"Teleport": true, | |||
|- | |||
|TTTAlwaysEnableSkinMenu | |||
|[True/False] | |||
|Trouble in Terrorist Town: Enables or disables the skin menu mid-round. | |||
| | |||
| | |||
|- | |||
|TTTEndRound | |||
|[TeamID] | |||
|Trouble in Terrorist Town: Ends the round. | |||
| | |||
| | |||
|- | |||
|TTTFlushKarma | |||
|none | |||
|Trouble in Terrorist Town: Resets the karma of all players to 1200. | |||
| | |||
| | |||
|- | |||
|TTTGiveCredits | |||
|[UniqueID] | |||
[Amount] | |||
|Trouble in Terrorist Town: Adds the specified amount of TTT credits to the specified player. | |||
| | |||
| | |||
|- | |||
|TTTPauseTimer | |||
|[True/False] | |||
|Trouble in Terrorist Town: Pauses the timer. | |||
| | |||
| | |||
|- | |||
|TTTSetKarma | |||
|[UniqueID] | |||
[Amount] | |||
|Trouble in Terrorist Town: Sets the karma of the specified player to the specified amount. | |||
| | |||
| | |||
|- | |||
|TTTSetRole | |||
|[UniqueID] | |||
[RoleID] | |||
|Trouble in Terrorist Town: Sets the TTT role of the specified player to the specified role. | |||
| | |||
| | |||
|- | |||
|Unban | |||
|[UniqueID] | |||
|Unbans the specified player so that they can join again. | |||
Writes the change to <code>blacklist.txt</code>. | |||
| | |||
Unban 12345678901234567 | |||
| | |||
"Unban": true, | |||
"UniqueID": "12345678901234567", | |||
|- | |||
|UpdateServerName | |||
|[Name] | |||
|Changes the server name to the specified name. | |||
Writes to <code>ServerName</code> in <code>Game.ini</code>. | |||
| | |||
UpdateServerName My server name | |||
| | |||
"ServerName": "My server name", | |||
"UpdateServerName": true, | |||
|- | |||
|UGCAddMod | |||
|[UGCModID] | |||
|Adds the mods to the server. | |||
| | |||
UGCAddMod UGC3267926 | |||
|'''Missing data, please rectify.''' | |||
|- | |||
|UGCClearModList | |||
| | |||
|Removes all mods from the server. | |||
| | |||
UGCClearModList | |||
|'''Missing data, please rectify.''' | |||
|- | |||
|UGCModList | |||
| | |||
|Lists all mods currently on the server. | |||
| | |||
UGCModList | |||
|'''Missing data, please rectify.''' | |||
|- | |||
|UGCRemoveMod | |||
|[UGCModID] | |||
|Removes specified mod from the server. | |||
| | |||
UGCRemoveMod UGC3267926 | |||
|'''Missing data, please rectify.''' | |||
|} | |||
---- | |||
== Connecting to RCON == | |||
RCON uses a simple UTF-8 TCP text stream allowing for a multitude of ways to connect. | |||
=== Authentication === | |||
After connecting to RCON, the first message sent is by the server requesting the RCON password to be transmitted. | |||
For this, the server sends a 10 byte message "<code>Password:</code> " (including the trailing space) to the client. | |||
The client is expected to reply with the password as lowercase hex representation of the MD5 checksum of the password. | |||
No line feed or carriage return character must be transmitted as part of the password. | |||
If the password is correct, the server will reply with <code>Authenticated=1\r\n</code> or if the password was incorrect, the reply will be <code>Authenticated=0\r\n</code>. | |||
'''Example''' | |||
Authentication using the password "hello test". | |||
< | > Password: | ||
< 7a6d667ea5ed4467c017b2ed6ea07e78 | |||
> Authenticated=1\r\n | |||
=== Sending commands and receiving replies === | |||
Any data sent to the server and terminated by a line feed character will be interpreted as a command and executed. | |||
the | |||
This is followed by the server sending the corresponding command response in JSON format with new lines being indicated by a line feed character | |||
The response is terminated with a carriage return and line feed. | |||
'''Example''' | |||
Executing the command <code>ServerInfo</code>. | |||
< ServerInfo\n | |||
> {\n\t"Command": "ServerInfo",\n\t"ServerInfo":\n\t{\n\t\t"MapLabel": "UGC2863450",\n\t\t"GameMode": "SND",\n\t\t"ServerName": "Server name",\n\t\t"Teams": true,\n\t\t"Team0Score": "0",\n\t\t"Team1Score": "3",\n\t\t"Round": "3",\n\t\t"RoundState": "Ended",\n\t\t"PlayerCount": "0/10"\n\t},\n\t"Successful": true\n}\r\n | |||
== Tools for connecting to RCON == | |||
=== Third party hosted tools === | |||
The easiest way to access RCON is to use a third party hosted tool. These are websites that take the RCON connection information and provide an RCON web interface. | |||
''' | '''Warning''': These tools may not be open source and can steal RCON passwords! Because they are hosted by third parties, it is impossible to verify that they do not. | ||
https:// | * [https://pavlovrcon.com/ PavlovRCON.com]: A web-based RCON client | ||
* [https://discord.com/oauth2/authorize?client_id=780880728992383077&scope=bot&permissions=199744 Horde Bot]: Discord bot specific to [[Hosting Providers|Horde servers]] | |||
=== Third party local tools === | |||
These are programs that are downloaded and ran locally to provide an RCON interface. | |||
''' | '''Warning''': If a tool is not open source it is not easily possible to verify that it does not steal RCON passwords. It is recommended to only use open source tools that can be verified. | ||
https://github.com/ | * [https://github.com/Oakraven79/pavlov_rcon_tcl pavlov_rcon_tcl]: Python based UI which is designed to be usable from within VR. Standalone executable. Requires editing of configuration files. | ||
* [https://github.com/Krzychu81/pavlov-vr-rcon pavlov-vr-rcon]: node.js based web UI which is designed to be usable from within VR. Requires node.js. | |||
=== Third party self hosted tools === | |||
These are services that need to be self hosted. | |||
If | '''Warning''': If a tool is not open source it is not easily possible to verify that it does not steal RCON passwords. It is recommended to only use open source tools that can be verified. | ||
* [https://github.com/devinSpitz/PavlovRconWebserver PavlovRconWebserver]: Feature-rich all-in-one hosting solution. | |||
* [https://github.com/Longoon12000/PterodactylPavlovServerController PPSC]: [https://pterodactyl.io/ Pterodactyl]-based feature-rich server management software. Requires the servers to run through Pterodactyl. | |||
* [https://github.com/makupi/pavlov-bot pavlov-bot]: A bot that allows for using RCON through Discord. | |||
=== Direct connect === | |||
Since the RCON protocol is plain text TCP, direct connection terminals can be used to connect to RCON. | |||
==== Netcat ==== | |||
nc ip-or-domain.com port | |||
'''Example''' | |||
❯ nc myserver.com 9101 | |||
Password: 7a6d667ea5ed4467c017b2ed6ea07e78 | |||
Authenticated=1 | |||
ServerInfo | |||
{ | |||
"Command": "ServerInfo", | |||
"ServerInfo": | |||
{ | |||
"MapLabel": "sand", | |||
"GameMode": "snd", | |||
"ServerName": "My server", | |||
"Teams": true, | |||
"Team0Score": "0", | |||
"Team1Score": "2", | |||
"Round": "2", | |||
"RoundState": "Started", | |||
"PlayerCount": "0/10" | |||
}, | |||
"Successful": true | |||
} | |||
Disconnect | |||
Goodbye | |||
=== | ==== Telnet ==== | ||
Telnet seems to prematurely flush the buffer when entering the password, causing authentication to fail. | |||
=== Libraries === | |||
These are libraries for developers to interface with RCON. | |||
* [https://github.com/Longoon12000/PavlovVR-Rcon PavlovVR-Rcon]: .net 7 library written in C# | |||
* [https://github.com/kaylynn234/rcon rcon]: Python library | |||
* [https://github.com/makupi/async-pavlov async-pavlov]: Asynchronous python library | |||
==== Tips on developing apps to use RCON ==== | |||
It should be avoided to open a new connection for each command. It may cause performance issues. | |||
It should be avoided to send multiple commands directly one after the other without a delay of 100ms. It may cause commands to be dropped. | |||
Commands are not executed during a map change. | |||
Latest revision as of 09:38, 9 June 2024
RCON (Remote Console) is the method with which Pavlov VR servers can be controlled from outside of VR. It does not allow for reading server log messages.
RCON Commands
Placeholders
Values in [square brackets] are placeholders and must be replaced, or will be replaced by the server in a reply.
[UniqueID] - Player ID (eg. SteamID64 (PCVR), Oculus Username (Shack))
[GameMode] - See Gamemodes table and Gamemodes
[TeamID] - 0 for blue, 1 for red, if there are teams
[VehicleID] - See Vehicles
[MapName/ID] - See Default maps or find the Map ID on Mod.io and append it to "UGC" (Example: https://mod.io/g/pavlov/m/mcdonalds has Resource ID 2804322
, the MapID to use would be UGC2804322
)
[SkinID] - See Skins
[RoleID] - See TTT Roles
[ItemID] - See Items
[True/False] - Either "True" to enable or "False" to disable
[Amount] - A number indicating an amount of something
Reply format
All command replies are formatted as JSON and inherit this base format:
{ "Command": "[The command name]", "Comment": "[An optional comment about the command]", "Successful": "[True/False]" }
Comment will not exist if the command does not output a comment.
Additional command output is added to the above format. The Example Reply column below only contains this additional command output.
Often, commands will contain a field with its own name and a boolean value. This is a very inconsistent value. For example in SetMaxPlayers
, if the amount is set to the same as the current slot count, Successful
will be true
but SetMaxPlayers
will be false
. However for SwitchTeam
for example, if a player is switched to the same team they are already in, SwitchTeam
will be true
anyway.
Commands
Command | Parameters | Description | Example Command | Example Reply |
---|---|---|---|---|
Help | none | Returns the full list of commands and their parameters |
Help |
"Help": [ "AddMapRotation MapID GameMode", ...truncated... "UpdateServerName ServerName" ], |
AddMapRotation | [MapName/ID]
[GameMode] |
Adds the specified map with the specified game mode to the bottom of the map rotation.
Writes the map to |
AddMapRotation sand snd |
|
AddMod | [UniqueID] | Adds the specified player to the moderator list, making them an admin.
Allows them to use the admin menu in the pause menu and be immune to being vote-kicked. Writes the player to |
AddMod 12345678901234567 |
"AddMod": true, "UniqueID": "12345678901234567", |
Ban | [UniqueID] | Kicks and permanently bans the specified player from the server. They will not be able to join the server anymore.
Writes the player to |
Ban 12345678901234567 |
"Ban": true, "UniqueID": "12345678901234567", |
Banlist | none | Lists the currently banned player UniqueIDs from blacklist.txt .
|
Banlist |
"BanList": [ "12345678901234567", "12345678901234568", ...truncated... "12345678901234569" ], |
ClearEmptyVehicles | none | Removes all vehicles that are not occupied by a player. |
ClearEmptyVehicles |
|
Disconnect | none | Forces the server to closes the RCON connection. |
Disconnect |
Goodbye |
EnableCompMode | [True/False] | Enables or disables competitive mode.
Comment: Comp mode will be changed on map rotation, this updates the config value Writes to |
EnableCompMode true |
"CompModeState": true, "EnableCompMode": true, |
EnableVerboseLogging | [True/False] | Enables or disables verbose logging.
Writes to |
EnableVerboseLogging false |
"VerboseLoggingState": false, "EnableVerboseLogging": true, |
EnableWhitelist | [True/False] | Enables or disables whitelist usage.
When enabled, only players who are listed in Writes to |
"WhitelistState": true, "EnableWhitelist": true, | |
Gag | [UniqueID]
[True/False] |
Gags or ungags the specified player.
When gagged, players can not use voice chat. |
"Gag": true, "UniqueID": "12345678901234567", | |
GiveAll | [TeamID]
[ItemID] |
Gives an item to all players on a team.
The |
"GiveAll": true, "TeamID": "1", "ItemID": "galul", | |
GiveCash | [UniqueID]
[CashAmount] |
Gives the specified amount of cash to the specified player. |
GiveCash 12345678901234567 200 |
"GiveCash": true, "UniqueID": "12345678901234567", |
GiveItem | [UniqueID]
[ItemID] |
Equippes the specified item to the specified player to the corresponding item slot.
Primary guns are placed into the players main hand, replacing the held gun, which will drop. Secondary guns are placed onto the players hip, replacing the holstered gun, which will drop. Utilities will be placed onto the players chest slots until all slots are full, which will cause given items to be dropped instead. |
GiveItem 12345678901234567 syringe |
"GiveItem": true, "UniqueID": "12345678901234567", |
GiveTeamCash | [TeamID]
[CashAmount] |
Adds the specified amount of cash to each member of the specified team. |
GiveTeamCash 0 200 |
"GiveTeamCash": true, "TeamID": "0", |
InspectAll | none | Returns a list of InspectPlayer blocks for all players on the server. |
InspectAll |
"InspectList": [ { "PlayerName": "Username", "UniqueId": "12345678901234567", "KDA": "3/1/2", "Score": "50", "Dead": false, "Cash": "3450", "TeamId": "1", "Ping": 39.857143402099609, "Gag": false }, ...truncated... ], |
InspectPlayer | [UniqueID] | Returns a detailed status for the specified player.
The player must be listed in RefreshList. |
InspectPlayer 12345678901234567 |
"PlayerInfo": { "PlayerInfo": { "PlayerName": "Username", "UniqueId": "12345678901234567", "KDA": "3/1/2", "Score": "50", "Dead": false, "Cash": "3450", "TeamId": "1", "Ping": 39.857143402099609, "Gag": false }, |
InspectTeam | [TeamID] | Returns a list of InspectPlayer blocks for all player on the specified team. |
InspectTeam 1 |
"InspectList": [ { "PlayerName": "Username", "UniqueId": "12345678901234567", "KDA": "3/1/2", "Score": "50", "Dead": false, "Cash": "3450", "TeamId": "1", "Ping": 39.857143402099609, "Gag": false }, ...truncated... ], |
ItemList | none | Lists all items in the game and the current map.
Custom items built into the map will be listed. |
ItemList |
"ItemList": [ "1911", "57", "acog", "adrenaline", ...truncated... "ww2knife", "ww2medkit", "ww2painkillers", "ww2syringe" ], |
Kick | [UniqueID] | Kicks the specified player from the server. |
Kick 12345678901234567 |
"UniqueID": "12345678901234567", "Kick": true, |
Kill | [UniqueID] | Kills the specified player. |
Kill 12345678901234567 |
"UniqueID": "12345678901234567", "Kill": true, |
MapList | none | Returns the current map rotation from Game.ini. |
MapList |
"MapList": [ { "MapId": "UGC2863450", "GameMode": "SND" }, ...truncated... { "MapId": "sand", "GameMode": "snd" } ], |
ModeratorList | none | Returns a list of UniqueIDs of all moderators from mods.txt .
|
ModeratorList |
"ModeratorList": [ "12345678901234567", ...truncated... "12345678901234568" ], |
RefreshList | none | Returns a list of all connected player names and their corresponding UniqueIDs. |
RefreshList |
"PlayerList": [ { "Username": "Username", "UniqueId": "12345678901234567" }, ...truncated... { "Username": "Username2", "UniqueId": "12345678901234568" } ], |
RemoveMapRotation | [MapName/ID]
[GameMode] |
Removes the first occurrence of the specified map and game mode combination from the map rotation.
[MapName/ID] and [GameMode] are case sensitive to the entries in Writes the change to |
RemoveMapRotation sand snd |
|
RemoveMod | [UniqueID] | Removes the specified player from the moderator list.
Writes the change to |
RemoveMod 12345678901234567 |
"RemoveMod": true, "UniqueID": "12345678901234567", |
ResetSND | none | Reset the currently running SND match.
All players will have starting cash, no kills, deaths, assists or score. All players are killed. The score is reset to 0 all. |
ResetSND |
"ResetSND": true, |
PauseMatch | [Optional Amount] | Pauses the currently running match for the specified amount of seconds.
The game is frozen and displays a "Game is paused" countdown timer. The game is unpaused when amount is not specified or 0. Unpausing starts a countdown timer at 15 seconds before unpausing. Minimum: 0 Maximum: 3600 |
PauseMatch 60 |
"PauseTime": 60, "PauseMatch": true, |
RotateMap | none | Immediately changes the current map to the next map in the map rotation.
If the current map was changed to using |
RotateMap |
"RotateMap": true, |
ServerInfo | none | Returns server information such as server name, player count, current map and mode, and more. |
ServerInfo |
"ServerInfo": { "MapLabel": "datacenter", "GameMode": "snd", "ServerName": "Server name", "Teams": true, "Team0Score": "4", "Team1Score": "1", "Round": "6", "RoundState": "Started", "PlayerCount": "8/10" }, |
SetBalanceTableURL | [GithubURL] | Sets the balance table to load from the specified URL.
The URL has the format The balance table contains the values for the prices in the buy wheel, how much money is gained from which actions and how much damage is dealt by each weapon including damage falloff and more. Writes to |
SetBalanceTableURL vankruptgames/BalancingTable/Beta_5.1 |
"GithubURL": "https://raw.githubusercontent.com/vankruptgames/BalancingTable/Beta_5.1", "SetBalanceTableURL": true, |
SetCash | [UniqueID]
[CashAmount] |
Sets the cash of the specified player to the specified amount.
Minimum: 0 Maximum: 16000 |
SetCash 12345678901234567 1000 |
"SetCash": true, "UniqueID": "12345678901234567", |
SetLimitedAmmoType | [AmmoType] | Sets the ammo limitation type.
0 for unlimited, 1 for limited generic, 2 for limited specific, 3 for custom, 4 for limited special, 5 for boxless. See Limited Ammo Types for details. Writes to |
SetLimitedAmmoType 0 |
"SetLimitedAmmoType": true, "LimitedAmmoType": "0", |
SetMaxPlayers | [Amount] | Sets the amount of slots on the server to the specified amount.
Minimum: 1 Maximum: 24 (PCVR), 10 (Shack) Writes to |
SetMaxPlayers 10 |
"SetMaxPlayers": true, "MaxPlayers": 10, |
SetPin | [Optional PinNumber] | Sets the server pin to the specified pin number.
Supplying a pin number locks the server so that player have to enter a pin to join. Not supplying a pin number unlocks the server so that players do not have to enter a pin. PinNumber can be any whole number between 1 and 9999 and may not contain leading zeroes such as Setting the pin to Writes to |
SetPin 69 |
|
SetPlayerSkin | [UniqueID]
[SkinID] |
Sets the player skin of the specified player to the specified skin.
The skin is automatically removed if the player leaves the server, switches teams or upon map change. |
SetPlayerSkin 12345678901234567 kevin |
"SetPlayerSkin": true, "UniqueID": "12345678901234567", |
SetTimeLimit | [Amount] | Sets the time limit of the current match to the specified amount in seconds.
The match will end once the time limit has counted down to 0. |
Missing data, please rectify. | |
ShowNametags | [True/False] | Enables or disables name tags above friendly players. |
ShowNametags true |
"NametagsEnabled": true, "ShowNametags": true, |
ShutdownServer | none | Immediately shuts down the server. |
ShutdownServer |
|
Slap | [UniqueID]
[Amount] |
Deals the specified amount of damage to the specified player. Can be lethal if the amount exceeds the current health of the player.
The damage is dealt directly to health and ignores armor. |
Slap 12345678901234567 |
"UniqueID": "12345678901234567", |
SwitchMap | [MapID]
[GameMode] |
Immediately switches to the specified map and game mode.
TDM is automatically selected if no game mode has been specified. |
SwitchMap datacenter snd |
"SwitchMap": true, |
SwitchTeam | [UniqueID]
[TeamID] |
Kills and moves the specified player into the specified team.
It will be as if the player has just joined (that team) or if they switched themselves, losing all money, kills, deaths, assists, score and gear. |
SwitchTeam 12345678901234567 1 |
"SwitchTeam": true, "UniqueID": "12345678901234567", |
Teleport | [Source UniqueID]
[Target UniqueID] |
Teleports the specified source player to the position of the specified target player.
Only works when both the source player and the target player are alive. |
Teleport 12345678901234567 12345678901234568 |
"MoveUniqueID": "12345678901234567", "ToUniqueID": "12345678901234568", "Teleport": true, |
TTTAlwaysEnableSkinMenu | [True/False] | Trouble in Terrorist Town: Enables or disables the skin menu mid-round. | ||
TTTEndRound | [TeamID] | Trouble in Terrorist Town: Ends the round. | ||
TTTFlushKarma | none | Trouble in Terrorist Town: Resets the karma of all players to 1200. | ||
TTTGiveCredits | [UniqueID]
[Amount] |
Trouble in Terrorist Town: Adds the specified amount of TTT credits to the specified player. | ||
TTTPauseTimer | [True/False] | Trouble in Terrorist Town: Pauses the timer. | ||
TTTSetKarma | [UniqueID]
[Amount] |
Trouble in Terrorist Town: Sets the karma of the specified player to the specified amount. | ||
TTTSetRole | [UniqueID]
[RoleID] |
Trouble in Terrorist Town: Sets the TTT role of the specified player to the specified role. | ||
Unban | [UniqueID] | Unbans the specified player so that they can join again.
Writes the change to |
Unban 12345678901234567 |
"Unban": true, "UniqueID": "12345678901234567", |
UpdateServerName | [Name] | Changes the server name to the specified name.
Writes to |
UpdateServerName My server name |
"ServerName": "My server name", "UpdateServerName": true, |
UGCAddMod | [UGCModID] | Adds the mods to the server. |
UGCAddMod UGC3267926 |
Missing data, please rectify. |
UGCClearModList | Removes all mods from the server. |
UGCClearModList |
Missing data, please rectify. | |
UGCModList | Lists all mods currently on the server. |
UGCModList |
Missing data, please rectify. | |
UGCRemoveMod | [UGCModID] | Removes specified mod from the server. |
UGCRemoveMod UGC3267926 |
Missing data, please rectify. |
Connecting to RCON
RCON uses a simple UTF-8 TCP text stream allowing for a multitude of ways to connect.
Authentication
After connecting to RCON, the first message sent is by the server requesting the RCON password to be transmitted.
For this, the server sends a 10 byte message "Password:
" (including the trailing space) to the client.
The client is expected to reply with the password as lowercase hex representation of the MD5 checksum of the password.
No line feed or carriage return character must be transmitted as part of the password.
If the password is correct, the server will reply with Authenticated=1\r\n
or if the password was incorrect, the reply will be Authenticated=0\r\n
.
Example
Authentication using the password "hello test".
> Password: < 7a6d667ea5ed4467c017b2ed6ea07e78 > Authenticated=1\r\n
Sending commands and receiving replies
Any data sent to the server and terminated by a line feed character will be interpreted as a command and executed.
This is followed by the server sending the corresponding command response in JSON format with new lines being indicated by a line feed character
The response is terminated with a carriage return and line feed.
Example
Executing the command ServerInfo
.
< ServerInfo\n > {\n\t"Command": "ServerInfo",\n\t"ServerInfo":\n\t{\n\t\t"MapLabel": "UGC2863450",\n\t\t"GameMode": "SND",\n\t\t"ServerName": "Server name",\n\t\t"Teams": true,\n\t\t"Team0Score": "0",\n\t\t"Team1Score": "3",\n\t\t"Round": "3",\n\t\t"RoundState": "Ended",\n\t\t"PlayerCount": "0/10"\n\t},\n\t"Successful": true\n}\r\n
Tools for connecting to RCON
Third party hosted tools
The easiest way to access RCON is to use a third party hosted tool. These are websites that take the RCON connection information and provide an RCON web interface.
Warning: These tools may not be open source and can steal RCON passwords! Because they are hosted by third parties, it is impossible to verify that they do not.
- PavlovRCON.com: A web-based RCON client
- Horde Bot: Discord bot specific to Horde servers
Third party local tools
These are programs that are downloaded and ran locally to provide an RCON interface.
Warning: If a tool is not open source it is not easily possible to verify that it does not steal RCON passwords. It is recommended to only use open source tools that can be verified.
- pavlov_rcon_tcl: Python based UI which is designed to be usable from within VR. Standalone executable. Requires editing of configuration files.
- pavlov-vr-rcon: node.js based web UI which is designed to be usable from within VR. Requires node.js.
Third party self hosted tools
These are services that need to be self hosted.
Warning: If a tool is not open source it is not easily possible to verify that it does not steal RCON passwords. It is recommended to only use open source tools that can be verified.
- PavlovRconWebserver: Feature-rich all-in-one hosting solution.
- PPSC: Pterodactyl-based feature-rich server management software. Requires the servers to run through Pterodactyl.
- pavlov-bot: A bot that allows for using RCON through Discord.
Direct connect
Since the RCON protocol is plain text TCP, direct connection terminals can be used to connect to RCON.
Netcat
nc ip-or-domain.com port
Example
❯ nc myserver.com 9101 Password: 7a6d667ea5ed4467c017b2ed6ea07e78 Authenticated=1 ServerInfo { "Command": "ServerInfo", "ServerInfo": { "MapLabel": "sand", "GameMode": "snd", "ServerName": "My server", "Teams": true, "Team0Score": "0", "Team1Score": "2", "Round": "2", "RoundState": "Started", "PlayerCount": "0/10" }, "Successful": true } Disconnect Goodbye
Telnet
Telnet seems to prematurely flush the buffer when entering the password, causing authentication to fail.
Libraries
These are libraries for developers to interface with RCON.
- PavlovVR-Rcon: .net 7 library written in C#
- rcon: Python library
- async-pavlov: Asynchronous python library
Tips on developing apps to use RCON
It should be avoided to open a new connection for each command. It may cause performance issues.
It should be avoided to send multiple commands directly one after the other without a delay of 100ms. It may cause commands to be dropped.
Commands are not executed during a map change.