• 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.

Hero passive transformation

Level 5
Joined
Dec 29, 2009
Messages
2

Goal

The goal of this tutorial is to transform a hero passively (without using an active ability that could be disabled or interrupt his current order), without using the Chaos ability, since it is completely buggy and only usable with regular units.
(see PitzerMike's brilliant Ability Guide for more details)

Method

Say you want to transform a hero, whose unit-type is "Unit Type 1", into "Unit Type 2".
  1. You need to create an ability based on Bear Form [Abrf] (though any other permanent transformation probably works too).
  2. Then (this is the hard part of this method) put in "Unit Type 1" in the "Alternate Form Unit" field of the spell, and "Unit Type 2" in the "Normal Form Unit", as illustrated in this image:

    attachment.php

  3. Now, to transform your unit, you just need to add and remove the Bear Form ability to your unit to transform:
    • Actions
      • Unit - Add Transformation 1->2 to YourUnit
      • Unit - Remove Transformation 1->2 from YourUnit
  4. Your unit is now permanently transformed into "Unit Type 2", and will not morph back at any point without using this method again, or some morphing ability.

How not to fail at using this method

  1. Fill out the data fields correctly: the "Normal Form" field is the unit you morph TO, the "Alternate Form" field is the unit you morph FROM.
  2. You only need to add and remove the ability: do not set the ability as unavailable for the player owning the unit, or nothing will happen.

Known (minor) bugs

This method can create some weird results in particular circumstances, but they can easily be avoided:
  1. If the unit is hexed when you try to transform it, the unit will permanently gain some movement speed. (also named the 1.25 bug)
    This can be avoided by simply checking whether the unit is hexed or not before transforming it. (then use whatever method you see fit to make sure it transforms when it stops being hexed)
  2. If the unit you morph to uses animations with a tag (like "alternate"), and the unit is currently idling, it will stay in its base animations (with no tag) until it stops idling.
    This can be avoided by manually adding the tag to the unit.
    • Animation - Add the alternate animation tag to YourUnit
 

Attachments

  • objectdata.png
    objectdata.png
    17.3 KB · Views: 10,036
Level 26
Joined
Aug 18, 2009
Messages
4,097
Aside from your mentioned minor bugs, do you know which stats fail to get removed/applied by the new type? For example have heard about cast point or the build menu remaining.

Thing is, you could have a base unit type and two abilities for each other unit type to convert the base into the target type and backwards. This way, it would be possible to arbitrarily change a unit's type ingame with a linear increment of objects. Nowadays, I use to trigger nearly all unit stats but resetting the model/icon is a bit problematic and therefore this would be a shortcut.
 
Level 7
Joined
May 11, 2010
Messages
278
so if i switch my Unit Type 1 to Unit Type 2, and then want to switch it back, do i have to make another ability that works the other way around? (switch places of Unit Type 1 and 2)
or can i just re-run the trigger?
 
Level 16
Joined
Aug 7, 2009
Messages
1,406
I said it once, and I'm going to say it again: Blizzard is trolling.
They haven't fixed a single reported bug in ages (1.26 patch doesn't count, they only fixed a bug that appeared when they tried to fix a bug in 1.25)

No, everything is going according to the planes:
More people getting tired of the buggy WC3 map editor->more people buying StartCraft 2->More money for Blizzard->Profit->(More people realizing that the StarCraft 2's atmosphere sucks, no matter how great its editor is->More people leaving Blizzard's games; but this is just an additional info)
 
Level 1
Joined
May 3, 2012
Messages
1
Question - Ability: Transform

If the game needed 3 forms; a DPS, a Tank and a Healer all in one... how can you make the ability change you when needed? (I.E. being attacked heavily changes you to tank, allies have low health change to healer and when there are enemies nearby instant change to DPS) :vw_wtf:
A screenshot: http://www.hiveworkshop.com/forums/members/217583-albums5559-picture57830.html

could you show a trigger(s) that can do this? thanks!
I have a feeling it isn't that difficult now that I typed it out haha
~Glow_Stick


- also a music producer (Dubstep too!) on newgrounds com, name: Opaix (Electrolord99 username) -
 
Level 17
Joined
Jul 17, 2011
Messages
1,863
If the game needed 3 forms; a DPS, a Tank and a Healer all in one... how can you make the ability change you when needed? (I.E. being attacked heavily changes you to tank, allies have low health change to healer and when there are enemies nearby instant change to DPS) :vw_wtf:
A screenshot: http://www.hiveworkshop.com/forums/members/217583-albums5559-picture57830.html

