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

[General] Creating a new stat - Abillity power

Status
Not open for further replies.
Level 4
Joined
Jul 26, 2017
Messages
66
If you're thinking about the Ability Power stat in LoL yes that's sort of what I'm trying to emulate.
What I'm trying to conceptualize is a stat/attribute that would increase the damage of the unit's spells by a factor and can be seen in the game's UI. Such stat can be increased thru items and is not affected by any other stat.

So what I'm wondering is how would you go about implementing it on a map?
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
can be seen in the game's UI
UI is the most difficult part, additional damage can easiliy be triggered.
If you are talking about showing how much damage the ability does, that is not possible in warcraft 3. You cannot change the tooltips of abilities during the game. You can of course write: 100+0.5 Ability Power, but you cannot put the calculated value there.
You also have to think about where the ability power of a hero is displayed. You could sacrifice one stat of the hero (intelligence for example)
Or use a resource like lumber. You can also have a multiboard displaying it, or a floating text. None of these are really good, but you have to pick the one, that is the best for you.

For additional damage you can either use a damage detection system and modify the damage. You cannot really distinguish from which ability the damage came, so you would increase the damage of every ability by the same amount.
The better, but harder solution is to trigger all the damage from abilities yourself using the "unit damage target" action and adjust the damage depending on the ability power.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Tides of Blood also had ability power. It didn't display at all in the UI, but that wasn't as important, since the way it worked was that every 1 ability power increases all ability damage by 1%.
It wasn't necessarily only damage either. For instance, the health of one summonable thing was affected by ability power instead of its attacks.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
So what I'm wondering is how would you go about implementing it on a map?
If one is using a unit indexer and will have less than 8192 units on the map at any time then one can use a real or integer array to represent ability power with index representing the custom value of the unit.

Another way would be to use hashtable to map the unit and ability power to a value. Parent key would be the handle ID of the unit and child key some arbitrary unique key. When the unit is removed so must all its mappings to prevent a leak.

One could display ability power using a multiboard. Another way would be to add a chat command that prints out the selected unit's ability power. Unlike SC2, WC3 does not support modifying the UI to add new elements like you require.
 
Level 4
Joined
Jul 26, 2017
Messages
66
I guess showing it somewhere during gameplay would be the biggest obstacle in implementing this system. I'm already triggering like 80% of my Ability Damage so triggering the rest should be easy, except for the DOT's. If I were to use food as an indicator since it really has no other use would it be hard to manipulate?? And what does one do to chance the meatleg icon?
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
You can either import an image and overwrite the food icon by using the same path, or change it under game interface.
The only problem with food is, that you have this x/y format.
 
Level 4
Joined
Jul 26, 2017
Messages
66
What if I just leave the y for x/y constant all throughout gameplay for all players and just change the x so that the resulting fraction would represent the ability damage multiplier? e.g. if y is 20 then 15 ability power would mean 75% increased spell damage,
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
if y is 0, it is not displayed.
if y > 0, but y < x the text turns red.
So you just to leave y at 0. Did not think about that before.

If you want all your abilities to be increased by the same ratio, your idea would work too.
 
There are multiple options for showing stuff in the UI though most of it is hard-locked such as the 6 stats, damage/armor/int/str/agi/level however at least those can still be edited. Unit-wise they can use gold mine ability and gold value.

Besides those hard locks you can use a hero icon or leaderboard/timer window/multiboard or buyable items/units or flare trick or items or dummy units to show changeable in-game numbers on the icons. Most of the UI does suck due to it being so difficult to modify however there does exist options somewhat.
 
Status
Not open for further replies.
Top