-
Notifications
You must be signed in to change notification settings - Fork 91
Tag documentation
Tags in SUF are just pure Lua/World of Warcraft API calls with nothing special to them, you do not need to learn any special API’s that you don’t have to in order to create addons inside World of Warcraft.
If all you want to do is prefix or suffix a tag if they have text, you don’t need to create a new tag and you can use the existing features, for example:
You want to show the group number next to a players name but you want to wrap it in parenthesis, instead of doing ([group])
you would do [(()group())]
this will embed the parenthesis around the group number if there is one, another wise show nothing. Or maybe you want to put an AFK/DND tag next to a players name but you want to put a space after it if they are AFK or DND, you would do [afk( )]
The basic syntax is [(<text to prefix>)<tag name>(<text to suffix>)]
.
By default, SUF includes three API calls you can use in tags with basic documentation below.
See Tag examples for examples and details on how to create different tags.
(r, g, b) OR ({r = #, g = #, b = #}) |
Returns a hex color code based on the 0 – 1.0 RGB value passed. |
(unit) |
Return’s the class color as a hex value if the unit is a player, otherwise returns nil. |
(number) |
Formats a large number into a short one, this is what you see used in the health/power text by default |