[Trigger] Creating non-leak abilities

Level 7
Joined
Feb 22, 2009
Messages
260
It came to my notice recently that Warstomp, Thunderclap, Shockwave and Earthquake causes perma tiny leaks.

Is there any spell pack or ways to recreate these spells without causing leak through terrain deformation?

I wish to make the spells fully functional with melee maps.

Some of the issues I encountered:
  • Applying the slow and stun effect without triggering the spell shield ability (dummy stormbolt, therefore, can not be used since it triggers spell shield) -- This is important because a few new units I added to the map has the ability to cast spell shield to block single-target spells one time so alternative Thunderclap and warstomp should not trigger them.
  • Applying the slow and stun effect regardless of enemy units' visibility
  • Applying the slow and stun effect correctly with the damage -- I once tried to use aura as a way to apply the slow but the area effect of the aura take collision size into consideration, meanwhile the trigger function I used to apply the dmg does not so it created bug where the units are slowed but not damaged
  • The stun and slow debuff should not be dispellable
  • Whatever applies the slow effect should not have stacking issues with other spells -- There was a suggestion to use acid bomb to apply the slow effect but since acid bomb can not stack with itself, this alternative thunderclap causes non-stacking issue with the default acid bomb.
 
Level 29
Joined
Sep 26, 2009
Messages
2,594
Is it even worth trying to solve?
Let's say that a single cast of shockwave creates 20 of those leaks. Let's say that each leak would take 500B memory. So we're looking at 10KB memory leak per cast. How many times do you cast Shockwave over the course of the entire game? You would need to cast it 100 times so that it would take you additional 1 MB of your RAM.
And that is assuming that Shockwave would even create so many leaks per cast and that each leak would take that much memory. In reality it will most likely be much smaller.

I am all for making map as leakless as possible, but this sounds like a premature optimization. You will import/write lots of script to imitate some spells in order to avoid leaks that may very well have no impact on your gameplay whatsoever.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
What Nichilus said, and to put it into perspective, Warcraft 3 came out in 2002. The average user's pc back then had what, 512mb of ram? Yet the game worked fine as far I can recall, I don't remember having issues because of deformations and my computer was some old Dell that we had for many years. Fast forward to today and we're rocking 16gb minimum, you'd have to generate millions of these for it to even show up on the radar.
 
Last edited:
Level 7
Joined
Feb 22, 2009
Messages
260
Applying the slow and stun effect without triggering the spell shield ability (dummy stormbolt, therefore, can not be used since it triggers spell shield) -- This is important because a few new units I added to the map has the ability to cast spell shield to block single-target spells one time so alternative Thunderclap and warstomp should not trigger them
You can use storm bolt or slow on enemy player side instead, or create 1 more player that allied with the enemy or you so they can see invisible unit without true sight.


It would trigger the spell shield
 
Top