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,365
Reaction score
7,674
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

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,569
Latest member
Shtelsky
Top