• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Increase damage every level

Status
Not open for further replies.
Level 6
Joined
Aug 4, 2012
Messages
193
how can i increase hero damage every damage? for example level 1 damage-1, level 2 damage-2, level 3 damage-3

i posted at the wrong place, please move this to Triggers & Scripts section
 
Level 12
Joined
Oct 16, 2010
Messages
680
you can set the base damage of the unit to 1-1 and set the primary attribute to 0

primary attribute will add x damage per point(you can set it in gameplay constants)
if your hero gains y primary attribute(set in object editor) per level
you can set x to 1/y
so if hero gains 2 points of str per level (which is his primary attribute)
then set x damage per primary attribute to 0,5

the effect will be what you wanted, hero gains 1 damage per level

or you can use damage engine , but that way the damage display won't fit to the actual damage
 
Level 6
Joined
Aug 4, 2012
Messages
193
can't i put extra damage while i already got attributes? for example my hero's primary attribute is strength then if the hero's strength too high, the hp regen of the hero would be fast too
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
how can i increase hero damage every damage? for example level 1 damage-1, level 2 damage-2, level 3 damage-3

i posted at the wrong place, please move this to Triggers & Scripts section

so if hero lv10 then +10 damage? easiest way if u use upgrades, then add upgrade in object editor to unit and when unit level uping then increase the upgrades level by 1.

at upgrades have more things too, just cant decrease the upgrades level but i guess u dont even need :D
 
Level 3
Joined
Nov 15, 2012
Messages
32
upgrades won't do you any good if you have 2 or more heroes per player

isn't creating an item based on tome with Item Permanent Damage Gain (Alaa) abilities instead the usual Str/Agi/Int Gain every time a hero leveled up much more simple?
this way you didn't have to create 1000 levels of upgrades if the level cap is 1000 no?
 
Level 6
Joined
Aug 4, 2012
Messages
193
really? then how to use? please explain in detail

i can't find this item? is it standard item? the raw code for this item=(Alaa)?
 
There is no item. You have to create one and put Item- Permanent Damage Gain as an Ability. You have to set the ability's damage bonus to 1, then Use this:
  • Damage
    • Events
      • Unit - A unit Gains a level
    • Conditions
    • Actions
      • For each (Integer A) from 1 to (Level of (Leveling Hero)), do (Actions)
        • Loop - Actions
          • Hero - Create Tome of Experience and give it to (Leveling Hero)
You can add any conditions here if you want it to be applied only to a player or player group.
 
Level 6
Joined
Aug 4, 2012
Messages
193
what if i want different heroes have different damage, for example hero A, 1 damage every level, hero B, 2 damage every level?

There is no item. You have to create one and put Item- Permanent Damage Gain as an Ability. You have to set the ability's damage bonus to 1, then Use this:
  • Damage
    • Events
      • Unit - A unit Gains a level
    • Conditions
    • Actions
      • For each (Integer A) from 1 to (Level of (Leveling Hero)), do (Actions)
        • Loop - Actions
          • Hero - Create Tome of Experience and give it to (Leveling Hero)
You can add any conditions here if you want it to be applied only to a player or player group.

it doesn't work, when i use this way, if my hero level is 500, then when i up 1 level, means 501, then my hero damage increased by 500/501
 
Last edited:
Level 6
Joined
Aug 4, 2012
Messages
193
the load system is set hero experience=xxxx, something like that, although you see the level is 100 for example, but the damage never change
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
On loading, you can use the integer-A loop to increase the damage of the hero.
So when he's level 100, you loop from 1 to 100 and add +1 damage every time.

Then you need a trigger without the A-loop that runs every time a hero levels. You just give the hero a tome and it's done.

To differentiate between hero types, you can use ITE's (If Then Else).
If type of hero = A or B or C, then +1 damage
else +2 damage.
 
Level 6
Joined
Aug 4, 2012
Messages
193
when i get to 101 level, not 200, is 202, since 1 is base damage, when i load, i got 101 damage, base damage (1)+100=101, if i get to 101 level, 101+101=202, that is not what i want
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
when i get to 101 level, not 200, is 202, since 1 is base damage, when i load, i got 101 damage, base damage (1)+100=101, if i get to 101 level, 101+101=202, that is not what i want
Loop from 2 to hero level ("Level 1" doesn't really count anyway, you don't level up to go to level 1).
So when you load, you get +100 damage (the same as the hero's level). Or +200 if you give +2-damage tomes (for other unit-types).
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
upgrade is useless and is not MUI.

upgarde is usefull, if u know how to use, else blizzard dont put it into game.
whatever that right, if u want dynamic system then it is bad ideea but if somebody dont want decrease dmg/hp etc amount then it is good.

kinda similiar like tome thing, useing tome abilities is ok until u need to use only few of them but when u need lets say 7k-8k hp then make a for loop and add 50*350/400 ability kinda bad ideea.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
A system similar to Bonus would be easy to use, completely MUI and can handle large integers.
The only problem is that it shows as "+ X" dmg (it's not included in the base damage).

I very quickly put together a demo-system for you to check out (see attached map), insipred by Earth-Fury's Bonus Mod.

You just create N abilities based on the item damage bonus (N is "2log (max damage)" (that's the same as "log (max damage) / log 2").
Example: if you want to be able to add up to 10 000 damage, you will need 13.3 -> 14 (always round up) abilities.
These will have the values 1, 2, 4, 8, 16, ... (powers of 2).

Add the functions in the header of the map to your map, set the variables in the "Initialization" trigger correctly, follow the comments in the "Set Damage"-trigger and you should be fine.
 

Attachments

  • Bonus Damage.w3x
    18.3 KB · Views: 41
Status
Not open for further replies.
Top