Page 2 of 3
Re: [v1.1.0+] Pragmatic Heroism
Posted: Mon Mar 07, 2016 4:07 am
by Zizzo
Hachem_Muche wrote:But why not change the weight of everything? Sounds like a debugging adventure!
Eh heh… that's generally the kind of "adventure" I try to avoid.
Hachem_Muche wrote:Actually I thought Zomnibus had a way to change the weight of each individual addon.
No, ZOmnibus is a single addon; it predates the .teaac "addon collection" infrastructure, and
back when I asked, no one expressed any interest in having ZOmnibus retooled to use said infrastructure.
Hachem_Muche wrote:The default weight for addons (is supposed to be) 100.
Out of curiosity, what's your source for this?
Hachem_Muche wrote:PTT does override other addons, because it pretty much replaces the entire tooltip for actors. Another addon (at a higher weight) that tried to modify the normal ToME tooltip would probably break.
Oh, I know overloading is necessary sometimes; I've had to resort to it myself.
Hachem_Muche wrote:Have you tested PH with a higher weight than PTT to confirm it works?
I was
really hoping to avoid having to resort to that, actually, for the reasons I mentioned above.
Hachem_Muche wrote:The next (rather sloppy) option I can think of is defining something like a new mod.Actor._life_text(self) function that returns the string you want to display, and then using that in your search and replace code to update actor life in the tooltip. It would then be easy enough to have PTT check for that function and use it.
That's pretty much exactly what I was going to suggest, actually.
Hachem_Muche wrote:Also note that if the player really needs to see the negative life of an npc, he can temporarily disable PTT's actor tooltip and the normal tooltip (using PH) will be displayed.
True, but that's kind of inconvenient.
Re: [v1.1.0+] Pragmatic Heroism
Posted: Sun Mar 20, 2016 3:18 am
by Zizzo
Hachem_Muche wrote:The next (rather sloppy) option I can think of is defining something like a new mod.Actor._life_text(self) function that returns the string you want to display, and then using that in your search and replace code to update actor life in the tooltip. It would then be easy enough to have PTT check for that function and use it.
We Apologize for the Delay;™ I was hoping to get
Hellcommander's Spine of the Spire error fixed so I could combine both changes into a single ZOmnibus release, but I never could find what that was about. At any rate, the just-released v2d defines the Actor:negativeLifeStr() method for exactly the purpose you describe above. As I read your code, it looks like you could incorporate this by changing this line:
Code: Select all
if self.life < 0 then ts:add({"color", 255, 0, 0}, "HP: unknown")
to something like:
Code: Select all
if self.life < 0 then
local neg_hp = self.negativeLifeStr and self:negativeLifeStr() or 'unknown'
ts:add({"color", 255, 0, 0}, "HP: " .. neg_hp)
No one else should see any changes in functionality in this release (I hope…).
Re: [v1.1.0+] Pragmatic Heroism
Posted: Fri Mar 25, 2016 1:54 am
by Nagyhal
I'm not sure this was ever a very good mechanic.
Frankly, it would be better gameplay if you could see exactly how many negative HP you have lost when you are below 0 HP, but couldn't tell and had to guess when you were above 0 HP.
Re: [v1.1.0+] Pragmatic Heroism
Posted: Fri Mar 25, 2016 6:33 pm
by Zizzo
Nagyhal wrote:I'm not sure this was ever a very good mechanic.
Frankly, it would be better gameplay if you could see exactly how many negative HP you have lost when you are below 0 HP, but couldn't tell and had to guess when you were above 0 HP.
*blink* I'm… frankly mystified by the idea that not being able to know how close you are to dying would be good gameplay. That's kind of the
raison d'être for this addon, after all.
[Unless you mean that the effect you describe would only apply when you have a die-at threshold less then zero — although even then, typically your die-at threshold is close enough to zero that by the time you're into negative HP, you're already in holy-crap panic territory anyway.]
Game Freeze
Posted: Mon Mar 28, 2016 7:52 pm
by Row
When in negative life and mouse over a skill, the game freezes. I think the bug is in the Pragmatic Heroism add-on. Classic UI.
Re: [v1.1.0+] Pragmatic Heroism
Posted: Mon Mar 28, 2016 8:08 pm
by Micbran
Can you reproduce the error and grab it via. Screenshot?
Re: [v1.1.0+] Pragmatic Heroism
Posted: Mon Mar 28, 2016 8:12 pm
by Row
I figured other add-on was responsible: Classic UI buff removal. After turning it off there is no freeze.
Re: [v1.1.0+] Pragmatic Heroism
Posted: Thu May 05, 2016 1:19 am
by Zizzo
Pushing out v2d.1 to fix
Yet Another Glitch™ in the Classic UI.
Re: [v1.1.0+] Pragmatic Heroism
Posted: Sat Jul 23, 2016 4:21 am
by Zizzo
I'm experimenting with a new style of life bar display:

