# Need help with a little math.

#### Mr. Detective

##### NATO Special Operative
Hello,

I need help with calculating some numbers.

Let's say I have a character that starts with 100 HP, and I want her maximum HP to increase by 10 every time she levels up. What would the maximum HP be when she reaches level 100 (or 99 in the database)? I thought it'd be 99 x 10 = 990, then 990 + 100 = 1090, that doesn't seem right. Sometimes, her HP increases by 11?

Let me ask this, too. I want to set the maximum MP of a character to 25, and he can reach this by, let's say, level 40. After that, he stops gaining MP. Is the only way to do this to go into every single level, and manually put how much MP I want to increase by?

#### Zerothedarklord

##### Veteran
1080. you only gain 98 levels because in the database, the max level is 99, 99 - 1 = 98.

#### Uruuha

##### Villager
How much Life does your Character Gain per Level ? Ex : 25 per Level

How much Life does your Character Start with ? Ex : 100... at (Level 1 )

Now, Think of it this way 99 Levels = Level 98 + ( Level 1 )

So, Calculate the HP Gain for 98 Levels and then add HP at ( Level 1 )

= 98 X 25 + (100)

= 2450 + 100

= 2550 Life at Level 99

(If you want Consistency in Value gain Per Level, keep all the Values ending in "5"s and "0"s)
Ex : 5.. 10.. 15.. 20 etc

As for your other question, I think the only 2 ways you can achieve that are :

- Capping Starting Value the same as Final Value.. (Ex : 25 Mana at Level 1 ~ 40)
- Capping Max Level of Character at 40 and repeating the same thing as above but adjusting the value for 40

Last edited:

#### Aesica

##### undefined
You can use this formula to calculate the hp (or mp or whatever) for any level, really:

Code:
``````max = 99; // level you're calculating up to
initial = 100; // starting value
gain = 10; // amount gained per level
result = initial + gain x (max - 1);``````

#### Shaz

##### Global Moderators

I've moved this thread to MV Support. Please be sure to post your threads in the correct forum next time. Thank you.

I don't actually know if you're using MV or another engine, but this is not a discussion of mechanics - it's a "how do I make X happen" question. If you're using a different engine, just post what it is, and one of us will move it to that forum.

#### Mr. Detective

##### NATO Special Operative
@Aesica Any way for me to cap maximum MP at a certain level and it never increases again? Or I just have to change the MP amount for each level manually?

@Uruuha Sounds like doing it manually, huh? XD

@Shaz Uh... This has nothing to do with the engine. I'm using MZ, by the way. It's a formula question that can be applicable for any engine, just to clarify.

#### Shaz

##### Global Moderators
Then I'll move it to General Discussion.

#### Aesica

##### undefined
@Aesica Any way for me to cap maximum MP at a certain level and it never increases again? Or I just have to change the MP amount for each level manually?
Not without a plugin. Or you could always make the growth rate be a straight line so it never increases. That's only ideal if you're using a system where abilities scale with level--as in, the Fireball you learn at level 1 is still effective at level 99.

### Latest Profile Posts

For anyone interested in my project M - i finally made a gamethread about it

Yay. I turned 39 today. Another year older, another year closer to the grave.
I'm sure the latest post/thread in the sidebar used to have 5 posts. Was it always been like this?

### Made it to the 10th video doing this! ​

Made the "My Beating Mystery" board today:

in Grim Trigger episodes 3 & 4, the main characters play a Clue rip-off board game called "My Beating Mystery" (haha), so of course I had to draw the board for it. Can't decide if I wanna add blood or not