• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Amplified Healing (Damage Engine)

There are some systems that exist to detect when a unit is healed and add more life to the unit:

But it will have to loop through all units on the map and periodically check to see if their health jumps above a certain threshold.

Personally, I'd lean towards triggering all your healing abilities--as you'll get more control over it that way. Typically the triggering for a heal is just "Set life of unit = life of unit + <amount to heal>". If you wanted to make it more systematic, I'd introduce a few variables and run a custom trigger where you can perform your heal amplication/reduction effects. For example:
  • Set Healing_Caster = (Casting unit)
  • Set Healing_Target = (Target unit of ability being cast)
  • Set Healing_Amount = 100.0
  • Trigger - Run Healing Amplification <gen>
  • Unit - Set life of Healing_Target equal to ((Life of Healing_Target) + Healing_Amount)
  • Healing Amplification
    • Events
    • Conditions
    • Actions
      • ---- check for buffs and such to increase Healing_Amount however you'd like ----
Hopefully that makes sense! I can help make an example map if that'd help.
 
There are some systems that exist to detect when a unit is healed and add more life to the unit:

But it will have to loop through all units on the map and periodically check to see if their health jumps above a certain threshold.

Personally, I'd lean towards triggering all your healing abilities--as you'll get more control over it that way. Typically the triggering for a heal is just "Set life of unit = life of unit + <amount to heal>". If you wanted to make it more systematic, I'd introduce a few variables and run a custom trigger where you can perform your heal amplication/reduction effects. For example:
  • Set Healing_Caster = (Casting unit)
  • Set Healing_Target = (Target unit of ability being cast)
  • Set Healing_Amount = 100.0
  • Trigger - Run Healing Amplification <gen>
  • Unit - Set life of Healing_Target equal to ((Life of Healing_Target) + Healing_Amount)
  • Healing Amplification
    • Events
    • Conditions
    • Actions
      • ---- check for buffs and such to increase Healing_Amount however you'd like ----
Hopefully that makes sense! I can help make an example map if that'd help.
I'm sorry, I'm still unable, or at least I don't fully understand the system, I try to do it but it doesn't work, could you give me a more precise example? What I want to do is that if a unit carries an item that amplifies healing, let's say 20%, this is applied to the healing he does. How would you do it?

Another thing I don't quite understand is the events, for the nice letters showing the healing to be displayed, it needs an event, but when I enter the event for my trigger, it doesn't work, I also tried to add my variable inside the Heal Unit, but that didn't work either, I think I'm missing something.
 
Last edited:
Level 11
Joined
Nov 15, 2007
Messages
800
With Damage Engine you could just use negative damage and modify it the same way you'd modify any other damage. E.G.
  • Holy Light
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Holy Light
    • Actions
      • Set VariableSet NextDamageType = DamageTypeHeal
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing -100.00 damage of attack type Spells and damage type Universal
  • Amplify Healing
    • Events
      • Game - OnDamageEvent becomes Equal to 1.00
    • Conditions
      • DamageEventType Equal to DamageTypeHeal
      • (DamageEventSource has an item of type Scepter of Healing) Equal to True
    • Actions
      • Set VariableSet DamageEventAmount = (DamageEventAmount x 1.20)
PurgeandFire's way of doing healing separately would mean not having to filter healing out of all other damage amplifications, though. Also negative damage might still give the "Unit under attack" message if an off-screen unit is healed? Not completely sure on that one.
 
With Damage Engine you could just use negative damage and modify it the same way you'd modify any other damage. E.G.
  • Holy Light
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Holy Light
    • Actions
      • Set VariableSet NextDamageType = DamageTypeHeal
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing -100.00 damage of attack type Spells and damage type Universal
  • Amplify Healing
    • Events
      • Game - OnDamageEvent becomes Equal to 1.00
    • Conditions
      • DamageEventType Equal to DamageTypeHeal
      • (DamageEventSource has an item of type Scepter of Healing) Equal to True
    • Actions
      • Set VariableSet DamageEventAmount = (DamageEventAmount x 1.20)
PurgeandFire's way of doing healing separately would mean not having to filter healing out of all other damage amplifications, though. Also negative damage might still give the "Unit under attack" message if an off-screen unit is healed? Not completely sure on that one.

Of course, now I have a question, for the skills that heal with aura? Like Tranquility or Healing Spray, or on my map for example, there is a skill that is a healing totem. I suppose it could be looped?

Captura de pantalla 2024-09-03 145600.png


