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

[Spell] Changing Spells While in Metamorphosis

Status
Not open for further replies.
Level 9
Joined
Apr 22, 2020
Messages
430
Hello everyone i need for someone to make me a trigger on how to replace the spell of a hero that is in Metamorphosis Form and Returning the default spells of the hero once the Metamorphosis spell has ended. To be a little more clear about what i'm saying i have made a passive Metamorphosis spell for my hero which is just a Unit Spell because its passive so the hero can freely use it whenever he likes but i want my hero to replace it spells when the hero is in Metamorphosis and when the Metamorphosis spell finishes the spell that was originally in the hero returns back, so does anyone know how to trigger this?
 
Level 20
Joined
Feb 27, 2019
Messages
592
I have one way of solving the problem. I hope this is within your understanding, do tell if something doesnt make sense.
You add engineering upgrade on cast and remove it when the hero stops casting.
The engineering upgrade has to be edited to replace the spells. Try starting with one ability and see how it works. If theres a problem you might have to trigger each ability and use channel as the dummy ability. If the target type is wrong it can be changed using set ability integer field of Target Type (Ncl2) and I think that will work.
So I also found this other thread that was discussing the same thing.
[Spell] - Metamorphosis & Engineering Upgrade
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,557
Life Steal with Attack Damage
I showed you how to work with Metamorphosis and other morphing abilities in this thread. Simply disable or remove the ability from the unit after it's done morphing and then enable or add the new ability. Then reverse the process when the Morphed unit returns back to normal.

Also, Passive abilities are things like Bash, Critical Strike, and Evasion. Your Morph ability is not passive :p
 
Level 9
Joined
Apr 22, 2020
Messages
430
Life Steal with Attack Damage
I showed you how to work with Metamorphosis and other morphing abilities in this thread. Simply disable or remove the ability from the unit after it's done morphing and then enable or add the new ability. Then reverse the process when the Morphed unit returns back to normal.

Also, Passive abilities are things like Bash, Critical Strike, and Evasion. Your Morph ability is not passive :p
Yeah i know the spell metamorphosis is an ultimate ability of the Demon Hunter what i meant for "Passive Metamorphosis" on my hero is the hero has like a 5th ultimate skill that doesn't use the heroes skill points that is why it's passive and if your thinking how could the metamorphosis spell not need to eat up my skill points is that i made the Metamorphosis spell into a Unit Spell and added it as a Default active Ability on the hero in the object editor. I'm sorry Uncle but i thought that trigger you made of the metamorphosis was only to add additional abilities of the hero when casting the spell i don't really know how to trigger it for my own so can you make me a trigger for it? Replacing the abilities of my hero while in Metamorphosis Form?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,557
Yeah i know the spell metamorphosis is an ultimate ability of the Demon Hunter what i meant for "Passive Metamorphosis" on my hero is the hero has like a 5th ultimate skill that doesn't use the heroes skill points that is why it's passive and if your thinking how could the metamorphosis spell not need to eat up my skill points is that i made the Metamorphosis spell into a Unit Spell and added it as a Default active Ability on the hero in the object editor. I'm sorry Uncle but i thought that trigger you made of the metamorphosis was only to add additional abilities of the hero when casting the spell i don't really know how to trigger it for my own so can you make me a trigger for it? Replacing the abilities of my hero while in Metamorphosis Form?
Hero Ability = Can be Learned using Skill Points. It's only accessible to Heroes in the Object Editor, although non-Hero units can have Hero abilities added to them with triggers. When adding them with triggers, they're basically treated like Unit Abilities.

Unit Ability = Cannot be Learned using Skill Points. It can be added to ANY Unit or Item in the Object Editor or with triggers.

Item Ability = Cannot be Learned using Skill Points. It functions exactly like a Unit Ability. This really only exists for Categorization purposes as far as I can tell, seeing as how Items can use Unit Abilities too.

A Passive Ability is one like Critical Strike. A Hero/Unit/Item ability can be Passive.

An Active Ability is one like Storm Bolt. Again, Hero/Unit/Item abilities can be Active.

It's important to understand this when explaining yourself! When you say "Passive Metamorphosis" I think of an ability like "The Hero has a 10% chance on Attack to transform into a Demon". Not a bad idea, actually :p

Anyway, I understand what you want now, I think [db]east linked you what you'll need.

Edit: I uploaded an example of using the Engineering Upgrade to change an ability. However, it doesn't seem to work in Reforged. If you test it, you'll see that Holy Light gains some properties of Blink such as the Button Position and Mana Cost, but it still functions like Holy Light in regards to everything else.

There's an alternative method that doesn't use Engineering Upgrade, I'll post an example soon.
 

