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

AttackTypes and DamageTypes, GetUnitAttackType

Status
Not open for further replies.
Hello,

I am not that familiar on Wc3 Mechanics but let me ask, how does DAMAGE_TYPE affects the autoattack damage outcome to a unit? also what about WEAPON_TYPE? The only part of the damage outcome I understand is that it is affected by Attack Value then Attack Type then Armor Type then Armor Value. I can't seem to figure out at what part this two comes.

I am also planning to make a GetUnitAttackType lib that's why I asked this question so that I would be more cautious in the making of this lib.

My proposal is that When GetUnitAttackType is called, it will check for the unit-type id of the given unit and searches for it's attack type. If nothing is found, the function will then create 2 dummies, the one with the same unit-type of the given unit and the other is the damage receiver. The dummy of the same unit-type will then deal damage towards receiver, which will then fire LFH's Physical DD. With the combination of an Armor lib and Attack Type value table, the function will then calculate the base damage and then get's the quotient to acquire the actual Attack type value.
 
Last edited:
Level 12
Joined
Jan 2, 2016
Messages
973
Okay, so:
Attack type determines how much damage does the unit deal to certain armor types.

Weapon type is the sound made upon impact/hit.

Damage type is a bit more mysterious. However, units always use DAMAGE_TYPE_NORMAL for their auto-attack. That type gets reduced by the armor value. DAMAGE_TYPE_MAGIC can be resisted by magic immune enemies.
DAMAGE_TYPE_UNIVERSAL completely ignores the target's armor amount.

And I'm not certain about the next, but I think that DAMAGE_TYPE_FIRE deals extra damage to structures. I haven't really experimented much with the rest xP
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Units have different attack types and different weapon types and different combat sounds.
Weapon types in OE (Object Editor) are different than in TE (Trigger Editor).

Units have a static DAMAGE_TYPE_NORMAL.

But if the library is going to be GetUnitAttackType... we already have that... as long as a unit only uses one attack index.
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
These two threads give a good, mostly correct overview. If there are more questions just ask.

Lately there are too many threads which do not belong in the Lab section because they do not push unknown borders but instead are questions. This is one of them.
 
Status
Not open for further replies.
Top