You can host a dedicated server for Hurtworld or rent one from a game server provider that can host one for you. You can run the server normally, or in headless mode (without graphics).
Running a server in Headless mode: Edit
You can run a headless version of the server by running a copy of the game through a batch script. A server script might look something like this:
Game\Hurtworld.exe -batchmode -nographics -exec "host 12871;queryport 12881;servername My Server" -logfile "gamelog.txt" //car.dll
`-batchmode` and `-nographics` tell the game to run headless.
The `-exec` will push commands to the console to be executed on game start - in this case, telling the game to host a server. `host 12871` will host on port 12871, and we also set the name of the server with the `servername` command.
The 'queryport 12881' sets the port that the server communicates with steam on (this defaults to 12881), without this port the server won't show up in the browser. For a more detailed description of these commands, see below.
If you want to run console commands from a file, not the batch script, you can instead put them in a file called `autoexec.cfg` in the folder above the executable.
To Run A Server Non-Headlessly From the Console: Edit
Open a copy of the game. From the main menu, press F1 to bring up the console. You can then input the command `host` (See commands below for usage).
Server Saves Edit
Все сервера имеют функции автосохранения. Если вы попробуете и хозяин, и сообщение об ошибке "не удается хост - убедитесь, что у вас есть достаточные права доступа к файлам в директории игры" напечатан, это означает, что Hurtworld не имеете разрешения на чтение/запись в папку, где он находится.
If you wish to manage saves more explicitly (e.g. run a friend's server save, or manage multiple worlds on the same server) you can use the `savesever` and `loadserver` commands to save and load savegames. See below for usage. Note, however, that loading a new save will cause that save to become the autosave. If you are using multiple saves with your server we highly recommend you backup your autosave under a different name to avoid losing it.
Another thing to note is loading is additive, you could potentially merge 2 save files by loading one over the other, however this may cause buildings to overlap and may wipe character data if players have profiles in both servers.
Hosting Server Commands Edit
|Host||<port>||Hosts a game on the default map, and specified port. Loads the autosave if there is one.||host 12871|
|host||<port> <map>||Hosts a game on the specified map, and specified port. Loads the autosave if there is one.||host 12871 Desert|
|host||<port> <map> <save>||Hosts a game on the specified map, and specified port. Loads the specified savegame (relative to the .exe and without an extension)||host 12871 Desert mysave|
|maxplayers||<num>||Specify the maximum number of players||maxplayers 20|
|servername||<name>||Set the name of the server, as visible in the server browser.||servername My Server|
|changelevel||<levelName>||Change, or reload the level.||changelevel Desert|
|creativemode||<val>||Turn creative mode on and off (free build). Value as 0 for off, 1 for on.||creativemode 1|
|kick||<guid> <reason>||Kick a player, with a reason. Enter the start of a guid for a player (you can see these with `serverstatus`) to identify them.||kick f422 Being a jerk|
|saveserver||<saveName>||Save the server state to file, in the .exe directory. Can be loaded (see loadserver)||saveserver mySave|
|loadserver||<saveName>||Additively load the server state from file, relative to the .exe directory.||loadserver mySave|
|addadmin||<playerid>||Adds a player as admin to the local server for the current session only||addadmin 179673BE-B868-C1A4-4F87-0341FD852002|
|queryport||<port>||Specifies the port to use for communication with the master server, this port must be publicly accessible for the server to show up in the game browser. Default is 12881.||queryport 12882|
|quit||Quits the game immediately.||quit|
|quit||<time>||Quits the game after <time> seconds. Will show a nice message to all clients every 30 seconds, for 5 minutes before the server shuts down.||quit 86400|
|---- ADMIN COMMANDS FOR CLIENT ----|
|itemlist||<name filter>||Shows a list of all items in game (some of them still in development) with item codes||itemlist bow|
|g||<code> <count>||Gives you an item based on item code, be careful with this, if you give yourself too many they will spew onto the ground and lag the server||g 52 100|
|g||<name> <count>||Gives you <count> of every item thats name contains the string <name>||g ore 255|
|rcon||<command>||Executes a command on the server as if it was typed directly into its console|
|spawn||<prefabname>||This will spawn any networked object 2 meters in front of you. Full list of prefabs coming soon||spawn AITokarServer
|refreshai||Destroys all creatures and resource nodes in the world|
|teleport||<who> <toplayer>||Specified by full name, will take player A directly to player B||teleport spencer dazzler|