How to host a different game mode as dedicated server

TODO: since version 1.70, most game modes have been converted to angelscript (only teddy hunt and team elimination are still PHP!), this section needs to be updated accordingly!

game modes are started with a script. Back in the days, all were PHP but since workshop release, the campaign/invasion scripts have been entirely ported to AngelScript. In the meanwhile, since version 1.70, also "dominance", "minimodes" and "deathmatch" have been ported to AngelScript.

THE FOLLOWING TEXT HAS TO BE ADAPTED FOR TEAM ELIMINATION AND TEDDY HUNT ONLY!

Here is an example about how to start deathmatch:
Created a *.bat file (just a text file with the extension *.bat) in your RWR folder and add this into that file:

rwr_server pipes debug_output pause

PS: if you start an AngelScript script (thus not PHP, such as e.g. invasion), you don't need to create that *.bat file but you can directly execute the rwr_server.exe and proceed to the next step.

Unpack this file in your game directory to have the PHP binaries to be able to execute the php scripts: https://www.dropbox.com/s/ejzteh5oo4er80o/php_rwr.zip?dl=0

exectute that batch file by double clicking it and a server console will appear. In there you can now launch the script you want, e.g. deathmatch but typing:

start_script ../scripts.legacy/start_deathmatch.php

The older PHP scripts are all located in the "scripts.legacy" folder, the AngelScript scripts in the "scripts" folder.

you can also create a file called "commands.xml" in your RWR folder with an alias for every mode to avoid having to type too much. This is an excerpt of mine:

            

if you type "dm" without the brackets into your server console it will launch the deathmatch script with the default server settings. You might want to customize those by e.g. specifying the port and the server name. Those files are usually in the same folder than the script file itself. In our example it's called server_settings_deathmatch.example.php. Best is you duplicate that file and rename it to like "server_settings_deathmatch.php" so that in case of a game update the *example* file won't be overwritten. the deathmatch script and the others as well, include the *example* file on default and also the one I specified. If you want to name the server setting file differently, you will have to also change the line in start_deathmatch.php to have the file inclusion pointing to your custom server setting file.

This line is:

include_once(get_include_with_fallback("server_settings_deathmatch.php", "server_settings_deathmatch.example.php"));

As for my server_settings_deathmatch.php file, it looks like this:

".

" ";

return $command; } ?>