• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Miscellanous / Other] Temporary Chaos Damage

Level 19
Joined
May 25, 2004
Messages
1,478
First let me state I am using Warcraft III - Classic (v1.27b)

I’m working on a mechanic idea and I’m trying to figure out the best (and stable) way to implement it in Warcraft III.

I want a system where:
  • A unit (Fel Orc Grunt in this test case) normally deals normal damage
  • When it enters a specific area (a “Fountain of Blood”), it automatically gains a buff/effect
  • That effect temporarily “upgrades” or transforms the unit into the same unit type, but a version that deals Chaos damage instead
  • After ~60 seconds, the unit reverts back to its original normal-damage version
  • This should all happen automatically (no player activation, no manual casting)
The key design goal is that it should feel like an environmental interaction (similar to regeneration fountains), not an active ability.

For prototyping, I used the Militia (Call to Arms) ability as a base because it already handles temporary unit transformation.

I modified it so the unit becomes a Chaos-damage version of itself when triggered.

Current results:
  • The transformation into the Chaos-damage version works
  • The unit behaves correctly during the buff duration
  • The concept is almost functioning as intended
Problem areas / concerns:
  • The revert process is unstable (currently causes a crash in my test map, likely due to how Militia handles state restoration)
  • The ability still displays as “Militia” in-game, and I haven’t found a clean way to rename/replace that UI text while using this system
  • I’m not currently using triggers yet, but I’m wondering if this entire approach is actually better handled via triggers instead of ability-based transformation
What I’m looking for:

At this point I’m less focused on fixing the Militia implementation specifically, and more interested in:
  • Is there a better recommended way to implement temporary “damage mode swapping”?
  • Would this be more stable using triggers + unit swap/replace?
  • Is there a known clean method for swapping damage types without relying on Militia transformations?
  • Any examples of similar “aura zone transformation” systems?
I want to avoid a setup where players need to manually activate anything — it should be fully automatic when units approach the Fountain.

Any direction, design advice, or alternative approaches would be really appreciated.


Just to clarify what I’m aiming for — I’m trying to design a new racial mechanic for a custom WC3 race.

The idea is that units from my race can interact with a Fountain-type structure/area and temporarily enter a Chaos-enhanced combat state (mainly damage behavior shift), then revert after a duration.

It’s meant to be a passive, environmental racial ability, not something manually activated or micro’d.
 

Attachments