This was the result, the clear problem is that the negative damage is added to the total healing, raising it to 320, what is true is that the +20% multiplier is applied, but now it would be to avoid adding more than the necessary amount, the problem that I also see is that the system that you passed subtracts -100 of flat life, which added to 20% is 120, the paladin's healing is +200 which would mean that the extra 20% should be +240, for now I think it's just playing with the values.
 
Last edited:
Level 11
Joined
Nov 15, 2007
Messages
800
Of course, now I have a question, for the skills that heal with aura? Like Tranquility or Healing Spray, or on my map for example, there is a skill that is a healing totem. I suppose it could be looped?
Non-instant spells are a little more complicated. The simple and crude way to make a healing totem ability (with GUI Unit Indexer) would be something like
  • Summon Healing Totem
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Healing Totem
    • Actions
      • Set SummonLocation = (Target point of ability being cast)
      • Unit - Create 1 Healing Totem for (Triggering player) at SummonLocation facing Default building facing degrees
      • Set Summoner[(Custom value of (Last created unit))] = (Triggering unit)
      • Unit - Add a 30.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_SummonLocation)
  • Healing Totem Periodic
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Set HealTotemGroup = (Units of type Healing Totem)
      • Unit Group - Pick every unit in HealTotemGroup and do (Actions)
        • Loop - Actions
          • Set HealingLocation = (Position of (Picked unit))
          • Set HealingSource = Summoner[(Custom value of (Picked unit))]
          • -------- We use the summoner rather than the ward to heal so any item effects etc. can be taken into account in modifications --------
          • Set HealingGroup = (Units within 500.00 of HealingLocation matching (((Matching unit) belongs to an ally of (Owner of HealingSource).) Equal to True).)
          • Unit Group - Pick every unit in HealingGroup and do (Actions)
            • Loop - Actions
              • Set NextDamageType = DamageTypeHeal
              • Unit - Cause HealingSource to damage (Picked unit), dealing -20.00 damage of attack type Spells and damage type Universal
          • Custom script: call DestroyGroup(udg_HealingGroup)
      • Custom script: call DestroyGroup(udg_HealTotemGroup)
But a better way to handle periodic spells is through indexing every individual instance of a spell and all its effects, which you can use something like Bribe's GUI spell system for if you don't want to set it all up from scratch.

This was the result, the clear problem is that the negative damage is added to the total healing, raising it to 320, what is true is that the +20% multiplier is applied, but now it would be to avoid adding more than the necessary amount, the problem that I also see is that the system that you passed subtracts -100 of flat life, which added to 20% is 120, the paladin's healing is +200 which would mean that the extra 20% should be +240, for now I think it's just playing with the values.

You would need ALL healing to be done through triggers for this to work. The Holy Light spell itself should have 0 healing in the object editor, and then you'd set the damage amount to whatever you want the healing to be. For multiple ability levels you'd use e.g.

  • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (-200.00 x (Real((Level of (Ability being cast) for (Triggering unit))))) damage of attack type Spells and damage type Universal
For a spell that heals 200 per level
 
Last edited:
Non-instant spells are a little more complicated. The simple and crude way to make a healing totem ability (with GUI Unit Indexer) would be something like
  • Summon Healing Totem
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Healing Totem
    • Actions
      • Set SummonLocation = (Target point of ability being cast)
      • Unit - Create 1 Healing Totem for (Triggering player) at SummonLocation facing Default building facing degrees
      • Set Summoner[(Custom value of (Last created unit))] = (Triggering unit)
      • Unit - Add a 30.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_SummonLocation)
  • Healing Totem Periodic
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Set HealTotemGroup = (Units of type Healing Totem)
      • Unit Group - Pick every unit in HealTotemGroup and do (Actions)
        • Loop - Actions
          • Set HealingLocation = (Position of (Picked unit))
          • Set HealingSource = Summoner[(Custom value of (Picked unit))]
          • -------- We use the summoner rather than the ward to heal so any item effects etc. can be taken into account in modifications --------
          • Set HealingGroup = (Units within 500.00 of HealingLocation matching (((Matching unit) belongs to an ally of (Owner of HealingSource).) Equal to True).)
          • Unit Group - Pick every unit in HealingGroup and do (Actions)
            • Loop - Actions
              • Set NextDamageType = DamageTypeHeal
              • Unit - Cause HealingSource to damage (Picked unit), dealing -20.00 damage of attack type Spells and damage type Universal
          • Custom script: call DestroyGroup(udg_HealingGroup)
      • Custom script: call DestroyGroup(udg_HealTotemGroup)
I've been testing and it does work that way, handling healing through triggers. The bad thing is that damage alerts are triggered, causing allies handled by the AI to move away from the healing area, believing that they are being damaged. Otherwise, I could consider the core of the question "solved" but there are still things that I don't know how to solve.
 
Top