• 🏆 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!

Avatar spell without spell immunity

Status
Not open for further replies.
Level 14
Joined
Jul 19, 2007
Messages
770
I wonder if it's possible to turn off the spell immunity from the Avatar spell??? I can see it has a magic damage reduction value, so if I fill the value to 40%, the spell immunity is gone and it reduces magic damage taken instead? If not, the magic damage reduction value must be useless?
 
Level 19
Joined
Feb 27, 2019
Messages
580
I dont think so. Unless its changable in gameplay constants or in the spell itself.

Havnt you tested changing the values yet?

Otherwise it could be triggered with a dummy spell. Easiest way would be to add an Item ability that gives bonus hp, damage and armor and then remove it. The hp would increase by percent of current hp though so that might be an issue. A calculation of life in some way would fix it by adding missing hp.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,514
Try testing it out.

And to add onto what [db]east said, a dummy spell isn't necessarily needed. You can use Metamorphosis or Chemical Rage as the base ability and then add the bonus stats with triggers.

For morph abilities you need to use Orders to detect when unit transforms. I have some examples in this thread: [Solved] - Issues with unit morph that walks through walls
 
Level 14
Joined
Jul 19, 2007
Messages
770
Try testing it out.

And to add onto what [db]east said, a dummy spell isn't necessarily needed. You can use Metamorphosis or Chemical Rage as the base ability and then add the bonus stats with triggers.

For morph abilities you need to use Orders to detect when unit transforms. I have some examples in this thread: [Solved] - Issues with unit morph that walks through walls
Hmm. Couldn't it be easier to just make a self-buffed "Battle Roar" ability that adds the bonus damage and armor to the Hero and then I just need to add bonus health-item ability to the Hero with the special buff? But how will I be able to change the size of the Hero with the special buff then?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,514
Hmm. Couldn't it be easier to just make a self-buffed "Battle Roar" ability that adds the bonus damage and armor to the Hero and then I just need to add bonus health-item ability to the Hero with the special buff? But how will I be able to change the size of the Hero with the special buff then?
You can do that as well, you would use Animation Tags and Change Unit Size to adjust it's size/animations to match the effects of Avatar.

The "Alternate" tag is what makes the Mountain King turn grey.

Although, a buff can get dispelled, whereas Avatar's effects cannot, so it's probably best to avoid using Roar.

An example trigger using an ability that does nothing besides run this trigger:
  • Avatar Roar
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fake Avatar
    • Actions
      • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Human\Avatar\AvatarCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Add Avatar Bonus Armor (Avatar) to (Triggering unit)
      • Unit - Add Avatar Bonus Damage (Avatar) to (Triggering unit)
      • Unit - Add Avatar Bonus Hit Points (Avatar) to (Triggering unit)
      • Animation - Add the alternate animation tag to (Triggering unit)
      • Animation - Change (Triggering unit)'s size to (150.00%, 150.00%, 150.00%) of its original size
      • Wait 60.00 seconds
      • Unit - Remove Avatar Bonus Armor (Avatar) from (Triggering unit)
      • Unit - Remove Avatar Bonus Damage (Avatar) from (Triggering unit)
      • Unit - Remove Avatar Bonus Hit Points (Avatar) from (Triggering unit)
      • Animation - Remove the alternate animation tag to (Triggering unit)
      • Animation - Change (Triggering unit)'s size to (100.00%, 100.00%, 100.00%) of its original size
The added abilities are based on the item abilities that add Armor/Damage/Hit Points.

