Page 1 of 1

How to mod the decrementing lightsabre health bar

Posted: Mon Mar 17, 2014 2:44 am
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

Re: How to mod the decrementing lightsabre health bar

Posted: Mon Mar 17, 2014 7:48 am
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.

Re: How to mod the decrementing lightsabre health bar

Posted: Mon Mar 17, 2014 8:52 am
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.

Re: How to mod the decrementing lightsabre health bar

Posted: Mon Mar 17, 2014 3:04 pm
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.

Re: How to mod the decrementing lightsabre health bar

Posted: Mon Mar 17, 2014 3:22 pm
by Eaol
Will the theme for each hero still play when playing as them from the Unit Selection screen like this?

Re: How to mod the decrementing lightsabre health bar

Posted: Mon Mar 17, 2014 4:15 pm
by AQT
The theme will play only if the map doesn't have any music playing.

Re: How to mod the decrementing lightsabre health bar

Posted: Mon Mar 17, 2014 4:16 pm
by Eaol
So basically, if you spawn in initially as the hero and not as another unit/spawning in between tracks?

Re: How to mod the decrementing lightsabre health bar

Posted: Mon Mar 17, 2014 4:54 pm
by AQT
Nope, I meant if you don't any background music set up for your map at all.

Re: How to mod the decrementing lightsabre health bar

Posted: Mon Mar 17, 2014 4:56 pm
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.

Re: How to mod the decrementing lightsabre health bar

Posted: Mon Mar 17, 2014 6:37 pm
by Sketchup
And hi Eaol! I haven't seen you in game in forever.