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

Hide Min Damage

Introduction

A small custom UI edit. It removes the min damage part of attack 1 and 2.
8 - 11 +3 becomes 11 +3
1230 - 20000 -110 becomes 20000 -110

Contains a Lua and Vjass version.
Requires Warcraft 3 V1.31 or higher.

How to import:

Get the 2 imported files from the map and import them into your map.
war3mapImported\HideMinDamage.fdf
war3mapImported\HideMinDamage.toc
(beaware that in the non current version "Export All Files" can be buggy).​
Open Trigger Editor copy paste the wanted version into your map.

Insight

Technically it "hides" the default String-Frame and places a custom String-Frame at the same spot. It creates a custom one to be free from hardcoded behaviours (difficult to detect update times which lead to ugly fast updating text).

ChangeLog

V6) Added a non fdf version.
V5) replaced the included FrameLoader Lua (Save&Load)
V4)
vjass) made FrameLoader optional.
Lua) replaced the FrameLoader with the new version
V3) Frame Fix saving&Loading
V2) Perfroms smoother
(smaller default Timeout)
Skips not visible attacks
some optimiziations in vjass
Contents

Hide Min Damage V6 (Map)

Updated to V2)
Default update rate is now 0.05s.
VJass finding now searches from second index to last, instead of last to second.
Requires less steps for units with bonus/reduced damage.​
VJass Library Renamed to HideMinDamageText
Checks the visibility of Damage Info Frames instead of Single Unit selection Frame.
Removed the valid index found check. If the Damage Frame is visible it will have that searched string.
Less actions for units with 1 or no attack.​
 
Last edited:
Updated to V3.
Recently someone told me that one of my UI systems broke when the game was saved and later loaded. I did some research about that and found out that custom created Frames and Frame modifications are not save nor loaded and that using references to the now broken custom Frames can crash the game. This applies to V1.31, V1.32.8 and V1.32.9 PTR.

I added a custom FrameLoader Trigger that reruns the whole system again when the game is Loaded.
 
When it hides the default but doesn't show anything anymore. Then it is likely that there something went wrong with the custom frame creation.

Make sure you add the Files HideMinDamage.toc and HideMinDamage.fdf into your map.
HideMinDamage.toc should contain 2 lines: the path of HideMinDamage.fdf in your map and an empty Line. (only one \)

HideMinDamage.fdf should have ~10 lines describing a Frame

Inside the script the path to HideMinDamage.toc is also mentoned in
BlzLoadTOCFile (\\)

Make sure the paths mentioned are the ones used in your map.
 
Level 35
Joined
Feb 5, 2009
Messages
4,552
When it hides the default but doesn't show anything anymore. Then it is likely that there something went wrong with the custom frame creation.

Make sure you add the Files HideMinDamage.toc and HideMinDamage.fdf into your map.
HideMinDamage.toc should contain 2 lines: the path of HideMinDamage.fdf in your map and an empty Line. (only one \)

HideMinDamage.fdf should have ~10 lines describing a Frame

Inside the script the path to HideMinDamage.toc is also mentoned in
BlzLoadTOCFile (\\)

Make sure the paths mentioned are the ones used in your map.

That totally fixed it, thanks :D
 
in my new map, im trying to remove all numbers like HP, Mana and Damage,
Than you don't need hide-min damage at all.
When 0s expired Change the Font of all the StringSimpleFrames.
Also hide the children of the unitinfos to disable their tooltip.

But I wonder if you don't want numbers, What you need from the single unit selection at all, could hide all of it?
 
Level 5
Joined
Oct 16, 2018
Messages
57
Change the Font of all the StringSimpleFrames.
Also hide the children of the unitinfos to disable their tooltip.

What? :ugly:
Couldnt understand what exactly i have to do.



But I wonder if you don't want numbers, What you need from the single unit selection at all, could hide all of it?

I do still want them to be selectable because the players must be able to read the damage & armor type and read their strength and weakness, and sometimes for using abilities.
 
I do still want them to be selectable because the players must be able to read the damage & armor type and read their strength and weakness, and sometimes for using abilities.
Well I don't know how to change the text inside the default tooltip.
Best I would know, how to do is to disable the normal unit info tooltips and then to display a custom one instead.

