Need help with a little math.

Mr. Detective

NATO Special Operative
Veteran
Joined
Sep 9, 2012
Messages
852
Reaction score
330
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,728
Reaction score
1,655
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,867
Reaction score
14,521
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
852
Reaction score
330
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,867
Reaction score
14,521
First Language
English
Primarily Uses
RMMV
Then I'll move it to General Discussion.
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,728
Reaction score
1,655
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 Profile Posts

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

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! :kaocry:

renderTimingPixel.png
Made the "My Beating Mystery" board today:
3ENFLSC.png

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

Forum statistics

Threads
110,407
Messages
1,053,061
Members
143,468
Latest member
oldj
Top