RUNNING WITH RIFLES
http://www.runningwithrifles.com/phpBB3/

Server Question
http://www.runningwithrifles.com/phpBB3/viewtopic.php?f=5&t=1963
Page 1 of 1

Author:  icor1031 [ Fri Dec 19, 2014 10:21 am ]
Post subject:  Server Question

Is it possible to set it so that players on my server get 1RP for every kill, and how?

Thanks.

Author:  pasik [ Fri Dec 19, 2014 8:07 pm ]
Post subject:  Re: Server Question

icor1031 wrote:
Is it possible to set it so that players on my server get 1RP for every kill, and how?

Thanks.


I believe you can do that by editing media/packages/vanilla/rewards.xml on the server, adding lines such as
Code:
   <reward class="enemy_shot"             base="1"    type="rp" />
   <reward class="enemy_killed_in_explosion"       base="1"    type="rp" />
   <reward class="enemy_stabbed"             base="1"    type="rp" />

Author:  icor1031 [ Sat Dec 20, 2014 2:37 am ]
Post subject:  Re: Server Question

pasik wrote:
icor1031 wrote:
Is it possible to set it so that players on my server get 1RP for every kill, and how?

Thanks.


I believe you can do that by editing media/packages/vanilla/rewards.xml on the server, adding lines such as
Code:
   <reward class="enemy_shot"             base="1"    type="rp" />
   <reward class="enemy_killed_in_explosion"       base="1"    type="rp" />
   <reward class="enemy_stabbed"             base="1"    type="rp" />



That seems to have worked, although I'm unsure because the update today killed my server :( Thanks for the info, though.

Author:  icor1031 [ Sat Dec 20, 2014 12:46 pm ]
Post subject:  Re: Server Question

Program Files (x86)\Steam\steamapps\common\RunningWithRifles\media\packages\vanilla\maps\map3\map_config.xml

To this file and other map#'s files,
I replaced: <faction file="green.xml" />
with: <faction file="brown.xml" />

Still, I never have brownpants. What did I do wrong?

-------

Also, where can I find a list of admin commands?

Thanks.

Author:  icor1031 [ Sun Dec 28, 2014 1:51 am ]
Post subject:  Re: Server Question

BUMP for brownpants!!!

Author:  pasik [ Sun Dec 28, 2014 2:16 pm ]
Post subject:  Re: Server Question

If it's an Invasion server, then you can e.g. copy media/packages/vanilla/scripts/start_invasion.php to start_my_invasion.php, and edit it. You'll find
Code:
   // customize settings
   // (you could copy start_invasion.php to start_my_invasion.php, customize it, and start it instead of the original, too,
   // would avoid losing settings customization when there's an update in this particular file)
   $s = &$metagame->user_settings;

   // e.g.
   /*
   $s->fellow_capacity_factor = 1.05;
   $s->fellow_ai_accuracy_factor = 0.94;
   $s->enemy_capacity_factor = 1.0;
   $s->enemy_ai_accuracy_factor = 0.94;
   $s->xp_factor = 0.27;
   $s->rp_factor = 1.0;
   $s->faction_choice = 0;

   $s->completion_variance_enabled = true;
   $s->friendly_fire = 0;
   $s->initial_xp = 0.0;
   $s->initial_rp = 0.0;
   $s->player_ai_compensation_factor = 1.0;
   $s->player_ai_reduction = 0;
   $s->base_capture_system = "any"; // could be single for backdoor prevention, not really that useful in invasion

   $s->overlay_paths = array();
   */


The stuff between /* */ is commented out, so they have no effect unless you move some of that stuff outside the comment block. To have Brownpants playable, you could have it say
Code:
$s = &$metagame->user_settings;
$s->faction_choice = 2;


That makes the third faction declared by media/packages/vanilla/scripts/gamemodes/invasion/map_rotator_invasion.php get_available_faction_configs() to become the friendly/coop/player faction, 0->green, 1->grey, 2->brown.

Then instead of running start_invasion.php, you'd run start_my_invasion.php.

Author:  pasik [ Sun Dec 28, 2014 2:26 pm ]
Post subject:  Re: Server Question

icor1031 wrote:
Also, where can I find a list of admin commands?

You can find some commands usable in the console directly by typing help there. They are pretty low level so using certain ones there can mess up some gamemode scripting not expecting you to change a map directly for instance.

Most gamemodes also include this file media\packages\vanilla\scripts\trackers\basic_command_handler.php which comes with random assortment of commands mostly used to help with testing when developing, so usefulness for administration is fairly weak. These are used by admins in-game by using the chat and saying /command.
    test
    test2
    defend
    0_attack
    0_win
    1_win
    1_lose
    kick
    whereami
    promote
    rp
    _create_vehicle
    _jeep
    _suitcase
    _g36

Also various components included in some gamemodes but not all provide more handled chat commands. Off the top of my head I can remember there being
    warp X, where X is a number between 0 and 10(?) to warp to any stage of the Invasion
    restart

Going deeper, new commands can be created following this http://runningwithrifles.gamepedia.com/ ... _interface

Author:  icor1031 [ Mon Dec 29, 2014 4:18 am ]
Post subject:  Re: Server Question

With your info, I was able to track what I needed.

In map_rotator_classic:
-------

$all_factions = <<<EOD
<faction file="green.xml" />
<faction file="grey.xml" />
<faction file="brown.xml" />
EOD;

$green_and_grey_factions = <<<EOD
<faction file="grey.xml" />
<faction file="brown.xml" />
EOD;

--

Thanks.

P.S., I'm surprised PHP is being used for this. I'll have to give that code to my friend as another example of heredoc's usefulness - he hates using it.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/