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

Another "gun dont show in the armory" topic
http://runningwithrifles.com/phpBB3/viewtopic.php?f=7&t=3094
Page 1 of 1

Author:  jikma [ Wed Oct 05, 2016 8:10 pm ]
Post subject:  Another "gun dont show in the armory" topic

Hi all,
I'm currently working on a mod, and trying to add weapons to each faction armories.
Most of my additions are working well, but despite all my efforts i'm still unable to add a few weapons for a mysterious reason...

If i understand well the weapon addition system, here are the necessary steps :

-Create the "myweaponname.weapon" weapon file
-Make sure that the following lines are writed in : " in_stock="1" can_respawn_with="1" "
-Make sure that there is the "myweaponname.xml" model file as well as the "myweaponname.png" hud file
-Add the line "<weapon file="myweaponname.weapon" />" in the "all_weapons.xml" file
-Add the line "<weapon key='myweaponname.weapon' />" in the "faction_primaries.resources" file

Then what? Those steps worked fine in most cases but for a few ones it's still isn't working.
Am I missing something? I must but dont know what!

I attach my "all_weapons" file, my faction file and my ".weapon" file if someone want to kindly take a look at them...

I wish to thank all the community for all the precious advices and tutos that i found on this forum, modding rwr is a real pleasure!

Author:  jikma [ Wed Oct 05, 2016 8:17 pm ]
Post subject:  Re: Another "gun dont show in the armory" topic

"onu_primaries.resources"
<resources>
<weapon key='onu_sg552.weapon' />
<weapon key='onu_mg3.weapon' />
<weapon key='onu_psg1.weapon' />
<weapon key='onu_spas12' />
<weapon key='onu_g36' />
<weapon key='onu_mp5sd.weapon' />
</resources>

"all_weapons.xml"
<weapons>
<weapon file="onu_g36.weapon" />
<weapon file="onu_spas12.weapon" />
<weapon file="uk_l22.weapon" />
<weapon file="taleb_k98.weapon" />
<weapon file="ama_m16a4_scope.weapon" />
...................................ect
<weapon file="onu_glock17.weapon" />
<weapon file="onu_mg3.weapon" />
<weapon file="onu_mp5sd.weapon" />
<weapon file="onu_mp7.weapon" />
<weapon file="onu_psg1.weapon" />
<weapon file="onu_sg552.weapon" />
...................................ect
<weapon file="aek_919k.weapon" />

<weapon file="buggy_mg.weapon" />
<weapon file="model_29.weapon" />

<weapon file="claymore_resource.weapon" />

</weapons>

"onu_g36.weapon"
<weapon file="base_primary.weapon" key="onu_g36.weapon">
<tag name="assault" />
<specification
retrigger_time="0.1"
accuracy_factor="0.85"
sustained_fire_grow_step=".35"
sustained_fire_diminish_rate="1.3"
magazine_size="30"
can_shoot_standing="1"
suppressed="0"
name="G36"
class="0"
projectile_speed="115.0" />

<animation key="recoil" ref="12" />
<animation key="recoil" ref="13" />
<animation key="recoil" ref="14" />
<animation state_key="reload" animation_key="reloading, g36" />

<animation state_key="celebrate_shoot" animation_key="celebrating, shooting" />

<sound key="fire" fileref="g36_shot.wav" pitch_variety="0.06" />
<sound key="magazine_out" fileref="rifle_clip_out.wav" />
<sound key="magazine_in" fileref="rifle_clip_in.wav" />
<sound key="cycle" fileref="rifle_chamber.wav" />
<sound class="impact" fileref="rifle_drop.wav" />
<model filename="onu_g36.xml" />

<hud_icon filename="hud_onu_g36.png" />
<commonness value="0.5" can_respawn_with="1" in_stock="1" />
<inventory encumbrance="11.0" price="2.0" />

<projectile file="bullet.projectile">
<result class="hit" kill_probability="0.65" kill_decay_start_time="0.34" kill_decay_end_time="0.67" />
</projectile>
<modifier class="speed" value="-0.02" />
</weapon>

Author:  The Soldier [ Wed Oct 05, 2016 8:36 pm ]
Post subject:  Re: Another "gun dont show in the armory" topic

This will work for Quick Match. It will not, however, work for Campaign. You'll also need to add it to invasion_all_weapons.xml.

Author:  jikma [ Wed Oct 05, 2016 10:12 pm ]
Post subject:  Re: Another "gun dont show in the armory" topic

Oh yes, i forgot to mention that i only intend to make it work for quick matches.
But thanks for the quick response anyway!

Would you say there's no problem with my files and it should work for quick matches?
If so I don't understand why this ****ing G36 refuse to show up in my UN armory

Author:  The Soldier [ Wed Oct 05, 2016 11:40 pm ]
Post subject:  Re: Another "gun dont show in the armory" topic

Did you change the key name in the weapon file? Should be in the first couple of lines.

Author:  jikma [ Thu Oct 06, 2016 12:04 am ]
Post subject:  Re: Another "gun dont show in the armory" topic

jikma wrote:
<weapon file="base_primary.weapon" key="onu_g36.weapon">


I guess I did, tell me if it's you see anything wrong in my ".weapon" file, I really can't get why this particuliar weapon refuse to shows up

Author:  The Soldier [ Thu Oct 06, 2016 12:50 am ]
Post subject:  Re: Another "gun dont show in the armory" topic

For the spas12 and G36 in the onu_primaries file, you don't have .weapon after them.

Author:  jikma [ Thu Oct 06, 2016 8:58 am ]
Post subject:  Re: Another "gun dont show in the armory" topic

hallelujah!!

Soldier you're the man!

I'm so sorry to have bothered you for such a stupid reason...
This was dumb, thanks! Problem solved

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