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

Enhanced MiscMetaData.slk

Level 26
Joined
Aug 18, 2009
Messages
4,097
This question pops up sometimes: Can we change the color of in-built floating texts like of the Critical Strike ability?

There are some more options/configurations the game can pick up in a map than what the World Editor normally allows to modify, in this case considering the Gameplay Constants.

The Gameplay Constants the World Editor shows are defined in the Units/MiscMetaData.slk file. When the World Editor saves, the changed options from its Gameplay Constants menu will be written to the war3mapMisc.txt file inside the saved map or in the case of a campaign to the war3campaignMisc.txt.

Here is a modified MiscMetaData.slk: GitHub - WaterKnight/w3-MiscMetaData: Enhanced version of MiscMetaData.slk

It has the following changes:
Fields were added for the following floating texts:
  • Gold
  • Lumber
  • Gold Bounty
  • Lumber Bounty
  • XP
  • Miss
  • Critical Strike
  • Shadow Strike
  • Mana Burn
  • Bash
(for each: Color, Velocity, Lifespan, Fadepoint, Height)

Color is in ARGB from 0 to 255 for each component.
Velocity is screen relative speed, the first component being x, the second being y and the third I am not sure (z?), the default for all those in-built floating texts is 100 there.
Lifespan is how long the floating text lasts in seconds.
Fadepoint is when the floating text after spawning starts to fade in seconds.
Height is the font size, default values are 0.024 (it falsely shows up as 0.000 in the World Editor's gameplay constants menu because the height fields are backed in UI/MiscUI.txt unlike the other fields that are backed in UI/MiscData.txt, I will see if I can later move it to an enhanced UI/SkinMetaData.slk instead and hope it will load correctly in the World Editor's gameplay interface menu then).

The display string of all those fields is prefixed with "Floating Text - ".

How to use?

Activate Local Files (Local files)
Put the modified MiscMetaData.slk beneath Warcraft III/_retail_/units, so it becomes Warcraft III/_retail_/units/MiscMetaData.slk.
Then restart the World Editor and you should find the changes in the Gameplay Constants menu. Use like other gameplay constants.

If you want to type in negative numbers, hold shift before opening a field in the Gameplay Constants menu.
 
Last edited:
Top