It is currently Thu Mar 28, 2024 10:57 pm

RUNNING WITH RIFLES Multiplayer

test

Game servers 40 List provided by EpocDotFr | Players online 22


All times are UTC




Post new topic Reply to topic  [ 35 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: Tue May 21, 2013 1:13 pm 
Offline
User avatar

Joined: Mon Feb 25, 2013 12:24 pm
Posts: 283
Guide updated to encompass new scripts.

Just one thing though pasik, still having that issue where if I manually change the maps using the server console and the commands.xml if there are two commands chained together

Code:
    <alias name="map1" command="change_map vanilla/maps/map1; execute start1.xml"/>


then all that happens is the current map restarts.

I have to run the following command first

Code:
   <alias name="mapx" command="change_map vanilla/maps/map5"/>


which will change the map with default settings before the server will recognise the original command and act on it.

Only reason I noticed was during the last event I couldn't change the map until I remembered I had put the "mapx" command in to fix the issue.

_________________
Image


Top
 Profile  
 
PostPosted: Tue May 21, 2013 3:14 pm 
Offline
Site Admin

Joined: Mon Jun 27, 2011 11:59 am
Posts: 2856
I still can't think of anything why that would happen.

Server console
Code:
>map4
   Map media/packages/vanilla.winter/maps/map4 load requested
     Overlay: media/overlays/modulaatio.invasion
   Loading
   Loading.
   Game loaded
   command class start_game
   command = start_game
     max_soldier 120
     vehicles true
     player_bot_compensation 4
     xp_multiplier 1
     rp_multiplier 1
     base_capture_system 0
     friendly_fire false
     faction 0
       ai_accuracy 0.94
       initial_over_capacity 0
       initial_occupied_bases 0
     faction 1
       ai_accuracy 0.94
       initial_over_capacity 0
       initial_occupied_bases 0
>


commands.xml
Code:
...
    <alias name="map4" command="change_map vanilla.winter/maps/map4; execute start1.xml"/>
...


start1.xml
Code:
<command
   class="start_game"
   vehicles="1"
   max_soldiers="120"
   player_ai_compensation="4"
   progress_multiplier="1.0"
   base_capture_system="any"
   friendly_fire="0">
   
   <faction initial_over_capacity="0" ai_accuracy="0.94" />
   <faction initial_over_capacity="0" ai_accuracy="0.94" />
<!--   <faction initial_over_capacity="0" ai_accuracy="0.94" /> -->
</command>


For the fun of it, you could try this, should be interesting to know if it works or not:

map3.xml:
Code:
<command
   class="change_map"
   map="media/packages/vanilla/maps/map3">

   <!-- <overlay path="media/overlays/modulaatio.invasion" /> -->
</command>


commands.xml
Code:
...
   <alias name="foo" command="execute map3.xml; execute start1.xml"/>
...


Top
 Profile  
 
PostPosted: Tue May 21, 2013 4:40 pm 
Offline
User avatar

Joined: Mon Feb 25, 2013 12:24 pm
Posts: 283
Lol, first time I type the command the current map stays the same but restarts, second time I type it, it changes map.

Update! Actually, it does the same now with the original commands - I type map1 and the map does not change, I do it again and it does. Bizarre!

_________________
Image


Top
 Profile  
 
PostPosted: Tue May 21, 2013 5:11 pm 
Offline
Site Admin

Joined: Mon Jun 27, 2011 11:59 am
Posts: 2856
Hmm.. what if you just press enter as the first command, or some non-existing command?


Top
 Profile  
 
PostPosted: Tue Jun 04, 2013 3:22 pm 
Offline
User avatar

Joined: Mon Feb 25, 2013 12:24 pm
Posts: 283
Hehe, with the in game commands now the double entering is no longer an issue, weird.

OK, here is an (EDITED)auto server restart batch file - restarts the server every 12 hours (currently 0400 and 1600 GMT for the {SAS} Servers) which should help out with the memory leaks that have been reported. (EDIT - once I figure out the AT command I might be able to set a time for restarts :D )

Code:
@ECHO OFF
:START
CLS
ECHO Starting Server Processes
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/modes
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/modes
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


This single command starts both servers and then after 12 hours kills them both and recalls itself to start all over again. Nice and simple.

And just for you DoomMetal, a cut & paste special for in game map changes :D

Spoiler:
Code:
#!/usr/bin/php -q
<?php

include_once("internal/tracker.php");
include_once("internal/helpers.php");
include_once("internal/admin.php");

// --------------------------------------------

class BasicCommandHandler extends Tracker {
        protected $metagame = NULL;

        // --------------------------------------------
        function __construct($metagame) {
                $this->metagame = $metagame;
        }

   // ----------------------------------------------------
   protected function handle_chat_event($doc) {
      // player_id
      // player_name
      // message
      // global
      $event = $doc->firstChild;

      $message = $event->getAttribute("message");
      // for the most part, chat events aren't commands, so check that first
      if (!starts_with($message, "/")) {
         return;
      }

      $sender = $event->getAttribute("player_name");
            
      // admin only from here on
      if (!is_admin($sender)) {
         return;
      }

      // it's a silent server command, check which one
      if (check_command($message, "test")) {
         $this->metagame->comms->send("say test yourself");

      } else if (check_command($message, "defend")) {
         // make ai defend only, both sides
         for ($i = 0; $i < 2; ++$i) {
            $command =
               "<command class='commander_ai'" .
               "   faction='" . $i . "'" .
               "   base_defense='1.0'" .
               "   border_defense='0.0'>" .
               "</command>";
            $this->metagame->comms->send($command);
         }
         $this->metagame->comms->send("say defensive ai set");

      } else if (check_command($message, "grey_win")) {
         $this->metagame->comms->send("declare_winner 1");
         
      } else if (check_command($message, "map1")) {
         $this->metagame->comms->send("map1") ;
         
      } else if (check_command($message, "map2")) {
         $this->metagame->comms->send("map2") ;
            
      } else if (check_command($message, "map3")) {
         $this->metagame->comms->send("map3") ;
         
      } else if (check_command($message, "map4")) {
         $this->metagame->comms->send("map4") ;
      
      } else if (check_command($message, "map5")) {
         $this->metagame->comms->send("map5") ;
      }
   }

        // --------------------------------------------
        function has_ended() {
                // always on
                return false;
        }

        // --------------------------------------------
        function has_started() {
                // always on
                return true;
        }
}


?>


And the corresponding alias codes

Spoiler:
Code:
    <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"/>


and modified start1.xml file, just do one for each map as you see fit:

Spoiler:
Code:
<command
   class="start_game"
   vehicles="1"
   max_soldiers="16"
   player_bot_compensation="1"
   xp_multiplier="1.0"
   rp_multiplier="1.0"
   friendly_fire="0"
   base_capture_system="single">

   <!-- friendly_fire: 0 / false, 1 / true
      true means fellow soldiers can kill each other by shooting -->
   <!-- base_capture_system: any, single, none -->
   
   <faction
      initial_occupied_bases="0"
      initial_over_capacity="0"
      capacity_multiplier="1.0"
      ai_accuracy="0.94">
   
      <!-- initial_occupied_bases: 0 for even,
         make sure all factions' occupied bases sum up to actual base count in the map, or leave at least one as 0 to make it flexible -->
   </faction>

   <faction initial_over_capacity="0" ai_accuracy="0.94" />

   <!-- make sure you have as much faction settings as there are factions loaded up in the game -->

</command>


If someone would nice enough to modify my basic_command_handler.php file above to include the faction switch and the generate any in-game command code that pasik posted in this thread that would be ace, I have tried a few times but each time I do it I break it :D

_________________
Image


Top
 Profile  
 
PostPosted: Fri Mar 14, 2014 10:21 am 
Offline
User avatar

Joined: Mon Feb 25, 2013 12:24 pm
Posts: 283
Original post updated to reflect the 0.9.4 release, it really is much simpler now to get a dedicated server up and running.

_________________
Image


Top
 Profile  
 
PostPosted: Mon Mar 17, 2014 2:21 am 
Offline

Joined: Sun Mar 16, 2014 3:39 am
Posts: 4
I am having a lot of trouble getting my server running.. Followed the steps just as you said. I'm running on Ubuntu Server. I make a new screen, run ./launch_server and the server launches. Then I run another screen and i do php server_settings_invasion.php, then I go back to the screen with the server and type start_server. The server starts but with none of my settings.. It isn't using any of the php files... What am I doing wrong?


Top
 Profile  
 
PostPosted: Mon Mar 17, 2014 7:58 am 
Offline
User avatar

Joined: Mon Feb 25, 2013 12:24 pm
Posts: 283
fallXone wrote:
I am having a lot of trouble getting my server running.. Followed the steps just as you said. I'm running on Ubuntu Server. I make a new screen, run ./launch_server and the server launches. Then I run another screen and i do php server_settings_invasion.php, then I go back to the screen with the server and type start_server. The server starts but with none of my settings.. It isn't using any of the php files... What am I doing wrong?


You shouldn't need to manually start the server if your .php scripts are running properly, are you sure you have PHP installed on your system? Not up to speed on Ubuntu Server I am afraid.

_________________
Image


Top
 Profile  
 
PostPosted: Mon Mar 17, 2014 2:57 pm 
Offline

Joined: Sun Mar 16, 2014 3:39 am
Posts: 4
{SAS}DocStone wrote:
fallXone wrote:
I am having a lot of trouble getting my server running.. Followed the steps just as you said. I'm running on Ubuntu Server. I make a new screen, run ./launch_server and the server launches. Then I run another screen and i do php server_settings_invasion.php, then I go back to the screen with the server and type start_server. The server starts but with none of my settings.. It isn't using any of the php files... What am I doing wrong?


You shouldn't need to manually start the server if your .php scripts are running properly, are you sure you have PHP installed on your system? Not up to speed on Ubuntu Server I am afraid.



Yeah I have php installed. What do you mean I shouldn't have to manually start the server? Do you guys have a linux guide available for running the dedicated server on linux?


Top
 Profile  
 
PostPosted: Mon Mar 17, 2014 3:17 pm 
Offline
Site Admin

Joined: Mon Jun 27, 2011 11:59 am
Posts: 2856
fallXone wrote:
{SAS}DocStone wrote:
fallXone wrote:
I am having a lot of trouble getting my server running.. Followed the steps just as you said. I'm running on Ubuntu Server. I make a new screen, run ./launch_server and the server launches. Then I run another screen and i do php server_settings_invasion.php, then I go back to the screen with the server and type start_server. The server starts but with none of my settings.. It isn't using any of the php files... What am I doing wrong?


You shouldn't need to manually start the server if your .php scripts are running properly, are you sure you have PHP installed on your system? Not up to speed on Ubuntu Server I am afraid.



Yeah I have php installed. What do you mean I shouldn't have to manually start the server? Do you guys have a linux guide available for running the dedicated server on linux?


Yup, you don't have to manually call start_server in the server console, the script is supposed to do it for you (script takes over the server console basically, though you can still intervene in there if needed).

The source of the problem would seem to be that you'd need to start the gamemode script, that's the correct entry point, rather than server settings.

So instead of running "php server_settings_invasion.php", try "php gamemode_invasion.php debug_output".


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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