ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Fri Jan 24, 2020 4:13 pm

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Sun Jul 12, 2015 12:14 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1746
Location: A shallow water area south of Bree
Inspired by this thread, I've put together a quick Low Health Popup addon. The idea is to interrupt what you're doing when your life falls below a configurable percent of full by popping up a dialog in your face, to block your keystrokes and prevent you from merrily carrying on and only noticing the problem a few turns later when you're dead (why, no, I have no personal experience with this at all, why do you ask? :oops: ). The pop-up threshold is configurable via the "Low-health warning popup threshold" game option in the UI tab of the Game Options dialog.

So, to those who were asking for an option like this in the prior thread (and to those who are interested here), was this what you had in mind? Any changes you'd like to see? And is this something we want to merge into ZOmnibus at some point?

[Technical info:]
Code:
Hooks:
  GameOptions:tabs [to add our game option]
Superload:
  mod.class.Player:
    takeHit() [to check for threshold crossing and pop up the dialog]

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


Top
 Profile  
 
PostPosted: Wed Aug 03, 2016 1:36 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1746
Location: A shallow water area south of Bree
v1a is a compatibility release with ZOmnibus v15, mostly to avoid having the game option listed twice. If you have any characters using this addon together with ZOmnibus, you should upgrade both together, and future characters should only use one or the other (if you forget, the character creation dialog will warn you).

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


Top
 Profile  
 
PostPosted: Sat Aug 06, 2016 7:59 pm 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1746
Location: A shallow water area south of Bree
Some of the dialog collision juggling I had to do in the ZOmibus v15 release inspired me to tweak a few more places with multiple-dialog problems. In this addon in particular, I've occasionally gotten multiple "you-have-fallen-below-N%-life" popups on the same turn, which is kind of redundant. v1b, just released, fixes this by checking whether there's already a low-life popup active before popping up a new one.

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


Top
 Profile  
 
PostPosted: Sat Sep 03, 2016 4:23 pm 
Offline
Sher'Tul

Joined: Sun Jun 15, 2014 12:19 am
Posts: 1153
Location: Yeehaw, pardner
Low health pop-ups will still appear when the threshold is set to 0... just only if you have negative life.

EDIT: might be related to surge of power

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


Top
 Profile  
 
PostPosted: Sun Sep 04, 2016 3:11 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1746
Location: A shallow water area south of Bree
Micbran wrote:
Low health pop-ups will still appear when the threshold is set to 0... just only if you have negative life.

[sound F/X: source diving] …Okay, that was just sloppy thinking on my part; I forgot about negative die-at thresholds, so I assumed we'd never have to worry about checking a zero threshold. That should be fixed in v1b.1, just pushed out.

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


Top
 Profile  
 
PostPosted: Wed Nov 20, 2019 2:11 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1746
Location: A shallow water area south of Bree
So I thought I was going to need to retire this addon thanks to 1.6.1's new "Gameplay | Life Lost Warning" option, but on closer examination, it looks like the two can coexist peacefully. I'm posting it as an FAQ below, so that I can link back to it from the Steam page.

[Incidentally, we note that with a heroism infusion or similar effect, it's possible to lose more than 100% of your max life in a single turn and still not die — and the code doesn't appear to check for that, which means you could still get the warning even with the option "disabled" at 100. Easy mistake to make. :oops: :wink: (Although frankly, I'd probably want to get the warning in that case anyway… :shock: )]

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


Top
 Profile  
 
PostPosted: Wed Nov 20, 2019 2:12 am 
Offline
Sher'Tul Godslayer

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1746
Location: A shallow water area south of Bree
Frequently Asked Questions:

Is this redundant with the Life Lost Warning game option?

Game release 1.6.1 adds a new option "Gameplay | Life Lost Warning", which pops up a warning and temporarily blocks keyboard and mouse input if you lose more than a specified percentage of your maximum life in a single turn. That's subtly different from this addon's warning dialog, which pops up when your life falls below a specified percentage of maximum. We believe that these two safety checks are complementary, and they should work seamlessly together.

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

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