Observations: none of the customs auto-start. Each custom overrides the tip area in the loading screen. I'm probably the only one, but starjewled was my favorite, closely followed by aiur chef.
I kind of feel like a design doc is just a spec. for the gameplay. Don't need that if you're on a small team. Also, people use all kind of game development strategies, there's isn't a set way to produce games the best way - it's an art. Personally, I invent game ideas that I think would be fun AND other people will like - no need for mutual exclusion. It's normal to refine gameplay, just like good software.
Ah, no conflict then. I'll be doing a tutorial on how to write bots that take the place of an actual player. I'm glad you linked that though so I won't do that type of tutorial also.
Tutorial writing complete. I plan to write more AI tutorials in the future. Next up I will probably do a tutorial on how to write 'bots' for MOBA games. If you have any questions or comments, please let me know what you thought of this tutorial.
This tutorial explains how to apply data behaviors to units that provide simple but useful AI. In this tutorial, basic data editing knowledge is assumed (intermediate level or advanced). We will re-create two example behaviors from my custom map:
Suicide Fire Elemental - Attack outward from the ability caster's facing.
Bovine Warp Trooper - Provides merc. support by following the caster around and attacking things.
Each unit is autonomous and does not allow player control.
Key points will be highlighted like this
Videos
Fire Elemental
Warp Trooper
Suicide Fire Elemental
The suicide fire elemental runs forward until it finds a close target to explode itself on. Follow the recipe below to recreate the elemental's running behavior:
1. New issue order effect - Fire Elemental Action - Attack
Set Ability - Ability = Attack
Set Effect - Player + = (None):Source
Set Target - Target + = (None):Target Unit/Point
Set Unit + = (None):Source
This causes the fire elemental to attack to some location depending on how it is called from other data entries.
2. New persistent effect - Fire Elemental Attack Forward
Set Effect - Period Count = 1
Set Effect - Period Durations = (0.0)
Set Periodic Effects = (Fire Elemental Action - Attack)
Set Periodic Offsets = { (0,-3,0) }
Set Target - Location + = (None):Source Unit
This causes the fire elemental to attack move three spaces forward from its current position.
3. New behavior - Fire Elemental Behavior
Set Stats - Flags - Hidden = true
Set Stats - Period - .5
Set Behavior - Category Permanent (optional)
Set Effect - Initial = Fire Elemental Attack Forward
Set Effect - Periodic = Fire Elemental Attack Forward
This behavior forces the fire elemental to continue attacking forward every .5 seconds.
4. New apply behavior effect - Fire Elemental Behavior Apply
Set Behavior - Behavior = Fire Elemental Behavior
This applies the attack move forward behavior.
5. New behavior based on Timed Life - Fire Elemental Timed Life
Set Stats - Duration = 7
Effect - Expire Effect = Fire Elemental Target Explosion <Your custom explosion effect as you see fit...>
This behavior causes the fire elemental to explode if it cannot find a target after a short duration.
6. New apply behavior effect - Fire Elemental Timed Life Apply
Set Behavior - Behavior = Fire Elemental Timed Life
7. New set effect - Fire Elemental Buffs
Set Effects - Effects = (Fire Elemental Behavior Apply, Fire Elemental Timed Life Apply)
This applies all the fire elemental buffs to a target unit.
8. New weapon - Fire Elemental Suicide Explode
Set Effect - Effect = <Your custom explosion effect as you see fit...>
Set Stats - Backswing = 0.0
Set Stats - Minimum scan range = 7
Set Random Delay Maximum = 0.0
Set Random Delay Minimum = 0.0
Set Stats - Range = 0.4
Set Weapon - Allowed Movement = Moving
Set Weapon - Target Filters as you see fit...
The weapon is incredibly important for the behavior because it dictates the distance your minion acquires a target. This is handled by the minimum scan range field.
9. New unit and actor - Fire Elemental Unit / Fire Elemental Actor
Duplicate the spectre unit from SC2, make copies of the unit entry and its actor. Change names to 'Fire Elemental'
Set Unit - Flags = Uncommandable, Invulnerable
Remove the spectre abilities in Ability - Abilities+ and Ability - Command Card
Set movement - speed = 4.4
Set combat - Weapon = Fire Elemental Suicide Explode
For the fire effects, I made some modifications to the actor (optional). I modified the tint color of the spectre to red with a increased HDR setting. In addtion, added a fire animation on top of the tint change. The final touch was to always make the spectre use the cover animation group so its gun would be holstered.
10. New create unit effect - Fire Elemental Create
Set Effect - Creation Options - Set Facing = TrueNote, all boxes are checked except facing by default
Set Effect - Effect - Spawn = (Fire Elemental Buffs)
Set Target - Location + = (None):Target Unit / Point
Set Unit - Spawn Owner + = (None):Caster
Set Unit - Spawn Unit = Fire Elemental
This creates the fire elemental and applies a set of behaviors to it. It also ensures the fire elemental will run in the same direction the caster was facing.
11. New persistent effect - Fire Elemental Init
Set Effect - Period Count = 1
Set Effect - Period Durations = (0.0)
Set Effect - Period Effects = (Fire Elemental Create Unit)
Set Effect - Periodic Offsets = { (0, -1, 0) }
Set Target - Location + = (None):Caster Unit/Point
This creates the fire elemental 1 space in front of the caster.
12. Create new button - Fire Elemental Button
Create button as you see fit...
13. Create new effect-target ability - Fire Elemental Ability
Set Effect - Effect - Fire Elemental Init
Set Stats - Range = (16)
Set cost / commands / cast time as you see fit...
Conclusion
Alternatively, you could have added the behaviors to the Initial Unit Behavior Field in the Unit Tab for the Fire Elemental Unit. The advantage here is that we created effects which are more flexible in their application. We could retool some of the effects here to be more generic for reuse. The overall effect is that a casting unit uses an ability called fire elemental. A unit is created 1 position in front of the caster which runs forward attack-moving. The weapon minimum scan range dictates the distance threshold that your fire elemental will track on to enemy units like a homing missile. The fire elemental has a timed life so that it expires after 7 seconds.
Bovine Warp Troopers
Bovines warp troopers follow the caster around the battle field like a hired merc. Follow the recipe below to recreate the merc. behavior:
1. New unit and actor - Bovine Warp Trooper
Duplicate the tauren marine unit from SC2, make copies of the unit entry and its actor. Change names to 'Bovine Warp Trooper'
Set Unit - Flags = Uncommandable
Set movement - speed = 3.5
I increased the movement speed to 3.5 so the unit will always catch up to the caster. You want it to be uncommandable since it is a mercenary AI. In addition, you can lower its pathing priority if you don't want it to get in the way of your main hero.
Set Effect - Target Location + = (None):Caster Unit
This method tells the tauren to attack move to a location on the caster's 'six'. Using random periodic offsets cause the tauren to shuffle around making things a bit more believable. Also note that the target location is the caster unit, while effects above issue orders to the source unit, which is the tauren.
4. Create new behavior - Warp Trooper Behavior
Set Behavior - Categories = Permanent (OPTIONAL)
Set Effect - Effect Initial = Warp Trooper Attack Forward
Set Effect - Effect Periodic = Warp Trooper Attack Forward
Set Stats - Flags: Hidden = True
Set Stats - Period = 1.0
This continually requests that the tauren follow the caster.
Set Target - Location + = (None):Caster Unit/Point
This effect spawns multiple warp troopers around the caster.
9. Create new effect-instant ability - Universal Warp Troopers
Set Effect - Effect - Warp Troopers Create
Set cost / commands / cast time as you see fit...
For the warp in/out effects, I used a behavior that prevents using abilities. An actor applies the warp animation and blue tint color while the warp behavior is active. I also added a custom weapon that is similar to a plasma rifle. These are just to make things pretty, it's not necessary for the tutorial.
Conclusion
Issuing attack move to a random location behind the caster creates a very believable mercenary effect that is easy to create and manage. The above behavior could be improved by added validators based on the distance to the caster. If the caster is too far away, the warp troopers could move instead of attack to the caster's position. Alternatively, they could warp to the caster's positions since they seem to have the technology.
I watched you guys play unit arena for like 15 min, then alt tabbed. 1 hour later it was still going! I think I saw diablo get summoned a few times. That map reminded me of all the sc1 maps I used to play.
check your actor links for your unit catelog. Something changed in the new patch for actor creation events. My map was creating a baneling everytime someone attacked.
Pretty sure there were undocumented ui text label changes. Some text boxes that fix text values before-hand are not quite largest enough. I think this was documented, but changing the color through triggers for ui labels works now.
My new map had a data problem in 1.2. Some actor events are behaving differently. I had a bug where everything turned into banelings due to a bad actor creation event.
How did you fix it? Everything in my map turns into banelings now.
Edit: 'Explain' link resolved this. Looks like an actor got a new event somehow, or the event is now handled differently. The actor was being created when someone attacked.
Just a general question, should we as SC2 mappers be able to make SC2 crash to the error reporter or lock up? Can concurrent operations cause this type of behavior? Been struggling with crashes / hangups in my SC2 mod power level overwhelming for about a month without any luck of fixing it.
0
Observations: none of the customs auto-start. Each custom overrides the tip area in the loading screen. I'm probably the only one, but starjewled was my favorite, closely followed by aiur chef.
0
Well they haven't even made a news post yet including twitter / facebook. Give them a little time.
0
I've been reading these were released. Can anyone confirm? I'm pretty interested here for new models / art to play with.
0
I kind of feel like a design doc is just a spec. for the gameplay. Don't need that if you're on a small team. Also, people use all kind of game development strategies, there's isn't a set way to produce games the best way - it's an art. Personally, I invent game ideas that I think would be fun AND other people will like - no need for mutual exclusion. It's normal to refine gameplay, just like good software.
0
I personally like less abilities, higher quality. Most abilities in PLO serve a unique purpose and change the heroes play style completely.
0
Add better trigger info to the game dump when it crashes. Also, fix the crashes. Trigger debugger can't look at record variables.
0
@zeldarules28: Go
Ah, no conflict then. I'll be doing a tutorial on how to write bots that take the place of an actual player. I'm glad you linked that though so I won't do that type of tutorial also.
0
Tutorial writing complete. I plan to write more AI tutorials in the future. Next up I will probably do a tutorial on how to write 'bots' for MOBA games. If you have any questions or comments, please let me know what you thought of this tutorial.
0
Introduction
This tutorial explains how to apply data behaviors to units that provide simple but useful AI. In this tutorial, basic data editing knowledge is assumed (intermediate level or advanced). We will re-create two example behaviors from my custom map:
Each unit is autonomous and does not allow player control.
Key points will be highlighted like this
Videos
Fire Elemental
Warp Trooper
Suicide Fire Elemental
The suicide fire elemental runs forward until it finds a close target to explode itself on. Follow the recipe below to recreate the elemental's running behavior:
1. New issue order effect - Fire Elemental Action - Attack
This causes the fire elemental to attack to some location depending on how it is called from other data entries.
2. New persistent effect - Fire Elemental Attack Forward
This causes the fire elemental to attack move three spaces forward from its current position.
3. New behavior - Fire Elemental Behavior
This behavior forces the fire elemental to continue attacking forward every .5 seconds.
4. New apply behavior effect - Fire Elemental Behavior Apply
This applies the attack move forward behavior.
5. New behavior based on Timed Life - Fire Elemental Timed Life
This behavior causes the fire elemental to explode if it cannot find a target after a short duration.
6. New apply behavior effect - Fire Elemental Timed Life Apply
7. New set effect - Fire Elemental Buffs
This applies all the fire elemental buffs to a target unit.
8. New weapon - Fire Elemental Suicide Explode
The weapon is incredibly important for the behavior because it dictates the distance your minion acquires a target. This is handled by the minimum scan range field.
9. New unit and actor - Fire Elemental Unit / Fire Elemental Actor
For the fire effects, I made some modifications to the actor (optional). I modified the tint color of the spectre to red with a increased HDR setting. In addtion, added a fire animation on top of the tint change. The final touch was to always make the spectre use the cover animation group so its gun would be holstered.
10. New create unit effect - Fire Elemental Create
This creates the fire elemental and applies a set of behaviors to it. It also ensures the fire elemental will run in the same direction the caster was facing.
11. New persistent effect - Fire Elemental Init
This creates the fire elemental 1 space in front of the caster.
12. Create new button - Fire Elemental Button
13. Create new effect-target ability - Fire Elemental Ability
Conclusion
Alternatively, you could have added the behaviors to the Initial Unit Behavior Field in the Unit Tab for the Fire Elemental Unit. The advantage here is that we created effects which are more flexible in their application. We could retool some of the effects here to be more generic for reuse. The overall effect is that a casting unit uses an ability called fire elemental. A unit is created 1 position in front of the caster which runs forward attack-moving. The weapon minimum scan range dictates the distance threshold that your fire elemental will track on to enemy units like a homing missile. The fire elemental has a timed life so that it expires after 7 seconds.
Bovine Warp Troopers
Bovines warp troopers follow the caster around the battle field like a hired merc. Follow the recipe below to recreate the merc. behavior:
1. New unit and actor - Bovine Warp Trooper
I increased the movement speed to 3.5 so the unit will always catch up to the caster. You want it to be uncommandable since it is a mercenary AI. In addition, you can lower its pathing priority if you don't want it to get in the way of your main hero.
2. Create issue order effect - Warp Trooper Action - Attack
This tells the tauren to attack move to a target location specified in the parent effect.
3. Create persistent effect - Warp Trooper Attack Forward
This method tells the tauren to attack move to a location on the caster's 'six'. Using random periodic offsets cause the tauren to shuffle around making things a bit more believable. Also note that the target location is the caster unit, while effects above issue orders to the source unit, which is the tauren.
4. Create new behavior - Warp Trooper Behavior
This continually requests that the tauren follow the caster.
5. Create new apply buff effect - Warp Trooper Apply Behavior
6. Create new set effect - Warp Trooper Buffs Set
The timed life effect in the video is optional and we already did an example of timed life above.
7. Create new create unit effect - Warp Troopers Create Unit
This spawns the warp trooper and applies a set of behaviors to it.
8. Create new persistent effect - Warp Troopers Create
This effect spawns multiple warp troopers around the caster.
9. Create new effect-instant ability - Universal Warp Troopers
For the warp in/out effects, I used a behavior that prevents using abilities. An actor applies the warp animation and blue tint color while the warp behavior is active. I also added a custom weapon that is similar to a plasma rifle. These are just to make things pretty, it's not necessary for the tutorial.
Conclusion
Issuing attack move to a random location behind the caster creates a very believable mercenary effect that is easy to create and manage. The above behavior could be improved by added validators based on the distance to the caster. If the caster is too far away, the warp troopers could move instead of attack to the caster's position. Alternatively, they could warp to the caster's positions since they seem to have the technology.
0
I watched you guys play unit arena for like 15 min, then alt tabbed. 1 hour later it was still going! I think I saw diablo get summoned a few times. That map reminded me of all the sc1 maps I used to play.
0
I refuse to believe they are that bad technically to make such a mistake. Maybe there are different credentials on the bnet team.
0
@BasharTeg: Go
check your actor links for your unit catelog. Something changed in the new patch for actor creation events. My map was creating a baneling everytime someone attacked.
0
Pretty sure there were undocumented ui text label changes. Some text boxes that fix text values before-hand are not quite largest enough. I think this was documented, but changing the color through triggers for ui labels works now.
My new map had a data problem in 1.2. Some actor events are behaving differently. I had a bug where everything turned into banelings due to a bad actor creation event.
0
@alderis: Go
How did you fix it? Everything in my map turns into banelings now.
Edit: 'Explain' link resolved this. Looks like an actor got a new event somehow, or the event is now handled differently. The actor was being created when someone attacked.
0
Just a general question, should we as SC2 mappers be able to make SC2 crash to the error reporter or lock up? Can concurrent operations cause this type of behavior? Been struggling with crashes / hangups in my SC2 mod power level overwhelming for about a month without any luck of fixing it.