Here's an example trigger using a custom Metamorphosis ability designed to work like Avatar:
  • Avatar Simple
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(metamorphosis))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Mountain King
        • Then - Actions
          • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Human\Avatar\AvatarCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Wait 0.00 seconds
          • Unit - Add Avatar Bonus Armor (Avatar) to (Triggering unit)
          • Unit - Add Avatar Bonus Damage (Avatar) to (Triggering unit)
          • Animation - Change (Triggering unit)'s size to (150.00%, 150.00%, 150.00%) of its original size
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Triggering unit)) Equal to Mountain King (Avatar)
            • Then - Actions
              • Wait 0.00 seconds
              • Unit - Remove Avatar Bonus Armor (Avatar) from (Triggering unit)
              • Unit - Remove Avatar Bonus Damage (Avatar) from (Triggering unit)
              • Animation - Change (Triggering unit)'s size to (100.00%, 100.00%, 100.00%) of its original size
            • Else - Actions
It works pretty much the same as Metamorphosis, we have a Normal Form and Alternate Form of the Mountain King. The Alternate Form of Mountain King has the new Voice lines and the animation tag "alternate" under Art - Required Animation Names, giving it the grey color. The Metamorphosis ability is adjusted to use Immediate Take Off/Landing and a Normal Duration of 0.00 seconds, this makes it's effects occur immediately. The HP bonus is added through Metamorphosis, and the Damage/Armor bonus are added through custom item abilities.

Here's a slightly more advanced version of the above trigger that has size scaling as well. Note that it's not MUI but it's not too difficult to make it MUI:
  • Avatar
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(metamorphosis))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Mountain King
        • Then - Actions
          • -------- Avatar - ON --------
          • Set VariableSet Avatar_Unit = (Triggering unit)
          • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Human\Avatar\AvatarCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set VariableSet Avatar_Increment = 1.00
          • Countdown Timer - Start Avatar_Timer as a Repeating timer that will expire in 0.01 seconds
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Triggering unit)) Equal to Mountain King (Avatar)
            • Then - Actions
              • -------- Avatar - OFF --------
              • Set VariableSet Avatar_Unit = (Triggering unit)
              • Set VariableSet Avatar_Increment = -1.00
              • Countdown Timer - Start Avatar_Timer as a Repeating timer that will expire in 0.01 seconds
            • Else - Actions
  • Avatar Size
    • Events
      • Time - Avatar_Timer expires
    • Conditions
    • Actions
      • -------- Add/Remove Abilities --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Avatar Bonus Damage (Avatar) for Avatar_Unit) Equal to 0
          • Avatar_Increment Greater than 0.00
        • Then - Actions
          • Unit - Add Avatar Bonus Armor (Avatar) to Avatar_Unit
          • Unit - Add Avatar Bonus Damage (Avatar) to Avatar_Unit
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Avatar Bonus Damage (Avatar) for Avatar_Unit) Equal to 1
              • Avatar_Increment Less than 0.00
            • Then - Actions
              • Unit - Remove Avatar Bonus Armor (Avatar) from Avatar_Unit
              • Unit - Remove Avatar Bonus Damage (Avatar) from Avatar_Unit
            • Else - Actions
      • -------- --------
      • -------- Increase Size --------
      • Set VariableSet Avatar_Size = (Avatar_Size + Avatar_Increment)
      • Animation - Change Avatar_Unit's size to (Avatar_Size%, Avatar_Size%, Avatar_Size%) of its original size
      • -------- --------
      • -------- End --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Avatar_Size Greater than or equal to 150.00
        • Then - Actions
          • Set VariableSet Avatar_Size = 150.00
          • Animation - Change Avatar_Unit's size to (Avatar_Size%, Avatar_Size%, Avatar_Size%) of its original size
          • Countdown Timer - Pause Avatar_Timer
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Avatar_Size Less than or equal to 100.00
            • Then - Actions
              • Set VariableSet Avatar_Size = 100.00
              • Animation - Change Avatar_Unit's size to (Avatar_Size%, Avatar_Size%, Avatar_Size%) of its original size
              • Countdown Timer - Pause Avatar_Timer
            • Else - Actions
The default value of Avatar_Size needs to be set to 100.00 in the Variable Editor (Control + B).
 

Attachments

  • Fake Avatar 1.w3m
    19 KB · Views: 25
