How to mod the decrementing lightsabre health bar

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
Sketchup
Recruit Womprat Killer
Posts: 12
Joined: Fri Jun 21, 2013 11:29 am
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set

How to mod the decrementing lightsabre health bar

Post by Sketchup »

Sup beaches

I'm trying to find the files associated with that annoying lightsabre bar that decreases over time with inactivity. I'm making a hero conquest mod, and need to know which scripts within the mod tools deal with this annoying thing. I've looked through sides and scripts and couldn't find anything. If there's already a LVL mod that exists for this, feel free to hook me up.

Regards
Sketch
User avatar
LukeBenVader1
Private Recruit
Posts: 20
Joined: Fri Jan 10, 2014 8:28 am
Projects :: Ultimate Laser Tag
Games I'm Playing :: SW Battlefront II
xbox live or psn: No gamertag set

Re: How to mod the decrementing lightsabre health bar

Post by LukeBenVader1 »

Just put the hero units into the team like the other units:
Hidden/Spoiler:
SetupTeams{
hero = {
team = ALL,
units = 12,
reinforcements = -1,
soldier = { "all_hero_hansolo_tat",1,2},
assault = { "all_hero_chewbacca", 1,2},
engineer= { "all_hero_luke_jedi", 1,2},
sniper = { "rep_hero_obiwan", 1,2},
officer = { "rep_hero_yoda", 1,2},
special = { "rep_hero_macewindu", 1,2},
},
}

AddUnitClass(ALL,"all_hero_leia", 1,2)
AddUnitClass(ALL,"rep_hero_aalya", 1,2)
AddUnitClass(ALL,"rep_hero_kiyadimundi",1,2)

SetupTeams{
villain = {
team = IMP,
units = 20,
reinforcements = 150,
soldier = { "imp_hero_bobafett", 1,2},
assault = { "imp_hero_darthvader",1,2},
engineer= { "cis_hero_darthmaul", 1,2},
sniper = { "cis_hero_jangofett", 1,2},
officer = { "cis_hero_grievous", 1,2},
special = { "imp_hero_emperor", 1,2},

},
}
AddUnitClass(IMP, "rep_hero_anakin",1,2)
AddUnitClass(IMP, "cis_hero_countdooku",1,2)
And completely remove these lines:
Hidden/Spoiler:
SetHeroClass(ALL, "all_hero_hansolo_tat")
SetHeroClass(IMP, "imp_hero_bobafett")
And there you go, the lightsaber healthbar has been turned into an ordinary health bar and no health decreases. Just make sure you have them listed in the ReadDataFile Section.
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: How to mod the decrementing lightsabre health bar

Post by Anakin »

The healthbar it selfe is set up in the hud file
Hidden/Spoiler:
[code]
Group("player1herobar")
{
Position(0.008307, 0.947696, 0.000000, "Viewport")
Scale(0.539993, 0.539993, 0.539993)
EventEnable("player1.hero.healthFraction")
EventDisable("player1.hero.healthDisable")
BarBitmap("player1herobar_COLOR")
{
ScaleTexture(0)
EventValue("player1.hero.healthFraction")
Bitmap("hud_herobar_saberglow")
BitmapRect(0.300000, 0.030000, "Left", "Top", "Viewport")
Position(0.147668, -0.008300, 0.000000, "Viewport")
Scale(1.903298, 1.674797, 1.000000)
ZOrder(7)
Alpha(0.800000)
Color(40, 126, 255)
EventEnable("initialize")
}

BarBitmap("player1herobar_INNERWHITE")
{
ScaleTexture(0)
FlashyScale(0.000000)
EventValue("player1.hero.healthFraction")
Bitmap("hud_herobar_saberglow")
BitmapRect(0.300000, 0.030000, "Left", "Top", "Viewport")
Position(0.146132, 0.008366, 0.000000, "Viewport")
Scale(1.903298, 0.471231, 1.000000)
ZOrder(6)
Alpha(0.800000)
EventEnable("initialize")
}

ProceduralBarBitmap("player1herobar_PULSE")
{
ScaleTexture(0)
EventValue("player1.hero.healthFraction")
Bitmap("hud_herobar_saberglow")
BitmapRect(0.300000, 0.000052, "Left", "Top", "Viewport")
Position(0.142687, 0.002335, 0.000000, "Viewport")
Scale(1.470730, 1.000000, 1.000000)
ZOrder(0)
Alpha(0.096829)
Color(167, 255, 0)
BlendMode("Additive")
EventEnable("initialize")
}

Bitmap("player1herobar_herobarsaberhilt")
{
Bitmap("hud_herobar_saberhilt")
BitmapRect(0.400000, 0.133000, "Left", "Top", "Viewport")
Position(0.000034, -0.013004, 0.000000, "Viewport")
Scale(0.370000, 0.370000, 0.370000)
Alpha(0.500000)
EventEnable("player1.hero.health")
EventDisable("player1.hero.healthDisable")
}

}
[/code]
But the damage is something about the player1.hero.healthFraction value. I have no idea where this is defined, but i'm sure it is hard coded. So the only way is the one LukeBenVader1 told you. If you still want to have the lightsaber bar you can change the normal unit's health bar with the one from the heros.
Sketchup
Recruit Womprat Killer
Posts: 12
Joined: Fri Jun 21, 2013 11:29 am
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set

Re: How to mod the decrementing lightsabre health bar

Post by Sketchup »

I'm making an online mod, so adding classes isn't an option. Thanks for confirming my suspicion that it's hard coded.
Eaol
Major
Major
Posts: 510
Joined: Fri Jul 31, 2009 5:49 pm
Games I'm Playing :: SWBF2 and Warframe
Location: Everywhere.

Re: How to mod the decrementing lightsabre health bar

Post by Eaol »

Will the theme for each hero still play when playing as them from the Unit Selection screen like this?
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: How to mod the decrementing lightsabre health bar

Post by AQT »

The theme will play only if the map doesn't have any music playing.
Eaol
Major
Major
Posts: 510
Joined: Fri Jul 31, 2009 5:49 pm
Games I'm Playing :: SWBF2 and Warframe
Location: Everywhere.

Re: How to mod the decrementing lightsabre health bar

Post by Eaol »

So basically, if you spawn in initially as the hero and not as another unit/spawning in between tracks?
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: How to mod the decrementing lightsabre health bar

Post by AQT »

Nope, I meant if you don't any background music set up for your map at all.
Eaol
Major
Major
Posts: 510
Joined: Fri Jul 31, 2009 5:49 pm
Games I'm Playing :: SWBF2 and Warframe
Location: Everywhere.

Re: How to mod the decrementing lightsabre health bar

Post by Eaol »

Ok. That makes sense. I kind of wanted to do this too, and balance heroes some other way. I could have sworn people used to complain about the whole hero time limit back in the day.
Sketchup
Recruit Womprat Killer
Posts: 12
Joined: Fri Jun 21, 2013 11:29 am
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set

Re: How to mod the decrementing lightsabre health bar

Post by Sketchup »

And hi Eaol! I haven't seen you in game in forever.
Post Reply