It is currently Sat Apr 27, 2024 4:12 pm

RUNNING WITH RIFLES Multiplayer

test

Game servers 47 List provided by EpocDotFr | Players online 120


All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Squad Question?
PostPosted: Tue Dec 29, 2015 10:48 pm 
Offline

Joined: Tue Dec 29, 2015 10:42 pm
Posts: 2
Is it possible to make a mod that allows a player to have more than 10 squadmates?

I have been working on a mod to do this but seem to be at a loss.

Thanks.


Top
 Profile  
 
 Post subject: Re: Squad Question?
PostPosted: Wed Dec 30, 2015 8:32 am 
Offline
Site Admin

Joined: Mon Jun 27, 2011 11:59 am
Posts: 2856
There's a chance it's possible. There are squad_member_xp_cost and squad_size_xp_cap parameters for soldier tag in the faction file. By default they are 0.1 and 1.0, giving you max 10 mates at 1.0 (10000) XP.

From what I can tell, the squad member icon set with hud_squad*.png is clamped between 0 and 10, but the system should still allow more members and show it correctly in text.


Top
 Profile  
 
 Post subject: Re: Squad Question?
PostPosted: Wed Dec 30, 2015 8:49 pm 
Offline

Joined: Tue Dec 29, 2015 10:42 pm
Posts: 2
I got it working, please read below for instructions:

Step 1:
Add squad_size_xp_cap="2.0" to the "default group" section of green.xml file:
Code:
<soldier name="default" spawn_score="1.0" squad_size_xp_cap="2.0" >

The "squad_size_xp_cap" increases the number allowed to join your squad. It does not increase the soldiers actually joining your squad. That number still caps at 10. So you end up with 10/14 or 10/20.

1.0 = 10 squadmates and 2.0 = 20 squadmates

Step 2:
Update the squad configuration files. By adding additional <soldier /> tags, it increases the additional soldiers actually joining your squad.

Below is the new code from default.squad_config file:
Code:
<?xml version="1.0" encoding="utf-8"?>
<squad_config name="Default">
   <soldier />
   <soldier weapon2_tag="medikit" />
   <soldier />
   <soldier />

   <soldier />
   <soldier />
   <soldier />
   <soldier />

   <soldier />
   <soldier />
   <soldier />
   <soldier />
   
   <soldier />
   <soldier />
   <soldier />
   <soldier />
   
   <soldier />
   <soldier />
   <soldier />
   <soldier />
</squad_config>

There are 20 soldier tags which correspond with squad_size_xp_cap="2.0"

Step 3:
Make a hud_squad11.png, hud_squad12.png, etc ....

You can copy hud_squad10.png and rename the copy to hud_squad11.png or you can create your own.

Hope this helps everyone ... :D


Top
 Profile  
 
 Post subject: Re: Squad Question?
PostPosted: Thu Dec 31, 2015 12:36 am 
Offline
Site Admin

Joined: Mon Jun 27, 2011 11:59 am
Posts: 2856
Nicely done! I completely forgot the squad config and that its 10 entries would have an effect to it, nice job finding that!

Had to recheck the remark about the icon set index being clamped; there's actually a bug that the clamped value isn't in fact used at all :lol: Lucky break we've never hit the issue of non-existing icons due to the max 10 being forced by squad configs / default parameters. Won't be fixing this one as it allows proper modding too.


Top
 Profile  
 
 Post subject: Re: Squad Question?
PostPosted: Thu Dec 31, 2015 2:08 am 
Offline

Joined: Sat Oct 05, 2013 12:19 am
Posts: 635
We have a budding modder here. Something I've never done before - well done, Galliium. :)


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

All times are UTC


Who is online

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