• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Abilities turned into passives

Status
Not open for further replies.
Level 12
Joined
Jun 20, 2017
Messages
959
Basically I've come up with a way to turn almost any ability into a passive ability with a percentage chance of firing, it requires a dummy ability with an icon "Electrostatic Discharge" in this case, the real ability hidden at the 0, -11 position, and a trigger which is below, basically depending on how rare or frequent you want the ability to fire, you replace the random integer (for 50%, it would be a random number between 1 and 2, for 33%, it would be a random number between 1 and 3...etc.) In this case the fan of knives ability is the real ability and its been modified and costs no mana...

What do you guys think? With a little tweaking you could make any ability into a passive like this

  • Strike
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Electrostatic Discharge for (Attacking unit)) Equal to 1
    • Actions
      • Set ELDI = (Random integer number between 1 and 5)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ELDI Equal to 1
        • Then - Actions
          • Unit - Order (Attacking unit) to Night Elf Warden - Fan Of Knives
        • Else - Actions
          • Do nothing

i
 
Level 8
Joined
Mar 19, 2017
Messages
248
Will only work for abilities that don't use the casting time, like precisely Fan of Knives, otherwise the unit will attempt to cast the skill on proc, resulting on it making the animation, the pause for casting, etc, and will work similarly like Borrowed Time Dota ability. On this case why hidding the skill and treating it as (a very inconvenient) passive?
Also, you can't have multiple passive skills like this, because of order colliding, ie. 2 passives like using a modified Fan of Knives (on this case i think both passives will "trigger" as Fan of Knives doesn't have a casting time, but on any case, some unwanted shit will happen).
All of this problems could be assessed by setting the base casting point of the implicated unit to 0.0 though, allowing you to use Roar or other skills as base passives, ie. an on attack skill that makes the attacked unit gain 5 armor for 10 seconds (again, with a 0 cast time Roar).
It still works, and you could use Fan of Knives, and maybe tweaking the skill itself, ie. if you set the damage to a negative value and setting allies as eligible targets, making it a passive aoe heal.

Another possibility (1.30 versions), to increase the elegancy and features of your concept could be doing this:
1. Fan of Knives ("active skill") must simply be hidden at the start (with an unit indexer, or you hide it manually when ie. the unit is trained) using BlzUnitHideAbility instead of using the X/Y position approach.
2. When the passive procs, you hide the dummy passive skill, unhide the active skill, and add the unit to a system with a periodic timer (or using a timer for each unit using some index).
3. Regarding the callback of the timer, the only comparisson you will be using is noting if the current cooldown of the active skill of the unit is 0 (using the not so new at this point BlzGetUnitAbilityCooldownRemaining). If true, then you clear the unit from the system (or pause its timer), and unhide the passive skill while hiding the active skill. Depending on the timeout of the timer (it should be like 1/(24+)) this system allows to dinamically end the passive cooldown itself.

Lots of people had recquested a passive skill with cooldown + UI showing, well, this can do that and it adds to the Spell Block Amulet approach.
 
Level 39
Joined
Feb 27, 2007
Messages
5,019
First, "unit is attacked" is and always will be a bad event to use because of its ability to be exploited into firing many times without an attack actually occurring. That right there is a good reason never to use this.

Second, I'm going to reiterate what @disruptive_ said about it only working for instant cast non-order-interrupting abilities, or requiring both cast backswing and cast point set to 0 on the casting unit. This can make the unit animations for spell casts look, well, bad because they will effectively be out of sync with the visuals. Sometimes having cast animations makes the abilities feel more real, and with both zeroed out any normal skills the unit will cast won't be properly animated. This is mostly a developer choice, not a gameplay limitation; it can also be solved by using a dummy unit to cast the spells, not the main unit itself.

Third, if the spell you want to cast is unit or point targeted and the caster has to turn to face the target, there will always be a delay before casting. Only under specific conditions can units turn to face a point instantly and cast a spell/execute an order; otherwise all turning is capped by the game at its maximum turn rate. Even with backswing/cast point = 0 there will be a delay if the unit has to turn around to use Death Coil on a target behind it.

Lots of people had recquested a passive skill with cooldown + UI showing, well, this can do that and it adds to the Spell Block Amulet approach.
Using Exhume Corpses for this works very well and has a great tutorial to explain it: Passive ability with cooldown - Best method!. IMO there really doesn't need to be a better solution than that.
 
Level 12
Joined
May 22, 2015
Messages
1,051
I found a sort of way to do this a long time ago (I used it while I didn't know how to make use of dummy units). Basically, I just give an item that auto-casts on pickup (like tome of knowledge, for example, but the spell is war stomp).

It worked (doesn't interrupt the hero) but it won't work on units that have no inventory and items leak if you don't truly delete them (test with tomes - there is a pixel left behind after you get them that never goes away - that is the item lingering for eternity lol).

Really, the best way is to just spawn an invisible dummy unit and have that unit cast the spell. I used the model called "bugger" or something like that initially. Now I use vexorian's dummy model which has some extra capabilities but is basically just an invisible model to attach spell effects to.
 
Status
Not open for further replies.
Top