Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
881
Reaction score
573
First Language
English
Primarily Uses
RMMV
How does MV handle rounding on base parameters? Does it truncate it off, or does it actually round to the nearest whole?

For example,
if I have a defense of 1 and I multiply it by 150% with a status (result of 1.5), will the game treat it as a 1 or a 2?
What if I have a defense of 2 and I multiply it by 66% (for a result of ~1.33)?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,504
Reaction score
8,144
First Language
German
Primarily Uses
RMMV
integers and similiar numbers are usually truncated, 1.8 -> 1
however, it depends on the exact formula because of the way the function works, especially if using control variable command.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,870
Reaction score
4,813
First Language
English
Primarily Uses
RMMZ
If I recall correctly, it's an integer, meaning no decimal. However, the way it is calculated does take in consideration decimals, it just rounds it up after calculation. Meaning every level doesn't add something, but will rather result in a new calculation. Something like this:

Physical Attack = Base Stat + Growth * (level - 1)

If base stat = 10
growth = 2.7
level = 15

Then Physical Attack = 10 + 2.7 * 14 = 47.8
which would make it 47 (or 48, depending on if it rounds or it floors the value).
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
881
Reaction score
573
First Language
English
Primarily Uses
RMMV
integers and similiar numbers are usually truncated, 1.8 -> 1
however, it depends on the exact formula because of the way the function works, especially if using control variable command.

I'm specifically looking at the case of base parameters (stats) being controlled with a trait (from equipment, status effects, class, etc.)
 

Latest Threads

Latest Posts

Latest Profile Posts

Still early in development but feel like I'm hitting a wall. Either I can't find plugins to do what I need, or they're paywalled :/
Screenshot-2021-05-02-at-15-07-54.png


Tivadar will help you travel to distant places in Eniko: Ghosts Of Grace

Finally done with the school project, here's the raw video of it. o_O :smile:

Forum statistics

Threads
111,175
Messages
1,058,985
Members
144,421
Latest member
luok
Top