• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

What is the principle of a Mjollnir dota?

Level 4
Joined
Apr 16, 2025
Messages
61
How does mjollnir work in dota? (We're talking about lightning triggering with some chance when you're attacked.)
Does it really create a dummy unit every time it's activated that hits the attacker with chain lightning? Or is there something better, like a lightning sphere that triggers when you're attacked?
 
Last edited:

Uncle

Warcraft Moderator
Level 74
Joined
Aug 10, 2018
Messages
7,956
You can use the Orb of Lightning ability and have it cast Chain Lightning instead of Purge. Just remember that this is an Orb effect which has stacking issues.

Otherwise, you can use a Damage Event and trigger it yourself. How you trigger it is up to you:
1) You can use a Dummy unit that casts Chain Lightning.
2) You can trigger the effects of Chain Lightning yourself and avoid using a Dummy unit.

The perks of triggering everything yourself means that you can make the Caster the source of the damage and get proper kill/damage credit. It also opens up the door to other unique effects (apply a buff, deal bonus damage equal to attribute, etc).

I believe it's NOT an Orb effect in DotA 1, but I haven't played in years and I'm more familiar with DotA 2 so I might be mixing the two up. Assuming I'm correct, that would mean they triggered it and avoided using an Orb ability.

EDIT:
I misread and thought you were talking about the hero's own passive Chain Lightning proc. Also, I recall Mjolnir's ability casting Forked Lightning, but that doesn't change anything important.

Anyway, the answer you're looking: Mjolnir's activated ability is triggered using a Damage Event or an "Is Attacked" Event. I would assume the more recent versions of DotA 1 use a Damage Event since that can't be abused to proc more often than it should. It's actual lightning effects could be handled using the above mentioned #1 or #2, but I would assume that they went with #2.

A unit takes damage -> Damage source has Mjolnir buff -> Roll some dice -> If successful then cast Forked Lightning on Damage target.
 
Last edited:
Level 4
Joined
Apr 16, 2025
Messages
61
You can use the Orb of Lightning ability and have it cast Chain Lightning instead of Purge. Just remember that this is an Orb effect which has stacking issues.

Otherwise, you can use a Damage Event and trigger it yourself. How you trigger it is up to you:
1) You can use a Dummy unit that casts Chain Lightning.
2) You can trigger the effects of Chain Lightning yourself and avoid using a Dummy unit.

The perks of triggering everything yourself means that you can make the Caster the source of the damage and get proper kill/damage credit. It also opens up the door to other unique effects (apply a buff, deal bonus damage equal to attribute, etc).

I believe it's NOT an Orb effect in DotA 1, but I haven't played in years and I'm more familiar with DotA 2 so I might be mixing the two up. Assuming I'm correct, that would mean they triggered it and avoided using an Orb ability.

EDIT:
I misread and thought you were talking about the hero's own passive Chain Lightning proc. Also, I recall Mjolnir's ability casting Forked Lightning, but that doesn't change anything important.

Anyway, the answer you're looking: Mjolnir's activated ability is triggered using a Damage Event or an "Is Attacked" Event. I would assume the more recent versions of DotA 1 use a Damage Event since that can't be abused to proc more often than it should. It's actual lightning effects could be handled using the above mentioned #1 or #2, but I would assume that they went with #2.

A unit takes damage -> Damage source has Mjolnir buff -> Roll some dice -> If successful then cast Forked Lightning on Damage target.
I have already found a system that solves the problem of the lightning sphere. The whole point here is that it will work during my attack, and I need the lightning to hit the enemies attacking me. That is, if I am surrounded, for example, then the lightning flies constantly.

In Dota 2, the same principle is used when activating the hammer on yourself, by the way.

"If successful then cast Forked Lightning on Damage target." And how to use it? Through a dummy unit? It's just pretty low-tech, it turns out... If I'm attacked by 100 units, the fps will drop. The creation of dummy units is not optimized...

I find it hard to believe that the creator of Dota also resorts to dummy units when activating this item. Although... Who knows.
 

Uncle

Warcraft Moderator
Level 74
Joined
Aug 10, 2018
Messages
7,956
I have already found a system that solves the problem of the lightning sphere. The whole point here is that it will work during my attack, and I need the lightning to hit the enemies attacking me. That is, if I am surrounded, for example, then the lightning flies constantly.
Not too sure what you mean exactly, but I answered how to do the "chain lightning passive attack" and the "forked lightning buff effect" that Mjolnir provides.

"If successful then cast Forked Lightning on Damage target." And how to use it? Through a dummy unit? It's just pretty low-tech, it turns out...
Like I said before, you can use a Dummy unit OR you can trigger everything yourself.

Just about any ability that exists in Warcraft 3 can be recreated from scratch using triggers. But if you want to interact with the core mechanics of the game (Buffs for example) then you will want to rely on a hybrid approach, which implies using Dummy units. The engine is optimized in a way that it's often better to use what it provides instead of your own custom solutions. In other words, work with the engine, not against it.

Unfortunately, there's no Action like this to simplify the process:
  • Ability - Cast a (Level 1) Chain Lightning from (Damage source) on (Damage target)

If I'm attacked by 100 units, the fps will drop. The creation of dummy units is not optimized...
The FPS will definitely drop if the ability procs too often, but that's mostly because of the Art being rendered (lots of Lightning effects). At least that's what I've noticed from experience. A screen full of Special Effects really hurts the FPS (or Unit models - same thing).

But if you're looking to optimize things then Dummy units can be recycled -> Dummy Recycler v1.25
I'd be surprised if modern DotA 1 doesn't use something like this.
 
Last edited:
Level 4
Joined
Apr 16, 2025
Messages
61
Not too sure what you mean exactly, but I answered how to do the "chain lightning passive attack" and the "forked lightning buff effect" that Mjolnir provides.


Like I said before, you can use a Dummy unit OR you can trigger everything yourself.

Just about any ability that exists in Warcraft 3 can be recreated from scratch using triggers. But if you want to interact with the core mechanics of the game (Buffs for example) then you will want to rely on a hybrid approach, which implies using Dummy units. The engine is often optimized in a way that it's better to use what it provides over your own custom solutions.

Unfortunately, there's no Action like this to simplify the process:
  • Ability - Cast a (Level 1) Chain Lightning from (Damage source) on (Damage target)


The FPS will drop if the ability procs too often mostly because of the Art being rendered (lots of Lightning effects).

But if you're looking to optimize things then Dummy units can be recycled -> Dummy Recycler v1.25
I'd be surprised if modern DotA 1 doesn't use something like this.
Thanks for the answers and tips.

As for the system that fixes the lightning sphere triggering (for example, when you are standing and you are attacked, so that the sphere is heated), you can find the answer here (opens in the editor) Xnd Hero Siege 1.51 (bug fix folder)
 
Top