Last edited:
Level 19
Joined
Feb 27, 2019
Messages
580
Hmm. Couldn't it be easier to just make a self-buffed "Battle Roar" ability that adds the bonus damage and armor to the Hero and then I just need to add bonus health-item ability to the Hero with the special buff? But how will I be able to change the size of the Hero with the special buff then?
Item Health bonus is percentage based of the units current hit points. So the missing hit points would need to be added.

In this example the caster of Avatar has 500 of 1000 HP and HP_Bonus is set to 500

Set HP_Calc = Life of Unit (500)
Add ability Item Health Bonus to Unit
Set Hp_Calc = Life of Unit - HP_Calc (750 - 500 = 250)
Set HP_Calc = HP_Bonus - HP_Calc (500 - 250 = 250)
Set Life of Unit to Life of Unit + HP_Calc (750 + 250 = 1000)

Now the Unit has 1000 of 1500 HP.

Another option could be to add a tech ability to the unit at the start of the spell then remove the tech ability after the spell is done. The tech would have to be researched at the start of the game. I have not tried doing this myself though so I dont know if it actually works.

EDIT: Oh yes now I see it. By using Metamorphosis the hp would be able to be set and an expiration timer appear. Yes. Ofcourse.
 
Last edited:
Level 14
Joined
Jul 19, 2007
Messages
770
You can do that as well, you would use Animation Tags and Change Unit Size to adjust it's size/animations to match the effects of Avatar.

The "Alternate" tag is what makes the Mountain King turn grey.

Although, a buff can get dispelled, whereas Avatar's effects cannot, so it's probably best to avoid using Roar.

An example trigger using an ability that does nothing besides run this trigger:
  • Avatar Roar
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fake Avatar
    • Actions
      • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Human\Avatar\AvatarCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Add Avatar Bonus Armor (Avatar) to (Triggering unit)
      • Unit - Add Avatar Bonus Damage (Avatar) to (Triggering unit)
      • Unit - Add Avatar Bonus Hit Points (Avatar) to (Triggering unit)
      • Animation - Add the alternate animation tag to (Triggering unit)
      • Animation - Change (Triggering unit)'s size to (150.00%, 150.00%, 150.00%) of its original size
      • Wait 60.00 seconds
      • Unit - Remove Avatar Bonus Armor (Avatar) from (Triggering unit)
      • Unit - Remove Avatar Bonus Damage (Avatar) from (Triggering unit)
      • Unit - Remove Avatar Bonus Hit Points (Avatar) from (Triggering unit)
      • Animation - Remove the alternate animation tag to (Triggering unit)
      • Animation - Change (Triggering unit)'s size to (100.00%, 100.00%, 100.00%) of its original size
The added abilities are based on the item abilities that add Armor/Damage/Hit Points.

Here's an example trigger using a custom Metamorphosis ability designed to work like Avatar:
  • Avatar Simple
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(metamorphosis))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Mountain King
        • Then - Actions
          • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Human\Avatar\AvatarCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Wait 0.00 seconds
          • Unit - Add Avatar Bonus Armor (Avatar) to (Triggering unit)
          • Unit - Add Avatar Bonus Damage (Avatar) to (Triggering unit)
          • Animation - Change (Triggering unit)'s size to (150.00%, 150.00%, 150.00%) of its original size
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Triggering unit)) Equal to Mountain King (Avatar)
            • Then - Actions
              • Wait 0.00 seconds
              • Unit - Remove Avatar Bonus Armor (Avatar) from (Triggering unit)
              • Unit - Remove Avatar Bonus Damage (Avatar) from (Triggering unit)
              • Animation - Change (Triggering unit)'s size to (100.00%, 100.00%, 100.00%) of its original size
            • Else - Actions
