No Longer Works (Bug got Patched)
This small tool that took about an hour to make. allows users to easily modify the Health Pool of Any/Every Hero in the game without affecting their Buildable's Health or they Buff Health, like a Junker Queens Shout's Overhealth would be reduced if you decrease the users Health using Set Max Health
This tool uses a Bug that i found out about using this site's wiki about a year ago
https://workshop.codes/wiki/articles/health-pool-bug-an-alternative-to-set-max-health
Anyway just keep the Base Values up to Date & modify them in the Subroutine
(or just have 0 modify scripts & have the base values be what you want)
and it'll make sure the players health is setup correctly whenever it needs updating
Also as a Bonus you can change Barrier HP as well (changing the Barrier HP will affect all Buildable objects for the user, but im not sure how many characters have both a Buildable & a shield anyway.. other than Sym)
10 Comments
Juno's health doesn't seem to be working as it should, she's always stuck at 125 HP when using no preset. Am I doing something wrong?
The 125 doesn't make any sense, given her health values of 75 + 150
Thus i can only conclude that shes linked to the wrong hero data, if what your saying is true.
https://imgur.com/a/wxraNVv
I just opened a game with your code, using the "None" preset, I made no changes besides the preset.
But even when using presets, her health is still at 125.
The half preset sets her health to 63.5.
i'll have to look into that when i have time, but i've been very busy the last 3-4 months because i started hosting a Ark Server.
How do you actually change health pools? (I don’t really understand variables yet) like giving doom 125 armor for example
you would go into the modify subroutine, first store the current value for the Hero by setting TempValue to
Value in Array(HealthSettings, Index of Array(All Heroes, Hero(Doomfist)).that Global Variable is now storing the current Health for Doomfist in an Array of 3, where 0 is the Normal HP, 1 is the Armor & 2 is the Shield, so you would then do
Modify Global Variable at Index(TempValue, 1, Add, 125)which will add 125 to the Armor in the array.then finally you can update the HealthSettings with the new Health by doing
Set Global Variable at Index(HealthSettings, Index of Array(All Heroes, Hero(Doomfist), TempValue)Alternatively you can also just go into the Base Subroutine and modify the array that code thinks will be the Normal Health before any edits. each
Append to Arraythat adds a Hero has a Comment above it, saying what hero its for.Since the only reason its meant to match unmodified values is for easy and less complex modifications in the Modify Subroutine (which is also completely optional, and can be removed).
This is perfect, but DVa's health pool doesn't seem to work.
Yeah i did say that in the description, and that i would fix it later. later is now tho, i just fixed it & came back to the site to update it.
It works, but the change to the barrier HP causes the hero to have a “near-death” effect.
im aware but its not possible to fix, its caused by the 30% of the maximum health being higher than the health added by the HealthPools. (i think its 30% might be wrong)
basically like deployables the near death effect triggers based off max health and does not care about any added Health from the Workshop, so if the Maximum health is increased a ton (like in the example OP Barriers) then pretty much any health will display the effect.
however if this triggers on heros you've reduced the health for using the tool, and they have no deployables, just decrease their max health using
Set Max Health(Event Player, 1)and it'll fix it. if they do have a deployable it'll decrease the deployables HP as well (also any health buffs, like Lucio Ultimate)the only reason i didn't do that already in the code, is because it would mean having another large array containing which heroes do & dont have deployables. and there is already 2 large arrays for shield & health, and like 7 variables overall. i haven't done much workshop this year but i feel like its already too many variables for something thats meant to be a tool that gets imported into another code.