• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Covert Ability description to a String with triggers

Status
Not open for further replies.
Level 10
Joined
Aug 25, 2004
Messages
473
Has anyone found a way yet to read stats like "damage", "description" "cost" and other, from the data editor with triggers. Maybe with catalog or data table.
Also, there is a function to display a screen button. But for that, you need a ScreenButtonID (its an integer only value, so its not the button ID from the raw data)
 
The catalog field value get function is as follows:

string CatalogFieldValueGet (int catalog, string entry, string path, int player);

so, if you wanted to get the energy cost of an ability, you would do:
CatalogFieldValueGet(c_gameCatalogAbil, [name of ability], Cost[0].Energy, -1);
This should work, but if it doesn't try other variations with the Cost part, it might be CostArray[0]. or Cost[0].Link

Furthermore, you can also grab the default button used for the ability and thus get the tooltip, icon, etc. For example...
JASS:
string mybutton = CatalogFieldValueGet(c_gameCatalogAbil, [abilname], CmdButtonArray[Execute], -1);
string icon = CatalogFieldValueGet(c_gameCatalogButton, mybutton, Icon, -1);
text tooltip = StringExternal(CatalogFieldValueGet(c_gameCatalogButton, mybutton, Tooltip, -1);

Tell me if this doesn't work, since I don't have my editor right now I can't test myself.
 
Status
Not open for further replies.
Back
Top