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

Hero attributes real/integer

Status
Not open for further replies.
I have been wondering for some time how hero attributes should be seen.

In the object manager they are seen as reals.
Fx. A unit can have 1.5 Strength and each level it can also gain a fraction of a number.
But when used in triggers as well as attribute increasing items the attributes are seen as integers.

So what are they, and why are they reals one place but integers the other?
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
They are saved as real, but when they are used in game they are rounded down as death adder said.

They saved as real so a hero can gain for example 1.5 str per level.
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
No, that's not the case. It's like Ceday and Death Adder wrote.
You can easily check this yourself in the world editor - e.g. paladin hero gains 2.7 strength per level and starts with 22 strenght and 650 hp.
Level 2 - he has 24 strength, 700 health
Level 3 - he has 27 strength, 775 health
He gains 25 hp bonus per strength point only. There's no in-between.
 
Status
Not open for further replies.
Top