Help with SumRndmDde's Stat Distribution plugin

MoonyPad

Villager
Member
Joined
Dec 11, 2016
Messages
10
Reaction score
0
First Language
English
Primarily Uses
Hey, everyone! I'm using this plugin to give more stat customization to the player, but I'm having touble with the formulas. Specifically, the cost formula.

This is the one I'm using: Math.ceil(actor.atk / 10) + 1






So, if I understand correctly... This should make that for every 10 attack points the actor has, the cost goes up 1 point. Since my character's attack is 22, the cost should be 3 points... And it's currently asking for 4. I know I'm missing something, or that I'm doing something wrong. I just don't know what. I suck when it comes to formulas, so I'd really appreciate any kind of help you could provide.

Thanks in advance!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,246
Reaction score
7,625
First Language
German
Primarily Uses
RMMV
ceiling means that the number will be rounded up. 22/10 is 2.2, rounded up is 3. and then you add 1 to it, giving it exactly the 4 that the engine requires.
 

MoonyPad

Villager
Member
Joined
Dec 11, 2016
Messages
10
Reaction score
0
First Language
English
Primarily Uses
ceiling means that the number will be rounded up. 22/10 is 2.2, rounded up is 3. and then you add 1 to it, giving it exactly the 4 that the engine requires.
Thanks a lot for the quick response! I imagined it was something like that... The formula I'm using was actually taken from an example, so I wasn't completely sure of what it did. It's good to know how it works for sure now. Just one more thing, is there a way to make it so the result is not rounded up?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Yosh! Senkara made a fourth video on my game.
This time, finding all the false endings. :LZScheeze:


P.S, his thumbnails are absolutely epic!
GOBBLE GOBBLE! Happy thanksgiving.
Oh no. That moment when you try to fix something you modified in your game, like, a year ago but didn't want to fix then, and you now have no idea what you even did. Me right now, trying to figure out why my gold window is over stretched?
LittlePIGGY wrote on atreyoray's profile.
Where are you TT^TT
We need ARP_InGameManual for MZ
Oh my gosh. Thank you, Macy's! Thank you so much! You have made me very happy!

Forum statistics

Threads
105,553
Messages
1,014,587
Members
137,227
Latest member
yournamehere
Top