It is currently Wed Apr 30, 2025 11:01 pm

RUNNING WITH RIFLES Multiplayer

test

Game servers 49 List provided by EpocDotFr | Players online 57


All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Wed Sep 17, 2014 12:37 pm 
Offline

Joined: Wed Sep 17, 2014 12:17 pm
Posts: 12
Hey guys, how's it going?

First thing's first, I purchased RWR a couple of weeks ago and I found it to be one of the most addictive and enjoyable games one can get for 10 dollars (that's not to say it doesn't beat more expensive games on some levels, but I digress).

In any case, our gaming community (OutbreakGaming) holds a dedicated RWR server. For the most part I find the game fairly easy to understand and master (which is partly why it's so much fun to delve into it with a couple of friends and have at it for hours) but recently I've been trying to improve server side support by adding in-game commands, mostly using bits and pieces from what Pasik and {SAS}DocStone put up on the forums and Wiki and some of my own (and very limited) knowledge in xml and php. (Speaking of which guys, perhaps you could gather all that information in one place for a more coherent tutorial of how to go about making easy server side support for an owner and his admins?)

Anyway, the commands work for the most part, but I was wondering about a few extra's I think I might need/want to toy around with:

1) Banning - I understand that it's a work in progress, but I was wondering if it'll be available eventually?

2) Map Changing - I know this one exists, but I couldn't for the life of me get it to work, I've seen a couple of versions in the forums (and in the wiki itself) but either I'm missing something imperative to the process or just lack the understanding and the know-how to make it work. I'd appreciate some help with that one.

3) spawning - works great in general (mostly thanks to the basic_command_handler as a template), with the exception of grenades. I saw that throwable weapon files are saved under ".projectile", but when I try to spawn them they detonate immediately, is there a way to spawn pickable grenades?

That's all for now, I apologize for the mouthful, and thank you in advance to anyone who reads this.

Good day.


Top
 Profile  
 
PostPosted: Wed Sep 17, 2014 2:35 pm 
Offline
Site Admin

Joined: Mon Jun 27, 2011 11:59 am
Posts: 2856
Arkin wrote:
...Speaking of which guys, perhaps you could gather all that information in one place for a more coherent tutorial of how to go about making easy server side support for an owner and his admins?)

Depending on how far you are going in, this stuff could be helpful http://runningwithrifles.gamepedia.com/ ... _interface. It isn't a tutorial in the slightest sense but for the most part there's everything you can do on the fly via scripting. New stuff is added almost every version, so the dump in the wiki could already be a bit outdated.

Quote:
1) Banning - I understand that it's a work in progress, but I was wondering if it'll be available eventually?

I believe it'll be made eventually (by me/someone). I think it will be done in the scripts, by hooking up some tracking for getting notifications about player connections, matching the client IP/player hash/something with a blacklist, and kicking the newly joined player out if match found. Would need some new command handling for /ban X for adding stuff in the blacklist and the blacklist load/save in some form.

Quote:
2) Map Changing - I know this one exists, but I couldn't for the life of me get it to work, I've seen a couple of versions in the forums (and in the wiki itself) but either I'm missing something imperative to the process or just lack the understanding and the know-how to make it work. I'd appreciate some help with that one.

Looking through the scripts, the intention was that you'd be able to use /warp X -style commands to move between stages in Invasion game mode, but I guess it only works in Adventure (which is the single player campaign based on Invasion), need to verify that later today.

I think Classic doesn't come with convenient map rotation control commands by default. It would be simple to extend it with that support, basically requiring a command handler that can call start_map(index) in the map rotation component. Anyhow, with basic command handler there's always e.g. /0_win command which can be used to declare the first faction as winner, in most cases triggering a map change to next one in the map rotation script.

If you don't have a map rotation script running, you can change maps by assembling a command like http://runningwithrifles.gamepedia.com/ ... change_map and sending it down to the server. A match with some default settings will start after the map changes, which you might want to override by calling something like http://runningwithrifles.gamepedia.com/ ... start_game. If you prefer to set up static settings for these in separate XML files, you can have those XML files in the server root folder, and call "execute that_xml_file.xml" directly with the script or via server console. (Also, there are the old direct console commands for map changing and match starting which might be part of the reason for the confusion; they work, but they don't provide as much control as the XML commands)

Quote:
3) spawning - works great in general (mostly thanks to the basic_command_handler as a template), with the exception of grenades. I saw that throwable weapon files are saved under ".projectile", but when I try to spawn them they detonate immediately, is there a way to spawn pickable grenades?

Projectiles can take additional field "activated" which can be used to control that, defaults to 1. So activated="0" would be the way to make them spawn as pickable items.


Top
 Profile  
 
PostPosted: Wed Sep 17, 2014 2:59 pm 
Offline

Joined: Wed Sep 17, 2014 12:17 pm
Posts: 12
Quote:
Projectiles can take additional field "activated" which can be used to control that, defaults to 1. So activated="0" would be the way to make them spawn as pickable items.


Just to be clear, right now I'm using the command in this syntax:

$this->spawn_instance_near_player($sender_id, "impact_grenade.projectile", "projectile");

Which prompts the appropriate function for item spawning. Where whould I add the "activated" field?

Thank you so much for the prompt and thorough reply!


Top
 Profile  
 
PostPosted: Wed Sep 17, 2014 6:08 pm 
Offline
Site Admin

Joined: Mon Jun 27, 2011 11:59 am
Posts: 2856
Arkin wrote:
Quote:
Projectiles can take additional field "activated" which can be used to control that, defaults to 1. So activated="0" would be the way to make them spawn as pickable items.


Just to be clear, right now I'm using the command in this syntax:

$this->spawn_instance_near_player($sender_id, "impact_grenade.projectile", "projectile");

Which prompts the appropriate function for item spawning. Where whould I add the "activated" field?

Thank you so much for the prompt and thorough reply!


Ah right, missed that one. Activated field would need to be delivered into the create_instance command that is sent to the server, spawn_instance_near_player method makes it happen internally. The most direct hack would be just this:
Code:
   protected function spawn_instance_near_player($sender_id, $key, $type) {
      $player_info = get_player_info($this->metagame, $sender_id);
      if ($player_info) {
         $character_info = get_character_info($this->metagame, $player_info->getAttribute("character_id"));
         if ($character_info) {
            $pos = parse_position($character_info->getAttribute("position"));
            $pos[0] += 5.0;
            $p = position_array_to_string($pos);
            $c = "<command class='create_instance' instance_class='" . $type . "' instance_key='" . $key . "' position='" . $p . "' activated='0' />";
            $this->metagame->comms->send($c);
         }
      }
   }

Having activated there for other instance types shouldn't have any side effects.


Top
 Profile  
 
PostPosted: Wed Sep 17, 2014 6:10 pm 
Offline
Site Admin

Joined: Mon Jun 27, 2011 11:59 am
Posts: 2856
pasik wrote:
Looking through the scripts, the intention was that you'd be able to use /warp X -style commands to move between stages in Invasion game mode, but I guess it only works in Adventure (which is the single player campaign based on Invasion), need to verify that later today.

Yeah, no worky for Invasion, works only for the campaign. Gonna fix that.


Top
 Profile  
 
PostPosted: Fri Sep 19, 2014 7:54 pm 
Offline

Joined: Wed Sep 17, 2014 12:17 pm
Posts: 12
Yeah, that did it. Thank you!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 10 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