RMMV Easy way to get decimals in your Variables | Plugin for decimals support

KotoYama

Veteran
Veteran
Joined
Apr 20, 2019
Messages
354
Reaction score
49
First Language
Spanish
Primarily Uses
RMMV
I've noticed that a lot of people seemed to have problems using decimals in their variables, which I never got since mines always worked just fine, until recently, when I had to start a new project with zero plugins.
So I did some digging and found it!
With Pixi Filter Controller your game would support decimals by default.
 

ChampX

Veteran
Veteran
Joined
Aug 14, 2016
Messages
221
Reaction score
146
First Language
English
Primarily Uses
RMMV
You can store a decimal as a string, basically by hitting script in the variable window and typing "2.5" or whatever. You'll need to do any arithmetic in a script window as well though but no plugins needed.

Another possibility is using the integer form i.e. 25 instead of 2.5 and then doing division (in this case divide 10) to get the decimal result. You may still need to use the script window to use the final result as I think doing it through the normal variable window will still truncate it. Depending on how much precision matters, this method may actually be preferred as computers aren't good with decimals.
 

Latest Threads

Latest Posts

Latest Profile Posts

Feel free to check out our "Touch the Stars" gamejam submission, "Starlight, Starbright!"
just finished playing one shot. im kinda disappointed with return the sun ending ngl. i was hoping there would be some after credits scene that would play with my emotions
So apparently the surprise Google Search page browser game saves your progress when you close the browser.

This really makes me miss the golden age of Flash gaming.
ohh man im ending oneshot now (im doing the last stepping puzzle rn) and the music is so...sad...like...ive been thinking recently about how fast moments pass and...my anxious thoughts combined with that music and nostalgia...like...im comfortably sad...and want to cry internally
We're playing one of the Touch the Stars game jam entries, come join us!

Forum statistics

Threads
113,552
Messages
1,075,790
Members
147,551
Latest member
ananansy
Top