Difference between revisions of "Creating a Missile Ability"

From HIVE
Jump to navigation Jump to search
m (1 revision: StarEdit.net Wiki)
m
 
Line 1: Line 1:
 
The following tutorial is a step-by-step process for making your own missile ability, based on what you would like the missile to do. This is also written assuming you have the "Show Table View" button pressed next to the right "Search" bar.
 
The following tutorial is a step-by-step process for making your own missile ability, based on what you would like the missile to do. This is also written assuming you have the "Show Table View" button pressed next to the right "Search" bar.
  
==Missile Explodes Upon Reaching Target==
+
=Missile Explodes Upon Reaching Target=
 
This tutorial will teach you how to create a missile ability that will only explode when it reaches its target unit or point. Upon reaching that target, it will deal area of effect damage to the surrounding area.
 
This tutorial will teach you how to create a missile ability that will only explode when it reaches its target unit or point. Upon reaching that target, it will deal area of effect damage to the surrounding area.
  
===Step 1 - Create a Button===
+
==Step 1 - Create a Button==
 
Go into the Data Editor (F7) and under "Data Type:" select "Buttons." Literally duplicate any button you want, and edit the following:
 
Go into the Data Editor (F7) and under "Data Type:" select "Buttons." Literally duplicate any button you want, and edit the following:
 
* '''Icon''' - Set this to whatever you would want the button to show up as on your command card. You should also set the "Alert Icon" to the same image. For this tutorial, I chose btn-ability-protoss-prismaticbeam.dds
 
* '''Icon''' - Set this to whatever you would want the button to show up as on your command card. You should also set the "Alert Icon" to the same image. For this tutorial, I chose btn-ability-protoss-prismaticbeam.dds
Line 11: Line 11:
 
* '''Hotkey''' - Choose whatever letter or number you'd like to activate this ability.
 
* '''Hotkey''' - Choose whatever letter or number you'd like to activate this ability.
  
===Step 2 - Create Your Effects===
+
==Step 2 - Create Your Effects==
 
This ability will only need 2 effects to work properly: "Energy Bolt Damage" and "Energy Bolt Launch." Select "Effects" from the "Data Type" dropdown menu for the next step.
 
This ability will only need 2 effects to work properly: "Energy Bolt Damage" and "Energy Bolt Launch." Select "Effects" from the "Data Type" dropdown menu for the next step.
  
====Damage====
+
===Damage===
 
