Dominos

Dominos

19M Downloads

XP Bar Enhancements

Tuller opened this issue ยท 5 comments

commented

Requests in order of "want cookie first":

  1. Can you make the rep bar auto switch what is being tracked based on the
    last rep gain you got that is not marked as "inactive"? (ie: I am currently
    displaying "Kirin Tor" and I gain 250 Ashen Verdict rep, the bar will then
    change to show "Ashen Verdict" instead of "Kirin Tor"). I believe this is
    functionality from the vanilla wow client.

  2. Bar text: Can you add functionality to allow the user to adjust what
    text is displayed on the XP/Rep bar? Waaaay back in the day of Bongos I
    used to do this manually in your code to suit my purposes, but it would be
    a nice feature.

  3. Bar Colors: Green and Purple are nice, but I would like to be able to
    easily change these at will, without going into the code and adjusting it
    there. Again, used to change this manually in Bongos way back in the day.

  4. Reporting into chat: XPBarNone allows you to shiftclick a bar to put
    whatever text you have into the chat client. This is nice, not
    uber-important, but nice.

  5. More tacos: Seriously, we all need more tacos.

I really have to tell you that this addon is the best thing ever. You have
done a fine job and I am not above bribery for your time...

commented

How exactly do i get the customizable text?

commented

Well the xp bar has a new function: SetXPFormat. This bit of code, for example, is more or less what is used to set the format string now.

/run Dominos.Frame:Get('xp'):SetXPFormat([[
if rest and rest > 0 then
return format("%s / %s (+%s) [%s%%]", comma(xp), comma(xpMax), comma(rest), pct)
end
return format("%s / %s [%s%%]", comma(xp), comma(xpMax), pct)
]])

commented

So, for now, I still have to edit code to get the text i want displayed, I just have to edit the format function itself (and probably still add some local functions to do some extra math) to reformat.

Should i be downloading the package from Curse / WowInterface, or from Gihub? Downloading from GitHub seems to be having issues (ie: it just downloaded the files, not the root containers, nor does it grab the whole package, i have to rename folders and download things like Roll, Totems and XP seperately).

What I end up doing is adding a local value for xpMax - xp, to give me a "remaining value" (xpLeft). Then I add another local function to get the level of the player, +1 for the "next level" (nxt) so that I can get an output that would say "9,876,543 to level 21", in addition to what you have displayed. Which then ends up looking something like this:

return format("%s / %s [%s%%] ::%s to level %s ::", comma(xp), comma(xpMax), pct, comma(xpLeft), nxt)

commented

SetXPFormat is a function that takes a snippet of lua code as a string. I ran this on my shaman for example:
/run Dominos.Frame:Get('xp'):SetXPFormat([[ return format('%s / %s (%s tnl)', comma(xp), comma(xpMax), comma(tnl)) ]])

So that character has a TNL display. Once you run it, its saved in the saved variables file.

commented

Customizable bar text is implemented now, just not in a pretty fashion.