This guide is to explain how to create a unit that can shift between forms (think Druid in WoW) at the push of a button. For my example I have created a Dark Templar that can shift into a Zergling, an Ultralisk and a Mutalisk. As a bonus I added in a "shadowmeld" ability which keeps the dark templar cloaked only while he is standing still: if he moves or attacks he becomes visible.
I will upload a finished product for testing as well. (If I can figure out how)
Getting Started ==
First things first, you'll need a "main unit" to work with. If you already have a unit in mind you can skip this step. Keep in mind I highly recommend not using a unit already in game and here's why. If I make the regular Dark Templar unit my shapeshifter, any other dark templars I later add to the map will also have these abilities. So I'm going to copy the Dark Templar model and make a new unit who to begin is exactly the same but changing him won't chage all the dark templars on my map.
Making a Unit ===
For me I used a Dark Templar as a base. In the top left of the data editor use the pull down menu to bring up "Units"
In the window below (where the units are all listed), Right-click and select "Add Object", this will bring up a new window.
Fill out the window as follows:
Name: The Name you want the unit to be called. Mine is "Nighteyes"
Hit "Suggest" this will duplicate the name you just typed in as an ID for the editor (making it easier to find later)
Object Family: Set to "Melee"
Race: I set to Protoss since I used a Dark Templar but all this really does is when you go back to the editor to place the unit it will then fall under the heading you chose.
Object Type: Set to either "Hero" if you want a Hero unit or "Unit" if you want it to be a general unit. I selected Hero.
Under "Field Valuse" select "Copy From" and choose the unit you want it to look/act like (I chose Dark Templar).
Then hit "OK" If you chose "unit" for type then move on, if you chose "Hero" go to the box on the right side of the screen and find "Unit - Flags", it'll be at the bottom. Right click the box to it's right which will bring a window up, put a check in the box for "Hero" and hit "OK"
Now go back to the dropdown menu where "Units" is and select "Actors"
Find the unit you'd like your new unit to look and act like (for me it was Dark Templar) by scrolling down the list or typing into the search box.
Right-Click on that unit, select "Duplicate Object". This will bring up a window. Place a check in all the boxes (or just the ones you want if you know what your doing) and hit "OK", it will take a few seconds.
Once you have your duplicate actor go to the box of values on the right. At the top (see pic) it will say something like "Dark Templar copy" at the very top in a little box by itself. Double click this and select your newly created unit from the list (this will link the actor to the unit, I think, but I know it's necissary). Also, in the filed values box below scroll down and find:
Art - Model -set this to what you want the unit to look like (I selected Dark Templar)
Art - Model (Build) - repeat as above (for protoss units they will often have a "warp-in" option, go ahead and choose this)
Art - Model (Placement) - repeat as first (though again protoss units sometimes have a "placement" option)
Art - Model (Portrait) - set to "Portrait - Dark Templar" or "Portrait - unit yours looks like"
Your Unit is now ready to be placed in the terrain editor and can be played (Test if you like to make sure you covered everything properly). If it's all good, go ahead and save. You'll notice your unit probably has no sound effects. Thats OK since we'll cover this later near the end and do all of them at once (since we'll be adding abilities and can do all sounds in one big swoop instead of a few at a time).
We're now going to want to repeat this entire process for our first "form". Since I made a "Zergling Form" first, we'll do that.
Simply name the new unit "Nighteyes : Zergling Form" or be clever and make your own. I like having the main unit's name first so that they are right beside each other on the list making finding them later easier. Repeat all but make this one copied from a Zergling, when you duplicate an actor, duplicate a zergling and under all the art headings set them to zergling. Basically we're making an exact copy of a zergling but giving it a new name since it will have different abilities from a zergling.
We have our units, what now?
Creating our Shapeshifting/Morphing Ability
Part I : Buttons! ===
We're going to need some buttons here. We'll need one button to shift into form, and one to shift back. (More if we have multiple forms, but for now just the two will do)
We're going to start with Zergling form but this will be applicable for any other form and once you have a first form you'll only need to add one more button because you can re-use the "return to normal" button.
At the drop down list where we selected "Units" and "Abilities" find "Buttons".
Create a new object (Right click the box below and hit "Add Object"
Set the name to "Zergling Form", hit suggest and then "OK"
Repeat but call this second one "Humanoid Form" or "Normal" or "Templar Shape" whatever.... Mine is "Humanoid Form"
Now For each of these buttons we need to set a few values. First pick our "Zergling Form" button from the list on the left. On the right side under "Hotkey" right click the box to it's left, I set mine to "Z" for Zergling.
Click the box next to "Tooltip" and this will be the description seen in game: mine said "Shift into Zergling Form."
Now click the box next to "Icon" now we get to sift through things for a proper icon. Hit "Browse" and in the box type in zergling, the top choice which says something like btn.zergling etc, etc.. is a good choice. (Anything on that list with "btn" in the title is a Button in game so it'll be the proper size. thus if you want to look through all available buttons simply type in "btn" to the box and browse these).
Our buttons are ready! Simply add a new button for each new form we add.
Part II : The Ability ===
Now we'll take that top-left drop down menu and select "Abilities". Find the ability "Warp Prism - Phasing Mode" since this is a pre-made, in game morph ability it's a good base for our purposes. (Thanks to Happy04's guide)
Click on this ability and near the top select, "Copy" then hit "Paste". We now have an exact copy of the ability.
Do this again (we need one ability to get to Zergling Form and one to get back).
Double Click on of the copies (not the original) and rename it "Zergling Form", suggest and hit "OK"
Repeat for the other copy but call this one "Humanoid Form" or whatever you used for the button above.
Now, once we rename these you'll notice the actual name becomes "Warp Prism - Zergling Form" and "Warp Prism - Humanoid Form", thats fine.
Select one of the abilities, lets do Zergling first and go to the values to the right.
Find "Ability - Info +" and open the box to it's right. In the window that comes up you'll see "Warp Prism - Phasing Mode", double click this.
This will bring a different window up.
The very top box called "Info-Unit" change to your UNIT we made in the beginning (for me it's Nighteyes: Zergling form).
Also, down in the box labelled "Info - Sections - Durations" set both the "Actors Duration" and "Stats Duration" to zero. We want this to be an instant cast and not a 1.5 second cast as is pre-set for the Warp Prism. (you can give it a cast time but that requires more fiddling with the art later on so if you know what your doing feel free, if its your first time I strongly recommend making it instant for now)
Now repeat this for the "Humanoid Form" and any others.
Ok, our abilities for the first shift is done. Now what?
Giving the Ability to our Unit
Go back to "Units"
Lets work with our main unit fisrt. So, select "Nighteyes" or whatever you called yours.
In the vales box to the right at the very top you'll see "Ability - Abilities +", open the box to the right of it.
Here is where any ability the unit has available is listed. Some units will have thigs we don't need any longer. For instance say we were using a High Templar but no longer wanted them to have "Psi Storm" since this is a Special Unit. If you wanted to remove an ability, click on it and hit the red "X" on the right side. I removed "Warpable" and "High Templar - Archon Warp" from my unit as they are not desired.
Once that's done hit the Green "X", this will add a slot. click on the new slot and in the drop down list set it to "Warp Prism - Zergling Form" or the form he will be changing to. (you'll repeat this for extra forms) Then hit "OK"
Directly below the abilities + box will be "Ability - Command Card +" Open this.
Here is the "Card" you see when you select the unit in-game.
If you removed any abilities in the above section remove them here as well by selecting the box and hitting the red "X"
Now pick the box you want the ability to appear in (click the box) and hit the green "X"
This will bring a window up. choose the button we made earlier (it should be labelled) and hit "OK" this should place our button in the selected slot.
With the button highlighted there are some options at the bottom:
Command Type should be "Ability Command"
Requirements : Leave at (none)
Ability : Warp Prism - Zergling Form
Ability Command : Phasing Mode
We have now linked our ability to our unit. Repeat this process for the Form but change it to the opposite. Zergling Form should add the "Humanoid Form" ability and the "Humanoid Form" button etc.
Almost There!
Part III : Editing the Actors ===
We can now test our ability but it'll be very janky, the art will double up, things will look weird. It will work but it will look and feel wrong (it'll say he changed to a zergling but he'll look like a Dark Templar with a zergling at his feet, or he won't be able to move).
Go to "Actors" and select your main unit (Nighteyes).
Go down (on the right side) to "Event - Events +" and open it.
Now there is a LOT of stuff in here. Don't get scared.
We're going to ignore ALL of it (whew!) and simply add a couple new things. Select the very last item on the list and right click and hit "Add Event" (we pick the last one so our new thing appears at the bottom, not mixed in the middle somewhere).
The new item which will be labelled "Action Damage" should be right at the bottom, Select it.
Change the "Msg Type" to "Ability Morph"
Source Name set to "Warp Prism - Zergling Form"
Sub Name to "Start"
Now re-select the event we just changed and right click it and hit "Add Term"
Set the "Term Type" to "Morph From" and the "Unit Link" to "Nighteyes"
So now on the left side it should have a little picture of a Flag with "AbilMorph.Zerglingform.Start" and below it an arrow saying "MorphFrom Nighteyes" and below that should be a little movie clipboard thingy. click that and change the "Msg Type" to "Create"
Check the Pic above if you get confused.
Now Select the event we just made, right click it and hit "Copy", then hit "Paste"
We now have an identical event below the first. select this new event.
On the right, simply change "Start" to "Finish"
On the second line change "Morph From" to "Morph To" and change "Nighteyes" to "Nighteyes : Zergling Form"
Now change "Create" to "Destroy" and under "type" select "Immediate"
Now paste the event once more: this time change:
"Source Name" to "Warp Prism - Humanoid Form"
Make sure the Sub Name is "Finish"
The Next line should be "Morph To" and "Nighteyes"
and the final line should be "Create"
So what have we just done? Well, basicaly we just told our main Unit what should be happening when his ability is used. The first two events tell him that when he hits the button to change to Zergling Form we are going to destroy the Dark Templar model and create a Zergling model in it's place. The final event tell him that when the Zergling Form is changing back to him he will create his own model.
We now have to repeat all 3 of these events (but the opposite) for our Zergling Form.
The 3 events for "Nighteyes : Zergling Form" should look like this pic when we're done:
We now have a fully functioning morphing unit!! Feel free to use anything from here for your own use but please give credit where it is due.
Tweaks ===
This section is not necissary but will make your unit cleaner and more streamlined.
Making your units all use the same amount of supply ====
You might notice (especially if you add an Ultralisk ability or whatever that when you shift forms your supply changes. This is because each of the units have different supply costs. A very quick and easy fix.
Go to "Units", pick your unit. On the right go down to "Stats - Supplies" change this to "-1" (this means this unit uses up 1 supply while on the field, a positive 1 would mean it gives back one supply)
Change this to the same number for all units involved. Now they all use the same supply!
Changing the cost of shifting forms ====
Go to "abilities" and select the abilities (warp prism - etc)
On the right side go down to "Stats - Flags" and bring it up. Check the boxes for "Ignore food" and "Ignore unit cost"
This will make changing forms free (if you don't want this, don't do it).
As a little tweak I made my Zergling form really fast. this is easy. Under "Units" select "Zergling Form", go down to "Movement - Speed". I set this to 5.
Sounds ===
Ok, now that we're all set we want to make it sound cool (or really at all).
Go to "Actors" select your main unit. Go down the right side to "Sound -Sounds" and open it.
You'll want to change the following sounds:
Attack
Pissed
Ready
What
Yes
Just click the sound and choose which sound you want to play (for Nighteyes, since he's a Dark Templar I chose "DarkTemplar_Attack" for his attack, etc. It's really pretty simple). Do this for each form/actor.
Also, right above "Sound - Sounds" you'll see "Sound - Ability Sounds +", open this.
Hit the Green "X" on the right. Click the new slot and in the next box scroll down to "Phasing Mode", you'll see all your abilities.
For your main unit choose "Zergling Form" and set the sound to "Zergling_Pissed"
Repeat for any other forms your main unit has.
For the Forms, do the opposite, choose humanoid form and use the "pissed" sound for it. (I use pissed because I assume shape changing has to hurt and would piss me off some too.) This will make a sound play whenever your unit shifts form.
This concludes the tutorial. In the future I may add how to add levels and make the forms appear at those levels and keep the experience etc consistent. Also, I'd like to add some custom abilities for the forms eventually. Like a Stomp, AoE knockback for Ultralisk Form, and cool things. So, edits to come in the future.
As a bonus I've also added "Shadowmeld" to this unit and here's how you can do it too:
Shadowmeld
Shadowmeld is a cloaking ability that is only active while the unit is stationary. If he moves or attacks he becomes visible until he stands still again.
Ok, So this is actually pretty simple.
First off, we make a button (follow the steps above, I used the button for Dark Templar Perma-cloak since it's basically the same thing it just isn't always on.)
Name: Shadowmeld
Tooltip should say something like : Cloaked while stationary.
No hotkey needed since this will be a passive ability.
Next we go to "Behaviors", search for "Permanantly Cloaked" Right click it and hit "Duplicate Object", put a check in all the boxes and hit "OK"
Rename the behavior "Shadowmeld", suggest, hit "OK"
On the right find "Behavior - Validators (Disable)" and bring up it's window.
Hit the green "X" to add and choose "Caster is Stationary"
Repeat and add "Caster not Attacking"
(this tells the behavior that if the unit is moving or attacking the behavior turns off, but if he fulfills both those validators it turns on)
As a note "Behavior - Validators (Remove)" will permamantly remove the ability if the requirements are not met.
Now go to the "Actors" tab. There should be a "Cloak on copy" and a "Cloak off copy" if you duplicated the original behavior properly.
Pick one (lets say Cloak on copy) and go to the right near the bottom to "Sound - Sound". Bring this up and set it to "Ghost_Cloakon" (the sound a ghost makes when cloaking)
Repeat for the other but use the "off" sound.
Now go to "Unit". Bring up the unit that will use Shadowmeld.
First, on the right find "Unit - Flags" make sure the check box "Cloaked" is NOT checked.
Then find "Behavior - Behaviors +" hit the green "X" and add Shadowmeld.
Your unit now has a working shadowmeld! But let's let the player know that.
Still on your unit, near the top go to "Ability - Command Card +" and add a button.
Choose the Shadowmeld button you made and set the command type to "Passive"
That should be it!!!
If you like this, Thanks! If you got feedback or improvements or whatever let me know!
Thanks to:
The Morphing Part of this guide is loosely based around Happy04's guide but I clarified some things and fixed some bugs as well as adding sounds, extra abilities, etc. So thanks to him for giving me a starting reference.
Very nice job. I am actually having almost no issues and I actually understand what your saying. Though I do have a question. How many times did you do this to catch on and remember? I dont' want to keep referring back to here so it takes longer. haha Guess just practice:D
Anyways, thanks a lot. I wanted to create a Druid Hero. This helps tons!
Lol, it actually took very little repetition for most of it (I already knew how to do most things like create a unit and make buttons) and basically since I learned how to make the ability about 70% on my own and 30% from 2-3 different forum topics that I kind of patched together into what I felt was right. Once I made one I just quickly made more (the uber and muta I did simultaneously: made both units, then both buttons, then both, etc...). It's actually a relatively simple process.
Also, I'm pretty sure I even found a way to simplify the events in each actors data but I need to do a little tweaking to streamline it, but I'm pretty sure I can cut down the amount of events per actor by at least one and still have it work properly. Not that theres anything wrong with the way it is but making things simpler is always nice.
Well, when you play around more and more you will eventually know the system. But the best wa, I personally found is you really try to understand the logic between objects you use.
For example, all ability needs a behavior if you want to modify a unit's stats, say hp, regen, movement speed ect. And you then need an effect to carry out the behavior. Effects are more complex because you can also use it to create persistent effects (something that repeats either randomly or not). After this step, you might want a model (not and actor of type model, but a model) to say display the effect or even the Splat(the aiming circle image for aoe spells). Finally you want an ability and actor, then put it in the unit.
Now go to "Unit". Bring up the unit that will use Shadowmeld.
First, on the right find "Unit - Flags" make sure the check box "Cloaked" is NOT checked.
Make sure you didn't miss that line. It's very important. You have to remove the DT's perma-cloak for his sometime-cloak to work.
Oh wait. I see, you mean like if you give this ability to a unit that can cast spells or something? that would just be in the "validators - disable" box. You'd simply add something like "caster not casting" or something, those validators are pretty simple. Just pick the ones you need for your purposes.
There is no validator I can find specific for global abilities. Which is pretty annoying. I have like 30 abilities and they all need to be effected by the validator. The best I can find is, Unit has no Orders. Which includes hold fire though which is problematic.
Thansk a lot for the tutorial. All works fine, although there seems to be some crap copies of actors etc I supose I coudl do without. Nice of you adding the extra stuff like sounds.
I am trying to make a unit which 'possesses' other units. I don't know if I shoudl try to use this as a base for that? Basicly, it could be morphing, but you need to target a unit and have the caster turn into that unit type. I supose I could remove the target unit and create a copy for it (when leaving the body) using triggers. You could make it a target ability, right, and still have the caster morph?
One problem with using morphing for my possession ability, though, is that both forms use the same percentage of health .. even if the health value of the two units differ. For instance, if Nighteyes in this exampel looses 50% health and then morph into a zergling, that unit will also have 50% health. Is this hardcoded, or can I change it?
Or ... should I use another method for my possession ability althougether, you think?
I haven't even booted the editor up in a few days but I think theres a thingy either in the unit or the actor that has "starting - health" (or shields or energy) as a value. I think if you edit this properly it should work. If this doesn't work I can think of a couple other possibilities but I'm not 100% clear as to what exaclty your ability does.
Is it:
A. Like he targets a unit and then shapeshifts into a copy of that unit (duplication)
B. Targets the enemy then takes control of that unit (mind control)
C. Targets the unit then becomes that unit (thus either leaving his body behind or having it disappear).
The difference in the ability would dictate slightly different answers (I think).
Yeah, I can change starting health, but both morphing units will share current health percentage, it seems, even thouigh they have different starting health / max health values. I guess I have to store the current health value with triggers when the ability is used, and then return it with triggers, so that both units can have different health.. but it woudl be easier if I just coudl unlink their health somehow.
It's C - becomes that unit, having the old form disappear. Think of it as a target vehicle your casting unit enters and then is able to exit with a second ability.
In warcraft 3 I had to do this with triggers:
made the caster unit hidden and unclickable
moved it to a region outside the playable map
changed the ownership of the target unit
gave it an "exit body" ability
The exit body ability does the same thing in reverse (also through triggers):
change ownership of caster back to previous owner
pick the hidden unit in the region I put it and move that unit close by the caster unit
remove the "exit body" ability from the caster.
I am looking for a better, smother way of doing this .. not sure morphing is what I should use?
The only problem I see using morphing (as it is in my tutorial) is that your going from 2 bodies to 1. It might be easier to make like a "mind control" type ability that also causes your main unit to become invisible/untargetable and possibly follow along as a "ghost" type of thing, I don't know. Especially if the new unit would have other abilities that the main unit has.... Hmm... I'll think about it and see if I have any bright ideas.
Any bright ideas? :) Im starting to think I could do it mostly by using triggers as I did in wc3 .. but instead of hiding and moving around the caster I could save the entire unit and remove it from the map temporarily.
Sounds like the Archon merge could be useful in your case. Two units melt into one unit. Not sure if it can be applied to other units though.
I found an easier way to do the events
Simply do these events on the two units you want to be able to morph between each other
AbilMorph.MorphAbility.Finish
MorphFrom NextUnit
MorphTo CurrentUnit
Create
AND
AbilMorph.MorphBackAbility.Finish
MorphFrom CurrentUnit
MorphTo NextUnit
Destroy Immediate
MorphAbility = The ability used to morph to the Next unit
MorphBackAbility = The ability used to morph to current unit
Current Unit = The unit you are editing
Next Unit = The unit he is supposed to morph into
The reason I use Finish on the ability morph and not Start is so if you choose to have a delay on the ability your old unit will still display until the ability is fully cast. If you use Start instead it will switch to the new unit first and then add the ability delay. Hope this helps a bit =)
This is actually cool, but creates problem when the unit dies. I could tell it with an event to 'unmerge' instead of dying? Also, for the purpose of my Possession ability, I need the Next Unit to be the target unit, which might not be possible to spell out in the events (unless i can save the target as a global variable and use that value in events?)
I currently use the bunker LOAD ability and when using Possession (ability with 0.1 range) on the 'transport' unit, a trigger orders the target unit to Load the caster unit. Another trigger changes the owner. To leave the possessed unit, I simply use the same ability and unload command. Also, I return the 'tranpsort' unit to the previous owner with a trigger.
The only problem is the cargo UI, which covers the unit weapon and armor info. I don't know how to disable it.
Take a peak at the current version of my map if you want, it gives you a better idea of what I'm trying to accomplish and how far I've come. Any feedback is welcome :) Thanks
I've yet to do this actual tutorial yet, but am planning on attempting it in the next couple of days for a machinima I have in mind... I'm curious, since I haven't tried it, the form you morph to... does the actual on screen character gain the abilities of the form you morph into? Sorry if it's a supid question...
My movie idea is a group of civilians who morph into a team of super heroes, like the Mighty Morphin Power rangers... So the civilians would morph in a zealot, or a terran marine (just as examples) and go out to fight the bad guy. So I'm hoping they morph inot the actual chartacter, with their abilities intact since civilinas can't do much... :)
[EDIT]
Well, I tried this... step by step, and it either doesn;t work in the latest version of the editor, or it is unable to be done for a civilian as opposed to an actual unit. I've tried 3 times, again following step by step, (at least the first part, creating a new object, duplicating the actor, linking them, etc...) the new unit never shows up as a placable unit in the terrain (unit layer) editor.
[EDIT 2]
I did it with a Dark Templar as outlined in the tutorial, instead of the civilian, and it works. Which just means I'm not going to be able to use a civilian for the transformation, which rather negates my movie idea... Gonna have to find a different approach. Probably using triggers, and hiding and unhiding models and manually triggering the aura... Bummer.
This guide is to explain how to create a unit that can shift between forms (think Druid in WoW) at the push of a button. For my example I have created a Dark Templar that can shift into a Zergling, an Ultralisk and a Mutalisk. As a bonus I added in a "shadowmeld" ability which keeps the dark templar cloaked only while he is standing still: if he moves or attacks he becomes visible.
I will upload a finished product for testing as well. (If I can figure out how)
Getting Started ==
First things first, you'll need a "main unit" to work with. If you already have a unit in mind you can skip this step. Keep in mind I highly recommend not using a unit already in game and here's why. If I make the regular Dark Templar unit my shapeshifter, any other dark templars I later add to the map will also have these abilities. So I'm going to copy the Dark Templar model and make a new unit who to begin is exactly the same but changing him won't chage all the dark templars on my map.
Making a Unit ===
For me I used a Dark Templar as a base. In the top left of the data editor use the pull down menu to bring up "Units"
In the window below (where the units are all listed), Right-click and select "Add Object", this will bring up a new window.
Fill out the window as follows:
Then hit "OK" If you chose "unit" for type then move on, if you chose "Hero" go to the box on the right side of the screen and find "Unit - Flags", it'll be at the bottom. Right click the box to it's right which will bring a window up, put a check in the box for "Hero" and hit "OK"
Now go back to the dropdown menu where "Units" is and select "Actors"
Find the unit you'd like your new unit to look and act like (for me it was Dark Templar) by scrolling down the list or typing into the search box.
Right-Click on that unit, select "Duplicate Object". This will bring up a window. Place a check in all the boxes (or just the ones you want if you know what your doing) and hit "OK", it will take a few seconds.
Once you have your duplicate actor go to the box of values on the right. At the top (see pic) it will say something like "Dark Templar copy" at the very top in a little box by itself. Double click this and select your newly created unit from the list (this will link the actor to the unit, I think, but I know it's necissary). Also, in the filed values box below scroll down and find:
Your Unit is now ready to be placed in the terrain editor and can be played (Test if you like to make sure you covered everything properly). If it's all good, go ahead and save. You'll notice your unit probably has no sound effects. Thats OK since we'll cover this later near the end and do all of them at once (since we'll be adding abilities and can do all sounds in one big swoop instead of a few at a time).
We're now going to want to repeat this entire process for our first "form". Since I made a "Zergling Form" first, we'll do that.
Simply name the new unit "Nighteyes : Zergling Form" or be clever and make your own. I like having the main unit's name first so that they are right beside each other on the list making finding them later easier. Repeat all but make this one copied from a Zergling, when you duplicate an actor, duplicate a zergling and under all the art headings set them to zergling. Basically we're making an exact copy of a zergling but giving it a new name since it will have different abilities from a zergling.
We have our units, what now?
Creating our Shapeshifting/Morphing Ability
Part I : Buttons! ===
We're going to need some buttons here. We'll need one button to shift into form, and one to shift back. (More if we have multiple forms, but for now just the two will do)
We're going to start with Zergling form but this will be applicable for any other form and once you have a first form you'll only need to add one more button because you can re-use the "return to normal" button.
At the drop down list where we selected "Units" and "Abilities" find "Buttons".
Create a new object (Right click the box below and hit "Add Object"
Set the name to "Zergling Form", hit suggest and then "OK"
Repeat but call this second one "Humanoid Form" or "Normal" or "Templar Shape" whatever.... Mine is "Humanoid Form"
Now For each of these buttons we need to set a few values. First pick our "Zergling Form" button from the list on the left. On the right side under "Hotkey" right click the box to it's left, I set mine to "Z" for Zergling.
Click the box next to "Tooltip" and this will be the description seen in game: mine said "Shift into Zergling Form."
Now click the box next to "Icon" now we get to sift through things for a proper icon. Hit "Browse" and in the box type in zergling, the top choice which says something like btn.zergling etc, etc.. is a good choice. (Anything on that list with "btn" in the title is a Button in game so it'll be the proper size. thus if you want to look through all available buttons simply type in "btn" to the box and browse these).
Our buttons are ready! Simply add a new button for each new form we add.
Part II : The Ability ===
Now we'll take that top-left drop down menu and select "Abilities". Find the ability "Warp Prism - Phasing Mode" since this is a pre-made, in game morph ability it's a good base for our purposes. (Thanks to Happy04's guide)
Click on this ability and near the top select, "Copy" then hit "Paste". We now have an exact copy of the ability.
Do this again (we need one ability to get to Zergling Form and one to get back).
Double Click on of the copies (not the original) and rename it "Zergling Form", suggest and hit "OK"
Repeat for the other copy but call this one "Humanoid Form" or whatever you used for the button above.
Now, once we rename these you'll notice the actual name becomes "Warp Prism - Zergling Form" and "Warp Prism - Humanoid Form", thats fine.
Select one of the abilities, lets do Zergling first and go to the values to the right.
Find "Ability - Info +" and open the box to it's right. In the window that comes up you'll see "Warp Prism - Phasing Mode", double click this.
This will bring a different window up.
The very top box called "Info-Unit" change to your UNIT we made in the beginning (for me it's Nighteyes: Zergling form).
Also, down in the box labelled "Info - Sections - Durations" set both the "Actors Duration" and "Stats Duration" to zero. We want this to be an instant cast and not a 1.5 second cast as is pre-set for the Warp Prism. (you can give it a cast time but that requires more fiddling with the art later on so if you know what your doing feel free, if its your first time I strongly recommend making it instant for now)
Now repeat this for the "Humanoid Form" and any others.
Ok, our abilities for the first shift is done. Now what?
Giving the Ability to our Unit
Go back to "Units"
Lets work with our main unit fisrt. So, select "Nighteyes" or whatever you called yours.
In the vales box to the right at the very top you'll see "Ability - Abilities +", open the box to the right of it.
Here is where any ability the unit has available is listed. Some units will have thigs we don't need any longer. For instance say we were using a High Templar but no longer wanted them to have "Psi Storm" since this is a Special Unit. If you wanted to remove an ability, click on it and hit the red "X" on the right side. I removed "Warpable" and "High Templar - Archon Warp" from my unit as they are not desired.
Once that's done hit the Green "X", this will add a slot. click on the new slot and in the drop down list set it to "Warp Prism - Zergling Form" or the form he will be changing to. (you'll repeat this for extra forms) Then hit "OK"
Directly below the abilities + box will be "Ability - Command Card +" Open this.
Here is the "Card" you see when you select the unit in-game.
If you removed any abilities in the above section remove them here as well by selecting the box and hitting the red "X"
Now pick the box you want the ability to appear in (click the box) and hit the green "X"
This will bring a window up. choose the button we made earlier (it should be labelled) and hit "OK" this should place our button in the selected slot.
With the button highlighted there are some options at the bottom:
We have now linked our ability to our unit. Repeat this process for the Form but change it to the opposite. Zergling Form should add the "Humanoid Form" ability and the "Humanoid Form" button etc.
Almost There!
Part III : Editing the Actors ===
We can now test our ability but it'll be very janky, the art will double up, things will look weird. It will work but it will look and feel wrong (it'll say he changed to a zergling but he'll look like a Dark Templar with a zergling at his feet, or he won't be able to move).
Go to "Actors" and select your main unit (Nighteyes).
Go down (on the right side) to "Event - Events +" and open it.
Now there is a LOT of stuff in here. Don't get scared.
We're going to ignore ALL of it (whew!) and simply add a couple new things. Select the very last item on the list and right click and hit "Add Event" (we pick the last one so our new thing appears at the bottom, not mixed in the middle somewhere).
The new item which will be labelled "Action Damage" should be right at the bottom, Select it.
Now re-select the event we just changed and right click it and hit "Add Term"
So now on the left side it should have a little picture of a Flag with "AbilMorph.Zerglingform.Start" and below it an arrow saying "MorphFrom Nighteyes" and below that should be a little movie clipboard thingy. click that and change the "Msg Type" to "Create"
Check the Pic above if you get confused.
Now Select the event we just made, right click it and hit "Copy", then hit "Paste"
We now have an identical event below the first. select this new event.
On the right, simply change "Start" to "Finish"
On the second line change "Morph From" to "Morph To" and change "Nighteyes" to "Nighteyes : Zergling Form"
Now change "Create" to "Destroy" and under "type" select "Immediate"
Now paste the event once more: this time change:
"Source Name" to "Warp Prism - Humanoid Form"
Make sure the Sub Name is "Finish"
The Next line should be "Morph To" and "Nighteyes"
and the final line should be "Create"
So what have we just done? Well, basicaly we just told our main Unit what should be happening when his ability is used. The first two events tell him that when he hits the button to change to Zergling Form we are going to destroy the Dark Templar model and create a Zergling model in it's place. The final event tell him that when the Zergling Form is changing back to him he will create his own model.
We now have to repeat all 3 of these events (but the opposite) for our Zergling Form.
The 3 events for "Nighteyes : Zergling Form" should look like this pic when we're done:
We now have a fully functioning morphing unit!! Feel free to use anything from here for your own use but please give credit where it is due.
Tweaks ===
This section is not necissary but will make your unit cleaner and more streamlined.
Making your units all use the same amount of supply ====
You might notice (especially if you add an Ultralisk ability or whatever that when you shift forms your supply changes. This is because each of the units have different supply costs. A very quick and easy fix.
Go to "Units", pick your unit. On the right go down to "Stats - Supplies" change this to "-1" (this means this unit uses up 1 supply while on the field, a positive 1 would mean it gives back one supply)
Change this to the same number for all units involved. Now they all use the same supply!
Changing the cost of shifting forms ====
Go to "abilities" and select the abilities (warp prism - etc)
On the right side go down to "Stats - Flags" and bring it up. Check the boxes for "Ignore food" and "Ignore unit cost"
This will make changing forms free (if you don't want this, don't do it).
As a little tweak I made my Zergling form really fast. this is easy. Under "Units" select "Zergling Form", go down to "Movement - Speed". I set this to 5.
Sounds ===
Ok, now that we're all set we want to make it sound cool (or really at all).
Go to "Actors" select your main unit. Go down the right side to "Sound -Sounds" and open it.
You'll want to change the following sounds:
Just click the sound and choose which sound you want to play (for Nighteyes, since he's a Dark Templar I chose "DarkTemplar_Attack" for his attack, etc. It's really pretty simple). Do this for each form/actor.
Also, right above "Sound - Sounds" you'll see "Sound - Ability Sounds +", open this.
Hit the Green "X" on the right. Click the new slot and in the next box scroll down to "Phasing Mode", you'll see all your abilities.
For your main unit choose "Zergling Form" and set the sound to "Zergling_Pissed"
Repeat for any other forms your main unit has.
For the Forms, do the opposite, choose humanoid form and use the "pissed" sound for it. (I use pissed because I assume shape changing has to hurt and would piss me off some too.) This will make a sound play whenever your unit shifts form.
This concludes the tutorial. In the future I may add how to add levels and make the forms appear at those levels and keep the experience etc consistent. Also, I'd like to add some custom abilities for the forms eventually. Like a Stomp, AoE knockback for Ultralisk Form, and cool things. So, edits to come in the future.
As a bonus I've also added "Shadowmeld" to this unit and here's how you can do it too:
Shadowmeld
Shadowmeld is a cloaking ability that is only active while the unit is stationary. If he moves or attacks he becomes visible until he stands still again.
Ok, So this is actually pretty simple.
First off, we make a button (follow the steps above, I used the button for Dark Templar Perma-cloak since it's basically the same thing it just isn't always on.)
Name: Shadowmeld
Tooltip should say something like : Cloaked while stationary.
No hotkey needed since this will be a passive ability.
Next we go to "Behaviors", search for "Permanantly Cloaked" Right click it and hit "Duplicate Object", put a check in all the boxes and hit "OK"
Rename the behavior "Shadowmeld", suggest, hit "OK"
On the right find "Behavior - Validators (Disable)" and bring up it's window.
Hit the green "X" to add and choose "Caster is Stationary"
Repeat and add "Caster not Attacking"
(this tells the behavior that if the unit is moving or attacking the behavior turns off, but if he fulfills both those validators it turns on)
As a note "Behavior - Validators (Remove)" will permamantly remove the ability if the requirements are not met.
Now go to the "Actors" tab. There should be a "Cloak on copy" and a "Cloak off copy" if you duplicated the original behavior properly.
Pick one (lets say Cloak on copy) and go to the right near the bottom to "Sound - Sound". Bring this up and set it to "Ghost_Cloakon" (the sound a ghost makes when cloaking)
Repeat for the other but use the "off" sound.
Now go to "Unit". Bring up the unit that will use Shadowmeld.
First, on the right find "Unit - Flags" make sure the check box "Cloaked" is NOT checked.
Then find "Behavior - Behaviors +" hit the green "X" and add Shadowmeld.
Your unit now has a working shadowmeld! But let's let the player know that.
Still on your unit, near the top go to "Ability - Command Card +" and add a button.
Choose the Shadowmeld button you made and set the command type to "Passive"
That should be it!!!
If you like this, Thanks! If you got feedback or improvements or whatever let me know!
Thanks to:
The Morphing Part of this guide is loosely based around Happy04's guide but I clarified some things and fixed some bugs as well as adding sounds, extra abilities, etc. So thanks to him for giving me a starting reference.
Ooh, I've been tossing round ideas involving shapeshifting recently, I can't wait to give this a go :D
Grade A Tutorial, nice job.
Very nice job. I am actually having almost no issues and I actually understand what your saying. Though I do have a question. How many times did you do this to catch on and remember? I dont' want to keep referring back to here so it takes longer. haha Guess just practice:D
Anyways, thanks a lot. I wanted to create a Druid Hero. This helps tons!
@MLGAzrael: Go
Lol, it actually took very little repetition for most of it (I already knew how to do most things like create a unit and make buttons) and basically since I learned how to make the ability about 70% on my own and 30% from 2-3 different forum topics that I kind of patched together into what I felt was right. Once I made one I just quickly made more (the uber and muta I did simultaneously: made both units, then both buttons, then both, etc...). It's actually a relatively simple process.
Also, I'm pretty sure I even found a way to simplify the events in each actors data but I need to do a little tweaking to streamline it, but I'm pretty sure I can cut down the amount of events per actor by at least one and still have it work properly. Not that theres anything wrong with the way it is but making things simpler is always nice.
@MLGAzrael: Go
Well, when you play around more and more you will eventually know the system. But the best wa, I personally found is you really try to understand the logic between objects you use.
For example, all ability needs a behavior if you want to modify a unit's stats, say hp, regen, movement speed ect. And you then need an effect to carry out the behavior. Effects are more complex because you can also use it to create persistent effects (something that repeats either randomly or not). After this step, you might want a model (not and actor of type model, but a model) to say display the effect or even the Splat(the aiming circle image for aoe spells). Finally you want an ability and actor, then put it in the unit.
casting abilities will still keep you cloaked.
@PSGMud: Go
Now go to "Unit". Bring up the unit that will use Shadowmeld.
First, on the right find "Unit - Flags" make sure the check box "Cloaked" is NOT checked.
Make sure you didn't miss that line. It's very important. You have to remove the DT's perma-cloak for his sometime-cloak to work.
Oh wait. I see, you mean like if you give this ability to a unit that can cast spells or something? that would just be in the "validators - disable" box. You'd simply add something like "caster not casting" or something, those validators are pretty simple. Just pick the ones you need for your purposes.
There is no validator I can find specific for global abilities. Which is pretty annoying. I have like 30 abilities and they all need to be effected by the validator. The best I can find is, Unit has no Orders. Which includes hold fire though which is problematic.
Thanks. Great Guide. Helped a lot.
Thansk a lot for the tutorial. All works fine, although there seems to be some crap copies of actors etc I supose I coudl do without. Nice of you adding the extra stuff like sounds.
I am trying to make a unit which 'possesses' other units. I don't know if I shoudl try to use this as a base for that? Basicly, it could be morphing, but you need to target a unit and have the caster turn into that unit type. I supose I could remove the target unit and create a copy for it (when leaving the body) using triggers. You could make it a target ability, right, and still have the caster morph?
One problem with using morphing for my possession ability, though, is that both forms use the same percentage of health .. even if the health value of the two units differ. For instance, if Nighteyes in this exampel looses 50% health and then morph into a zergling, that unit will also have 50% health. Is this hardcoded, or can I change it?
Or ... should I use another method for my possession ability althougether, you think?
Thanks again
@MeltAge: Go
I haven't even booted the editor up in a few days but I think theres a thingy either in the unit or the actor that has "starting - health" (or shields or energy) as a value. I think if you edit this properly it should work. If this doesn't work I can think of a couple other possibilities but I'm not 100% clear as to what exaclty your ability does.
Is it:
A. Like he targets a unit and then shapeshifts into a copy of that unit (duplication)
B. Targets the enemy then takes control of that unit (mind control)
C. Targets the unit then becomes that unit (thus either leaving his body behind or having it disappear).
The difference in the ability would dictate slightly different answers (I think).
@Auracy: Go
Yeah, I can change starting health, but both morphing units will share current health percentage, it seems, even thouigh they have different starting health / max health values. I guess I have to store the current health value with triggers when the ability is used, and then return it with triggers, so that both units can have different health.. but it woudl be easier if I just coudl unlink their health somehow.
It's C - becomes that unit, having the old form disappear. Think of it as a target vehicle your casting unit enters and then is able to exit with a second ability.
In warcraft 3 I had to do this with triggers:
The exit body ability does the same thing in reverse (also through triggers):
I am looking for a better, smother way of doing this .. not sure morphing is what I should use?
Sorry if I'm getting slightly off topic.
@MeltAge: Go
The only problem I see using morphing (as it is in my tutorial) is that your going from 2 bodies to 1. It might be easier to make like a "mind control" type ability that also causes your main unit to become invisible/untargetable and possibly follow along as a "ghost" type of thing, I don't know. Especially if the new unit would have other abilities that the main unit has.... Hmm... I'll think about it and see if I have any bright ideas.
@MeltAge: Go
Any bright ideas? :) Im starting to think I could do it mostly by using triggers as I did in wc3 .. but instead of hiding and moving around the caster I could save the entire unit and remove it from the map temporarily.
Sounds like the Archon merge could be useful in your case. Two units melt into one unit. Not sure if it can be applied to other units though.
I found an easier way to do the events
Simply do these events on the two units you want to be able to morph between each other
AND
MorphAbility = The ability used to morph to the Next unit
MorphBackAbility = The ability used to morph to current unit
Current Unit = The unit you are editing
Next Unit = The unit he is supposed to morph into
The reason I use Finish on the ability morph and not Start is so if you choose to have a delay on the ability your old unit will still display until the ability is fully cast. If you use Start instead it will switch to the new unit first and then add the ability delay. Hope this helps a bit =)
This is actually cool, but creates problem when the unit dies. I could tell it with an event to 'unmerge' instead of dying? Also, for the purpose of my Possession ability, I need the Next Unit to be the target unit, which might not be possible to spell out in the events (unless i can save the target as a global variable and use that value in events?)
I currently use the bunker LOAD ability and when using Possession (ability with 0.1 range) on the 'transport' unit, a trigger orders the target unit to Load the caster unit. Another trigger changes the owner. To leave the possessed unit, I simply use the same ability and unload command. Also, I return the 'tranpsort' unit to the previous owner with a trigger.
The only problem is the cargo UI, which covers the unit weapon and armor info. I don't know how to disable it.
Take a peak at the current version of my map if you want, it gives you a better idea of what I'm trying to accomplish and how far I've come. Any feedback is welcome :) Thanks
@Auracy: Go
Awsome job dude :) This helped me alot
I've yet to do this actual tutorial yet, but am planning on attempting it in the next couple of days for a machinima I have in mind... I'm curious, since I haven't tried it, the form you morph to... does the actual on screen character gain the abilities of the form you morph into? Sorry if it's a supid question...
My movie idea is a group of civilians who morph into a team of super heroes, like the Mighty Morphin Power rangers... So the civilians would morph in a zealot, or a terran marine (just as examples) and go out to fight the bad guy. So I'm hoping they morph inot the actual chartacter, with their abilities intact since civilinas can't do much... :)
[EDIT] Well, I tried this... step by step, and it either doesn;t work in the latest version of the editor, or it is unable to be done for a civilian as opposed to an actual unit. I've tried 3 times, again following step by step, (at least the first part, creating a new object, duplicating the actor, linking them, etc...) the new unit never shows up as a placable unit in the terrain (unit layer) editor.
[EDIT 2] I did it with a Dark Templar as outlined in the tutorial, instead of the civilian, and it works. Which just means I'm not going to be able to use a civilian for the transformation, which rather negates my movie idea... Gonna have to find a different approach. Probably using triggers, and hiding and unhiding models and manually triggering the aura... Bummer.
Thanks for this epic tutorial!