Give officer new weapon?

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Give officer new weapon?

Post by SkinnyODST »

How do I give the clone officer an upgraded rep rifle? While keeping the stock one? Pretty much adding a new weapon
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: Give officer new weapon?

Post by AnthonyBF2 »

SkinnyODST wrote:How do I give the clone officer an upgraded rep rifle? While keeping the stock one? Pretty much adding a new weapon
Well the officer already has four weapons, so you'd add the following code:

Code: Select all

SetClassProperty("rep_inf_ep3_officer", "WeaponName5", "rep_weap_award_rifle")
SetClassProperty("rep_inf_ep3_officer", "WeaponAmmo5", "4")
4 is the number of clips, not bullets and I may be incorrect on the weapon name, you can see it's name in rep/odf if I misspelled it.

P.S. I strongly recommend you read the site's modding FAQ - repeatedly. You'll acquire a lot from it.
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Re: Give officer new weapon?

Post by SkinnyODST »

AnthonyBF2 wrote:
SkinnyODST wrote:How do I give the clone officer an upgraded rep rifle? While keeping the stock one? Pretty much adding a new weapon
Well the officer already has four weapons, so you'd add the following code:

Code: Select all

SetClassProperty("rep_inf_ep3_officer", "WeaponName5", "rep_weap_award_rifle")
SetClassProperty("rep_inf_ep3_officer", "WeaponAmmo5", "4")
4 is the number of clips, not bullets and I may be incorrect on the weapon name, you can see it's name in rep/odf if I misspelled it.

P.S. I strongly recommend you read the site's modding FAQ - repeatedly. You'll acquire a lot from it.
Thanks! But as I`m still new here I don`t know how to get to the faq`s...It`s probably really simple, but thanks again
Oh and also, I changed around the officers loadout so the AWARD rifle is weapon 8. I changed the number to 8 after it didn`t work and it STILL doesn`t work
User avatar
Oceans14
Command Sergeant Major
Command Sergeant Major
Posts: 296
Joined: Mon Apr 27, 2015 7:09 pm
Projects :: Athenova Campaign
Games I'm Playing :: SWBF2
Location: Planet 4546b

Re: Give officer new weapon?

Post by Oceans14 »

The FAQ thread (found under SWBF2 Modding, where this thread is): viewtopic.php?f=27&t=13806
Also useful, the documentation that comes with modtools. These are found as .doc files within your modding directory, or here: https://sites.google.com/site/swbf2modt ... ng-started
It's a lot of information, but very useful. Sometimes when I'm bored I poke around the documentation and more often than not I learn something new (or get an idea for a possible map/mod :) )
I changed around the officers loadout so the AWARD rifle is weapon 8. I changed the number to 8 after it didn`t work and it STILL doesn`t work
Unless the unit actually has 8 weapons, this probably won't work... Though I can't really confirm. I would set it up just as Anthony suggested and make sure you can get it working first, then make changes from there.
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: Give officer new weapon?

Post by AnthonyBF2 »

Oh I forgot, it's an award weapon so it has to be earned before you can switch to it in your inventory. :(

You'd have to add a sixth weapon+ammo command for rep_weap_inf_rifle so the commander can use that to unlock the award rifle.
Post Reply