• 🏆 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 to show Damage and DEF in Multiboard?

Status
Not open for further replies.
Level 18
Joined
Jan 21, 2006
Messages
2,552
Do you already know what these values are, or you need to know how to find them? Because you cannot reference a unit's "damage" and "defense", there are no natives for that.
 
Level 7
Joined
Jul 20, 2009
Messages
295
For example:
My hero has 210-215 Attack and 21 Defense and as he levels the number changes. I want my Multiboard to show the Attack and Defense of my hero everytime their values changes. Is there a way to do it?
 
Level 9
Joined
May 28, 2007
Messages
365
You will need to play around with some damage systems, because Warcraft III won't let you get a unit's damage.

The first approach is with a damage system, such as LDD, or Anitarf's damage system. The second approach is to calculate damage statically, but checking all the items the unit has, upgrades, level and primary attribute.

For defense, I'm pretty sure there is a function for that somewhere around here. You just store the unit's HP, then damage it, then check how much HP it has based on the damage dealt, and the armor is the difference. (I think that's how it works).
 
Level 7
Joined
Jul 20, 2009
Messages
295
Does the number only change when he levels, and does the number change by the same amount per level?

No, not just when he levels, whenever there is an increase in attack, the multiboard updates it and shows it. And so for the armor too. No, the number does not change by the same amount, I am afraid, what over there will be different types of heroes and so.. I cannot spend like 2 hours doing each and every single level increase for DMG and DEF for a hero and then another 20 hours for the rest + boring, also by doing it this way it would not work as there will be equipments involved changing DEF and DMG.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
As I said before, there is no way of gathering a unit's "attack damage" or "defense" from the code. An option you could consider is keeping an accurate record (via variables) of the specific units' damage/defense --you would have to increase/decrease the stored records if your unit were to level up, pick up an item, or any other event that would possibly cause it's attack to increase.
 
Status
Not open for further replies.
Top