Jump to content
MoonyCake

Help with SumRndmDde's Stat Distribution plugin

Recommended Posts

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

 

Spoiler

image.thumb.png.13f52f575ef3393f49e13aeafe7f10e3.png



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!

 

Edited by MoonyPaad

Share this post


Link to post
Share on other sites

Hmmm... :thonkang:
Math.ceil is something I don't recall what it does, but I wonder if something isn't forcing the formula to round up instead of down (because it follows a .to_i formula - .to_i means force to integer and usually rounds down regardless of the float point even if the float is .999 - though in this case the float point would be .2)...

Of course, this is MV. In VX Ace, I'm one hundred percent certain this would return 3.

My advice, just to see if it returns a different result: replace "/ 10" with "* 0.1" (this is generally less messy to use float point multipliers in place of dividing by tens).

Share this post


Link to post
Share on other sites

You're very welcome.

 

I'd look to see if the plugin isn't rounding float points up. I'm not intricately familiar with the undertow of MV, so I don't know if the default formula force to integers also round up, but I know in VX Ace, the default formula force to integers round down (I still say it should be based on if the float point is lesser than .5).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×