Hero questions

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:

Hero questions

Post by SkinnyODST »

I made the ep3 Officer the republic`s hero and I have some questions about him:

1. How do I alter the amount of points needed to unlock him?

2. How do stop him having "lightsaber health"?

3. I gave him a shield, and it doesn`t recharge. It DID recharge BEFORE I made him a hero but now it doesn`t. HOW DOES ONE STOP THIS MADNESS?! :funny2:
CdtFox
2nd Lieutenant
2nd Lieutenant
Posts: 379
Joined: Wed Feb 17, 2016 8:51 am
Projects :: BUC and Designated Days
Games I'm Playing :: SWBF2+EAW+Subnautica
xbox live or psn: No gamertag set
Location: France
Contact:

Re: Hero questions

Post by CdtFox »

SkinnyODST wrote:I made the ep3 Officer the republic`s hero and I have some questions about him:

1. How do I alter the amount of points needed to unlock him?

2. How do stop him having "lightsaber health"?

3. I gave him a shield, and it doesn`t recharge. It DID recharge BEFORE I made him a hero but now it doesn`t. HOW DOES ONE STOP THIS MADNESS?! :funny2:
1) Open rep_inf_default_officer.odf, in the unit's odf you have a line for that: "PointsToUnlock = 8" <--- just change that value ;)

2) Just Change the healt type of your unit, "HealtType = whatever you want"

3)

Code: Select all

MaxShield      = 400
AddShield      = 5
MaxShield is the shields strength
AddShield is the shields recharge rate

Hopefully this helped some :)
DylanRocket
2nd Lieutenant
2nd Lieutenant
Posts: 363
Joined: Sun Sep 02, 2012 2:47 am
Projects :: None
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set
Location: HK Factory
Contact:

Re: Hero questions

Post by DylanRocket »

SkinnyODST wrote:2. How do stop him having "lightsaber health"?
All Hero units have this and it can't be removed.
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Re: Hero questions

Post by SkinnyODST »

2) Just Change the healt type of your unit, "HealtType = whatever you want"
What do you mean "Whatever you want"? I would like him to have the same health type that standard units have "health bar". What do I write?
2) Just Change the healt type of your unit, "HealtType = whatever you want"
What do you mean "Whatever you want"? I would like him to have the same health type that standard units have "health bar". What do I write?

Also, that`s not the right kind of points I was talking about when I said "How do I alter the amount of points to unlock him, I meant the amount of points needed to get that yellow and red "You can now play as ***" notification. I should have been more specific.

*EDIT* ALSO! I know how to set up a shield for him, it just kind of gets...disabled because he`s a hero.
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: Hero questions

Post by Oceans14 »

I don't believe what you're trying to do is possible. Not certain, but pretty sure. In my experience, any unit you add as a hero in that special line in the script will have lightsaber health. Pretty sure you can put the regular clone trooper in there and he'll have the saber bar. Try it.

However, there's a chance that this behavior is controlled by a lua or odf somewhere. You'll have to poke around a little.
JimmyAngler
High General
High General
Posts: 837
Joined: Mon Nov 04, 2013 10:37 am
Projects :: Battlefront Halation
Games I'm Playing :: SWBF 1-2-2015
xbox live or psn: none
Location: Area 51

Re: Hero questions

Post by JimmyAngler »

DylanRocket wrote:
SkinnyODST wrote:2. How do stop him having "lightsaber health"?
All Hero units have this and it can't be removed.
Doesn't MEU have heroes with regular health?
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Hero questions

Post by Marth8880 »

JimmyAngler wrote:Doesn't MEU have heroes with regular health?
Their health bars *look* the same as normal health bars (with the custom HUD enabled), but the way their health functions is still that of a normal hero.
Samee3
First Lance Corporal
First Lance Corporal
Posts: 123
Joined: Sun Jul 05, 2015 5:07 pm
Projects :: BF2 Refresh Mod
Games I'm Playing :: Empire at War
xbox live or psn: VaporousFern310
Location: California, USA

Re: Hero questions

Post by Samee3 »

The desired effect could be produced through some slightly complicated LUA scripting, if that's your kind of thing.

Alternatively, you could set him up to have like this:

Code: Select all

AddUnitClass(REP, "rep_inf_ep3_officer", 0, 1)
The two numbers on the end are the most important part. It basically says that "there can only be one", and BF2 reserves it for the player. I use this in conjunction with PointsToUnlock for all my "heroes".
Post Reply