ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Mon Dec 16, 2019 3:08 am

All times are UTC




Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sun Jan 18, 2015 3:56 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1724
Location: A shallow water area south of Bree
We've all seen it. It's the bane of everyone trying to kill that one orc or vampire that just. won't. die. It's the reason I wouldn't touch heroism infusions or the Last Stand talent. It's spelled "HP: unknown" --- or at least it was, until my new Pragmatic Heroism addon. :wink:

This addon modifies the actor tooltips to show their exactive negative HP, and their exact negative die-at threshold. [There wasn't an obvious angle for the percentage display, so I went with f.i. (-70%) at -30/-100 and (-10%) at -90/-100.] This should work for both the player and NPCs, and with any effect that reduces the die-at threshold to below 0HP.

And this one probably won't be going into ZOmnibus, as I can imagine that some would consider it cheating.

[Technical data:]
Code:
Superload:
  mod.class.Actor:
    tooltip() [to replace "HP: unknown" in the tooltip, obviously]

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


Top
 Profile  
 
PostPosted: Tue Jan 26, 2016 12:14 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1724
Location: A shallow water area south of Bree
Release v2, just pushed out, adds a nice feature that I had wanted from the start but only just recently got working: when you're below zero life, your life bar now displays your negative life and die-at threshold, as shown below:
Attachment:
negative-life-bar.png
negative-life-bar.png [ 85.82 KiB | Viewed 4154 times ]


The black "life" meter expanding from the right as your life decreases is just an extra flourish. :twisted:

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


Top
 Profile  
 
PostPosted: Wed Jan 27, 2016 9:57 am 
Offline
Uruivellas

Joined: Mon Jan 27, 2014 10:40 am
Posts: 703
You deserve some kudos for that black life flourish, that's an amazing touch. xD


Top
 Profile  
 
PostPosted: Wed Feb 10, 2016 1:51 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1724
Location: A shallow water area south of Bree
astralInferno wrote:
You deserve some kudos for that black life flourish, that's an amazing touch. xD

*blush* (bows)

Did just find a bug, though: invisible actors apparently have nil tooltips, which means attempting to modify them is almost certainly going to end badly. :wink: That's fixed in v2a, just pushed out.

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


Top
 Profile  
 
PostPosted: Wed Feb 10, 2016 3:49 pm 
Offline
Higher

Joined: Mon Aug 20, 2012 10:57 am
Posts: 53
Quote:
And this one probably won't be going into ZOmnibus, as I can imagine that some would consider it cheating.


How about include it in ZOmnibus, but make it configurable so that it can be turned off. There are more options in ZOmnibus that can be considered cheating, such as always evade all patrols.


Top
 Profile  
 
PostPosted: Thu Feb 11, 2016 1:35 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1724
Location: A shallow water area south of Bree
Row wrote:
How about include it in ZOmnibus, but make it configurable so that it can be turned off. There are more options in ZOmnibus that can be considered cheating, such as always evade all patrols.

A fair point, I suppose; I don't think I was thinking about that sort of thing way back when I first created ZOmnibus. Anyone else have an opinion?

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


Top
 Profile  
 
PostPosted: Thu Feb 11, 2016 9:57 am 
Offline

Joined: Thu Feb 11, 2016 9:54 am
Posts: 1
I've only just started playing, and haven't even experienced being able to go negative HP yet, but I do use the ZOmnibus pack and would say add it. I like stuff, and if it can be turned on or off then I don't see a problem with it.


Top
 Profile  
 
PostPosted: Wed Feb 17, 2016 2:40 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1724
Location: A shallow water area south of Bree
Okay, you've convinced me. :wink: v2b, just pushed out, adds the "Show negative life in tooltips" option under the UI tab of the Game Options dialog — and that's enough to let us merge into ZOmnibus. We Apologize for the Convenience.™ :mrgreen:

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


Top
 Profile  
 
PostPosted: Sat Feb 20, 2016 5:10 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1724
Location: A shallow water area south of Bree
Aaand greater exposure via ZOmnibus apparently means more stupid bugs found faster… :oops: Pushing out v2b.1 to fix display of shield info in the life bar while you're below zero life. We Apologize for the Error.™

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


Top
 Profile  
 
PostPosted: Tue Mar 01, 2016 7:22 am 
Offline
Higher

Joined: Mon Aug 20, 2012 10:57 am
Posts: 53
When using classic UI and Plenum tooltip addon, there is no way to tell how much in the negative life you are.
It should display the negative life number also in:
    * classic ui life bar
    * character sheet


Top
 Profile  
 
PostPosted: Wed Mar 02, 2016 1:24 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1724
Location: A shallow water area south of Bree
Row wrote:
When using classic UI and Plenum tooltip addon, there is no way to tell how much in the negative life you are.

Wait, so with Plenum, you're not getting e.g. "HP: -13/-100" in the player's tooltip? Is it still saying "HP: unknown"? I'll need to investigate that. But you're right, support of the Classic UI is something I really should have done by now.

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


Last edited by Zizzo on Wed Mar 02, 2016 4:18 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Mar 02, 2016 4:18 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1724
Location: A shallow water area south of Bree
Well, supporting the Classic UI turned out not to be quite as hard as I'd feared:

Attachment:
classic-lifebar.png
classic-lifebar.png [ 9.49 KiB | Viewed 3812 times ]


That's going out as v2c. As for Plenum, I think I'm going to need to bring Hachem_Muche in on this…

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


Top
 Profile  
 
PostPosted: Wed Mar 02, 2016 9:27 pm 
Offline
Uruivellas

Joined: Thu Nov 18, 2010 6:42 pm
Posts: 744
Zizzo, got your poast RE: Plenum Tooltip.

What you're doing with the actor tooltip should work fine on the PTT created tooltip.

Any reason you set your addon weight to 50?

PTT runs at a weight of 150 to make sure the effects of other addon's are taken into account, and because it's not game-breaking if another addon breaks it (It can be disabled from the game menu.).

I think both addon's should be compatible if you set the weight of PH to 151.

_________________
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.


Top
 Profile  
 
PostPosted: Thu Mar 03, 2016 3:08 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1724
Location: A shallow water area south of Bree
Hachem_Muche wrote:
Any reason you set your addon weight to 50?

(scratches head) I'm… pretty sure that's what most or all of the other addons I've looked at use. For that matter, I pretty much had to have copied it from somewhere.

Hachem_Muche wrote:
PTT runs at a weight of 150 to make sure the effects of other addon's are taken into account,

See, this is the bit that confuses me. Because the way you've got it implemented currently, you're effectively discarding the effects of other addons and rebuilding the tooltip from scratch (hence the problem, in fact). That's why I offered to have Pragmatic Heroism pass information "downstream" to Plenum, to use in its tooltip reconstruction.

Hachem_Muche wrote:
I think both addon's should be compatible if you set the weight of PH to 151.

I considered that briefly, but Pragmatic is also part of ZOmnibus, so I'd also have to change ZOmnibus' weight, and I shudder to imagine what that might break. :?

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


Top
 Profile  
 
PostPosted: Fri Mar 04, 2016 8:19 pm 
Offline
Uruivellas

Joined: Thu Nov 18, 2010 6:42 pm
Posts: 744
But why not change the weight of everything?
Sounds like a debugging adventure!

Actually I thought Zomnibus had a way to change the weight of each individual addon.
The default weight for addons (is supposed to be) 100.

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.
Have you tested PH with a higher weight than PTT to confirm it works?

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.

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.

_________________
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


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