Attachments

  • Ability Swap.w3x
    16.7 KB · Views: 35
Last edited:
Level 9
Joined
Apr 22, 2020
Messages
430
Hero Ability = Can be Learned using Skill Points. It's only accessible to Heroes in the Object Editor, although non-Hero units can have Hero abilities added to them with triggers. When adding them with triggers, they're basically treated like Unit Abilities.

Unit Ability = Cannot be Learned using Skill Points. It can be added to ANY Unit or Item in the Object Editor or with triggers.

Item Ability = Cannot be Learned using Skill Points. It functions exactly like a Unit Ability. This really only exists for Categorization purposes as far as I can tell, seeing as how Items can use Unit Abilities too.

A Passive Ability is one like Critical Strike. A Hero/Unit/Item ability can be Passive.

An Active Ability is one like Storm Bolt. Again, Hero/Unit/Item abilities can be Active.

It's important to understand this when explaining yourself! When you say "Passive Metamorphosis" I think of an ability like "The Hero has a 10% chance on Attack to transform into a Demon". Not a bad idea, actually :p

Anyway, I understand what you want now, I think [db]east linked you what you'll need.

Edit: I uploaded an example of using the Engineering Upgrade to change an ability. However, it doesn't seem to work in Reforged. If you test it, you'll see that Holy Light gains some properties of Blink such as the Button Position and Mana Cost, but it still functions like Holy Light in regards to everything else.

