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

[Trigger] Spelll damage 300% of hero damage

Status
Not open for further replies.
Level 14
Joined
Aug 8, 2010
Messages
1,022
You sure that this RPG doesn't use GUI Damage Engine? -.-

It's really easy to use... i don't know why you don't want it.
You can actually improvise and calculate the damage - for example, you get the base damage of the hero (via object editor) you calculate how much damage the strength gives (in gameplay constants, strength gives damage, so when the hero gains level, it gains strength and with that, it gains damage) and finally you can calculate how much damage gives the primary stat of the hero (damage is gained not only by strength, but is gained by the primary stat of the hero aswell, intelligence for example). Then you store all this in a variable.

Example : You have a hero with 20 base damage, 13 strength (2 damage per strength point) and 7 intelligence (primary stat, 1 damage per int point)

So you set the variable equal to : 20 + (((Current strength of YourHero x 2)) + (Current intelligence of YourHero x 1)).

The damage of the spell is : 20 + 26 + 7 = 53. Then you can use the math function "In random number between X and X", and set that variable (53 in this case) to be lower/higher with a random number due to the object editor values "Damage - Sides per die" and "Damage - Roll dice".
 
Level 11
Joined
Nov 15, 2007
Messages
781
Example : You have a hero with 20 base damage, 13 strength (2 damage per strength point) and 7 intelligence (primary stat, 1 damage per int point)

Strength does not give damage unless it's the primary attribute of the hero, I have no idea where you're getting this.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I'm not saying it's impossible to do it...

But I'm assuming that the creator/triggerer of that map use a Damage Detection System to make it more simpler and easier

You're saying that you don't want to use the system but you said as if the Gais RPG didn't use that system as well (perhaps they did ?)

NOTE: Just use the system, it's not that complex, trust me.

Credits to Maker: GetUnitCurrentDamage
 
Level 14
Joined
Aug 8, 2010
Messages
1,022
Strength does not give damage unless it's the primary attribute of the hero, I have no idea where you're getting this.
Oh... i have mistaken this... i thought strength gives damage, not hit points per strength point. Nevermind, this makes it even easier - you have to set base damage in a variable, add the damage from the primary attribute to this variable, and finally, check if the unit has item that increases damage, if it has, then add XX damage to the damage variable. If the unit has a buff like inner fire, then set that variable to be equal to "DmgVar = (DmgVar + (DmgVar x (((Real(Level Of Inner Fire)) x 3)) / 100))". If DmgVar is equal to 30, the damage with the Inner Fire buff will be "30 + 30 x 4 (4 is the level of inner fire [for example]) x 3 (3 is the percent of damage given for each level of the spell) / 100", which is euqal to "30 + 3,6" = 34 damage (if we use round numbers)
 
Level 10
Joined
May 27, 2009
Messages
494
There are lots of possible things to do...
First is making all damage to be triggered.. so you can separate those damage from attack and damage from spells and the likes

Secondly, calculating a hero's damage through Damage Base, Number of Dice and Sides per dice (or die whatsoever)
Since wc3 gives random damage.. yeah it's hard to get the exact amount.. unless number of dice and sides are at a relatively close value
Well of course bonuses aren't included so you'll do a workaround for it.. like using the Bonus library or your own workaround

But if you want an easy way.. there isn't any.. since blizzard doesn't gave us full access to object data...
 
Level 17
Joined
Jul 17, 2011
Messages
1,864
YOU NEED A DAMAGE ENGINE TO DETECT THE HERO'S DAMAGE it can not be done otherwise because the hero can have damage bonuses from items not just from strenght or agility also there are damage bonuses from auras and some other damage modifiers Damage engine is not hard to understand, you do not need to touch anything in the system only some variables. maybe if you just try to read the documentation you can understand it then after you get the hero's damage you will simply use Unit - Damage area for the damage detected from the system.
 
Oh my fucking god. Entire day I am talking one same thing..........................I know to it must be done with gui damage engine, I just told you to do not talk me abbout it and to make me spell here. If u have only one half of one half of brain u should understand this. So all what I want is to stop mindless posts and to make me spell here
 
Level 17
Joined
Jul 17, 2011
Messages
1,864
well you can just use normal damage detection event but i still recommend using damage engine

  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Footman // this is your hero from which the damage comes
    • Actions
    • Set Unit = Attacking Unit
    • Set Unit2 = Attacked Unit
      • Trigger - Add to Untitled Trigger 002 <gen> the event (Unit - (Unit2) Takes damage)
  • //----------------------------------------------------------------------------------------------------------------------------
  • Untitled Trigger 002
    • Events
    • Conditions
    • Actions
  • Set real = Damage Taken
  • --------------------------------------------------------------------
  • Untitled Trigger 003
    • Events
  • Unit - A unit begins casting an ability
    • Conditions
    • Actions
  • Set Unit2 = target unit of ability being cast
  • Unit - Cause (Unit) to damage circular area after 0.00 seconds of radius 200.00 at (Position of (Unit2)), dealing real*3 damage of attack type Hero and damage type Hero
i put as little actions as possible :)
 
Last edited:
GUI damage engine is actually the easiest way to do this... I think it looks hard for you because you look at the core trigger, which is something that you shouldn't do... For normal users, what you only need to look at is the API of the system...

else wait until Cold Bone's system is finished with the upgrades... it will be really awesome for you...
 
Status
Not open for further replies.
Top