Last edited:
It would be much easier to do with triggers. Very simple. You wouldn't even need transformation.
Just make the orc's Attack One regular damage, Attack Two chaos damage. First trigger:
When unit comes in range of the fountain (there's event for that), check if unit type is fel orc grunt; if it is, disable Attack One, enable Attack Two, add a timer.

Trigger two: When timer expires on a unit, check unit type again just to be safe, disable Attack Two, enable Attack One.
 
It would be much easier to do with triggers. Very simple. You wouldn't even need transformation.
Just make the orc's Attack One regular damage, Attack Two chaos damage. First trigger:
When unit comes in range of the fountain (there's event for that), check if unit type is fel orc grunt; if it is, disable Attack One, enable Attack Two, add a timer.

Trigger two: When timer expires on a unit, check unit type again just to be safe, disable Attack Two, enable Attack One.
I made a custom buff that explain the unit is under chaos effect, would that work via triggers?
 
Yes. You could attach it to dummy ability (Rejuvenation works best, just set HP restored to zero, and make sure casting at 100% is enabled), create a dummy unit with Locust and Ghost abilities and no sounds or attacks. Then as part of the first trigger you create that unit for Neutral Passive at the orc's position and issue it an order to cast your dummy ability at the orc.

Third trigger you'll need is when someone finishes casting the dummy ability, remove the casting unit, to clean up the dummy. And that's it.
 
It would be much easier to do with triggers. Very simple. You wouldn't even need transformation.
Just make the orc's Attack One regular damage, Attack Two chaos damage. First trigger:
When unit comes in range of the fountain (there's event for that), check if unit type is fel orc grunt; if it is, disable Attack One, enable Attack Two, add a timer.

Trigger two: When timer expires on a unit, check unit type again just to be safe, disable Attack Two, enable Attack One.
Yes. You could attach it to dummy ability (Rejuvenation works best, just set HP restored to zero, and make sure casting at 100% is enabled), create a dummy unit with Locust and Ghost abilities and no sounds or attacks. Then as part of the first trigger you create that unit for Neutral Passive at the orc's position and issue it an order to cast your dummy ability at the orc.

Third trigger you'll need is when someone finishes casting the dummy ability, remove the casting unit, to clean up the dummy. And that's it.

I'm having an issue finding the enable/disable Attack one/Attack 2
  • Chaos
    • Events
      • Unit - A unit comes within 256.00 of Fountain of Blood 0000 <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Fel Orc Grunt
    • Actions
      • ???
I think I may not have explained my goal clearly enough.

What I’m trying to achieve is more of a race-wide environmental mechanic, not just a single unit transformation.

Basically:
  • Any unit belonging to my custom race (Peons, Grunts, etc.)
  • When they enter a specific “Fountain of Blood” area
  • They temporarily switch into a Chaos-enhanced state (mainly damage type change / combat behavior change)
  • After a set duration, they automatically revert back
  • No manual activation, no player input — it should feel like a passive zone effect that applies to all my race units
Originally I tried doing it through a Militia-based transformation, but that seems to be causing instability on revert.

I’m realizing now I might be thinking about it incorrectly as a “unit transform” problem when it might actually be better handled as a state/buff system applied to units in that area.
 
Yes, you can do that with triggers I described, just add all the relevant unit-types to the check instead of just the grunt. Use "Or, Multiple Options"
The only issue would be with Peon, since both of their attacks are already used up. Hmm.


Ah, I was fairly sure there was a trigger for that. If there isn't you can modify one of the Orb abilities, they can enable attacks natively. Disable both attacks by default, and give it ability which will activate attack one. The fountain trigger would remove the first ability one and add the second one.
 
Yes, you can do that with triggers I described, just add all the relevant unit-types to the check instead of just the grunt.
The only issue would be with Peon, since both of their attacks are already used up. Hmm.
I don't mind making Special units of Chaos version, and using some chemicalrage ability or something, I'm just having issues having that work.
I was wanting the sound like "Berserk" so it tell the player that unit has morphed.
 
You could try the following:
1) base the ability off Bear Form, but don't give it to the unit; add a desired duration
2) when unit enters range of the fountain, use trigger to add the ability to it and issue the order to use it (Unit - Issue an Order With No Target)
3) separate trigger when unit uses the transformation, create sound effect on its position, and remove ability from it; oh and destroy the sound effect in the same trigger, it won't interfere with actual sound playing, just prevent memory leaks

(sorry if something doesn't work, I'm at work and composing triggers from memory)
 
You could try the following:
1) base the ability off Bear Form, but don't give it to the unit; add a desired duration
2) when unit enters range of the fountain, use trigger to add the ability to it and issue the order to use it (Unit - Issue an Order With No Target)
3) separate trigger when unit uses the transformation, create sound effect on its position, and remove ability from it; oh and destroy the sound effect in the same trigger, it won't interfere with actual sound playing, just prevent memory leaks

(sorry if something doesn't work, I'm at work and composing triggers from memory)
Understood, thank you so much for offering assistance, I’m just a novice map maker trying to make things work. I appreciate your help
 
Welp, that turned out to be harder than I thought, but I think I got it working. Transformation abilities are buggy as hell.
Side effects: 1) The base unit is healed up to 100% when transformation ends. Solvable, but I was too lazy to bother.
2) Might hit a hiccup if a unit approaches the fountain right when a buffed unit dies, but that's minor.
 

Attachments

Welp, that turned out to be harder than I thought, but I think I got it working. Transformation abilities are buggy as hell.
Side effects: 1) The base unit is healed up to 100% when transformation ends. Solvable, but I was too lazy to bother.
2) Might hit a hiccup if a unit approaches the fountain right when a buffed unit dies, but that's minor.
I tried the map, I still have some concerns on how to make it work flawlessly.
I used used hour Elemental Fury, but the not only have the HP issues, but the position they are facing changes to the original facing point before they transformed.
I then tried 2 different abilities:
  • First was Metamorphosis which seemed to solve the HP issues, but still had issues such as the unit freezes in place for a few moments before working.
  • Then i went back to the idea of trying Chemical Rage, which worked almost the same as Metamorphosis, but then crashed when I tried to do it again.
Seems like Metamorphosis is the better option of the 3, but the unit freezes for the first few seconds.
Please take a look and see what I am doing wrong!

Please note: Original post has the new updated test map
 
Last edited:
Won't be able to check the map for many hours, its still morning here.
I did try metamorphosis, and it KINDA worked, but first turned base Grunt into same Grunt but with a timer, and only when that expired, turned him into a Chaos Grunt. My attempts to bypass that first timer were unsuccessful.