- combined-lifebar.png (13.65 KiB) Viewed 15206 times

- combined-lifebar-classic.png (2.73 KiB) Viewed 15206 times
The idea is a "combined" life bar, showing both your normal hit points and your "negative" hit points (the latter is the bit in darker red on the Minimalist UI and black on the Classic UI). I figure this will be more useful for characters who have some permanent source of a negative die-at threshold, as a more visible reminder that you've still got some buffer if your life gets low. I plan to make it switchable between this and the original black-bar display via a new game option.
So. Thoughts before I release this? [Up to and including "dear lord, don't do that, it's horrible!"

]
Re: [v1.1.0+] Pragmatic Heroism
Posted: Sat Jul 23, 2016 1:23 pm
by astralInferno
What does it look like when your current life is /lower/ than your negative life? a red bar with the dark red bit extending from it? (IE, reversed colors from the examples?)
Re: [v1.1.0+] Pragmatic Heroism
Posted: Sat Jul 23, 2016 10:23 pm
by Zizzo
astralInferno wrote:What does it look like when your current life is /lower/ than your negative life?
Like this:

- combined-lifebar-negative.png (13.07 KiB) Viewed 15194 times

- combined-lifebar-negative-classic.png (1.88 KiB) Viewed 15194 times
The test character I've been grabbing these images from has 148hp and a die-at threshold of -100hp; it may be clearer in the full-health bars:

- combined-lifebar-full.png (13.79 KiB) Viewed 15194 times
(oops, only 3 attachments allowed…) that the "negative-life" part of the bar takes up about 40% of the bar, which works out proportionally. The idea is that instead of the life bar going from 0hp to 148hp when you're above 0hp and -100hp to 0hp when you're below 0hp, it will go from -100hp to 148hp all the time (well, or until the die-at threshold expires, if it's temporary

), and the below-zero part is just colored differently.
Re: [v1.1.0+] Pragmatic Heroism
Posted: Sun Jul 24, 2016 9:18 am
by astralInferno
Zizzo wrote:The test character I've been grabbing these images from has 148hp and a die-at threshold of -100hp; it may be clearer in the full-health bars:
combined-lifebar-full.png
Ah, that's not what I meant. What I meant was-
(oops, only 3 attachments allowed…) that the "negative-life" part of the bar takes up about 40% of the bar, which works out proportionally. The idea is that instead of the life bar going from 0hp to 148hp when you're above 0hp and -100hp to 0hp when you're below 0hp, it will go from -100hp to 148hp all the time (well, or until the die-at threshold expires, if it's temporary

), and the below-zero part is just colored differently.
-irrelevant! Cool. ^^
Re: [v1.1.0+] Pragmatic Heroism
Posted: Mon Jul 25, 2016 6:38 pm
by Zizzo
astralInferno wrote:-irrelevant! Cool. ^^
And with that… sort of ringing endorsement,

I'll go ahead and push this out as v3. By default, the new "Combined life bar" game option is disabled, leaving the original life bar handling in place, so as not to surprise anyone.
Re: [v1.1.0+] Pragmatic Heroism
Posted: Mon Jan 01, 2018 3:04 am
by Zizzo
I swear, I keep tripping over missing bits in the life-bar/shield display…

v3a fixes another of those bugs that would have choked the display. We Apologize for the Inconvenience.™
Re: [v1.1.0+] Pragmatic Heroism
Posted: Thu Apr 30, 2020 2:08 am
by Zizzo
…Wow, I really wasn't paying attention, was I? Instead of "HP: unknown", 1.6 apparently will now happily report that an actor has -200 HP, and even "helpfully" add that that's -162% of its max life — neither of which, of course, offer any insight into how close said actor is to, y'know, actually
dying, which was kind of the whole point of this addon.

v3a.1 restores the intended behavior, re-adding the actor's die-at threshold and changing the percentage to reflect the remaining percentage of the actor's negative life.
(Now, as I recall, some other addons, notably
Plenum, were using this addon's :negativeLifeStr() method in their own downstream manipulation of the actor tooltip. As a heads-up to those addons' authors, this release changes that method to return a slightly different string: since we're now doing reassembly via Lua's .. operator instead of string.gsub(), we no longer have to double-escape the '%' character, so :negativeLifeStr() returns a string with slightly fewer '%'s than before. We Apologize for the Inconvenience.™)