[v1.1.0+] Low Health Popup

A place to post your add ons and ideas for them

Moderator: Moderator

Post Reply
Message
Author
Zizzo
Sher'Tul Godslayer
Posts: 2520
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

[v1.1.0+] Low Health Popup

#1 Post by Zizzo »

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: Select all

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..."

Zizzo
Sher'Tul Godslayer
Posts: 2520
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.1.0+] Low Health Popup

#2 Post by Zizzo »

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..."

Zizzo
Sher'Tul Godslayer
Posts: 2520
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.1.0+] Low Health Popup

#3 Post by Zizzo »

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..."

Micbran
Sher'Tul
Posts: 1154
Joined: Sun Jun 15, 2014 12:19 am
Location: Yeehaw, pardner

Re: [v1.1.0+] Low Health Popup

#4 Post by Micbran »

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.

Zizzo
Sher'Tul Godslayer
Posts: 2520
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.1.0+] Low Health Popup

#5 Post by Zizzo »

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..."

Zizzo
Sher'Tul Godslayer
Posts: 2520
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.1.0+] Low Health Popup

#6 Post by Zizzo »

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..."

Zizzo
Sher'Tul Godslayer
Posts: 2520
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.1.0+] Low Health Popup

#7 Post by Zizzo »

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..."

Zizzo
Sher'Tul Godslayer
Posts: 2520
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [v1.1.0+] Low Health Popup

#8 Post by Zizzo »

By request, v2 adds a new game option "UI | Low-health warning as flyer", which changes the low-health warning from a popup dialog to the way the in-game "UI | Life Lost Warning" works, with a big flyer message and blocking keyboard/mouse input for two seconds.
"Blessed are the yeeks, for they shall inherit Arda..."

Post Reply