public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers

MZ [SOLVED- Thanks to TheoAllen] Call Variable, in text decimal.

BMM Archive · July 15, 2026

Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

Original Source

  • Original title: MZ [SOLVED- Thanks to TheoAllen] Call Variable, in text decimal.
  • Original author: SirCuddlesWorth
  • Original date: August 12, 2021
  • Source thread: https://forums.rpgmakerweb.com/threads/solved-thanks-to-theoallen-call-variable-in-text-decimal.139546/
  • Source forum path: Game Development Engines > RPG Maker Javascript Plugins > Learning Javascript

Summary

I posted in the wrong forum before, so I have to delete that. But I am struggling trying to call a normal variable, and the gold in a custom menu with decimals. So it comes out as, 1,430.00 and not 1430. It's been bugging my OCD bad, I am terrible at JS. It's really hard for me, with my learning disability. But I'm trying.

Archived First Post

I posted in the wrong forum before, so I have to delete that.
But I am struggling trying to call a normal variable, and the gold in a custom menu with decimals.
So it comes out as, 1,430.00 and not 1430. It's been bugging my OCD bad, I am terrible at JS.
It's really hard for me, with my learning disability. But I'm trying.

I've looked at:
But I don't see anything for displaying text in a string, or I'm being dumb again and did not see it.

Only thing I've found after days, is this.
Steam Forums suggestion: $gameParty._gold.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")
It just outputs a )

Google, RPGM Forums: $gameVariables.value(34).toLocaleString("en", { minimumFractionDigits: 2, maximumFractionDigits: 2 })
It works for storing the value, but I need it to call it and output as decimal.

It's probably something simple, I just need help I can't figure it out. Somebody please help.
Protected download

Downloads / Referenced Files

Log in to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download

Referenced Images / Attachments

ScreenShot-0021.png
ScreenShot-0021.png
Creator Claims / Removal

If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.

#039#rpg-maker-archive#js-learning

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar