It is currently Thu Mar 28, 2024 11:20 pm

RUNNING WITH RIFLES Multiplayer

test

Game servers 40 List provided by EpocDotFr | Players online 21


All times are UTC




Post new topic Reply to topic  [ 14 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Custom campaigns
PostPosted: Thu Oct 22, 2015 5:52 am 
Offline

Joined: Thu Oct 22, 2015 5:31 am
Posts: 3
Hey, guise, can you clear some stuff up?

I managed to mod some easy stuff: essentially made most weapons available at the armory, allowed them on respawn (and vests) and gave vest1 to AI soldiers, so there's tons of wounded soldiers, which is really fun.

I tried adding the relevant files to an overlay folder called "mono"; added the overlay file.
Code:
<?xml version="1.0" encoding="utf-8"?>
<overlay user_selectable="1">
<overlay campaign_entry_script="start_campaign.php">
</overlay>


Then added the script and did what I thought would be enough:
Code:
<?php

chdir(dirname(__FILE__));

// start scripts located elsewhere than vanilla/scripts should include
// vanilla/scripts in include path with a relative path
set_include_path("../../../packages/vanilla/scripts");

// all vanilla includes are defined in relation to vanilla/scripts OR the local folder
include_once("gamemodes/invasion/gamemode_invasion.php");
include_once(get_include_with_fallback("server_settings_invasion.php", "server_settings_invasion.example.php"));

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

$metagame = new GameModeInvasion();

{
   $s = &$metagame->user_settings;
   $s->overlay_paths = array("media/overlays/mono");
}

$metagame->init();
// execution blocks here at run until comms from server is lost
$metagame->run();
$metagame->uninit();

_log("ending execution");

?>

What I did was to change the overlay path to my folder.

Clearly it was not enough, as there is no effect at all when I start a custom campaign. What else should I do? What other xml or scripts (or else) is lacking for my custom campaign to be modded so I don't have to switch between two RWR folders when I want to play online?
Am I lacking tons of other campaign/gamemode scripts or something? Or in some file I should specify all paths/files to be overwritten by my mod? (If so, how can one best achieve this?)


Thank you very much.


Top
 Profile  
 
 Post subject: Re: Custom campaigns
PostPosted: Thu Oct 22, 2015 9:39 am 
Offline
Site Admin

Joined: Mon Jun 27, 2011 11:59 am
Posts: 2856
monoolho wrote:
Code:
<?xml version="1.0" encoding="utf-8"?>
<overlay user_selectable="1">
<overlay campaign_entry_script="start_campaign.php">
</overlay>



overlay_config.xml expects campaign_entry_script field to be defined in the root element, so try this one:
Code:
<?xml version="1.0" encoding="utf-8"?>
<overlay campaign_entry_script="start_campaign.php">
</overlay>

The user_selectable field isn't strictly needed, the overlay will be user selectable if campaign_entry_script is defined.

Some bit of seeing what is happening if things aren't working as expected can be done at the logs, on Windows at %appdata%\Running with rifles\rwr_game.log and metagame.log. There's lots of noise there surely, but sometimes it can help detecting if the expected files and paths are being used by the game. In your case it defaulted to run start_invasion.php instead of start_campaign.php.


Top
 Profile  
 
 Post subject: Re: Custom campaigns
PostPosted: Fri Oct 23, 2015 5:13 pm 
Offline

Joined: Thu Oct 22, 2015 5:31 am
Posts: 3
pasik wrote:
monoolho wrote:
Code:
<?xml version="1.0" encoding="utf-8"?>
<overlay user_selectable="1">
<overlay campaign_entry_script="start_campaign.php">
</overlay>



overlay_config.xml expects campaign_entry_script field to be defined in the root element, so try this one:
Code:
<?xml version="1.0" encoding="utf-8"?>
<overlay campaign_entry_script="start_campaign.php">
</overlay>

The user_selectable field isn't strictly needed, the overlay will be user selectable if campaign_entry_script is defined.

Some bit of seeing what is happening if things aren't working as expected can be done at the logs, on Windows at %appdata%\Running with rifles\rwr_game.log and metagame.log. There's lots of noise there surely, but sometimes it can help detecting if the expected files and paths are being used by the game. In your case it defaulted to run start_invasion.php instead of start_campaign.php.


Wow, you're a genius, man.

Who would dare say a single line of unnecessary coding would render all my work fruitless... Well, you and countless mods before, but, I did not expect the simple overlay xml would do that.

IT LIVES! IT LIVES! It's working now. Corrected some flaws and, well, it looks almost as if a modder had done it. The log also proved far too useful to fixing stuff. Damn it feels good. Aission Mccomplished.

Thank you very much, master pasik.

Just one last questions: can one mod to make the rare weapons available at the armory just like enemy weapons?
Thank you very much for your hard work


Top
 Profile  
 
 Post subject: Re: Custom campaigns
PostPosted: Sat Apr 15, 2017 3:19 am 
Offline

Joined: Sat Apr 15, 2017 3:14 am
Posts: 2
I need help, i helping my friend for his campaign,
so i got to get it working with all the faction playable (there are 9 factions)
but only 3 factions spawns the user with a weapon.

Please help what can we do?
Thanks a lot!


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 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:  
cron
Powered by phpBB® Forum Software © phpBB Group