could you show a trigger(s) that can do this? thanks!
I have a feeling it isn't that difficult now that I typed it out haha
~Glow_Stick


- also a music producer (Dubstep too!) on newgrounds com, name: Opaix (Electrolord99 username) -

well you will need 3 units for that and you will only be able to morph to a healer when morphed to a tank.
if you start with a dps then you can morph to a tank and then to a healer and then back to dps
its not a good idea to automatically change the ability based on conditions tho
 
Level 1
Joined
Oct 14, 2014
Messages
2
Hi!

I need a Help , I'm creating a custom map like a ''DotA'' , but have a problem!
I'm making skill ''Change Courier Type'' (Replaces old unit-type with a new unit).
It's working but , when I start of another ability within Courier like ''Burst'' (Makes courier move faster for 20 seconds. Cooldown: 40 seconds) , then start again with ''Change Courier Form'' It will replace old unit with a new unit , but after changing set's ''Burst'' cooldown to 0.

Any idea how to fix it? , Replaced unit's save ability cooldowns of prewious unit.
 
You can make all of the units already for the players, then hide the others. If one casts burst, make them all cast burst. Then when you use GCT, just hide the current courier (and possibly place it in a safe place, together with all the other couriers), then get another courier from the list, put it on the old courier's position and unhide it..
 
I have two questions about this method:

1) does it require to set all abilities as "permanent" if I want them to carry over to the new unit?
2) does the UnitTypeId change? I know that the handle ID remains the same, but is my morphed unit still considered the same type as the original?

So, for example, if my original unit is a footman and the new unit is an archer, will any "Is unit a footman" checks still return true even when morphed?
 
Level 7
Joined
Jun 30, 2017
Messages
46
Thanks to illbean#1337 on Discord, we discovered a bug regarding this method.

Target point of ability being cast seems to get lost after the transformation is performed. Could be that some other event responses get lost as well, haven't tested any further.

  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
  • Actions
    • Set VariableSet location1 = (Target point of ability being cast)
    • Game - Display to (All players) the text: ((String((X of location1))) + ( + String((Y of location1)))))
    • Unit - Add Transform to Militia to (Triggering Unit)
    • Unit - Remove Transform to Militia to (Triggering Unit)
    • Set VariableSet location2 = (Target point of ability being cast)
    • Game - Display to (All players) the text: ((String((X of location2))) + ( + String((Y of location2)))))
Result:
1679151067517.png



So to anyone having weird issues in the future, make sure to initialize your variables with event responses you'll be using in the spell before the actual transformation, and then use those variables after the transformation.

PS: This was tested on Reforged with Classic graphics
 

Attachments

  • Trigger Event Response bug.w3m
    17.3 KB · Views: 7
Level 5
Joined
Sep 5, 2022
Messages
17
Target point of ability being cast seems to get lost after the transformation is performed.
From my understanding so far using this system, it only affects the the same trigger the transformation happened in.
Because in one of the spells i'm creating for the Druid Class i'm making, the Hero transforms (using this exact method) and THEN jumps to the targeted location using the initiating spell.

This breaks if I apply the Jump AFTER the transformation, but it works fine if I apply it BEFORE the transformation, just like Insanity_AI mentioned.

However, while in one of my other forms, already transformed, I can, without issue cast the jump spell.
-----------------------
From some testing while making more spells, it seems that WC3 is running triggers 1 after the other in the same order they're listed in the trigger editor. Meaning top most trigger goes first, and bottom most goes last.
This means that if we're using this system to transform a unit, if u've got another trigger that needs the unit to be a certain unit type when triggering from "Starts the effect of an ability", that trigger needs to be either after or before the transformation skill.

Example:
My transformation skill is Warstomp.
-Trigger - Warstomp Transformation-
Event: Unit starts the effect of an ability, ability = Warstomp
Actions: Transform from Human into Tauren

-Trigger - Warstomp Cool Effect
Event: Unit starts the effect of an ability, ability = Warstomp
Condition: Unit type of casting unit = Human
Action: Cool Effect

In this example, the second trigger (Warstomp Cool Effect) will not go off because when the game gets to this trigger, the unit will already be a Tauren, and will thus faul the "= Human" check.
 
Last edited:
Top