I suspect the way to do it is store the original unit's data in an array, remove it, create a new unit in its space, and after timer expires create a copy of the original unit with the saved data, but that's a lot of fiddly work and I am not good enough of a triggerer to pull that off without memory leaks and serious bugs.
 
I'm having a new issues with the metamorphosis now, it used to just change after the unit stopped freezing, now it does something else, like gives the buff, but still does normal damage, then later on ... on its own... does the buff sound gives it chaos dmg, not even by the fountain... and then goes back to normal like nothing happened.

I noticed you had a dummy unit (not used) from previous idea you had in your test map you made, perhaps we can combine the ideas?

or if anyone else wants to give a crack at it!

Please note: Original post has the new updated test map
 
Solution turned out to be very simple, because I didn't know the -11 trick =/
To add negative value, shift-enter or shift-double-click the field.
Doers the sound (for you) also make the bloodlust sound after it goes off?
Edit: All i have to do is remove it from the Metamorphosis ability and the sound isn't doubled.


also the button isn't hidden from me, but I'm using an older version
First let me state I am using Warcraft III - Classic (v1.27b)
but i can use a blank button to hide it


Please note: Original post has the new updated test map
 
Last edited:
Shouldn't this be possible by using one of the orb abilities or whatever to change between attack 1 and attack 2? I don't know enough to tell you what to do without opening my editor, but I can suggest a different method I know will work:

Don't use metamorphosis; don't do anything like that. Use this really smart cool hack to swap between two unit types passively without interrupting anything: https://www.hiveworkshop.com/threads/hero-passive-transformation.198482/

