• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Single-target heal quirks

Status
Not open for further replies.
Level 2
Joined
Aug 18, 2019
Messages
8
Hi all,

long-time stalker, first time poster here.

What I want to have is a single-target, auto-cast heal ability which is used whenever a unit is damaged - preferably without triggers.
Sounds easy enough, especially looking at the Heal ability already existing. However, after playing around with the ability and its cooldown, buff duration, etc I'm facing following issue:
The unit will only get healed by 1 Priest, even if the damaged unit is not topped off and a second Priest is nearby.
Imagine Starcraft 2 Medics, multiple Medics healing a single unit whenever it gets damaged (only without the channeling-part).

I've searched left and right (also in this forum) but all I could find are custom heal abilities, based off of chain lighntnings, MUI hots, etc. - nobody seemed to care about this very basic but specific issue with single-target heal abilities in general.

I've also tried to use different auto-cast abilities as base and do the healing via triggers, but encountering different issues (e.g. Slow not targetting the damaged unit, Inner Fire / Frost Armor preventing the unit to be targetted twice in rapid succession ...) and I'm kinda refusing to believe that Heal isn't the right ability to use as a base.

Is there anything I've missed or other abilities / tricks I could use?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,540
Maybe someone more knowledgeable can help you but i'd say that what you see in the Object Editor is what you get. There's also Gameplay Constants that can change the mechanics of abilities but I don't think there's anything related to Heal on there.

Triggering sounds like the way to go. Detect the order strings for when the Heal ability is toggled on and then add that ordered unit to a Unit Group. Then have a timer that periodically checks for nearby damaged units. When a damaged unit is found order the Healer to cast the heal ability on them. If they toggle the ability off then remove them from the Unit Group. That covers most of it, nothing too difficult and we can always help you if you aren't sure how to do it.
 
Level 2
Joined
Aug 18, 2019
Messages
8
Maybe someone more knowledgeable can help you but i'd say that what you see in the Object Editor is what you get. There's also Gameplay Constants that can change the mechanics of abilities but I don't think there's anything related to Heal on there.

Triggering sounds like the way to go. Detect the order strings for when the Heal ability is toggled on and then add that ordered unit to a Unit Group. Then have a timer that periodically checks for nearby damaged units. When a damaged unit is found order the Healer to cast the heal ability on them. If they toggle the ability off then remove them from the Unit Group. That covers most of it, nothing too difficult and we can always help you if you aren't sure how to do it.
After setting up your mentioned trigger I've realized that this will inevitably restrict / randomize the targetting of all Priests of such Unit Group (e.g. imagine an AoE ability damages multiple units within range of 2 Priests, they would randomly choose which they gonna heal - except there's some kind of prioritization-system established which would still be a bandaid-fix). So, I'm going back to the draw board. :(

I think it is the buff that prevents second casting.

So if you make a trigger that removes that specific buff from Target unit on cast, I think that gives you the result you want.
Well, yes and no. Removing the buff is possible (although only via a triggered wait after casting an ability, which is kinda ugly - if done without a wait, the buff will never get removed).
The cooldown is responsible for how long the buff stays active - but reducing the cooldown of my heal spell isn't really what I want to have.
I'm also facing the issue of AI not healing a single unit with multiple Priests. The second (and onwards) Priest needs to specifically be ordered to heal a target instead of picking the target automatically.


In summary my whole idea seems to be impossible to implement. I'm focusing so heavily on the heal ability as I want to use Zwiebelchens Threat System in conjunction and found out that AoE heal abilities (e.g. Replenish / Essence of Blight) are not registered properly as "heal threat". Starting to run out of ideas what else to try. :(
 
Level 2
Joined
Aug 18, 2019
Messages
8
I've tried renew yesterday - this failed due to (again) hardcoded quirks of that ability: only buildings / mechanical units as targets allowed, even if I change the ability.
However, I could also turn my units into mechanicals - which could resolve the targeting issue while also keeping the AI intact (as no triggering is required).
Only downside (which would be fine to live with) is that those abilities are channels instead of auto-cast one-time events.
Thanks for the food of thoughts, will try out when I'm back again.

Edit: nope, the weird targeting of renew / repair does not let me select my units - even after adjusting the ability and the unit.
 
Last edited:
Level 8
Joined
May 21, 2019
Messages
435
It kinda sounds like a massive issue to overcome, but I wanna focus on what you wrote here:

In summary my whole idea seems to be impossible to implement. I'm focusing so heavily on the heal ability as I want to use Zwiebelchens Threat System in conjunction and found out that AoE heal abilities (e.g. Replenish / Essence of Blight) are not registered properly as "heal threat". Starting to run out of ideas what else to try. :(

How about you just code the threat on AoE heals yourself? It says in the version notes, that there's a function called "ApplyHealThreat". Kinda sounds like you can just calculate what the healing would end up being, and then throw that in there yourself.
 
Level 2
Joined
Aug 18, 2019
Messages
8
It kinda sounds like a massive issue to overcome, but I wanna focus on what you wrote here:



How about you just code the threat on AoE heals yourself? It says in the version notes, that there's a function called "ApplyHealThreat". Kinda sounds like you can just calculate what the healing would end up being, and then throw that in there yourself.

This is working and I've also done so. The small issue I've noticed is that units aren't registered initially on the 'threat-board' when only using those abilities (tested with Essence of Blight). I've left a comment in the Threst Systems' thread, explaining the situation.
Workaround I've done is to add chip-damage whenever the spell is cast in a radius around the target receiving the heal - luckily even "0 damage" is enough to get the Priest registered as threat and then continually increasing it whenever he's casting his ability via "ApplyHealThreat". Not entirely sure if I covered all memory leaks, but that's a different topic to be tackled if that's the way to go ;-)

Essence of Blight has the advantage of being mostly adjustable in ways I need it to be (cooldown is decoupled from the buff-duration, buff-duration can be set to 0.01 to enable multiple Priests to heal the same target [not flawlessly, but good enough for now], targetting AI stays intact as it is considered a 'healing' ability therefore prioritizing wounded targets, etc.) - I'm now tweaking the ability to my needs as it is an PBAoE-ability with cast-range and radius (and specific amount of targets), however the effect (buff + heal) is kinda weirdly applied (cast-range and radius need to be adjusted to find the right amount).

Only downside is it being an AoE-ability reduced to only 1 target - right-clicking a unit will not 'anchor' it to tunnel-heal the target, but instead it will somewhat randomly choose which target it heals with each cast if multiple wounded targets are in range.
I'm still disappointed in not getting around the 'cooldown = buff-time' of our simple Heal ability ... it would have had all boxes checked in what I expect to have as a healing ability ...

Edit: scanning through a few more ressources I've ended up at thehelper.net (affiliated with hiveworkshop) where exactly this rant (not possible to heal same target with two Priests) came up twice - without any solution.
However, I've also stumbled upon the 'use Renew / Repair'-suggestion - while Renew does not work due to invalid targets, Repair apparently does. Will try out as soon as I'm home again ...
 
Last edited:
Status
Not open for further replies.
Top