Need help with a little math.

Mr. Detective

NATO Special Operative
Veteran
Joined
Sep 9, 2012
Messages
860
Reaction score
332
First Language
English
Primarily Uses
N/A
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?

Thanks in advance!
 

Uruuha

Villager
Member
Joined
Nov 17, 2020
Messages
20
Reaction score
19
First Language
English
Primarily Uses
RMMZ
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
Veteran
Joined
May 12, 2018
Messages
1,735
Reaction score
1,663
First Language
English
Primarily Uses
RMMV
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
Global Mod
Joined
Mar 2, 2012
Messages
41,894
Reaction score
14,526
First Language
English
Primarily Uses
RMMV

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
Veteran
Joined
Sep 9, 2012
Messages
860
Reaction score
332
First Language
English
Primarily Uses
N/A
@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
Global Mod
Joined
Mar 2, 2012
Messages
41,894
Reaction score
14,526
First Language
English
Primarily Uses
RMMV
Then I'll move it to General Discussion.
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,735
Reaction score
1,663
First Language
English
Primarily Uses
RMMV
@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 Threads

Latest Posts

Latest Profile Posts

Yesterday I went to get some new jeans for my new job... and discovered I'm a plus size. I'm planning on dieting so I can get back to where I was before 2020. I decided on a Japanese food diet because the recipes I can cook at home are both low-calorie and delicious.
Did you ever had the wish to become a carpenter?
:kaojoy:Here comes a better driver AI. I sent some monks to pacify angry car drivers who previously just run over people without any consideration of life.
(Sorry, no English version of the video this time.)
Another character battle theme

Forum statistics

Threads
110,499
Messages
1,053,787
Members
143,596
Latest member
phantomgalaxy
Top