# Yanfly's Class Base Parameters Random Stats Gains?

#### overlordmikey

##### BroCo. Gaming
Anyone know if I can use Yanfly's Class Base Parameters to set it up so that stats go up semi-randomly. I'm not that great at writing mathematical formula (usually my brother and the other member of our team does math), but it seems that there should logically be a mathematical formula to do that.

Like (purely hypothetical):

<Custom Class Parameters>

atk = level * 5 + (something here that would say between 2 and 5 points up each level);

</Custom Class Parameters>

#### Johnboy

##### Veteran
Try this:

atk = level * 5 + (Math.randomInt(3) +2)

That should give you a random number from 0-3 and then add 2, giving you 2-5.

#### overlordmikey

##### BroCo. Gaming
Try this:

atk = level * 5 + (Math.randomInt(3) +2)

That should give you a random number from 0-3 and then add 2, giving you 2-5.

Good news is it seemed that worked, bad news is it didn't create 2 to 5, instead 7 then 5 then 6. So it's random, but the math seems off.

However this is still a new gain in knowledge so thank you.

Last edited:

#### overlordmikey

##### BroCo. Gaming
Ooops. I put Math.randomInt(3) when it should be Math.random(3) I think. Maybe try that instead? I'm still learning all this myself but here is a reference to a damage formula page:

Okay this fixes a thing where stats can go down when leveling up (as far as I can tell), but on the flip-side it does not fix a (lets call it a glitch) glitch when un-equipping things (or even just hitting remove with nothing equipped) and changing-removing classes/subclasses causes you're stats to randomly fluctuate. I may be forced to give up on this plan sadly, but I haven't given up yet. If you have any ideas just let me know. ^_^

### Latest Profile Posts

This could probably be an entire thread, but it’s really interesting how replaying a game several years later can change how you relate to a character. I think Tidus from FFX got such a bad rap. I getchu. Completely different reaction as an adult now.
As you see, I still enjoy writing tutorials. Is there anything specific you want to see? (I know mapping and editing/resource making is usually popular, but those are very broad topics)
Well, I wanted to expand player battlers visually and now have 3 sheets and counting for each of my players party.
1. Regular sheet
2. The character has turned stone sheet.
3. Using potions sheet.

Technically the main hero has 4 since he starts with a wooden sword, and I felt that the battler should reflect that until he gets a metal one.

Right back to the RM game dev grind in about 15 minutes.