A way to add digit grouping to displayed variables?

ManaBrent

Veteran
Veteran
Joined
Apr 26, 2020
Messages
67
Reaction score
49
First Language
English
Primarily Uses
RMMV
Is there a way to add digit grouping to variables displayed in text boxes?

For example making 1000000 display as 1,000,000.

I've found that I can make menu numbers display that way using Yanfly's Core Engine, but I'm at a loss how to make this happen in other areas.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
8,833
Reaction score
6,644
First Language
English
Primarily Uses
RMMV
JavaScript has a toLocaleString() method that adds comma grouping to numbers.

So you could do with event commands
Code:
Control Variables -> yourVariableWithANumber -> Script -> $gameVariables.value(thatVariablesId).toLocaleString()

Or if you're using a plugin that allows you to display evals in text, such as Yanfly's Message Eval Text, instead of using \V[34] to display the value of the variable you could do it directly: \evalText<<$gameVariables.value(34).toLocaleString()>>
 

ManaBrent

Veteran
Veteran
Joined
Apr 26, 2020
Messages
67
Reaction score
49
First Language
English
Primarily Uses
RMMV
That works perfectly! Thank you!

This is gonna take a while to edit in.
 

Latest Threads

Latest Profile Posts

Someone in a facebook group just corrected something I said, by saying exactly what I said. The mind boggles.
Less than 20 tiles remain in Inside_B that I need some kind of analogue of in my in custom Inside_B, and a whole 39 tiles that I didn't use and can thus make my own custom tiles or my own flavors of from other tile sheets.


Chapters advancing demonstration.
Main character roey will be revived after chapter 7, so the animations will be different after it
The title of the main characters will be ascended to celestial as well as wings and rings.
Next Up. The 2nd floor of the Western Academy!

Base:
Map012.png

With a little parallax magic *:



WestAcademyFl2.png


Anything you'd add?
BUwvmx.png


Introducing a new and exciting challenge mode!! Is our demo too easy? Did you get a rare pull and want to show off on stream? Please talk to the mysterious 2nd announcer who has 6 additional challenges PER ROUND! As a game developer, I struggled to complete some of the stage 2 challenges, so I hope you tactics fans have a blast!

Forum statistics

Threads
131,642
Messages
1,221,830
Members
173,385
Latest member
VoidKass1
Top