ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Tue Jul 07, 2020 3:13 am

All times are UTC




Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
PostPosted: Mon Mar 07, 2016 4:07 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1857
Location: A shallow water area south of Bree
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.

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Sun Mar 20, 2016 3:18 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1857
Location: A shallow water area south of Bree
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:
if self.life < 0 then ts:add({"color", 255, 0, 0}, "HP: unknown")
to something like:
Code:
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…).

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Fri Mar 25, 2016 1:54 am 
Offline
Wyrmic

Joined: Tue Feb 15, 2011 12:01 am
Posts: 282
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.


Top
 Profile  
 
PostPosted: Fri Mar 25, 2016 6:33 pm 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1857
Location: A shallow water area south of Bree
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.]

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
 Post subject: Game Freeze
PostPosted: Mon Mar 28, 2016 7:52 pm 
Offline
Higher

Joined: Mon Aug 20, 2012 10:57 am
Posts: 53
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.


Top
 Profile  
 
PostPosted: Mon Mar 28, 2016 8:08 pm 
Offline
Sher'Tul

Joined: Sun Jun 15, 2014 12:19 am
Posts: 1154
Location: Yeehaw, pardner
Can you reproduce the error and grab it via. Screenshot?

_________________
A little bit of a starters guide written by yours truly here.


Top
 Profile  
 
PostPosted: Mon Mar 28, 2016 8:12 pm 
Offline
Higher

Joined: Mon Aug 20, 2012 10:57 am
Posts: 53
I figured other add-on was responsible: Classic UI buff removal. After turning it off there is no freeze.


Top
 Profile  
 
PostPosted: Thu May 05, 2016 1:19 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1857
Location: A shallow water area south of Bree
Pushing out v2d.1 to fix Yet Another Glitch™ in the Classic UI.

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Sat Jul 23, 2016 4:21 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1857
Location: A shallow water area south of Bree
I'm experimenting with a new style of life bar display:

Attachment:
combined-lifebar.png
combined-lifebar.png [ 13.65 KiB | Viewed 3365 times ]

Attachment:
combined-lifebar-classic.png
combined-lifebar-classic.png [ 2.73 KiB | Viewed 3365 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!" :oops: :wink: ]

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Sat Jul 23, 2016 1:23 pm 
Offline
Uruivellas

Joined: Mon Jan 27, 2014 10:40 am
Posts: 715
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?)


Top
 Profile  
 
PostPosted: Sat Jul 23, 2016 10:23 pm 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1857
Location: A shallow water area south of Bree
astralInferno wrote:
What does it look like when your current life is /lower/ than your negative life?

Like this:

Attachment:
combined-lifebar-negative.png
combined-lifebar-negative.png [ 13.07 KiB | Viewed 3353 times ]

Attachment:
combined-lifebar-negative-classic.png
combined-lifebar-negative-classic.png [ 1.88 KiB | Viewed 3353 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:

Attachment:
combined-lifebar-full.png
combined-lifebar-full.png [ 13.79 KiB | Viewed 3353 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 :wink: ), and the below-zero part is just colored differently.

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Sun Jul 24, 2016 9:18 am 
Offline
Uruivellas

Joined: Mon Jan 27, 2014 10:40 am
Posts: 715
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:

Attachment:
combined-lifebar-full.png

Ah, that's not what I meant. What I meant was-

Quote:
(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 :wink: ), and the below-zero part is just colored differently.

-irrelevant! Cool. ^^


Top
 Profile  
 
PostPosted: Mon Jul 25, 2016 6:38 pm 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1857
Location: A shallow water area south of Bree
astralInferno wrote:
-irrelevant! Cool. ^^

And with that… sort of ringing endorsement, :wink: 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.

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Mon Jan 01, 2018 3:04 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1857
Location: A shallow water area south of Bree
I swear, I keep tripping over missing bits in the life-bar/shield display… :oops: v3a fixes another of those bugs that would have choked the display. We Apologize for the Inconvenience.™

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Thu Apr 30, 2020 2:08 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1857
Location: A shallow water area south of Bree
…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. :oops: 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.™)

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group