RPG Maker Times

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

Tweak: Global Comma Delimeters (VX/VXA)

Following on from yesterday’s post to address an error that occurred in RMVXA, this expands on that idea. What if you want comma delimeters globally, such as in shops when you buy and sell items? You don’t need to fiddle with the Window_Gold, Window_ShopBuy or Window_ShopSell windows to do it. That would cause too many conflicts. Instead, we can set up a basic method to insert commas in larger numbers that affects all areas where currency is used. Note: This is only relevant for RMVX and RMVXA. It most likely is possible in RMXP, but due to the way RGSS is structured I’m not willing to do it, as it…

Fix: Gold Comma Separators Scriptlet

Comparison of Fixnum with String Failure In reference to the Gold Comma Separators Scriptlet, a bug was found. It was pointed out that in RMVXA, the commas worked fine in the main Gold Window, but opening up a shop and buying items resulted in this: And, since the previous method worked in RMXP and RMVX, but not in RMVXA, I was quite interested in finding a solution (not being one to shy away from a challenge), since I did overlook this in the first place. A Fix Was Found Typically, RMVXA does things a little differently. After a while, I found the solution. The Gold Comma Separators Scriptlet has now…

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. Copy and paste these somewhere between Materials and Main Processes (or after the main scripts…

Categories

Archives

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.