Let's say I added the clone rifleman's award rifle to a cloaked anakin model in place of his saber toss. Let's say I munged and, in-game, it worked perfectly except for the fact that the weapon's icon was floating on the screen and that once de-selected, it was impossible to re-select.
I know there's a tutorial in the FAQ section on floating weapons; I'll look into it now. But is there a fix for the de-selection bug? I suppose I could just delete his choke, so that it was impossible to de-select the rifle in the first place; but for obvious reasons I'd rather avoid that. Can it be done?
Fixing a weapon added to a unit
Moderator: Moderators
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Fixing a weapon added to a unit
"Let's say" we stop talking in hypotheticals.
All you have is the award weapons "bug." You've given a unit a weapon that normally has an award weapon but you didn't load the award weapon in the unit's odf. Either make a custom weapon without an award, or make sure to load the award weapon through the .odf (see stock unit .odfs for an example).
All you have is the award weapons "bug." You've given a unit a weapon that normally has an award weapon but you didn't load the award weapon in the unit's odf. Either make a custom weapon without an award, or make sure to load the award weapon through the .odf (see stock unit .odfs for an example).
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Fixing a weapon added to a unit
I did put the award weapon into Anakin's odf, though. I didn't put in the normal rifle. Does that matter?
Also, in what odf and where in it can I change the amount of ammo a weapon has? I've been sifting through common and rep weapon odfs but I can't seem to find it. I can change the amount per clip, but not the maximum ammo over all.
Also, in what odf and where in it can I change the amount of ammo a weapon has? I've been sifting through common and rep weapon odfs but I can't seem to find it. I can change the amount per clip, but not the maximum ammo over all.
- RED51
- Jedi

- Posts: 1024
- Joined: Sun Sep 07, 2008 6:25 pm
Re: Fixing a weapon added to a unit
You increase the ammo by rising this number, found in the default unit(i.e.:rep_inf_default_rifleman):
WeaponAmmo = 4 With the normal rifle odf that has 50 rounds per clip, you will have 200 rounds
Change to
WeaponAmmo = 8 Now, you will have 400 rounds
WeaponAmmo = 4 With the normal rifle odf that has 50 rounds per clip, you will have 200 rounds
Change to
WeaponAmmo = 8 Now, you will have 400 rounds
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Fixing a weapon added to a unit
Thanks for that! It was simple, and it worked, too. I was flicking through weapon odfs; I never thought to go to the unit's odf.
Now all there is is to fix that de-selection thing. I didn't completely understand Mav's answer, although I know that he is a great modder and if I did understand his explanation, it would work. So could anyone explain his response to me, please?
Now all there is is to fix that de-selection thing. I didn't completely understand Mav's answer, although I know that he is a great modder and if I did understand his explanation, it would work. So could anyone explain his response to me, please?
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: Fixing a weapon added to a unit
Just add these lines to your weapon's .odf:
Code: Select all
ScoreForMedalsType = -1
MedalsTypeToUnlock = -1