Difference between Hardcoded & Triggered spells

Posted: February 7, 2010 in Advanced Mechanics

Just wanted to share this insightful article by Robzor @ dota-allstars.com. (for DotA Mechanic lovers)

The Warcraft 3 World Editor contains a set of spells which are referred to as Hardcoded Spells, these were produced by Blizzard and are used in the campaign as well as ladder games. These are your typical Storm Bolt/Carrion Swarm/Shockwave/Hex/etc spells.

The problem with these spells is that they are not highly customizable, each and every only contains a few ability specific data fields which allow you to alter things such as AoE, cast range, stun duration, damage and cooldown. Most of the ability, and the mechanics behind it, can not be altered through making these simple changes within the World Editor. This is where the triggers come in. The World Editor also comes with the ability to trigger spells, either through GUI or a programming language called JASS. This is an event based system which performs specified actions specified by the map maker, the action could be anything such as giving a unit experience, removing a unit from the game, creating a new unit, make unit X damage unit Y for Z damage or removing fog of war.

As I said these triggers, or functions, runs when a special event occurs, a great example being if a specific Storm Bolt ability is being cast then you also want to slow the target unit; The Storm Bolt is casted and you now want to apply a slow, which the hardcoded Storm Bolt ability can not do. In order to be able to slow the target you now want to create a dummy unit which has a Slow ability, then when the Storm Bolt is cast you create this dummy unit which is ordered to cast Slow on the target. This makes it seem, to the average user, as if the unit was stunned, damaged and slowed by the spell cast.

What’s important to remember is that not all triggers need dummy units to work as they are intended to, it completely depends on the nature of the spell you want to produce; Starfall makes use of no dummy units, it just adds all units within a 600 range of Priestess of the Moon to a group and decides that Mirana shall damage all of these units for 75/150/225/300 damage. No dummy units used, goal achieved.

So, the few things to keep in mind;

  • Hardcoded abilities are always produced by Blizzard. This also means that the spell is less likely to malfunction, but if it does malfunction in any way the chance that you will be able to fix the error on your own is close to nil unless you find a triggered workaround.
  • Triggers do not necessarily make use of dummy units, but sometimes it is required to complete the task at hand.
  • Triggers are in some cases very limited, they can not achieve everything we would like them to due to limitations within the JASS coding.
  • Even though I said that there are two ways to produce triggers (GUI/JASS) the superior one in all cases is JASS, although it is harder to learn unless you’re familiar with programming.

That should cover everything you need to know about the basics as to distinguish what defines a triggered ability from those hardcoded ones made by Blizzard.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s