RPG Maker Times

Smile Game Builder and RPG Maker Tutorials, Plugins, Resources, Windowskins

Gold Comma Separators Scriptlet

If, like me, you hate the way large numbers are displayed without any separators, thus making it hard to read, then you’ll want the Gold Comma Separators Scriptlet for your games.

What this does is separates large numbers with a comma every three blocks of numbers. Thus, 100000 becomes 100,000. That’s way easier to read! (Incidentally, it took me ages to figure out how to successfully do this!)

Edit: An error occurring in RMVXA has been fixed.

To achieve this, we attach

.to_s.reverse.gsub(/(d{3})(?=d)/, ‘\1,’).reverse

to the $game_party.gold. This is done differently in each RPG Maker.

With RMXP, you need to overwrite the refresh method.

This has already been integrated into the Tweaks and Add-Ons Script (TWAXP).
The refresh method is overwritten in RMVX.
With RMVXA, refresh is overwritten.

Copy and paste these somewhere between Materials and Main Processes (or after the main scripts in RMXP). And voila!

Remember: Do NOT modify the default scripts directly, as this can cause problems. Try to alias whenever you can (RMXP doesn’t always make this possible, however).



Hi-Tex House Pack Vol. 1

For Smile Game Builder

The Hi-Tex House Pack Vol. 1 contains 297 assets: 284 house wall terrains and 13 models. Get your copy for only $5!

Sponsored Ad

Sponsored Ad

Follow me on Twitter

© 2008-2018, Companion Wulf. All Rights Reserved.