It works pretty much the same as Metamorphosis, we have a Normal Form and Alternate Form of the Mountain King. The Alternate Form of Mountain King has the new Voice lines and the animation tag "alternate" under Art - Required Animation Names, giving it the grey color. The Metamorphosis ability is adjusted to use Immediate Take Off/Landing and a Normal Duration of 0.00 seconds, this makes it's effects occur immediately. The HP bonus is added through Metamorphosis, and the Damage/Armor bonus are added through custom item abilities.

Here's a slightly more advanced version of the above trigger that has size scaling as well. Note that it's not MUI but it's not too difficult to make it MUI:
  • Avatar
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(metamorphosis))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Mountain King
        • Then - Actions
          • -------- Avatar - ON --------
          • Set VariableSet Avatar_Unit = (Triggering unit)
          • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Human\Avatar\AvatarCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set VariableSet Avatar_Increment = 1.00
          • Countdown Timer - Start Avatar_Timer as a Repeating timer that will expire in 0.01 seconds
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Triggering unit)) Equal to Mountain King (Avatar)
            • Then - Actions
              • -------- Avatar - OFF --------
              • Set VariableSet Avatar_Unit = (Triggering unit)
              • Set VariableSet Avatar_Increment = -1.00
              • Countdown Timer - Start Avatar_Timer as a Repeating timer that will expire in 0.01 seconds
            • Else - Actions
  • Avatar Size
    • Events
      • Time - Avatar_Timer expires
    • Conditions
    • Actions
      • -------- Add/Remove Abilities --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Avatar Bonus Damage (Avatar) for Avatar_Unit) Equal to 0
          • Avatar_Increment Greater than 0.00
        • Then - Actions
          • Unit - Add Avatar Bonus Armor (Avatar) to Avatar_Unit
          • Unit - Add Avatar Bonus Damage (Avatar) to Avatar_Unit
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Avatar Bonus Damage (Avatar) for Avatar_Unit) Equal to 1
              • Avatar_Increment Less than 0.00
            • Then - Actions
              • Unit - Remove Avatar Bonus Armor (Avatar) from Avatar_Unit
              • Unit - Remove Avatar Bonus Damage (Avatar) from Avatar_Unit
            • Else - Actions
      • -------- --------
      • -------- Increase Size --------
      • Set VariableSet Avatar_Size = (Avatar_Size + Avatar_Increment)
      • Animation - Change Avatar_Unit's size to (Avatar_Size%, Avatar_Size%, Avatar_Size%) of its original size
      • -------- --------
      • -------- End --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Avatar_Size Greater than or equal to 150.00
        • Then - Actions
          • Set VariableSet Avatar_Size = 150.00
          • Animation - Change Avatar_Unit's size to (Avatar_Size%, Avatar_Size%, Avatar_Size%) of its original size
          • Countdown Timer - Pause Avatar_Timer
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Avatar_Size Less than or equal to 100.00
            • Then - Actions
              • Set VariableSet Avatar_Size = 100.00
              • Animation - Change Avatar_Unit's size to (Avatar_Size%, Avatar_Size%, Avatar_Size%) of its original size
              • Countdown Timer - Pause Avatar_Timer
            • Else - Actions
The default value of Avatar_Size needs to be set to 100.00 in the Variable Editor (Control + B).
Thanks but my Avatar spell in my map is meant to have 3 levels. Can you please make triggers for that too?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,514
Just adjust the level of the abilities: "Set level of ability X to Level of ability being cast".

It shouldn't be too hard to do yourself.

Note that some item abilities can't use levels so Armor and Damage might not work. If they don't work, you can create multiple versions of them, each version representing a different level.
 
Level 14
Joined
Jul 19, 2007
Messages
770
Just adjust the level of the abilities: "Set level of ability X to Level of ability being cast".

It shouldn't be too hard to do yourself.

Note that some item abilities can't use levels so Armor and Damage might not work. If they don't work, you can create multiple versions of them, each version representing a different level.
Sry but you have to make it for me. I can't get it to work :(
 
Status
Not open for further replies.
Top