It is currently Sun Dec 22, 2024 1:55 am

RUNNING WITH RIFLES Multiplayer

test

Game servers 52 List provided by EpocDotFr | Players online 82


All times are UTC




Post new topic Reply to topic  [ 35 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
PostPosted: Fri Mar 01, 2013 2:20 pm 
Offline
User avatar

Joined: Mon Feb 25, 2013 12:24 pm
Posts: 283
**** 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:

  • Download and extract the dedicated server files into a folder of your choice on your server. They are normally available from here
  • Copy over the media folder from the RWR game install to the same folder the rwr_server.exe is in.
  • IMPORTANT - These need to be from the same Beta Version

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 :D

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:

Image

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:

  • class - this is the command
  • server_name - whatever you want to call your server. Don't make it too long or it makes a mess of the ingame server list
  • server_port - the port you configured at the start {default 1234}
  • comment - appears in the in-game server browser and on the web server list at http://serverlist.modulaatio.com/
  • url - at the moment this only works in the web server list, and allow the server name to become clickable and redirect to a preferred site. Currently set to redirect to our clan homepage
  • register_in_server_list - 0 means your server is hidden, 1 means it is visible {default 1}
  • client_max_start_rank - ranges from 0,0 to 1.0, with each 0.1 increase setting the maximum rank you can join with a new character {default 0.1}
  • client_faction_index - this has three settings; -1 means players can choose which army, 0 means all are Green, 1 means all are Grey and 2 means all are Brown. {default -1}
  • Persistency - set to "forever" to allow the server to retain game stats or to "match" to reset the stats at the end of each game - match is recommended for PvP
  • max_players - this sets the maximum number of players allowed to connect to your server. Remember, network load is exponential, not linear - 32 players do NOT use twice as much as 16, so set this according to your available bandwidth




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:

  • class - this is the command
  • server_name - whatever you want to call your server. Don't make it too long or it makes a mess of the ingame server list
  • server_port - the port you configured at the start {default 1234}
  • comment - appears in the in-game server browser and on the web server list at http://serverlist.modulaatio.com/
  • url - at the moment this only works in the web server list, and allow the server name to become clickable and redirect to a preferred site. Currently set to redirect to our clan homepage
  • register_in_server_list - 0 means your server is hidden, 1 means it is visible {default 1}
  • client_max_start_rank - ranges from 0,0 to 1.0, with each 0.1 increase setting the maximum rank you can join with a new character {default 0.0}
  • client_faction_index - this has three settings; -1 means players can choose which army, 0 means all are Green, 1 means all are Grey and 2 means all are Brown. DO NOT CHANGE THIS SETTING IN INVASION{default 0}
  • Persistency - set to "forever" to allow the server to retain game stats or to "match" to reset the stats at the end of each game - forever is recommended for Invasion
  • max_players - this sets the maximum number of players allowed to connect to your server. Remember, network load is exponential, not linear - 32 players do NOT use twice as much as 16, so set this according to your available bandwidth

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:

Image

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:
The server comes with only one game configuration .xml file, the commands.xml file, but I have also created (with Pasik's guidance) some other other files which go in the directory with it; start_server.xml and startx.xml. These are custom configured config files which are as follows:

Start_server.xml
Code:
<command
   class="start_server"
   server_name="{SAS}Beerdrinkers"
   server_port="1234"
   register_in_serverlist="1"
   client_max_start_rank="0.0"
   client_faction_index="-1"
   persistency="forever"
   comment="Pvp, Persistant Profiles"
   url="http://www.asylumofabsurdity.co.uk/rwr">
</command>


These are all pretty self explanatory, details as follows:

  • class - this is the command
  • server_name - whatever you want to call your server. Don't make it too long or it makes a mess of the ingame server list ;)
  • server_port - the port you configured at the start {default 1234}
  • register_in_server_list - 0 means your server is hidden, 1 means it is visible {default 1}
  • client_max_start_rank - ranges from 0,0 to 1.0, with each 0.1 increase setting the maximum rank you can join with a new character {default 0.3}
  • client_faction_index - this has three settings; -1 means players can choose which army, 0 means all are Green and 1 means all are Grey. {default -1}
  • Persistency - set to "forever" to allow the server to retain game stats or to "match" to reset the stats at the end of each game - Note, you will have to manually copy them to a different directory before the next game finishes them or they will be deleted.
  • comment - appears in the in-game server browser and on the web server list at http://serverlist.modulaatio.com/
    url - at the moment this only works in the web server list, and allow the server name to become clickable and redirect to a preferred site. Currently set to show our server stats


Game Configuration

start1.xml
Code:
<command
   class="start_game"
   vehicles="1"
   max_soldiers="300"
   player_bot_compensation="20"
   progress_multiplier="1.0">
   
   <faction initial_over_capacity="0" ai_accuracy="0.94" />
   <faction initial_over_capacity="0" ai_accuracy="0.94" />
</command>


Again, here is what each variable means:

  • class - again, this is the command required
  • vehicles - 1 is on, 0 is off {default is 1}
  • max_soldiers - the number of AI bots spread between the two teams. I set this per map with the max_soldiers="(number of control points x 20) + 20)". So in map1 with 14 control points, I set max_soldiers to 300; (14 x 20)+20=300 , and in Map3 with 8 control points it is set to 180; (8 x 20)+20=180. I call this the roast chicken rule - 20 minutes per pound plus another 20 minutes :D
  • player_bot_compensation - this number gives the side with the least amount of Human players a numerical Bot boost. If it was 4v1 then the second team would receive a 60 bot increase, if it was 4v4 there would be no increase, and if it was 8v0 you would have a 160 bot increase. The increase in numbers is limited to the max_bot count. {default is 6}
  • progress_multiplier - sets how quickly you rank up. At 1.0 a 40XP kill will gain you the full 40XP, at 0.5 the same kill would only gain you 20XP {default 1.0}
  • faction_initial_overcapacity - sets an increase in the amount of soldiers at game start, these are non-respawning (see below for pasik's description and suggested usage) {default 0}
  • ai_accuracy - sets how good the bots are. Set it higher for a harder game, set it lower for some rambo action. {Default 0.94}
  • The first set of the above two variables are for the Green team, the second set the Grey team

I now have separate startx.xml files for each map, numbered accordingly - map1 has start1.xml, map2 has start2.xml and so on.

Commands

These get all tied together with the third .xml file, the commands.xml. this is what is used to change maps, start/stop/restart server/maps etc.

I use the following file to make it as simple as possible:

commands.xml
Code:
<command_aliases>
   <!-- <alias name="init" command="serve" /> -->
   <alias name="message1" command="say Welcome to your servername!"/>
   <alias name="message2" command="say Join us in Teamspeak"/>
   <alias name="message3" command="say www.your-address.co.uk"/>
   <alias name="greet" command="message1; message2; message3"/>
    <alias name="1" command="start_game 0 0.94 300; compensation_factor 20"/>
    <alias name="2" command="start_game 0 0.94 250; compensation_factor 20"/>
    <alias name="3" command="start_game 0 0.94 200; compensation_factor 20"/>
    <alias name="4" command="start_game 0 0.94 150; compensation_factor 20"/>
    <alias name="5" command="start_game 0 0.94 120; compensation_factor 20"/>
    <alias name="map1" command="change_map vanilla/maps/map1; execute start1.xml"/>
    <alias name="map2" command="change_map vanilla/maps/map2; execute start2.xml"/>
    <alias name="map3" command="change_map vanilla/maps/map3; execute start3.xml"/>
    <alias name="map4" command="change_map vanilla.winter/maps/map4; execute start4.xml"/>
    <alias name="map5" command="change_map vanilla/maps/map5; execute start5.xml"/>
   <alias name="serve" command="execute start_server.xml; map1"/>
</command_aliases>


This allows you to get the game up and running with the map of your choice, with the settings of your choice, with just the one command!

All you need to do now is open the rwr server, and at the command prompt type "serve"

This starts the server with the parameters specified in "start_server.xml" then follows that with the alias "map1" which then loads in map 1 and executes "start1.xml"

If I wish to change the map, then all I type in the command window is "Map{whatever the number}" and the new map loads, as does the custom config files for that map.

For advanced users, here is how to change the PvP configuration - continue at your own risk:

Spoiler:
The second file that can be modified is the map_rotator_classic.php file in the scripts/trackers folder, this is where you control the game variables and set bot numbers per map. Please only change these files if you know what you are doing, as a single mistake will make a mess of things:

map_rotator_classic

Code:
protected function get_start_game_command($index) {
      $start_game_command = "";

      $ai_accuracy = 0.94;
      $player_ai_compensation = 4;
      $xp_multiplier = 0.2;
      $rp_multiplier = 1.0;
      $friendly_fire = 0;
      $base_capture_system = "any";


Again, here is what each variable means:

  • ai_accuracy - sets how good the bots are. Set it higher for a harder game, set it lower for some rambo action. {Default 0.94}
  • player_ai_compensation - this number gives the side with the least amount of Human players a numerical Bot boost. If it was 4v1 then the second team would receive a 16 bot increase, if it was 4v4 there would be no increase, and if it was 8v0 you would have a 32 bot increase. The increase in numbers is limited to the max_bot count. {default is 4}
  • xp_multiplier - sets how quickly you rank up. At 1.0 a 40XP kill will gain you the full 40XP, at 0.5 the same kill would only gain you 20XP {default 1.0}
  • rp_multiplier - sets how quickly you receive Reward Points up. At 1.0 a 300RP reward will give you the full 300RP, at 0.5 the same reward would only give you 150RP {default 1.0}
  • friendly_fire - 0 for off, 1 for on. {default 0}
  • base_capture_system - unknown at the moment. {default "any"}

These variables are then set across all the maps. Map specific settings are described below:

  • vehicles - 1 is on, 0 is off {default is 1}
  • max_soldiers - the number of AI bots spread between the two teams. I set this per map with the max_soldiers="(number of control points x 20) + 20)". So in map1 with 14 control points, I set max_soldiers to 300; (14 x 20)+20=300 , and in Map3 with 8 control points it is set to 180; (8 x 20)+20=180. I call this the roast chicken rule - 20 minutes per pound plus another 20 minutes :D
  • faction_initial_overcapacity - sets an increase in the amount of soldiers at game start, these are non-respawning (see below for pasik's description and suggested usage) {default 0}
  • The first set of the above variable is for the Green team, the second set the Grey team

And that's you, you have configured your Classic Running With Rifles Server with auto map rotation and custom settings!

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 :D

_________________
Image


Last edited by {SAS}DocStone on Sun Mar 16, 2014 4:04 pm, edited 17 times in total.

Top
 Profile  
 
PostPosted: Fri Mar 01, 2013 2:53 pm 
Offline
Site Admin

Joined: Mon Jun 27, 2011 11:59 am
Posts: 2856
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.


Top
 Profile  
 
PostPosted: Fri Mar 01, 2013 3:04 pm 
Offline
Site Admin

Joined: Mon Jun 27, 2011 11:59 am
Posts: 2856
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.


Top
 Profile  
 
PostPosted: Fri Mar 01, 2013 5:22 pm 
Offline
User avatar

Joined: Mon Feb 25, 2013 12:24 pm
Posts: 283
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 :D

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 :D

_________________
Image


Top
 Profile  
 
PostPosted: Fri Mar 01, 2013 6:56 pm 
Offline
Site Admin

Joined: Mon Jun 27, 2011 11:59 am
Posts: 2856
{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 :D


Uhm, meant the west side obviously, my head is still spinning after playing Sainte-Anne in flipped mode for a while :D Yeah, I know many like the crazy lotsa bots stuff and there's nothing wrong with having fun with it :) Many even go farther than that and lower the AI accuracy significantly to go out there and play a bit of Rambo.

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 :P


Top
 Profile  
 
PostPosted: Fri Mar 01, 2013 7:08 pm 
Offline
User avatar

Joined: Mon Feb 25, 2013 12:24 pm
Posts: 283
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 :P


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!

_________________
Image


Top
 Profile  
 
PostPosted: Mon Mar 04, 2013 2:30 pm 
Offline
User avatar

Joined: Mon Feb 25, 2013 12:24 pm
Posts: 283
Updated both contents and cosmetics to make it easier to follow.

Pasik, what other variables does Persistency have apart from "forever"?

_________________
Image


Top
 Profile  
 
PostPosted: Mon Mar 04, 2013 4:00 pm 
Offline
Site Admin

Joined: Mon Jun 27, 2011 11:59 am
Posts: 2856
{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.


Top
 Profile  
 
PostPosted: Mon Mar 04, 2013 4:18 pm 
Offline
User avatar

Joined: Mon Feb 25, 2013 12:24 pm
Posts: 283
Cheers Pasik, am I on track with everything else?

_________________
Image


Top
 Profile  
 
PostPosted: Mon Mar 04, 2013 6:15 pm 
Offline
Site Admin

Joined: Mon Jun 27, 2011 11:59 am
Posts: 2856
{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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 35 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group