• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Spell] Making custom shockwave and custom stampede with hero attribute as damage

Status
Not open for further replies.
Level 11
Joined
Jul 4, 2016
Messages
627
The easiest way I can think of is to make the shockwave and stampede a custom missile using chopstick’s missile system then you can specific the damage as much as you like.

AFAIK, the other option would be to use a damage engine. However, you can’t really specific the spell where the damage is coming from so utilizing damage engine would not be easy
 
Level 12
Joined
Feb 5, 2018
Messages
525
This is actually pretty simple to make with Damage Engine. If your map can only have one hero of the same type it's even easier.
1) Set shockwave/stampede damage to 1
2) Create a dummy unit in the object editor and then:
  • Shockwave
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (Unit-type of DamageEventSource) Equal to Dummy (Shockwave)
    • Actions
      • Unit - Cause DamageEventSource to damage DamageEventTarget, dealing ShockWave_Dmg damage of attack type Spells and damage type Magic
ShockWave_Dmg is a variable where you store the shockwave damage. You can combine the hero attribute bonus with base damage using the Arithmethic function.

If it is important that the Hero gets the kill credit you can either use hashtable or dynamic indexing. Hashtable should be good enough here.

EDIT: You can actually just order the Hero to deal the damage without the dummy unit at all. :D Just make sure the base damage is around 1-3 so it deals the small initial damage.
 
Level 24
Joined
Feb 9, 2009
Messages
1,787
Depending on what version you are using you can directly modify the spell cast's damage and update it to match the hero's stats.
  • example
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Carrion Swarm
    • Actions
      • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: (Ability being cast))'s Real Level Field: Damage ('Ucs1') of Level: ((Level of (Ability being cast) for (Triggering unit)) - 1) to (45.00 + (Real((Abs((Strength of (Triggering unit) (Include bonuses)))))))
Note
Ensure that the ability matches the stat you are trying to modify (example Ucs1 is carrion swarm's damage stat.)
Use carrion swarm instead of shockwave to avoid desync and just swap models.
 
Level 7
Joined
Mar 10, 2005
Messages
55
Thanks for all your help!
With Devaluts Trigger I don't need a damage engine and it works really nice. I can now modify the spells according to the heros stats. But I couldn't find the "Level of (Ability beeing cast for (Triggering Unit))"
Also works for the stampede damage if you look up the correct 4 digit string.
Just a little follow up question: With Carrion Swarm the damage dealt by the "shockwave" decreases after the first hit, is this changable?
 
Last edited:

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,724
Ability being cast is in the Function drop-down menu. It's the only Function you have available in this case.

Carrion Swarms damage shouldn't decrease after the first hit. You're making a mistake somewhere.

 

Attachments

  • ability.png
    ability.png
    224.5 KB · Views: 52

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,911
He shouldn't have to increase/decrease in this case. That issue seems to only happen with passive abilities.
I remember reading a post from you to increase and decrease level of bladestorm ability, from blademaster, because the OP said it wasn't working, that's why I would say it's better safe than sorry :p
Wc3 and its oddities.
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,724
I remember reading a post from you to increase and decrease level of bladestorm ability, from blademaster, because the OP said it wasn't working, that's why I would say it's better safe than sorry :p
Wc3 and its oddities.
Oh, I completely forgot about that... This game is just so inconsistent sometimes it's hard be certain about anything. I know I had the Shockwave ability working without the need of inc/dec but I guess it really comes down to the specific behavior of the ability. Anyway, like you said, better safe than sorry.

I wonder if using the "A unit begins casting an ability" Event would fix most of these issues as it would update the stats prior to the ability firing.
 

osh

osh

Level 2
Joined
Dec 8, 2021
Messages
10
Depending on what version you are using you can directly modify the spell cast's damage and update it to match the hero's stats.
  • example
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Carrion Swarm
    • Actions
      • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: (Ability being cast))'s Real Level Field: Damage ('Ucs1') of Level: ((Level of (Ability being cast) for (Triggering unit)) - 1) to (45.00 + (Real((Abs((Strength of (Triggering unit) (Include bonuses)))))))
Note
Ensure that the ability matches the stat you are trying to modify (example Ucs1 is carrion swarm's damage stat.)
Use carrion swarm instead of shockwave to avoid desync and just swap models.
I would just like to know what version of world editor you guys are using. I can't seem to find the Action "Set Ability" in mine so i came here to ask.
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,724
I would just like to know what version of world editor you guys are using. I can't seem to find the Action "Set Ability" in mine so i came here to ask.
You need to use 1.31+ to get access to this function as well as a lot of other powerful functions. Also, you get access to Lua as a scripting language which is far superior to Jass.
 
Status
Not open for further replies.
Top