Create a dummy buff ability based on Rejuvenation (or something else that doesn't do anything and can have a duration). When units are near the 'fountain', dummy cast this ability on them and forcibly morph them using the above method if they need to be morphed. Add these units to a group. Periodically check every unit in the group. If it doesn't have the dummy buff, then forcibly morph it back.

You will need 2 separate morph abilities for each pair of unit-types that you want to upgrade with chaos damage. If you have many unit types you want to morph this way for chaos damage, it may be prudent to build a database or a set of parallel arrays to hold the unit types and their abilities in a convenient combo.
  • Events
    • Time - Every 0.50 seconds of game-time //choose your preferred interval
  • Conditions
    • Pick every unit in GROUP_THAT_HOLDS_ALL_THE_FOUNTAINS and do (Actions)
      • Loop - Actions
        • Set TempPoint = (Position of (Picked Unit))
        • Unit - Create 1 DUMMY_CASTER_TYPE for NEUTRAL_PASSIVE_PLAYER at TempPoint facing (Default building facing) degrees
        • Set DummyU = (Last created unit)
        • Unit - Add DUMMY_BUFF_ABILITY to DummyU
        • Unit - Add a 1.00 second generic expiration timer to DummyU
        • Custom script: set bj_wantDestroyGroup = true
        • Unit Group - Pick every unit in (Units within RANGE_OF_FOUNTAIN of TempPoint) and do (Actions)
          • Loop - Actions
            • Set TempU = (Picked Unit) //this refers to the units around the fountain not the fountain any more
            • If (All conditions are true) then do (Then actions) else do (Else actions)
              • If - Conditions
                • (Unit-type of TempU) equal to GRUNT
              • Then - Actions
                • Unit - Add TRANSFORM_TO_CHAOS_ABILITY to TempU
                • Unit - Remove TRANSFORM_TO_CHAOS_ABILITY from TempU //unit is now chaos grunt
                • Unit - Add TempU to GROUP_OF_TRANSFORMED_UNITS
              • Else
            • If (All conditions are true) then do (Then actions) else do (Else actions)
              • If - Conditions
                • (Unit-type of TempU) equal to CHAOS_GRUNT //This is a separate If block to keep refreshing the buff on units that were already transformed and are still nearby
              • Then - Actions
                • Unit - Order DummyU to RELEVANT_ORDER_STRING_FROM_BUFF_ABILITY TempU
              • Else
  • Events
    • Time - Every 0.25 seconds of game-time //choose your interval
  • Conditions
  • Actions
    • Unit group - Pick every unit in GROUP_OF_TRANSFORMED_UNITS and do (Actions)
      • Loop - Actions
        • Set TempU = (Picked Unit)
        • If (All conditions are true) then do (Then actions) else do (Else actions)
          • If - Conditions
            • (TempU has buff DUMMY_BUFF) equal to False
          • Then - Actions
            • Unit - Add TRANSFORM_TO_NORMAL_ABILITY to TempU
            • Unit - Remove TRANSFORM_TO_CHAOS_ABILITY from TempU //unit is now normal grunt
            • Unit group - Remove TempU from GROUP_OF_TRANSFORMED_UNITS
 
Last edited:
Shouldn't this be possible by using one of the cargo hold abilities or whatever to change between attack 1 and attack 2? I don't know enough to tell you what to do without opening my editor, but I can suggest a different method I know will work:

Don't use metamorphosis; don't do anything like that. Use this really smart cool hack to swap between two unit types passively without interrupting anything: https://www.hiveworkshop.com/threads/hero-passive-transformation.198482/

Create a dummy buff ability based on Rejuvenation (or something else that doesn't do anything and can have a duration). When units are near the 'fountain', dummy cast this ability on them and forcibly morph them using the above method if they need to be morphed. Add these units to a group. Periodically check every unit in the group. If it doesn't have the dummy buff, then forcibly morph it back.

You will need 2 separate morph abilities for each pair of unit-types that you want to upgrade with chaos damage. If you have many unit types you want to morph this way for chaos damage, it may be prudent to build a database or a set of parallel arrays to hold the unit types and their abilities in a convenient combo.
  • Events
    • Time - Every 0.50 seconds of game-time //choose your preferred interval
  • Conditions
    • Pick every unit in GROUP_THAT_HOLDS_ALL_THE_FOUNTAINS and do (Actions)
      • Loop - Actions
        • Set TempPoint = (Position of (Picked Unit))
        • Unit - Create 1 DUMMY_CASTER_TYPE for NEUTRAL_PASSIVE_PLAYER at TempPoint facing (Default building facing) degrees
        • Set DummyU = (Last created unit)
        • Unit - Add DUMMY_BUFF_ABILITY to DummyU
        • Unit - Add a 1.00 second generic expiration timer to DummyU
        • Custom script: set bj_wantDestroyGroup = true
        • Unit Group - Pick every unit in (Units within RANGE_OF_FOUNTAIN of TempPoint) and do (Actions)
          • Loop - Actions
            • Set TempU = (Picked Unit) //this refers to the units around the fountain not the fountain any more
            • If (All conditions are true) then do (Then actions) else do (Else actions)
              • If - Conditions
                • (Unit-type of TempU) equal to GRUNT
              • Then - Actions
                • Unit - Add TRANSFORM_TO_CHAOS_ABILITY to TempU
                • Unit - Remove TRANSFORM_TO_CHAOS_ABILITY from TempU //unit is now chaos grunt
                • Unit - Add TempU to GROUP_OF_TRANSFORMED_UNITS
              • Else
            • If (All conditions are true) then do (Then actions) else do (Else actions)
              • If - Conditions
                • (Unit-type of TempU) equal to CHAOS_GRUNT //This is a separate If block to keep refreshing the buff on units that were already transformed and are still nearby
              • Then - Actions
                • Unit - Order DummyU to RELEVANT_ORDER_STRING_FROM_BUFF_ABILITY TempU
              • Else
  • Events
    • Time - Every 0.25 seconds of game-time //choose your interval
  • Conditions
  • Actions
    • Unit group - Pick every unit in GROUP_OF_TRANSFORMED_UNITS and do (Actions)
      • Loop - Actions
        • Set TempU = (Picked Unit)
        • If (All conditions are true) then do (Then actions) else do (Else actions)
          • If - Conditions
            • (TempU has buff DUMMY_BUFF) equal to False
          • Then - Actions
            • Unit - Add TRANSFORM_TO_NORMAL_ABILITY to TempU
            • Unit - Remove TRANSFORM_TO_CHAOS_ABILITY from TempU //unit is now normal grunt
            • Unit group - Remove TempU from GROUP_OF_TRANSFORMED_UNITS
Can you use an example in a map so I can see it working?
 
I gave you complete triggers and explained what it's doing. Its up to you to follow along with my solution and see if you can implement it yourself. Try first; if you fail then post here and I will help.

Actually, using Rejuvenation might be a poor choice if you have Spell Steal or Dispel abilities in your map htat might remove the buff. If you WANT it to be removable then this is fine, but the above method will not make the buff stealable. You could try a physical ability that won't get dispelled or stolen but I'm not sure about one that will display a green buff icon instead of a red debuff icon.
 
I gave you complete triggers and explained what it's doing. It’s up to you to follow along with my solution and see if you can implement it yourself. Try first; if you fail then post here and I will help.
oh ok, I thought you had an alternative method that worked, I was trying to see “proof of concept”.

Doesn’t the current method work using metamorphosis?
 
Not proof of concept; it 100% works and I've done similar things before. The method I showed has a few advantages:
  • No metamorphosis timer bar.
  • The unit could use another morph ability while this is active if you wanted to make that possible (though it would be a little funky).
  • Units will not have to pause and actually cast Metamorphosis (the unit's cast point and backswing values will mean that even with 0 cast time the Metamorphosis will cause a slight hiccup).
  • Units will not lose their current order like Metamorphosis cast will overwrite.
  • This method works even if the units are silenced, stunned, or otherwise unable to cast for any reason since the transformation is passively triggered by removing the ability from the unit.
 
Not proof of concept; it 100% works and I've done similar things before. The method I showed has a few advantages:
  • No metamorphosis timer bar
  • The unit could use another morph ability while this is active if you wanted to make that possible (though it would be a little funky)
  • Units will not have to pause and actually cast Metamorphosis
  • Units will not lose their current order like Metamorphosis cast will overwrite
  • This method works even if the units are silenced, stunned, or otherwise unable to cast for any reason since the transformation is passively triggered by removing the ability from the unit.
I’d love to see a working concept!

Let me know if you decide to make one that works. This sounds like it might be better!
 
I took 10 minutes of my time to type out a fully complete trigger solution with comments to explain why I structured it the way I did (I didn't copy those from a map, I wrote them in the text box here from scratch). You are welcome to leave your solution as it is unless you are bothered by any of the pitfalls my other solution avoids. But if you are interested in what I showed, try creating it yourself using my triggers as a template.

If you want an example of this I'm happy to provide it:
If you have many unit types you want to morph this way for chaos damage, it may be prudent to build a database or a set of parallel arrays to hold the unit types and their abilities in a convenient combo.
 
Ah I neglected to specify that the dummy unit would need to have the ability to cast instantly for my method to work. That's something you need to do with all dummy units most of the time so I encourage you to always set them up the same way:
  • Cast point: 0.00
  • Cast backswing: 0.00
  • Movement type: None
  • Speed base: 0
  • Spell has no cooldown/mana cost/cast time/channel duration.
A single dummy unit with these settings can cast instantly on any number of units unit it can see without needing to turn to face them. Another issue you could be having is that neutral passive can't see the target so you could (at map init) give them a map-wide visibility modifier. Perhaps the buff text only shows as green if a player unit casts the buff ability, so then you'd need to be changing the owner of the dummy for each picked unit.

Finally I forgot to clean up the TempPoint leak in the first trigger. Should be like this:
  • Events
    • Time - Every 0.50 seconds of game-time //choose your preferred interval
  • Conditions
    • Pick every unit in GROUP_THAT_HOLDS_ALL_THE_FOUNTAINS and do (Actions)
      • Loop - Actions
        • Set TempPoint = (Position of (Picked Unit))
        • Unit - Create 1 DUMMY_CASTER_TYPE for NEUTRAL_PASSIVE_PLAYER at TempPoint facing (Default building facing) degrees
        • Set DummyU = (Last created unit)
        • Unit - Add DUMMY_BUFF_ABILITY to DummyU
        • Unit - Add a 1.00 second generic expiration timer to DummyU
        • Custom script: set bj_wantDestroyGroup = true
        • Unit Group - Pick every unit in (Units within RANGE_OF_FOUNTAIN of TempPoint) and do (Actions)
          • Loop - Actions
            • Set TempU = (Picked Unit) //this refers to the units around the fountain not the fountain any more
            • If (All conditions are true) then do (Then actions) else do (Else actions)
              • If - Conditions
                • (Unit-type of TempU) equal to GRUNT
              • Then - Actions
                • Unit - Add TRANSFORM_TO_CHAOS_ABILITY to TempU
                • Unit - Remove TRANSFORM_TO_CHAOS_ABILITY from TempU //unit is now chaos grunt
                • Unit - Add TempU to GROUP_OF_TRANSFORMED_UNITS
              • Else
            • If (All conditions are true) then do (Then actions) else do (Else actions)
              • If - Conditions
                • (Unit-type of TempU) equal to CHAOS_GRUNT //This is a separate If block to keep refreshing the buff on units that were already transformed and are still nearby
              • Then - Actions
                • Unit - Order DummyU to RELEVANT_ORDER_STRING_FROM_BUFF_ABILITY TempU
              • Else
        • Custom script: call RemoveLocation(udg_TempPoint) //match this to your point variable name but keep the udg_ prefix
 
Back
Top