Disabling Rewards?

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
Darth Elmo
Private Third Class
Posts: 47
Joined: Sat Sep 15, 2007 8:20 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Italy
Contact:

Disabling Rewards?

Post by Darth Elmo »

Hey in the new map I am making, where do I disable reward weapons? Thanks :D
User avatar
Silas
Captain
Captain
Posts: 481
Joined: Thu Oct 11, 2007 5:30 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: Disabling Rewards?

Post by Silas »

Can't you just go to the unit's odf and remove the award weapons? I think that works.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Disabling Rewards?

Post by Teancum »

The 1.3 patch has an option in the fake console to remove it if I remember right.
User avatar
RED51
Jedi
Jedi
Posts: 1024
Joined: Sun Sep 07, 2008 6:25 pm
Games I'm Playing :: SWBFII

Re: Disabling Rewards?

Post 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.
Darth Elmo
Private Third Class
Posts: 47
Joined: Sat Sep 15, 2007 8:20 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Italy
Contact:

Re: Disabling Rewards?

Post by Darth Elmo »

That's my problem, thanks :D !!!
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: Disabling Rewards?

Post 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?
Last edited by MercuryNoodles on Wed Sep 24, 2008 2:29 pm, edited 1 time in total.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Disabling Rewards?

Post 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.
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Disabling Rewards?

Post by Frisbeetarian »

If he's just making a map without new sides, couldn't he disable the award weapons via the Lua?
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: Disabling Rewards?

Post 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
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Disabling Rewards?

Post 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...
Post Reply