Need help with a little math.

Mr. Detective

NATO Special Operative
Veteran
Joined
Sep 9, 2012
Messages
883
Reaction score
353
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,771
Reaction score
1,690
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
42,189
Reaction score
14,662
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
883
Reaction score
353
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
42,189
Reaction score
14,662
First Language
English
Primarily Uses
RMMV
Then I'll move it to General Discussion.
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,771
Reaction score
1,690
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

After gathering, sorting out & reconsidering hundreds of enemy battlers over the last two das, finally my favorite part begins: Inventing names and lore for them all :D
I'm running a sale for Learn RPG Maker MV on Itch.io, can I compete with NSFW games earning goals?
Another Friday and another Zoom call that could have been an email. Working from home is awesome.
Finished with the semester; finally have some time to play around with MV :kaopride:
Started work on the fishing Mini-Game

Forum statistics

Threads
111,368
Messages
1,060,527
Members
144,696
Latest member
Asher491351
Top