• 🏆 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!

How do I make Stat scaling damage?

Status
Not open for further replies.
Level 2
Joined
Nov 25, 2014
Messages
16
Hello, I cant seem to figure out how to do it and all the maps that I have which have it in them are protected.

I'd need to make some attacks do 3-10 times heroes primary stat or primary and secondary stat in damage. How would I go about this?
 
Level 6
Joined
Nov 24, 2012
Messages
218
You would use a custom damage system. I haven't touched triggers in so long but back in my day I used Weep's because it was super simple to understand and use, and because it was GUI. Here it is http://www.hiveworkshop.com/forums/spells-569/gui-friendly-damage-detection-v1-2-1-a-149098/ . What it does is let you have an Event : A unit takes damage (including 0), pretty much. Also let's you modify this incoming damage. So how to exploit the possibilities of this? Well, now you can shoot a 0 damage shockwave and use this trigger to detect the "0" damage it does and modify it to do something like 5X INT damage.

Bribe's is most popular for GUI at least back in my day: http://www.hiveworkshop.com/forums/spells-569/gui-damage-engine-v2-2-1-0-a-201016/ . It's not as simple and quick but the functionality and efficiency is greater. It's still very simple to use once you get the hang of it. I haven't tried this but it is better recommended I hear. My explanation below is based on Weep's system though.

For these two systems, to code a spell doing damage based on stat, you either 1) code the damage with the deal damage line (so like, your own custom spell), which means you don't need any damage system at all. Or if you plan using a wc3 spell do damage based on stats like Shockwave for example, then you do need damage system and you do 2) create a dummy unit at your caster location when unit cast the spell (if you don't know what that is, refer to here - a dummy unit is a unit with no model file with "locust" ability to become unclickable, so basically an undetectable unit that can cast the shockwave for u. The hero's shockwave spell will be a spell that does nothing except show icon, tooltip, cast range, mana cost.. -- usually based on "channel" ability). Now you order this dummy unit to cast the actual shockwave instead of your main hero and it will look like its coming from ur hero (make sure this shockwave is set to 0 damage). then you have a new trigger - event: detect damage (these systems can detect 0 dmg), with condition that it is this specific dummy unit. Then you set the damage to casting hero stat (which u save in integer variable). So in total you have 2 triggers, one to detect the spell casting which create the dummy to tell it to cast shockwave, and one to detect the 0 damage it does to modify it based on hero stat. Now why this roundabout method and not just have hero cast? Well, you would have to use cokemonkey's Damage system if you want to get around this since it can detect physical vs spell damage based on "runed bracers" skill but it's much more complicated and not worth your trouble for a beginner. Basically the dummy has to cast it because this lets you differentiate from hero physical damage and spell damage if you catch my drift. You know that all damage this dummy does is due to shockwave spell damage. If I lost you anywhere in this pile of text, please tell me :), good luck. -- So I personally recommend the first system - Weep's -- is easy to implement and simple. Poor functionalities but it's a great place to start!

And if you feel comfortable with triggers or perhaps sometime in the future take a look at this: it is still simple to use and has more functionality and it's really neat - http://www.hiveworkshop.com/forums/spells-569/gui-damage-modification-system-1-01-a-227662/
 
Level 2
Joined
Nov 25, 2014
Messages
16
I'm planning on using the Triggers for damage not the actual spells. Do I still need to get a damage GUI?
 
Level 6
Joined
Nov 24, 2012
Messages
218
Not sure on your wording there but just to be clear:
You only need a damage system for making standard WC3 spells that are normally based on constant values become based on Hero Stats (Chain Lightning / War Stomp / Shockwave / ETC). So yes if you want to use any WC3 ability then you need it.

If your spells are custom triggered, then it is very simple to deal damage based on hero stat. Inside your triggered spell, wherever you have the deal damage line, use something like this: http://www.hiveworkshop.com/forums/...e-based-hero-damage-stats-202142/#post1989506

Edit: Here are some of my previous posts with people asking similar things: http://www.hiveworkshop.com/forums/world-editor-help-zone-98/stat-based-spell-232633/#post2316175 - Follow it and you will get to a demo map.
 
Level 23
Joined
Oct 20, 2012
Messages
3,075
I'm planning on using the Triggers for damage not the actual spells. Do I still need to get a damage GUI?

I believe you're saying that you're planning on triggering your unit's attack damage instead of spell damage right? Hesitant Snow's suggestion still applies whether you're talking about attack damage or spell damage. Damage detection systems can detect when a unit is damage and THEN you can modify his attack damage. Using his stats as damage scaler isn't much of a problem but determining which stat is the hero's primary would require a bit more work. There are a lot of damage detection systems, mainly the two mentioned by Hesitant Snow and this recently made one.
 
Level 6
Joined
Nov 24, 2012
Messages
218
Oh I get it. If you want normal attacks to be based on Hero Stat or deal bonus damage based on Hero Stat or whatever just follow that above post. That system can detect if damage source is physical or spell by Runed Bracers ability method which is really neat. The major pro to this is you don't have to go about creating dummy units for all spells to differentiate between physical/spell damage (with my older method the differentiation works like: damage from unit = physical , damage from dummy = spell). So if you follow Green's post and use that system, you can do your hero stat scaling with much more ease. You'll be able to make physical attacks deal damage based on stat or even wc3 spells based on stat without the need for all those dummy units and such.
It might still seem like a lot of work to implement the system and everything but if you're planning on continuing mapmaking its 100% worth it.
 
Status
Not open for further replies.
Top