What? :ugly:
Couldnt understand what exactly i have to do.
This will "hide" the amounts of the unit infos: But you might not want all of them: The number after "InfoPanelIconValue" is the index that maps to this unit infos. Call the wanted BlzFrameSetFont() at 0s to "hide" the amount display.
BlzFrameSetFont(BlzGetFrameByName("InfoPanelIconValue", 0),"", 0.0, 0)
BlzFrameSetFont(BlzGetFrameByName("InfoPanelIconValue", 1),"", 0.0, 0)
BlzFrameSetFont(BlzGetFrameByName("InfoPanelIconValue", 2),"", 0.0, 0)
BlzFrameSetFont(BlzGetFrameByName("InfoPanelIconValue", 3),"", 0.0, 0)
BlzFrameSetFont(BlzGetFrameByName("InfoPanelIconValue", 4),"", 0.0, 0)
BlzFrameSetFont(BlzGetFrameByName("InfoPanelIconValue", 5),"", 0.0, 0)

Unit infos:
("SimpleInfoPanelIconDamage",0)
("SimpleInfoPanelIconDamage",1)
("SimpleInfoPanelIconArmor",2)
("SimpleInfoPanelIconRank",3)
("SimpleInfoPanelIconFood",4)
("SimpleInfoPanelIconGold",5)

The other part about childrens was to disable the mouse listener to show the default tooltip
 
Level 5
Joined
Oct 16, 2018
Messages
57
Well I don't know how to change the text inside the default tooltip.
Best I would know, how to do is to disable the normal unit info tooltips and then to display a custom one instead.


This will "hide" the amounts of the unit infos: But you might not want all of them: The number after "InfoPanelIconValue" is the index that maps to this unit infos. Call the wanted BlzFrameSetFont() at 0s to "hide" the amount display.
BlzFrameSetFont(BlzGetFrameByName("InfoPanelIconValue", 0),"", 0.0, 0)
BlzFrameSetFont(BlzGetFrameByName("InfoPanelIconValue", 1),"", 0.0, 0)
BlzFrameSetFont(BlzGetFrameByName("InfoPanelIconValue", 2),"", 0.0, 0)
BlzFrameSetFont(BlzGetFrameByName("InfoPanelIconValue", 3),"", 0.0, 0)
BlzFrameSetFont(BlzGetFrameByName("InfoPanelIconValue", 4),"", 0.0, 0)
BlzFrameSetFont(BlzGetFrameByName("InfoPanelIconValue", 5),"", 0.0, 0)

Unit infos:
("SimpleInfoPanelIconDamage",0)
("SimpleInfoPanelIconDamage",1)
("SimpleInfoPanelIconArmor",2)
("SimpleInfoPanelIconRank",3)
("SimpleInfoPanelIconFood",4)
("SimpleInfoPanelIconGold",5)

The other part about childrens was to disable the mouse listener to show the default tooltip


so you mean it is possible to hide unit damage and armor icons?
 
Did you copy the script & enabled, also have imported?
war3mapImported\HideMinDamage.fdf
war3mapImported\HideMinDamage.toc

It can happen that the toc and fdf changed their content:
In your map the war3mapImported\HideMinDamage.fdf has to contain code while war3mapImported\HideMinDamage.toc only contains file path(s).

This resource is only meant to be used with the default UI, I saw in one of your posts that you have a custom UI, then you would only need the part that calcs the text without min dmg and set your frame's text instead.
 
Level 5
Joined
Oct 16, 2018
Messages
57
yes, one can "hide" the tooltip, the label, the value,, the icon or all of it.
One can hide the hero stats.
The ally resources and many more.
Just changing the tooltip text that is a no go. Here one would have to recreate it (as far as I know).
is it possible to do it for each type? not all of them?
i mean an unique tooltip for Normal and other etc.
or only one tooltip for all damage types?
if its possible, please teach me.
 
the default UI only has one set of frames onto which the unit's data is displayed onto.

it is possible to have unique tooltips for each type, if you get the attack type of the current unit and change/show the current needed tooltip while the tooltip of the attack icon is shown. Might need to add a custom simpleframe as tooltip to know the user points at the attack icon.