Right-click in the left box (on any of the existing "Effects" if you'd like) and select "Add Object..." (or press '''Ctrl+='''). Let's name this effect "Energy Bolt Damage" with the type set to "Damage" and based on "DU_WEAP_SPLASH." Make sure you also click "Suggest" for the ID.
 
Right-click in the left box (on any of the existing "Effects" if you'd like) and select "Add Object..." (or press '''Ctrl+='''). Let's name this effect "Energy Bolt Damage" with the type set to "Damage" and based on "DU_WEAP_SPLASH." Make sure you also click "Suggest" for the ID.
  
Line 26: Line 26:
 
Click "Ok" and then find "Search - Search Filters." Double click on the space to the right of it to open a new "Object Values" window. This is where we set what can and cannot take damage. Start off by unchecking the boxes next to "Ally" and "Player." This prevents the damage from being dealt to you or your allied units. Now find "Dead" and double click on "Allowed" until it says "Excluded." Do the same for "[[Invulnerable]]," "Missile," and "Stasis." Click "Ok" and we're done with the first effect.
 
Click "Ok" and then find "Search - Search Filters." Double click on the space to the right of it to open a new "Object Values" window. This is where we set what can and cannot take damage. Start off by unchecking the boxes next to "Ally" and "Player." This prevents the damage from being dealt to you or your allied units. Now find "Dead" and double click on "Allowed" until it says "Excluded." Do the same for "[[Invulnerable]]," "Missile," and "Stasis." Click "Ok" and we're done with the first effect.
  
====Launch====
+
===Launch===
 
Right-click in the left box again and select "Add Object..." (or press '''Ctrl+='''). Name this new effect: "Energy Bolt Launch" and click the "Suggest" button. Set the effect type to "Launch Missile" and based on "Default Effect (CEffectLaunchMissile)."
 
Right-click in the left box again and select "Add Object..." (or press '''Ctrl+='''). Name this new effect: "Energy Bolt Launch" and click the "Suggest" button. Set the effect type to "Launch Missile" and based on "Default Effect (CEffectLaunchMissile)."
  
 
There are only two things you need to do for now. Find "'''Effect - Impact Effect'''" and set that to "Energy Bolt Damage" (the effect we just finished creating). Now find "'''Target - Impact Location +'''" and set that to "Target Point." We'll also need to change the "'''Unit - Ammo Unit'''" field, but we'll need to make our missile first. We'll come back to this later.
 
There are only two things you need to do for now. Find "'''Effect - Impact Effect'''" and set that to "Energy Bolt Damage" (the effect we just finished creating). Now find "'''Target - Impact Location +'''" and set that to "Target Point." We'll also need to change the "'''Unit - Ammo Unit'''" field, but we'll need to make our missile first. We'll come back to this later.
  
===Step 3 - Creating the Missile Unit===
+
==Step 3 - Creating the Missile Unit==
 
To create the missile itself, we'll need to make a mover, a unit, and an actor.
 
To create the missile itself, we'll need to make a mover, a unit, and an actor.
  
====[[Mover]]====
+
===[[Mover]]===
 
Select "Movers" from the "Data Type" dropdown so we can start to create our missile. Right-click in the left box and select "Add Object..." (or press '''Ctrl+='''). Name this new unit "Energy Bolt Missile," click "Suggest" for the ID, and set the type to "Missile" and based on "CMoverMissile." First, find "height Map" and set that to "Air." Next, double click the space next to "'''Motion Phases +'''" to open an "Object Values" window.
 
Select "Movers" from the "Data Type" dropdown so we can start to create our missile. Right-click in the left box and select "Add Object..." (or press '''Ctrl+='''). Name this new unit "Energy Bolt Missile," click "Suggest" for the ID, and set the type to "Missile" and based on "CMoverMissile." First, find "height Map" and set that to "Air." Next, double click the space next to "'''Motion Phases +'''" to open an "Object Values" window.
  
Line 46: Line 46:
 
Click "Ok" to close the window.
 
Click "Ok" to close the window.
  
====Unit====
+
===Unit===
 
Select "Units" from the "Data Type" dropdown so we can create our missile. Right-click in the left box and select "Add Object..." (or press '''Ctrl+='''). Name this new unit "Energy Bolt Missile," click "Suggest" for the ID, and under "Based On" select "Invulverable Missile." You should notice that the mover we just created has already been linked to the unit. Next, though, we'll need an actor to tie to the Unit.
 
Select "Units" from the "Data Type" dropdown so we can create our missile. Right-click in the left box and select "Add Object..." (or press '''Ctrl+='''). Name this new unit "Energy Bolt Missile," click "Suggest" for the ID, and under "Based On" select "Invulverable Missile." You should notice that the mover we just created has already been linked to the unit. Next, though, we'll need an actor to tie to the Unit.
  
====Actor====
+
===Actor===
 
Select "Actors" from the "Data Type" dropdown so we can create our missile. Right-click in the left box and select "Add Object..." (or press '''Ctrl+='''). Name this new actor "Energy Bolt Missile" again, click "Suggest" for the ID, change the actor type to "Missile" and make sure it is based on "GenericAttackMissile."
 
Select "Actors" from the "Data Type" dropdown so we can create our missile. Right-click in the left box and select "Add Object..." (or press '''Ctrl+='''). Name this new actor "Energy Bolt Missile" again, click "Suggest" for the ID, change the actor type to "Missile" and make sure it is based on "GenericAttackMissile."
  
Line 67: Line 67:
 
Leave everything else as is and click "Ok." Congratulations, your unit is now finished. Go back to "Energy Bolt Launch" under "Effects" and set the "Unit - Ammo Unit" field to "Energy Bolt Missile."
 
Leave everything else as is and click "Ok." Congratulations, your unit is now finished. Go back to "Energy Bolt Launch" under "Effects" and set the "Unit - Ammo Unit" field to "Energy Bolt Missile."
  
===Step 4 - Creating the Attack===
+
==Step 4 - Creating the Attack==
 
While still in the actors tab, right-click in the left box and select "Add Object..." (or press Ctrl+=). Name this new actor "Energy Bolt Attack", click "Suggest" for the ID, change the actor type to "Action" and make sure it is based on "GenericAttackMissile." First, we need to set the Impact Effect and Launch Effect near the top (under "Token"):
 
While still in the actors tab, right-click in the left box and select "Add Object..." (or press Ctrl+=). Name this new actor "Energy Bolt Attack", click "Suggest" for the ID, change the actor type to "Action" and make sure it is based on "GenericAttackMissile." First, we need to set the Impact Effect and Launch Effect near the top (under "Token"):
 
* '''Impact Effect''' - Set to "Energy Bolt Damage."
 
* '''Impact Effect''' - Set to "Energy Bolt Damage."
Line 78: Line 78:
 
Finally, find "'''Target - Impact Map +'''" and double click on the space next to it to open an "Object Values" window. Select "None" under the "Index" column. Click on the "Art" tab below the box and change the "Model" to "TerranLargeTriggeredExplosion (Unnamed)." Click "Ok" to close the window.
 
Finally, find "'''Target - Impact Map +'''" and double click on the space next to it to open an "Object Values" window. Select "None" under the "Index" column. Click on the "Art" tab below the box and change the "Model" to "TerranLargeTriggeredExplosion (Unnamed)." Click "Ok" to close the window.
  
===Step 5 - Creating the Ability===
+
==Step 5 - Creating the Ability==
 
Select "Abilities" from the "Data Type" dropdown so we can finally create the ability. Right-click in the left box and select "Add Object..." (or press '''Ctrl+='''). Name this new ability "Energy Bolt", click "Suggest" for the ID, change the ability type to "Effect - Target" and leave it based on "Default Ability (CAbilEffectTarget)."
 
Select "Abilities" from the "Data Type" dropdown so we can finally create the ability. Right-click in the left box and select "Add Object..." (or press '''Ctrl+='''). Name this new ability "Energy Bolt", click "Suggest" for the ID, change the ability type to "Effect - Target" and leave it based on "Default Ability (CAbilEffectTarget)."
  
Line 92: Line 92:
 
And you're done! Congratulations, you have a customized missile.
 
And you're done! Congratulations, you have a customized missile.
  
==Missile Explodes Upon Hitting Anything==
+
=Missile Explodes Upon Hitting Anything=
 
This tutorial is set up so that the missile will hit anything on it's path of fire. [[Missiles|Missile]] includes details about the different types of missiles and what the different fields do, so if you want your missile to behave differently, check that out.
 
This tutorial is set up so that the missile will hit anything on it's path of fire. [[Missiles|Missile]] includes details about the different types of missiles and what the different fields do, so if you want your missile to behave differently, check that out.
  

Latest revision as of 18:46, 8 April 2012

The following tutorial is a step-by-step process for making your own missile ability, based on what you would like the missile to do. This is also written assuming you have the "Show Table View" button pressed next to the right "Search" bar.

Missile Explodes Upon Reaching Target

This tutorial will teach you how to create a missile ability that will only explode when it reaches its target unit or point. Upon reaching that target, it will deal area of effect damage to the surrounding area.

Step 1 - Create a Button

Go into the Data Editor (F7) and under "Data Type:" select "Buttons." Literally duplicate any button you want, and edit the following:

  • Icon - Set this to whatever you would want the button to show up as on your command card. You should also set the "Alert Icon" to the same image. For this tutorial, I chose btn-ability-protoss-prismaticbeam.dds
  • Name - Name your button, in this case I'll call it Energy Bolt.
  • Tooltip - Fill this area with whatever information you'd like to appear on the button's tooltip. In this case, I chose something simple: "Shoots an energy bolt at the target are, and deals minor splash damage on impact."
  • Hotkey - Choose whatever letter or number you'd like to activate this ability.

Step 2 - Create Your Effects

This ability will only need 2 effects to work properly: "Energy Bolt Damage" and "Energy Bolt Launch." Select "Effects" from the "Data Type" dropdown menu for the next step.

Damage

Right-click in the left box (on any of the existing "Effects" if you'd like) and select "Add Object..." (or press Ctrl+=). Let's name this effect "Energy Bolt Damage" with the type set to "Damage" and based on "DU_WEAP_SPLASH." Make sure you also click "Suggest" for the ID.

There are a few things to edit here. First, find "Combat - Amount" and enter "50." This is how much damage the ability will do. Next, find "Search - Area+" and double click on the blank space next to it. This is where we set how much splash damage will be done to surrounding enemies. A window will pop up called "Object Values." Click the green X on the right and click on the new line that has been added to the blank box. You should see that the boxes below it are now editable. Set the values to the following:

  • Arc - 360. This is the area around the impact that will take splash damage.
  • Bonus - 0. This is bonus damage added to the initial damage done by the missile.
  • Fraction - 1. This is where you set the percent of the damage done to nearby enemies. 1 represents 100%, whereas .5 would be 50% and only deal half the damage to nearby units.
  • Maximum Count - -1. This is where you set the total amount of enemies the damage can hit. -1 means any number of units in the area can take damage.
  • Radius - 2. This is how big the blast radius will be for damage dealt.

Click "Ok" and then find "Search - Search Filters." Double click on the space to the right of it to open a new "Object Values" window. This is where we set what can and cannot take damage. Start off by unchecking the boxes next to "Ally" and "Player." This prevents the damage from being dealt to you or your allied units. Now find "Dead" and double click on "Allowed" until it says "Excluded." Do the same for "Invulnerable," "Missile," and "Stasis." Click "Ok" and we're done with the first effect.

Launch

Right-click in the left box again and select "Add Object..." (or press Ctrl+=). Name this new effect: "Energy Bolt Launch" and click the "Suggest" button. Set the effect type to "Launch Missile" and based on "Default Effect (CEffectLaunchMissile)."

There are only two things you need to do for now. Find "Effect - Impact Effect" and set that to "Energy Bolt Damage" (the effect we just finished creating). Now find "Target - Impact Location +" and set that to "Target Point." We'll also need to change the "Unit - Ammo Unit" field, but we'll need to make our missile first. We'll come back to this later.

Step 3 - Creating the Missile Unit

To create the missile itself, we'll need to make a mover, a unit, and an actor.

Mover

Select "Movers" from the "Data Type" dropdown so we can start to create our missile. Right-click in the left box and select "Add Object..." (or press Ctrl+=). Name this new unit "Energy Bolt Missile," click "Suggest" for the ID, and set the type to "Missile" and based on "CMoverMissile." First, find "height Map" and set that to "Air." Next, double click the space next to "Motion Phases +" to open an "Object Values" window.

Click the green X on the right to add a new line to the white box. Find and change the following:

  • Driver - Set to "Guidance."
  • Maximum Speed - 2.0
  • Minimum Speed - 2.0
  • Overlays - Click the red X to delete both of the overlays listed in the box.
  • Timeout - Set the value to 15. This is the amount of time the missile has to hit its target. With a short range, this value doesn't matter too much, but theoretically if you wanted your missile to be able to fire across a map, you'd want this number to be higher.

Click "Ok" to close the window.

Unit

Select "Units" from the "Data Type" dropdown so we can create our missile. Right-click in the left box and select "Add Object..." (or press Ctrl+=). Name this new unit "Energy Bolt Missile," click "Suggest" for the ID, and under "Based On" select "Invulverable Missile." You should notice that the mover we just created has already been linked to the unit. Next, though, we'll need an actor to tie to the Unit.

Actor

Select "Actors" from the "Data Type" dropdown so we can create our missile. Right-click in the left box and select "Add Object..." (or press Ctrl+=). Name this new actor "Energy Bolt Missile" again, click "Suggest" for the ID, change the actor type to "Missile" and make sure it is based on "GenericAttackMissile."

First, we need to set this actor to the unit we just made. Under "Token" near the top, you will find "Unit Name." Double click the field next to it and find the unit we just made, "Energy Bolt Missile." Next, find "Art - Model" and change that to "Yamato Weapon." Find "Scale" and set X, Y, and Z to 2.0. This will make the model twice as big, and twice as scary. Now find "Combat - Death Effects +" and double click on the space next to it to open an "Object Values" window. Select "Normal" and change the following:

  • Death Effect - Under "Normal" set Model to "ConsumeImpactModel (Unnamed)."

Finally, double click on the space next to "Event - Events +" to open another "Object Values" window. Leave the existing "UnitBirth.EnergyBoltMissile" event alone, but select the grayed out "UniBirth" under it. It should read:

  • Msg Type: Unit Birth
  • Source Name: (Any)
  • Sub Name: (Any)

Now select the line under it that says "AnimBracketStart." Leave the "Target" blank, but change the "Msg Type" to "Animation Play." Now under the Parameters, change the following:

  • Name: Stand. To change the name, click "Customize" below to open a new window called "Animation Names." Type "Stand" into the "Add Name:" field and click the green X. Click "Ok" and "Stand" should now be selectable.
  • Animation Properties: Stand. You can select "Stand" from the first dropdown menu that appears below the parameters box.
  • Flags: Check the box next to "Play Forever."

Leave everything else as is and click "Ok." Congratulations, your unit is now finished. Go back to "Energy Bolt Launch" under "Effects" and set the "Unit - Ammo Unit" field to "Energy Bolt Missile."

Step 4 - Creating the Attack

While still in the actors tab, right-click in the left box and select "Add Object..." (or press Ctrl+=). Name this new actor "Energy Bolt Attack", click "Suggest" for the ID, change the actor type to "Action" and make sure it is based on "GenericAttackMissile." First, we need to set the Impact Effect and Launch Effect near the top (under "Token"):

  • Impact Effect - Set to "Energy Bolt Damage."
  • Launch Effect - Set to "Energy Bolt Launch."

Now find "Art - Missile" and double click on the space next to it to open an "Object Values" window. Next to "Type," click on the "Actor" button and use the dropdown menu below to find the "Energy Bolt Missile." Click "Ok."

Next we'll change the sound that plays when the missile is launched, so find "Combat - Launch Assets +" and double click on the space next to it to open another "Object Values" window. Click on the "Sound" tab and use the dropdown menu to find "Ghost_EMPAttackLaunch." Click "Ok."

Finally, find "Target - Impact Map +" and double click on the space next to it to open an "Object Values" window. Select "None" under the "Index" column. Click on the "Art" tab below the box and change the "Model" to "TerranLargeTriggeredExplosion (Unnamed)." Click "Ok" to close the window.

Step 5 - Creating the Ability

Select "Abilities" from the "Data Type" dropdown so we can finally create the ability. Right-click in the left box and select "Add Object..." (or press Ctrl+=). Name this new ability "Energy Bolt", click "Suggest" for the ID, change the ability type to "Effect - Target" and leave it based on "Default Ability (CAbilEffectTarget)."

First, find "Ability - Commands +" and double click the space next to it to open an "Object Values" window. Select "Execute" under commands, and then find "Default Button" near the bottom. Find the button we made, "Energy Bolt," on the dropdown menu and then click "Ok" to close the window.

Now go to "Cost - Cost+" and double click the space next to it to open a new "Object Values" window. Click the green X on the right to add a line to the box on the left. Select the new line in the box, and scroll down to "Cooldown." Set the value under "Time Use" or "Time Start" to whatever number you'd like for your cooldown. If you want this ability to require energy, you can scroll down to "Vitals" and change the value of "Energy" to whatever you want the cost to be. Click "Ok" to close the window.

Next, find the following:

  • Effect - Effect - Change this to "Energy Bolt Launch."
  • Stats - Cast Start Time - 0.50. This will make the cast time for the ability .5 seconds long. Extent this if you'd like it to take longer to cast the spell.
  • Stats - Range - 10. This is where you will set the range of the ability, obviously.

And you're done! Congratulations, you have a customized missile.

Missile Explodes Upon Hitting Anything

This tutorial is set up so that the missile will hit anything on it's path of fire. Missile includes details about the different types of missiles and what the different fields do, so if you want your missile to behave differently, check that out.

  1. Create an Ability of type "Effect - Target".
  2. Set the field "Ability - Commands +" to contain the ability's button (See this if you do not know how to do a custom button: Custom Button).
  3. Set the field "Cost - Cost +" to whatever you want the launch of the missile cost to the player.
  4. Set the field "Stats - Range" to the range the caster should be able to launch his missile.
  5. Create an Effect of type "Launch Missile".
  6. Set the field "Target - Impact Location +" to Target Unit/Point.
  7. Set the field "Unit - Ammo Unit" to whatever you want the missile to look like (for example: Weapon - Photo Cannon Weapon).
  8. To set the speed/acceleration of the missile, go into the Movers tab, find your Ammo Unit, and modify the "Motion Phases +" field to your likes. To set the size of the missile, find your Ammo Unit in the Actors tab and change the field "Art - Scale" to your likes.
  9. Create an Effect of type "Damage" and set the field "Combat - Amount" to the damage the missile should deal.
  10. Create an Effect of type "Set" and set the field "Effect - Effects" to contain your Damage type effect and the effect named "Suicide".
  11. Create an Effect of type "Search Area".
  12. Set the field "Search - Areas +" to contain, in the "Effect" sub-field, your Set type effect. You should also decide of the Collision Size of your missile (make it match with it's scale) by setting a number in the "Radius" sub-field (something between 0.25 and 0.75 is normally a good guess).
  13. Set the field "Search - Exclude +" to contain "Caster".
  14. Set the field "Search - Search Filters" to exclude "Player", "Invulnerable", "Missile" and "Self".
  15. Create a Behavior of type "Buff".
  16. Set the field "Stats - Period" to 0.01 (this number is arbitrary, you can decide to set your own number in there, but make sure you keep it low).
  17. Set the field "Effect - Effect - Periodic" to contain the Search type effect you've created.
  18. Go in the Unit tab and find your Unit Ammo.
  19. Set the field "Behavior - Behaviors +" to contain your Buff type Behavior.
  20. Set the field "UI - Minimap Radius" to 0.2 (or something along the proportion unit-missile your map has). By the way, this step is optional.
  21. Stay in the Unit tab and find the Caster unit.
  22. Set the field "Ability - Abilities +" to contain the Effect - Target type effect you've created.
  23. Set the field "Ability - Command Card +" to contain your Effect - Target type effect's Custom Button.