Developer's Blog
Old 06-18-2009, 06:27 PM   #1
Robzor
Member
 
Robzor's Avatar
 
Join Date: Jun 2009
Location: Stockholm, Sweden
Posts: 861
Robzor is offline

Default [Article] Dummy Units


Dummy Units

Introduction - What is a dummy unit?

There has been much talk about dummy units in mechanics, for a very long time. In some cases people have elaborated on what these units are, but there has never been a proper explanation.

Dummy units could be defined as "workers" and are created to perform actions within the map, most commonly casting spells or dealing damage. A dummy unit is a regular unit, just as any other unit on the map, like a Treant or a Ghoul. The major difference lies in the fact that the dummy units can't be seen, nor do you realize that they do a lot of work in the game just through looking at how the game behaves.

This article strives to share what defines a dummy unit and how they are used.

Common traits

These are the most common traits dummy units which are only produced to provide spell effects have, with obligatory exceptions.

Locust - [Aloc]
The Locust ability can be used for many purposes, however it is used on dummy units to remove the unit's pathing, health bar and the ability to select the dummy unit through clicking on the unit or dragging a selection box over the unit. It also provides invulnerability (meaning that the unit won't die from any regular damage).

The unit is controllable even with this ability, most notably by triggers.

As a point of trivia; Other effects granted by the Locust ability are a special "Locust AI" which is enforced when the unit is summoned by a Locust Swarm based ability, and bypassing sources of damage block.
Marker - [A04R]
For anyone not familiar with the Marker ability I recommend reading the Guide about Marker by protomanx1.