But are you sure that your attackType Tooltips need such different formats. Can't it be generalized?
 
Level 5
Joined
Oct 16, 2018
Messages
57
the default UI only has one set of frames onto which the unit's data is displayed onto.

it is possible to have unique tooltips for each type, if you get the attack type of the current unit and change/show the current needed tooltip while the tooltip of the attack icon is shown. Might need to add a custom simpleframe as tooltip to know the user points at the attack icon.

But are you sure that your attackType Tooltips need such different formats. Can't it be generalized?

Imagine youre trying to hide min and max damage, but when you go to read description of an attack type, you can read the min and max damage.

So you try using custom description so min and max damage in the description will disappear, but youll have to do something to let the people know the weakness and strength of that attack type.


Hmm, you said tooltip?
If thats not the whole text, so what part of it is the "tooltip"?
If thats separate, do the description of attack type stays what it is?
 
Imagine youre trying to hide min and max damage, but when you go to read description of an attack type, you can read the min and max damage.
What is the problem? Dota 2 does the same: shows only avg number on the ui, but in the tooltip you see more.

When you hover the attack frame. You see the tooltip-Box&Text:

The top is the damage amounts.
Followed by Type(Name), Range, Speed and finally the attack type description text from Game Interface.

But for Frame-UI, Tooltip is just another Frame that is shown while some Frame is hovered.
 
Level 5
Joined
Oct 16, 2018
Messages
57
What is the problem? Dota 2 does the same: shows only avg number on the ui, but in the tooltip you see more.

When you hover the attack frame. You see the tooltip-Box&Text:

The top is the damage amounts.
Followed by Type(Name), Range, Speed and finally the attack type description text from Game Interface.

But for Frame-UI, Tooltip is just another Frame that is shown while some Frame is hovered.
tooltip is for example only this part?: 17 - 43
if it is, then please tell me how can i destroy/remove/delete this annoying part from my map.
im trying to not let the people know how much HP and dmg each unit does have, instead im telling them how strong a unit is.
for example i say:

HP: Good
DMG: Bad
ATK SPD: Very Good
SPD: Perfect
...

i think you got it, no NUMBER.
 
Level 5
Joined
Oct 16, 2018
Messages
57
Well I don't know how to change the text inside the default tooltip.
Best I would know, how to do is to disable the normal unit info tooltips and then to display a custom one instead.


This will "hide" the amounts of the unit infos: But you might not want all of them: The number after "InfoPanelIconValue" is the index that maps to this unit infos. Call the wanted BlzFrameSetFont() at 0s to "hide" the amount display.
BlzFrameSetFont(BlzGetFrameByName("InfoPanelIconValue", 0),"", 0.0, 0)
BlzFrameSetFont(BlzGetFrameByName("InfoPanelIconValue", 1),"", 0.0, 0)
BlzFrameSetFont(BlzGetFrameByName("InfoPanelIconValue", 2),"", 0.0, 0)
BlzFrameSetFont(BlzGetFrameByName("InfoPanelIconValue", 3),"", 0.0, 0)
BlzFrameSetFont(BlzGetFrameByName("InfoPanelIconValue", 4),"", 0.0, 0)
BlzFrameSetFont(BlzGetFrameByName("InfoPanelIconValue", 5),"", 0.0, 0)

Unit infos:
("SimpleInfoPanelIconDamage",0)
("SimpleInfoPanelIconDamage",1)
("SimpleInfoPanelIconArmor",2)
("SimpleInfoPanelIconRank",3)
("SimpleInfoPanelIconFood",4)
("SimpleInfoPanelIconGold",5)

The other part about childrens was to disable the mouse listener to show the default tooltip
HOW DO I EVEN USE THIS SCRIPTS?
are they jass or lua?
i need the Jass version, and then how do i use them?
where do i put ("SimpleInfoPanelIconDamage",0)?
 
("SimpleInfoPanelIconDamage",0)
is a argument for BlzGetFrameByName, to read from the game's frame storage to get a framehandle stored at 0 with name "SimpleInfoPanelIconDamage".
BlzGetFrameByName ("SimpleInfoPanelIconDamage",0)

Imagine it like a warcraft 3 "hashtables" which is filled by the game.
 
Top