Page 1 of 1

Disabling Rewards?

Posted: Wed Sep 24, 2008 4:38 am
by Darth Elmo
Hey in the new map I am making, where do I disable reward weapons? Thanks :D

Re: Disabling Rewards?

Posted: Wed Sep 24, 2008 5:26 am
by Silas
Can't you just go to the unit's odf and remove the award weapons? I think that works.

Re: Disabling Rewards?

Posted: Wed Sep 24, 2008 8:36 am
by Teancum
The 1.3 patch has an option in the fake console to remove it if I remember right.

Re: Disabling Rewards?

Posted: Wed Sep 24, 2008 9:03 am
by RED51
There is another way to remove award weapons. Open up the weapon odf you want to disable the award weap, and near the top of odf, you should see these lines:

Code: Select all

WeaponClass]
ClassLabel		= "cannon"

[Properties]
ScoreForMedalsType = 1
MedalsTypeToLock = 1

AnimationBank   = "rifle"
delete the score and medal lines like so:

Code: Select all

WeaponClass]
ClassLabel		= "cannon"

[Properties]

AnimationBank   = "rifle"
Once you do that, it will remove the award weapon from the weapon. Hope that helps.

Re: Disabling Rewards?

Posted: Wed Sep 24, 2008 9:47 am
by Darth Elmo
That's my problem, thanks :D !!!

Re: Disabling Rewards?

Posted: Wed Sep 24, 2008 11:17 am
by MercuryNoodles
post obsolete
Hidden/Spoiler:
I'll start by quoting myself from a previous thread on this.

[quote]No, no. Close, but no cigar on both counts. :P You should take the non-award weapon odf, and do this:

Code:
ScoreForMedalsType = -1
MedalsTypeToLock = -1


That keeps the non-award weapon from being locked out when you achieve the award. However, that's not all. You also need to go into the award weapon odf and do the same so you can't unlock the award weapon, or you'll have both weapons. It should look like this:

Code:
ScoreForMedalsType = -1
MedalsTypeToUnlock = -1


Then, you can remove the award weapons from the unit's odf without screwing up the game.

It'll say you have the award if you've already earned it via career stats (the yellow text when you first spawn on a map), but you won't be able to access it, and it shouldn't count anything towards the award when using the weapon. At least, that's how it worked when I last checked my own weapons.

In short:

1) disable the non-award weapon lockout
2) disable the award weapon unlock
3) remove award weapon from unit
[/quote]


Note: You can just remove or comment the lines, instead of using -1, as has been said.



Explanation:

What I did with the value "-1" more or less amounts to a silly way of commenting them out. The game reads the lines, but the value has no meaning, and somehow the engine doesn't spaz out over it. Each number refers to a type of award, which I suspect is hardcoded, and has no real mathematical bearing that I can determine, so there's no direct relationship to points. I did it that way to keep the lines in the odf, if for some reason I ever wanted enable award weapons later. After doing a search for my own post and reading a few confusing posts regarding the -1 value and the meaning of the numbers themselves, I thought I should clear that up. I wasn't aware of commenting at the time, so I resorted to a trick I'd picked up before modding this game. In many cases, setting a value to -1 results in making something infinite in number, but I went ahead with it because I was virtually certain Pandemic wouldn't have used the value, thus avoiding accidentally using a value given to an award.



Conclusion: The -1 thing aside, those are the three steps necessary to remove the award weapons and have a fully functional map. Definitely remove both the lock and unlock parameters, because just removing the award unlock will mean you'll lose your primary weapon whenever you have the award and switch weapons. Removal of the award weapon from the unit odf is necessary because once you take out the unlock, it becomes a "normal" weapon that'll appear in your inventory.
Query: Do you have any meatbags in dire need of being disposed of, Master?

Re: Disabling Rewards?

Posted: Wed Sep 24, 2008 1:42 pm
by Maveritchell
Just a quick correction: only add in the lines:

Code: Select all

ScoreForMedalsType = -1
MedalsTypeToUnlock = -1 
-if you're modifying a weapon with a parent class set up for an award (like a pistol that has a ClassParent of com_weap_inf_pistol). If you're building a weapon from the ground up (no class parent - I recommend this in most cases), then omit the lines entirely.

Re: Disabling Rewards?

Posted: Wed Sep 24, 2008 2:19 pm
by Frisbeetarian
If he's just making a map without new sides, couldn't he disable the award weapons via the Lua?

Re: Disabling Rewards?

Posted: Wed Sep 24, 2008 2:22 pm
by MercuryNoodles
Gah, I knew I had something backwards again. Now that I remember, it was the parenting that caused me to go through all of that. Blame my messy sides. They gave me all sorts of weird problems because I'd made them the lazy way. <---Another reason to not copy whole side folders.

Anyway, yes, that's almost right, except you mean MedalsTypeToLock. That bit you quoted is the award weapon unlock parameter. I don't use parenting in my newer weapons, so I should've remembered to mention that. Thanks for bringing that up.



Now, to get this right, since I had a step too many. For parented weapons:

1) disable the normal weapon's lockout with the -1 value
2) remove the award weapon from the unit odf

Re: Disabling Rewards?

Posted: Wed Sep 24, 2008 5:11 pm
by [RDH]Zerted
Frisbeetarian wrote:If he's just making a map without new sides, couldn't he disable the award weapons via the Lua?
Yes he could. There are many ways to do some things. However, we can't come up with the best way for him to do it if he only gives us so little information...