RUNNING WITH RIFLES http://www.runningwithrifles.com/phpBB3/ |
|
RWR Dedicated Server setup guide - OBSOLETE!!! http://www.runningwithrifles.com/phpBB3/viewtopic.php?f=9&t=1039 |
Page 1 of 4 |
Author: | {SAS}DocStone [ Fri Mar 01, 2013 2:20 pm ] |
Post subject: | RWR Dedicated Server setup guide - OBSOLETE!!! |
**** OBSOLETE !! THIS IS WORKING ANYMORE ***** Updated 14th March 2014 - Beta release 0.9.4 PLEASE NOTE - This tutorial is based on a RWR Server setup on a dedicated box running Windows Server with PHP 5.2.10 already installed. To run this on a standard windows machine at home some of the custom batch files will not work unless you have PHP installed on your machine. You can get more information on how to instal PHP on your home system from the official PHP webite here: http://uk1.php.net/ Installation The installation of the rwr_server itself is very simple, with only two steps:
Then you will have to set an exception for the game in your server firewall. You will need to allow incoming and outgoing UDP access on the port you have set up for the game. I am assuming that as you have a Windows Server set up you know how to do this ![]() Congratulations, you have installed your server and it will run as it is, however we still need to set it up. Server Configuration The system setup is now much simpler, and requires the download of only the server files and game files to work, with only one file really needing changed to make your server work as a vanilla RWR server. Games Settings – Classic You will have to navigate to your scripts folder to find the files you need to change to set up your folder - these files can be found here: ![]() The first file you will have to modify is the server_settings_classic.php file. This sets up the details for your server and should be filled in as follows: server_settings_classic Code: <?php function get_start_server_command() { // CUSTOMIZE YOUR SERVER SETTINGS HERE $command = "<command class='start_server' " . " server_name='{SAS} Beerdrinkers' " . " server_port='1234' ". " comment='PvP, Match Profiles, 12 Hour Auto Restart' ". " url='http://www.thesasclan.co.uk' ". " register_in_serverlist='1'". " client_max_start_rank='0.1'". " client_faction_index='-1'". " persistency='match'". " max_players='40'". "</command>"; return $command; } ?> These are all pretty self explanatory, details as follows:
Games Settings – Invasion The first file you will have to modify is the server_settings_invasion.php file. This sets up the details for your server and should be filled in as follows: server_settings_invasion Code: <?php // invasion server command function get_start_server_command() { // CUSTOMIZE YOUR SERVER SETTINGS HERE // $command = ""; $command = "<command class='start_server' " . " server_name='{SAS} Invasion' " . " server_port='1235' ". " comment='Coop Campaign, Persistent Profiles, 12 Hour Auto Restart' ". " url='http://www.thesasclan.co.uk' ". " register_in_serverlist='1'". " client_max_start_rank='0.0'". " client_faction_index='0'". " persistency='forever'". " max_players='40'". "</command>"; return $command; } ?> These are all pretty self explanatory, details as follows:
I do not recommend changing any other files when running an Invasion server, however if you do wish to experiment, settings can be changed in the modes\trackers\map_rotator_invasion.php file. Please do so at your own risk. That is your Invasion server set up. Simples. The same principles apply when changing your server_settings_team_eleimination.php file. Starting the game All that is left now is to start the games and run the scripts. Batch files are now included with the game and can be found in the main RWR directory: ![]() Again, pretty self explanatory and each batch file runs a particular flavour of the game. I made my own custom batch files to run the game, listed below, but use whatever you feel most comfortable with: RWR Classic Startup.bat Code: ECHO OFF ECHO Starting RWR Standard Server e: CD e:/RWR1 START "RWR Standard" rwr_server.exe TIMEOUT 5 CD E:\RWR1\media\packages\vanilla\scripts START "Map Rotation Script" php gamemode_classic.php RWR Invasion Startup.bat Code: ECHO OFF ECHO Starting RWR Invasion Server e: CD e:/RWR2 START "RWR Invasion" rwr_server.exe TIMEOUT 5 CD E:\RWR2\media\packages\vanilla\scripts START "Invasion Script" php gamemode_invasion.php A double click on either file and the game fires up with no issues. I also use a batch file that fires up both servers and restarts them automatically every 12 hours: Code: @ECHO OFF :START CLS ECHO Starting Server Proccesses ECHO. TIMEOUT 5 ECHO Starting RWR Standard Server ECHO. e: CD e:/RWR1 START "RWR Standard" rwr_server.exe TIMEOUT 10 ECHO Starting map rotation script ECHO. CD E:\RWR1\media\packages\vanilla\scripts START "Map Rotation Script" php gamemode_classic.php TIMEOUT 10 ECHO Starting RWR Invasion Server ECHO. CD e:/RWR2 START "RWR Invasion" rwr_server.exe TIMEOUT 10 ECHO Starting invasion script ECHO. CD E:\RWR2\media\packages\vanilla\scripts START "Invasion Script" php gamemode_invasion.php ECHO 12 Hour Countdown Started ECHO. TIMEOUT 43200 ECHO Killing Servers ECHO. TASKKILL /f /im rwr_server.exe ECHO. TIMEOUT 30 ECHO Restarting servers ECHO. GOTO START Again, feel free to use if you want, the servers do lag a bit sometimes if they are not restarted and this is a nice easy way to automate the process. Multiple Servers If you wish to run more than one instance of RWR_server.exe on your box then there is a further file that needs to be modified. In the installation directory of your second server, navigate to \RWR\media\packages\vanilla\scripts\comms_settings and modify the file to match the following: comms_settings Code: <?php include_once("internal/helpers.php"); // define the comms interface paths here // Comms knows to pick these up from global namespace $fifo_out_path = ""; $fifo_in_path = ""; if (is_windows()) { // windows $strComputername = php_uname('n'); $fifo_out_path = "\\\\" . $strComputername . "\\pipe\\rwr_server2_in"; $fifo_in_path = "\\\\" . $strComputername . "\\pipe\\rwr_server2_out"; } else { $fifo_out_path = "/tmp/rwr_server_in"; $fifo_in_path = "/tmp/rwr_server_out"; } ?> It is as simple as adding the number 2 to the two lines above, the game will take care of the rest. I have kept the old guide in the following spoiler for those that do not have PHP installed. Spoiler: For advanced users, here is how to change the PvP configuration - continue at your own risk: Spoiler: A very simple guide, which I will update as and when required, but it means if you do have a server sitting there, then at least now you know how to get it running RWR ![]() |
Author: | pasik [ Fri Mar 01, 2013 2:53 pm ] |
Post subject: | Re: RWR Dedicated Server setup guide - Windows |
Thanks DocStone, that's a great guide and summary of stuff to handle when setting up a server! I've just got one remark, initial_over_capacity actually means amount of soldiers, not bases. initial_occupied_bases (only possible to set for the first faction) is the one about control points you were describing. |
Author: | pasik [ Fri Mar 01, 2013 3:04 pm ] |
Post subject: | Re: RWR Dedicated Server setup guide - Windows |
300 bots for map1 (14 control points) will feel a lot different to 300 bots for map4 (6 points). My own general rule is 20 bots per control point, but for map5 it feels way too much too, especially in the east side of the map where the points are really closely positioned. |
Author: | {SAS}DocStone [ Fri Mar 01, 2013 5:22 pm ] |
Post subject: | Re: RWR Dedicated Server setup guide - Windows |
pasik wrote: Thanks DocStone, that's a great guide and summary of stuff to handle when setting up a server! I've just got one remark, initial_over_capacity actually means amount of soldiers, not bases. initial_occupied_bases (only possible to set for the first faction) is the one about control points you were describing. Weird, when I put: Code: <faction initial_over_capacity="1" ai_accuracy="0.94" /> <faction initial_over_capacity="0" ai_accuracy="0.94" /> in earlier, the Green army (when I used "status") were controlling all the points but 1 on start-up. Just did it again just now, and it was even again. Will update my post ![]() So what does changing that value actually do in real terms? Also, could you tell me what client_max_start_rank and client_faction_index do as well? I would like to be able to make it so that everyone has to start at level 0 when they join the server, makes promotions more worthwhile. pasik wrote: 300 bots for map1 (14 control points) will feel a lot different to 300 bots for map4 (6 points). My own general rule is 20 bots per control point, but for map5 it feels way too much too, especially in the east side of the map where the points are really closely positioned. Have to say 300 bots on the smaller maps when there are a lot of players in PvP (say 5 a-side) makes the games absolutely frantic and fantastic! Will try setting them to your preference and see how it goes at some point over the weekend, but so far the guys in the clan are loving the carnage so many bot's bring ![]() |
Author: | pasik [ Fri Mar 01, 2013 6:56 pm ] |
Post subject: | Re: RWR Dedicated Server setup guide - Windows |
{SAS}DocStone wrote: So what does changing that value actually do in real terms? When the match starts, 80% of the total soldier count will spawn in the battlefield. With 300 soldier count and even bases, it means 120 green and 120 grey soldiers. On top of this, the number of initial over capacity soldiers per faction is spawned to boost the initial state. If the boost goes over the faction capacity, some bots simply won't respawn after they die the first time. Initial over capacity is mostly useful in a situation where you'd set e.g. greens to have 1 base to start with. To continue with the previous example and let's say map1, 300 total soldier count and 14 control points, the soldiers per base figure would be roughly 300/14=21, with full capacity greens would have 21 soldiers against about 279 greys, until they capture new bases. Ok, with the 80% spawn rule, greens start with about 17 against 223; they'll never make it unless they are given some boost at the start, which is where initial over capacity comes into play. You can give greens some non-respawning soldiers for the very start of the match, to help them win another base to get the invasion going. If you're going to test that, you'll see that my numbers aren't absolutely correct. It's because the winning faction suffers some loss of soldiers-per-base when they have more bases than the even situation. It helps with allowing a chance to get even for the losing faction, a bit. {SAS}DocStone wrote: Also, could you tell me what client_max_start_rank and client_faction_index do as well? I would like to be able to make it so that everyone has to start at level 0 when they join the server, makes promotions more worthwhile. Set client_max_start_rank to 0.0. The setting works as a capping figure for anything the client himself sets as preferred value. The ranks are really from 0.0 to 1.0, but players in the UI see them from 0 to 10. Note that M72 LAW's are not usable at rank 0, you need at least rank 1. Mortars are rewarded starting from rank 3. Client_faction_index overrides the client preferred faction setting, -1 means client can choose, 0 means everyone is green, 1 means everyone is grey. {SAS}DocStone wrote: pasik wrote: 300 bots for map1 (14 control points) will feel a lot different to 300 bots for map4 (6 points). My own general rule is 20 bots per control point, but for map5 it feels way too much too, especially in the east side of the map where the points are really closely positioned. Have to say 300 bots on the smaller maps when there are a lot of players in PvP (say 5 a-side) makes the games absolutely frantic and fantastic! Will try setting them to your preference and see how it goes at some point over the weekend, but so far the guys in the clan are loving the carnage so many bot's bring ![]() Uhm, meant the west side obviously, my head is still spinning after playing Sainte-Anne in flipped mode for a while ![]() ![]() I personally don't think the AI scales up to too crowded fighting very well yet, they form those clusters and bump into each other all the time. It's a scene I don't want to see, after all I'm trying to create a decent AI here that isn't just sitting out there as targets ![]() |
Author: | {SAS}DocStone [ Fri Mar 01, 2013 7:08 pm ] |
Post subject: | Re: RWR Dedicated Server setup guide - Windows |
pasik wrote: I personally don't think the AI scales up to too crowded fighting very well yet, they form those clusters and bump into each other all the time. It's a scene I don't want to see, after all I'm trying to create a decent AI here that isn't just sitting out there as targets ![]() Lol, yeah, I can see your point there. I have to say, the AI in this game is incredible, you have really nailed it, the amount of times I have been blinsided is great! |
Author: | {SAS}DocStone [ Mon Mar 04, 2013 2:30 pm ] |
Post subject: | Re: RWR Dedicated Server setup guide - Windows |
Updated both contents and cosmetics to make it easier to follow. Pasik, what other variables does Persistency have apart from "forever"? |
Author: | pasik [ Mon Mar 04, 2013 4:00 pm ] |
Post subject: | Re: RWR Dedicated Server setup guide - Windows |
{SAS}DocStone wrote: Updated both contents and cosmetics to make it easier to follow. Pasik, what other variables does Persistency have apart from "forever"? "match" is the other alternative. |
Author: | {SAS}DocStone [ Mon Mar 04, 2013 4:18 pm ] |
Post subject: | Re: RWR Dedicated Server setup guide - Windows |
Cheers Pasik, am I on track with everything else? |
Author: | pasik [ Mon Mar 04, 2013 6:15 pm ] |
Post subject: | Re: RWR Dedicated Server setup guide - Windows |
{SAS}DocStone wrote: Cheers Pasik, am I on track with everything else? Looks good to me! Just one thing, progress_multiplier actually changes how large the XP rewards are, not the rank XP levels. So if you would have got +20 for certain kill, with 0.5 multiplier you'd get +10 instead. |
Page 1 of 4 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |