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