There's an alternative method that doesn't use Engineering Upgrade, I'll post an example soon.
Oh sorry for saying it a passive ability what i meant for it is that the hero already has this skill the hero doesn't need to level it just to get it that is why i keep saying it passive LOL! Thanks uncle but the Abilities doesn't necessarily have to be a leveled ability in Metamorphosis Form like for example in metamorphosis form has a 3 leveled Mana Burn, Evasion etc. You can just make them a direct ability just like Mana Burn - Drains the mana blah blah...... (No Description of the tier level of the ability just like "Level 1 Mana Burn" just make them direct no tiered levels needed "Mana Burn"
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,557
So to get around all sorts of bugs regarding Engineering Upgrade/Morphing I came up with this workaround.

You'll see in the map a Shadow Hunter with Healing Wave. You can use his Morph skill to "transform", turning him into the Far Seer and changing his Healing Wave ability into Chain Lightning. You can then transform back from the Shadow Hunter into the Far Seer, regaining Healing Wave but losing Chain Lightning. All of the Levels/Cooldowns/Skill Points are retained during this process.

How it works:

I use 2 custom abilities (both based on Berserk) to mimic a Morph effect. When you cast Morph (On) it will "transform" your Far Seer into what looks like the Shadow Hunter, and when you cast Morph (Off) it will "transform" your Shadow Hunter back into the Far Seer.

They aren't actually transforming into a new unit, I just change the Heroes Skin with triggers so it looks different.

For the Heroes abilities, I have an extra version of each ability.

1st Version = The Research ability
This one is Passive and is only learnable in the Skill Menu. You won't see this ability on the Command Card once it's learned. You'll still see it in the Skill Menu of course.

2nd Version = The Normal ability
This one is Active and can be cast like a normal ability. I add/remove the Normal abilities with triggers and adjust their levels accordingly.

So I basically cut all of the Heroes abilities in half. One half is the Research portion, and the other half is the Normal portion.

When you cast Morph, I check which form you're transforming into (Normal or Alternate) and then add/remove the associated Normal abilities. I also manage their cooldowns so that it doesn't reset their cooldowns upon Morphing.

I also have another important ability. This one is based on Engineering Upgrade and is used to change the Research ability in your Skill Menu. When I add this ability to the Hero it changes Healing Wave into Chain Lightning inside the Skill Menu.

I might expand upon it so it works with the actual Morph skills like Metamorphosis and Bear Form instead of having to rely on a triggered Morph ability.

Edit: I added version 3 that is designed to work with Bear Form. It seems to work fine but it's hard to test for every possible outcome. I went in with the goal of keeping it simple but ended up making it rather confusing... I should've just used a Hashtable, I wasted a lot of time -_-
 

Attachments

  • Morph Example v.1.w3m
    21.6 KB · Views: 38
  • Morph Example v.3.w3m
    33.2 KB · Views: 33
Last edited:
Level 5
Joined
Jul 31, 2020
Messages
103
Just out of curiosity; he was using Metamorphosis, right? So, what's the issue with adding whatever abilities to your primary unit, and whatever different abilities to your morphed unit? It will replace the abilities, and the only issue will be them resetting their cooldowns since they technically get removed, and added back again. This is solved by a cooldown system.

Not trying to offer an actual solution, although I feel like what I just typed in is actually one. Just trying to understand what the issue exactly is.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,557
@J2Krauser
I did something very similar to what you suggested in my example maps, I just added some extra functionality to make it work with the Skill Menu/Skill Leveling stuff.

By default, when using Metamorphosis you can't change the abilities from one ability to another. At least not through the Object Editor.

If Demon Hunter has Mana Burn on his standard Hero, then his Demon Form (Metamorph) version will have Mana Burn as well, even if you were to remove the ability from the Demon Form it wouldn't change anything.

You also cannot add/remove Hero abilities to and from the Skill Menu with triggers.

So to combat this I tried to use Engineering Upgrade, adding it to the Demon Hunter when he morphs through triggers. The idea was that Engineering Upgrade would adjust all of his skills, changing let's say Mana Burn into Acid Bomb.

However, I don't know if it's just Reforged or maybe Engineering Upgrade has always functioned this way, but it didn't work properly. Only some parts of the ability were changing to their alternate Engineering Upgrade version such as the mana cost/button position but the actual functionality of the ability didn't change. Mana Burn remained Mana Burn, even if it looked like Acid Bomb in the Skill Menu.

So everything in the Skill Menu was working, it was just the "learned" version of the Skills that weren't.

To fix this, I relied on Engineering Upgrade for the Skill Menu stuff, and used what you suggested with adding/removing abilities for the "learned" (aka castable) versions of the abilities. To the user, it looks like nothing special is going on, but in reality, the Hero has 2 versions of each Skill, one for Research purposes and the other for actual Use.

The Hero (Learnable) version was used solely for the Skill Menu, it's Research button positions are visible on the Command Card but it's learned button positions are set to 0,-11 so it's hidden from view. It's based on a passive ability with no effect.

The Unit (Castable) version is for casting purposes. It's contains the actual effects of the ability.

With some triggers it was easy to manage the Unit "learned" abilities, adding/removing them whenever necessary and adjusting their levels accordingly, taking into consideration cooldowns as well.
 
Last edited:
Level 5
Joined
Jul 31, 2020
Messages
103
@J2Krauser
I did something very similar to what you suggested in my example maps, I just added some extra functionality to make it work with the Skill Menu/Skill Leveling stuff.

By default, when using Metamorphosis you can't change the abilities from one ability to another. At least not through the Object Editor.

If Demon Hunter has Mana Burn on his standard Hero, then his Demon Form (Metamorph) version will have Mana Burn as well, even if you were to remove the ability from the Demon Form it wouldn't change anything.

You also cannot add/remove Hero abilities to and from the Skill Menu with triggers.

So to combat this I tried to use Engineering Upgrade, adding it to the Demon Hunter when he morphs through triggers. The idea was that Engineering Upgrade would adjust all of his skills, changing let's say Mana Burn into Acid Bomb.

However, I don't know if it's just Reforged or maybe Engineering Upgrade has always functioned this way, but it didn't work properly. Only some parts of the ability were changing to their alternate Engineering Upgrade version such as the mana cost/button position but the actual functionality of the ability didn't change. Mana Burn remained Mana Burn, even if it looked like Acid Bomb in the Skill Menu.

So everything in the Skill Menu was working, it was just the "learned" version of the Skills that weren't.

To fix this, I relied on Engineering Upgrade for the Skill Menu stuff, and used what you suggested with adding/removing abilities for the "learned" (aka castable) versions of the abilities. To the user, it looks like nothing special is going on, but in reality, the Hero has 2 versions of each Skill, one for Research purposes and the other for actual Use.

The Hero (Learnable) version was used solely for the Skill Menu, it's Research button positions are visible on the Command Card but it's learned button positions are set to 0,-11 so it's hidden from view. It's based on a passive ability with no effect.

The Unit (Castable) version is for casting purposes. It's contains the actual effects of the ability.

With some triggers it was easy to manage the Unit "learned" abilities, adding/removing them whenever necessary and adjusting their levels accordingly, taking into consideration cooldowns as well.

I see, so the issue is that we're talking about hero abilities which Metamorphosis won't change on its own. If only Blizzard finally implemented all those set ability string level field options. It would be so easy to achieve this. Just add the secondary abilities with no hotkeys to the hero with a cast finish trigger at (0, -11), change the primary abilities' icons, tooltips, names, learn icons (actually, you can do all this other than learn icon, so it almost works perfectly). Set up begins casting triggers for each ability with a unit-type check for the transformed unit, order it to cast the secondary ability instead, start the cooldown on the primary ability. Actually easy if only the learn icon replacing would work.
 
Status
Not open for further replies.
Top