Basically this ability excludes dummy units from any triggered AoE spells which would affect the units if they did not have this ability.
Model and shadow removal
Normally a dummy would be seen if only the Locust and/or Marker ability had been added, in DotA this problem is solved through giving the dummy unit a "Line of Sight blocker" model, which basically means that the unit has no model (as LOS blockers don't have any). In addition the shadows are removed by setting the unit stat field unitShadow to none.
Movement Type: Flying
This field does not matter for the most common dummy units which are used to cast spells since they already have the Locust ability (which removes pathing) but it matters a lot for dummy units used to remove fog. Without flying movement type, the dummy units would not be able to reveal terrain as if they were at a higher altitude, nor would they be able to see past trees.
No allowed weapons
Normally dummy units would be able to attack enemy units, this is obviously not wanted as most dummy units are just used for casting spells. To prevent this most dummy units have their weaponsOn field set to 0, thus disabling all the unit's attacks.
No day/night vision
Sight range is completely removed for most dummy units to prevent them from creating patches of vision when they are created.
Removal of dummies
The death of a dummy unit is also important, since if they were not to be removed it would cause performance issues. Dummy units used to perform tasks in spells are given an expiration timer, this adds a set amount of timed life to the unit (commonly 20 seconds, but differs from dummy unit to dummy unit). When the timed life runs out the dummy unit suffers from a regular death which removes it from the game.

There is also the case where the unit is manually removed from the game through the RemoveUnit function, which instantly removes the unit from the game. This method is usually only applied to units which preload resources to be used later on.
Practical use

Dummy units are used to perform tasks for another unit, thus meaning that the unit supposed to be casting a spell doesn't have to do it, or to provide additional spell effects which can not be provided upon the initial cast by the base spell. The reasons are many; The unit can't keep up with the pace at which the spells needs to be casted, to not interrupt the unit's command chain, not having to add the ability directly to the unit, the spell won't be able to produce the desired effects if the unit casted the skill, the base skill can not place all the desired effects, and so on and on.

A prime example would be Midnight Pulse on Enigma; This spell wants to produce a "Death and Decay" (the original ladder spell name) effect without Enigma having to channel the spell himself. As seen in DotA Midnigh Pulse is not channeling while Death and Decay in ladder is. This is where the dummy unit comes in.

In this example Midnight Pulse refers to the spell which Enigma himself casts and Death and Decay refers to the actual effect casted at the location Enigma targeted.
  1. Enigma casts Midnight Pulse at a target location.
  2. A dummy unit is spawned.
  3. The dummy unit is given the Death and Decay ability.
  4. The dummy unit is ordered to cast Death and Decay at the target location.
  5. Death and Decay is being channeled by the dummy unit.
  6. Death takes its toll and the dummy unit dies.
This means that a spell which normally would have needed to be channeled by Enigma himself was channeled by a dummy unit instead. This means that Enigma can do whatever he wants to during the spell duration without having to cancel the Death and Decay effect at the target location.

This is what dummy units commonly are used for; Providing an effect from a spell which you do not want the unit itself to cast. Epicenter is another case where you see this, the slows on the enemies around Sand King are casted by several dummy units as to not have Sand King himself casting them, which would interrupt his commands every time a new slow would have needed to be cast, not to mention that Sand King's cast point does not allow him to do it at the required speed.

The common dummy unit

The generic dummy unit used for spells in DotA is [e00E] (labeled "IceFrog's slave" as an insider joke amongst mechanics) and is the most widely used dummy unit in the game, however this one is not always used as some spells want to provide things which [e00E] can't due to the unit stats input into the World Editor. As a rule of thumb [e00E] is always used when the desired effect only involves the dummy unit casting a spell at a target or target location.

Examples of other situations would be when the dummy unit needs the ability to attack (used for Corrosive Skin, dummy unit [o00S]) or the ability to provide sight range (used for Lightning Bolt, dummy unit [e000]), thus a big array of dummy units exists to fill the needs for certain spells.

There isn't much more to this part except for some quotes from the data dump to allow you a look at the stats of the dummy units I mentioned;

[e00E]


Quote:
Originally Posted by e00E
[e00E]
auto=_
abilList=A04R,Aloc
level=1
type=_
goldcost=60
goldRep=60
bountydice=1
bountysides=1
stockMax=3
stockRegen=30
HP=100
realHP=120
regenHP=0.5
regenType=night
manaN=1000
mana0=1000
defUp=2
defType=medium
bldtm=14
reptm=14
Primary=_
upgrades=_
tilesets=*
preventPlace=_
requirePlace=_
collision=16
race=nightelf
prio=1
threat=1
valid=1
death=3
cargoSize=1
movetp=fly
turnRate=0.6
propWin=60
formation=4
targType=ground
pathTex=_
points=100
buffType=_
canFlee=1
file=Doodads\Terrain\LOSBlocker\LOSBlocker
unitSound=Wisp
name=Custom_e00E
unitClass=EUnit01
blend=0.15
scale=1
scaleBull=1
maxPitch=25
maxRoll=25
elevRad=50
walk=200
run=200
weap1=_
weap2=_
teamColor=-1
armor=Ethereal
modelScale=1
red=255
green=255
blue=255
uberSplat=_
unitShadow=_
buildingShadow=_
shadowOnWater=1
acquire=900
launchZ=60
impactZ=60
weapType1=_
targs1=air,debris,ground,structure,ward
showUI1=1
rangeN1=900
RngBuff1=250
atkType1=normal
weapTp1=artillery
cool1=0.7
dice1=1
sides1=1
dmgplus1=1
splashTargs1=_
targCount1=1
weapType2=_
targs2=_
showUI2=1
atkType2=normal
weapTp2=_
splashTargs2=_
targCount2=1
Name="Spellcaster"
Tip=""
Hotkey=W
Ubertip=""
Art=ReplaceableTextures\CommandButtons\BTNShade.bl p
Buttonpos=0,0
Specialart=
Builds=
Missileart=Abilities\Weapons\AncientProtectorMissi le\AncientProtectorMissile.mdl
Missilearc=0.5
Missilespeed=500


[o00S]


Quote:
Originally Posted by o00S
[o00S]
auto=_
abilList=A04R,Aloc
level=2
type=_
goldcost=135
lumbercost=20
goldRep=135
lumberRep=20
bountydice=6
bountysides=3
bountyplus=20
stockMax=3
stockRegen=30
HP=60000
realHP=350
regenHP=0.25
regenType=always
defUp=2
defType=medium
spd=270
bldtm=22
reptm=22
Primary=_
upgrades=_
tilesets=*
preventPlace=_
requirePlace=_
collision=32
race=human
prio=2
threat=1
valid=1
deathType=3
death=2.1
cargoSize=1
movetp=foot
turnRate=0.6
propWin=60
orientInterp=5
formation=2
targType=ground
pathTex=_
points=100
buffType=_
canFlee=1
file=Doodads\Terrain\LOSBlocker\LOSBlocker
unitSound=HeadHunter
name=Custom_o00S
unitClass=OUnit05
blend=0.15
scale=1.1
scaleBull=1
maxPitch=10
maxRoll=10
elevRad=50
walk=240
run=240
weap1=_
weap2=_
teamColor=-1
armor=Flesh
modelScale=1
red=255
green=255
blue=255
uberSplat=_
unitShadow=_
buildingShadow=_
shadowW=140
shadowH=140
shadowX=60
shadowY=60
shadowOnWater=1
weapsOn=1
acquire=500
castbsw=0.51
launchX=-5
launchY=-34
launchZ=113
impactZ=60
weapType1=_
targs1=air,debris,ground,item,structure,ward
showUI1=1
rangeN1=9999
RngBuff1=250
atkType1=pierce
weapTp1=missile
cool1=5
dice1=1
sides1=1
mindmg1=23
avgdmg1=25
maxdmg1=27
dmgpt1=0.31
backSw1=0.86
splashTargs1=_
targCount1=1
weapType2=_
targs2=_
showUI2=1
atkType2=normal
weapTp2=_
splashTargs2=_
targCount2=1
Name="Corrosive Skin Attacker"
Tip=""
Hotkey=T
Ubertip=""
Art=ReplaceableTextures\PassiveButtons\PASBTNCorro siveBreath.blp
Buttonpos=1,0
Requires=
Specialart=Objects\Spawnmodels\Orc\OrcSmallDeathEx plode\OrcSmallDeathExplode.mdl
Missileart=
Missilearc=0.15
Missilespeed=9999
DependencyOr=otbk


[e000]


Quote:
Originally Posted by e000
[e000]
auto=_
abilList=A04R,ANtr
level=1
type=_
goldcost=60
goldRep=60
bountydice=5
bountysides=3
stockMax=3
stockRegen=30
HP=100
realHP=120
regenHP=0.5
regenType=night
manaN=100
mana0=100
defUp=2
defType=medium
spd=270
bldtm=14
reptm=14
sight=1000
nsight=750
Primary=_
upgrades=_
tilesets=*
preventPlace=_
requirePlace=_
collision=16
race=nightelf
prio=1
threat=1
valid=1
death=3
cargoSize=1
movetp=fly
moveHeight=1000
moveFloor=1000
turnRate=0.6
propWin=60
formation=4
targType=ground
pathTex=_
points=100
buffType=_
canFlee=1
file=Doodads\Terrain\LOSBlocker\LOSBlocker
unitSound=Wisp
name=Custom_e000
unitClass=EUnit01
blend=0.15
scale=1
scaleBull=1
maxPitch=25
maxRoll=25
elevRad=50
walk=200
run=200
weap1=_
weap2=_
teamColor=-1
armor=Ethereal
modelScale=1.5
red=255
green=255
blue=255
uberSplat=_
unitShadow=_
buildingShadow=_
shadowOnWater=1
acquire=900
castbsw=0.51
launchZ=60
impactZ=60
weapType1=_
targs1=air,debris,ground,structure,ward
showUI1=1
rangeN1=900
RngBuff1=250
atkType1=normal
weapTp1=artillery
cool1=0.7
dice1=1
sides1=1
dmgplus1=1
splashTargs1=_
targCount1=1
weapType2=_
targs2=_
showUI2=1
atkType2=normal
weapTp2=_
splashTargs2=_
targCount2=1
Name="Lightning Bolter"
Tip=""
Hotkey=W
Ubertip=""
Art=ReplaceableTextures\CommandButtons\BTNMonsoon. blp
Buttonpos=0,0
Specialart=
Builds=
Missileart=Abilities\Weapons\AncientProtectorMissi le\AncientProtectorMissile.mdl
Missilearc=0.5
Missilespeed=500


Last Words

I hope everyone who was not previously familiar with dummy units could learn something from this, any questions may be asked here and I will answer them. Feel free to suggest additions to the article if there's anything more you'd like to see and I'll see what I can do about it.
  Reply With Quote
Last edited by Robzor; 07-13-2009 at 04:43 PM.
Old 06-18-2009, 06:43 PM   #2
Nonok
Member
 
Nonok's Avatar
 
Join Date: Jun 2009
Location: Kansas
Posts: 168
Nonok is offline
Default

Great read. Learned a lot, although I don't know how useful it will be because I don't map.
  Reply With Quote
Old 06-18-2009, 06:45 PM   #3
Leq
Forum Staff
 
Leq's Avatar
 
Join Date: Jun 2009
Location: Brazil
Posts: 816
Blog Entries: 4
Send a message via MSN to Leq
Leq is offline
Default

Good Guide!
__________________

Feel free to PM me if you need help with something.
Quick Help FAQ
  Reply With Quote
Old 06-18-2009, 07:12 PM   #4
sheepdefiler
Member
 
sheepdefiler's Avatar
 
Join Date: Jun 2009
Location: Sioux City, Iowa
Posts: 63
sheepdefiler is offline
Default

So in earlier versions of Dota (not as of late) i was sometimes granted vision of certain parts of the map. Just temporarily like it was explored. Was this from a malfunctioning "dummy" or because of other reasons?
  Reply With Quote
Old 06-18-2009, 07:21 PM   #5
ImmolatusBurn
Forum Staff
 
ImmolatusBurn's Avatar
 
Join Date: May 2009
Location: Minnesota
Posts: 1,419
Blog Entries: 3
Send a message via AIM to ImmolatusBurn Send a message via MSN to ImmolatusBurn
ImmolatusBurn is offline
Default

Moved to Advanced Mechanics Guides.
__________________
  Reply With Quote
Old 06-18-2009, 07:23 PM   #6
Leq
Forum Staff
 
Leq's Avatar
 
Join Date: Jun 2009
Location: Brazil
Posts: 816
Blog Entries: 4
Send a message via MSN to Leq
Leq is offline
Default

Depend of how old was the map and what skill you used
__________________

Feel free to PM me if you need help with something.
Quick Help FAQ
  Reply With Quote
Old 06-18-2009, 09:07 PM   #7
sheepdefiler
Member
 
sheepdefiler's Avatar
 
Join Date: Jun 2009
Location: Sioux City, Iowa
Posts: 63
sheepdefiler is offline
Default

around 6.49

EDIT:

and just at the map start up. no skills used. Also seemed to be random times when rosh would become visible for no apparent reason
  Reply With Quote
Old 06-19-2009, 05:43 PM   #8
shamelessn00b
Member
 
shamelessn00b's Avatar
 
Join Date: Jun 2009
Location: The dark side of the moon
Posts: 80
Send a message via Skype™ to shamelessn00b
shamelessn00b is offline
Default

nice read
  Reply With Quote
Old 06-21-2009, 09:16 AM   #9
Trysaeder
Member
 
Trysaeder's Avatar
 
Join Date: Jun 2009
Posts: 333
Trysaeder is offline
Default

Finally! A thread where e00E receives some credit!
He does so much work in our games of dota, and no one knows that he exists. One of the biggest unsung heroes in dota. Should become the 94th hero but he is needed for other things.
Take a minute to thank e00E for making your games so much easier and fun!
__________________
Master of the Night
  Reply With Quote
Old 06-27-2009, 11:41 AM   #10
Rytthigar
Member
 
Rytthigar's Avatar
 
Join Date: Jun 2009
Location: Norway
Posts: 198
Rytthigar is offline
Default

Nice! Could you add a list of abilities that utilize dummies? Or maybe that's too much work >.<
__________________
  Reply With Quote
Old 06-27-2009, 12:54 PM   #11
Robzor
Member
 
Robzor's Avatar
 
Join Date: Jun 2009
Location: Stockholm, Sweden
Posts: 861
Robzor is offline
Default

Quote:
Originally Posted by Rytthigar View Post
Nice! Could you add a list of abilities that utilize dummies? Or maybe that's too much work >.<
Technically I could, it's just that there's so many of them that I refrained from it and rather picked a few examples since this only was meant to be an article.
  Reply With Quote
Old 06-29-2009, 09:48 PM   #12
gnaLor
Member
 
gnaLor's Avatar
 
Join Date: Jun 2009
Location: Bavaria
Posts: 835
gnaLor is offline
Default Re: [Article] Dummy Units

Quote:
(commonly 20 seconds, but differs from dummy unit to dummy unit)
Öhm sorry but the explanation time given to dummy units (those who cast ordinary, not changeling spells like bolt, sleep etc) is about 1-2 seconds, this is enough.
20 seconds only for dummies who are used in spells which have a 20 seconds trigger effect (dont think there is one in DotA.).
Sorry if I'm wrong but I see no reason for ever giving a dummy 20 seconds.
Also by adding the time by the [BTLF] ability (sry dont even know about it) doesn't seem senseful to me. Whats about using the function "add explanation timer"? Doesn't need an extra ability for every amount of time then.
Besides this, nice guide
  Reply With Quote
Old 06-29-2009, 11:03 PM   #13
Robzor
Member
 
Robzor's Avatar
 
Join Date: Jun 2009
Location: Stockholm, Sweden
Posts: 861
Robzor is offline
Default Re: [Article] Dummy Units

Quote:
Originally Posted by gnaLor View Post
Öhm sorry but the explanation time given to dummy units (those who cast ordinary, not changeling spells like bolt, sleep etc) is about 1-2 seconds, this is enough.
20 seconds only for dummies who are used in spells which have a 20 seconds trigger effect (dont think there is one in DotA.).
Sorry if I'm wrong but I see no reason for ever giving a dummy 20 seconds.
The generic e00E dummy unit has a timed life of 20 seconds.

Why? TUBES. THE INTERNET IS A SERIES OF TUBES. No wait...

The 20 second duration exists so that you will be able to track the dummy unit without constantly saving it in a global variable or through the gamecache. In fact there were issues with dummy units not having enough time in previous versions causing suicides to occur, I haven't bothered to check is this have been fixed already.

Quote:
Originally Posted by gnaLor View Post
Also by adding the time by the [BTLF] ability (sry dont even know about it) doesn't seem senseful to me. Whats about using the function "add explanation timer"? Doesn't need an extra ability for every amount of time then.
Besides this, nice guide
There is no need to add an ID to the timed life, but in DotA they are given [BLTF] and thus I wrote it down. Though I'll probably change that part a little, re-reading it makes me realize I could've made it more clear.
  Reply With Quote
Old 06-29-2009, 11:39 PM   #14
blaow
Member
 
blaow's Avatar
 
Join Date: Jun 2009
Posts: 772
blaow is offline
Default Re: [Article] Dummy Units

Nice Robzor, as always
  Reply With Quote
Old 06-30-2009, 08:42 AM   #15
Sophismata
Member
 
Join Date: Jun 2009
Posts: 36
Sophismata is offline
Default Re: [Article] Dummy Units

Quote:
Originally Posted by gnaLor View Post
Sorry if I'm wrong but I see no reason for ever giving a dummy 20 seconds.
I forgive you.

Quote:
Originally Posted by gnaLor View Post
Also by adding the time by the [BTLF] ability (sry dont even know about it) doesn't seem senseful to me. Whats about using the function "add explanation timer"? Doesn't need an extra ability for every amount of time then.
If you mean "add expiration timer", then they are (essentially) one and the same thing. By adding 'BTLF' to the unit, there is no need to call a function to add 'BTLF' to the unit.
  Reply With Quote
Old 06-30-2009, 09:00 AM   #16
Robzor
Member
 
Robzor's Avatar
 
Join Date: Jun 2009
Location: Stockholm, Sweden
Posts: 861
Robzor is offline
Default Re: [Article] Dummy Units

Quote:
Originally Posted by Sophismata View Post
If you mean "add expiration timer", then they are (essentially) one and the same thing. By adding 'BTLF' to the unit, there is no need to call a function to add 'BTLF' to the unit.
Though if you add an expiration timer through triggers the ability/buff ID is unimportant. ^^
  Reply With Quote
Old 07-11-2009, 06:10 PM   #17
king_james
Member
 
king_james's Avatar
 
Join Date: Jun 2009
Location: Makati City, Philippines
Posts: 4,153
Blog Entries: 6
king_james is offline
Default Re: [Article] Dummy Units

Nice Read, but i hardly understood most of the parts. I'm not really a WE programmer.
__________________
My pride and honor:
  Reply With Quote
Old 07-11-2009, 06:33 PM   #18
Foede
Forum Staff
 
Foede's Avatar
 
Join Date: Jun 2009
Location: Argentina
Posts: 10,249
Awesome 
Send a message via MSN to Foede Send a message via Skype™ to Foede
Foede is online now
Default Re: [Article] Dummy Units

I'm not a W3 programmer either, and yet managed to understand most of it :P What parts were the most confusing ones?
  Reply With Quote
Old 07-13-2009, 02:07 AM   #19
busterkomo
Member
 
busterkomo's Avatar
 
Join Date: Jun 2009
Posts: 18
busterkomo is offline
Default Re: [Article] Dummy Units

Quote:
Dummy units used to perform tasks in spells are given the [BTLF] ability, this adds a set amount of timed life to the unit (commonly 20 seconds, but differs from dummy unit to dummy unit).
That's not it at all. The units aren't given an ability. Using the UnitApplyTimedLife() native, units are set to die after a period of time (20 seconds is actually quite excessive, but it doesn't really matter).
__________________
If you have any questions regarding JASS, or Warcraft 3 modding in general, feel free to send me a private message.
  Reply With Quote
Last edited by busterkomo; 08-14-2010 at 11:30 PM.
Old 07-13-2009, 04:41 PM   #20
Robzor
Member
 
Robzor's Avatar
 
Join Date: Jun 2009
Location: Stockholm, Sweden
Posts: 861
Robzor is offline
Default Re: [Article] Dummy Units

Quote:
Originally Posted by busterkomo View Post
That's not it at all. The units aren't given an ability.
Indeed, that was bad phrasing from my part. Rewrote that part.
  Reply With Quote
Reply


Forum Jump


Tags
dummy, locust, marker
Thread Tools