#Warlock - Impending Ruin gauge
6 messages · Page 1 of 1 (latest)
I. DESIGN BASED ON OTHER AURAS
I did it before with other auras (the Evoker's Scarlet Adaptation or the Druid's Primordial Arcanic Pulsar for example) using a simple progression bar with a custom text %c as follow :
function()
if aura_env.state and aura_env.state.tooltip1 then
local current = aura_env.state.tooltip1
local max = 600
aura_env.region:SetDurationInfo(current, max, true)
return string.format("%.0f", current/max)
else
aura_env.region:SetDurationInfo(0, 1, true)
return "0"
end
end
Example given for the Primordial Arcanic Pulsar, only the local max changes for GetSpellBonusDamage(7) * 1.61 in the Scarlet Adaptation one as the value can change
On the image, you can see the resulting gauge I designed for the Primordial Arcanic Pulsar > the number in the gauge indicates how much it is filled (here, how many Starsurge I have cast as of now), the number on the right indicates the total to be fully filled (with Starsurge, I need to cast 15 to spend the 600 Astral Power required by the talent to grant a Celestial Alignment)
II. MY PROBLEM
The Impending Ruin aura doesn't work the same as the others I've done before
➡️ Others > the code string fetches the tooltip information to fill the gauge to the total I want
E.g. > Primordial Arcanic Pulsar grants A Celestial Alignment for 12 sec. every 600 Astral Power spent, so basically, the gauge fetches how many Astral Power have been spent in the tooltip information and fills itself depending on that)
➡️ Impending Ruin > the tooltip only provides the basic information of what it does, but the interesting data is the stacks of the aura : 1 Soul Shard spent grants 1 stack of the Impending Ruin aura
III. WHAT I WANT AND WHAT I HAVE ALREADY TRIED
Basically, I would like for the gauge to not fetch information in the tooltip, but just the number of stacks of the aura and to fill depending on that
I have tried replacing the %c by a simple %s but it doesn't work > the text string provides the number of stacks alright, but the gauge doesn't fill (//see 1st image)
I have tried leaving the code string as it is but in this case, the gauge appears fully filled as soon as the aura is active, even with 1 stack (//see 2nd image)
IV. WHAT SOLUTION I THOUGHT OF
I assume the problem lies within the code string itself, and that I need to replace the aura_env.state and / or aura_env.state.tooltip in it by another variable
My problem is that I don't know the proper name for the aura's stacks variable, and I don't know how to identify this name with the resources I have.
If I'm correct, the code should look like something like this
function()
if A and B then
local current = B
local max = 600
aura_env.region:SetDurationInfo(current, max, true)
return string.format("%.0f", current/max)
else
aura_env.region:SetDurationInfo(0, 1, true)
return "0"
end
end
with A probably being the aura.env_state (?) in the first code and B being the proper variable for the aura's stack value
(The max may even be unnecessary in the return string.format("%.0f", current/max) line)
#snippets message