#(Haise) number_format tag
35 messages · Page 1 of 1 (latest)
(Haise) number_format tag
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>
format_number*
!search format
[Partial Name Match] !Tag timetag.format, !Tag itemtag.formatted, !Tag elementtag.format, !Tag listtag.formatted, !Tag binarytag.hash, !Mechanism inventorytag.reformat, !Tag locationtag.formatted, !Tag elementtag.end_format, !Tag server.economy.format, !Tag durationtag.formatted, !Tag timetag.format_discord, !Language denizen text formatting, !Tag elementtag.format_number, !Language format script containers, !Tag playertag.formatted_money, !Tag entitytag.formatted_health, !Tag durationtag.formatted_words, !Tag locationtag.simple.formatted, !Tag locationtag.formatted.citizens, !Tag playertag.formatted_food_level, !GuidePage how sample scripts are formatted in this guide,
[Semi-Strong Match] !Command mcmmo, !Command quests,
[Semi-Decent Match] !Command chat, !Command narrate, !Tag &font, !Command log, !Command yaml, !Command action, !Command tablist, !Command debug, !Command sql, !Command if, !Command while, !Tag &hover, !Tag &click, !Tag &score, !Tag binary, !Command actionbar, !Command announce, !Tag &translate, !Tag &gradient, !ObjectType binarytag, !ObjectType scripttag, !ObjectType secrettag, !Command waituntil, !Command effectlib, !Tag &keybind, !Tag &selector, !ObjectType elementtag, ...
!tag elementtag.format_number
Returns a number reformatted for easier reading.
For example: 1234567 will become 1,234,567.
Optionally, specify a standard number format code to instead use that.
For information on that optional input, refer to https://docs.oracle.com/javase/7/docs/api/java/text/DecimalFormat.html.
element manipulation
ElementTag
there's a good 5-10 ways to format that element the way you'd like
any way you know?
five to ten ways? yes
if you want to format numbers like Runescape as an example;
1-99999 as they are formatted,
100k-9999k as thousands suffixed with K for thousand, and
10M-2147M as millions suffixed with M for million would be something like:
format_money:
type: procedure
definitions: money
script:
- if <[money]> < 100000:
- determine <[money]>
- else if <[money]> < 10000000:
- determine <[money].div[1000].round_down>K
- else:
- determine <[money].div[1000000].round_down>M```
and then <element[2000000].proc[format_money]> would probably return 2000K
or <[money].proc[format_money]> if you defined that earlier
oh thanks so much exactly wat i needed
try it first, i didn't
ok sure
if it doesn't, you may be able to tweak it yourself
i mightve forgot a zero or so somewhere
no prob bob
Has your issue been resolved, or your question been answered?
If so, please type </resolved:1028673926114594866> to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@atomic cedar
ty forgot