Health Drain/Regeneration Questions [Solved]

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
BarbylBapkins
Private Recruit
Posts: 18
Joined: Mon Jan 28, 2019 10:08 am
Projects :: Thyferra
Games I'm Playing :: DST
xbox live or psn: No gamertag set

Health Drain/Regeneration Questions [Solved]

Post by BarbylBapkins »

I'm currently playing with the idea of having certain classes constantly regenerate health at an extremely slow rate, without the use of an ability. My current plans involve either giving these classes heroes' health bars and messing with their drain rates, or giving them Bacta Tank Bonus-like effects, but I haven't been able to figure out where the behaviors of either of these mechanics are controlled from. I looked for the hero health bar mechanics in "com_inf_default" and "com_inf_default_hero", but I didn't see anything in either location that looked like it controlled the specific health bar behaviors I was looking for. As for the Bacta Tank Bonus's effects, I didn't find any odf or lua files that sounded like they would contain anything useful, at least based on my limited knowledge. If anyone knows more about these mechanics, or if they've managed to implement something like this through another method, your knowledge would be much appreciated.
Last edited by BarbylBapkins on Fri May 21, 2021 10:00 pm, edited 2 times in total.
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: Health Drain/Regeneration Questions

Post by Marth8880 »

You simply add

Code: Select all

AddHealth = "1.0"
to the unit's ODF, replacing 1.0 with whatever your desired added health-per-second is. :)
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: Health Drain/Regeneration Questions

Post by AnthonyBF2 »

Hero health bar only applies to characters that has been designated as a hero class (SetHeroClass in the mission scripts).
You will need to use AddHealth on the character ODFs.
BarbylBapkins
Private Recruit
Posts: 18
Joined: Mon Jan 28, 2019 10:08 am
Projects :: Thyferra
Games I'm Playing :: DST
xbox live or psn: No gamertag set

Re: Health Drain/Regeneration Questions

Post by BarbylBapkins »

Many thanks to both of you!
Post Reply