Jump to content
Korean Random

kilo XP variable?


Bartman

Recommended Posts

{{v.xpToEliteLeft}}

{{v.xpToElite}}

 

Just discovered these very handy carousel variables, but as most tanks require vast amounts of XP to elite and you frequently tend to pull in four digits of xp per battle anyway, I'm missing a kilo version. Would it be possible to add a v.kxpToEliteLeft and a v.kxpToElite?

 

And as a longer term solition, as there are more variables that may result in long numbers, would it be possible to include a formatting rule that rounds down to the nearest SI prefix (i.e. nothing, k or M) and adds that character to the end? i.e. 996 -> 996, 1024 -> 1k, 123687 -> 124k

Edited by Bartman
Link to comment
Short link
Share on other sites

And as a longer term solition, as there are more variables that may result in long numbers, would it be possible to include a formatting rule that rounds down to the nearest SI prefix (i.e. nothing, k or M) and adds that character to the end? i.e. 996 -> 996, 1024 -> 1k, 123687 -> 123k

I wouldn't like to add new macros, but it is possible to change behavior of the {{v.xpToEliteLeft}} and {{v.xpToElite}} macros to automatically format values as human-readable.

Link to comment
Short link
Share on other sites

{{v.xpToEliteLeft>=100000?{{v.xpToEliteLeft%.3s}}k|{{v.xpToEliteLeft>=10000?{{v.xpToEliteLeft%.2s}}k|{{v.xpToEliteLeft}}}}}}

 

Good workaround, thanks! I've put it to the right of the mastery badge:

{ "x": 22, "y": 15, "format": "<font size='10' color='#C7C7B4'>{{v.xpToEliteLeft>=100000?{{v.xpToEliteLeft%.3s~k xp left}}|{{v.xpToEliteLeft>=10000?{{v.xpToEliteLeft%.2s~k xp left}}|{{v.xpToEliteLeft%'i~ xp left}}}}}}</font>" },
Edited by Bartman
Link to comment
Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...