# [RM2K3] IS THERE A WAY TO CHECK REQUIRED EXP FOR NEXT LEVEL?

## Posts

Pages:
1

The only way to do that is to manually set variables to the EXP required I entered in the Database. If I change my mind later on and change EXP values required for my characters, I'm looking at updating hundreds of conditional branches.

So yeah. Any neat little trick to do this?

Example with numbers!

Hero Higgins is lv10. Our level curve is 10,000 EXP to reach level 10, 14,350 EXP to reach lv11 (not real RM2k3 exp numbers). Hero Higgins has 11,840 EXP right now. We want to find out the EXP remaining:

1) Assign Hero Higgin's current EXP to variable 1. V1 is now 11,840.

2) Set Clone Higgin's level to 11. The safest way is to reduce Clone Higgin's level by 99 then increase it by Hero Higgin's current level. So something like:

VARIABLE: V3 = Hero Higgin's Level

CHANGE LEVEL: Clone Higgins -99 (this will set it to level 1, 0 exp)

CHANGE LEVEL: Clone Higgins + VARIABLE: V3

(this will add Hero Higgin's level 10, to Clone Higgin's lv1 giving him level 11)

4) Subtract V2 by V1. 14,350 - 11,840: 2,510. This is Hero Higgin's EXP needed to reach level 11, available to do what you want with it.

I can throw together a demo project tonight too if it'll help.

I have to say, Rm2k3's way of handling EXP and level ups is pretty peculiar. Most RPGs of the SNES era reset your EXP to zero when you reach a new level, and the EXP required for the next level is higher than the previous one, but not a number added on top of the amount needed for the previous one. Unlike Rm2k3, which doesn't reset your EXP to zero, but lets you keep the EXP you needed for the level up as your current EXP, and just adds more on top.

So what I kinda wanna do is make a common event that checks if a character's level increased, and reset their EXP to zero. But it only needs to do it once, at the moment the level is increased. Then I'd use my own EXP values instead of Rm2k3's. Do you think that's feasible, or is this fighting the engine too much? And how could I pull this off without once again checking every level?

Every experience curve in RM2k3 has three properties: Base Level, Acceleration, and Extra Value. (

**)**

__WARNING: in the official translation, the values are mislabeled and Extra should be labeled Acceleration! These formulas below are written assuming the 2nd value is Acceleration and the 3rd value is Extra.__So, given your experience curve has:

B = Base Value

A = Acceleration

X = Extra value

Experience needed to get from level L to L+1:

B + X + A(L)

Total experience needed to reach level L:

(L - 1)(B + X) + A( L(L-1) / 2 )

Examples..

Given B=25, X=15, A=8

Experience needed to get from 5 to 6:

B + E + A(L) = 25 + 15 + 8(5) = 40 + 40 = 80

Total experience needed to reach level 6:

(L-1)(B+X) + A( L(L-1) / 2)

= (6-1)(25+15) + 8( 6(5) / 2 )

= 5(40) + 8(30/2)

= 200 + 8(15)

= 200 + 120

= 320

If you want to know exactly how much EXP is needed to get to the next level:

Given the hero's level is 6, we want to target level 7.

Take the hero's EXP (assign it to a variable) and subtract it from the Total Experience needed to reach level 7.

So say the hero has 350 EXP.

Given the same base, acceleration, and extra value parameters..

Total exp needed to reach level 7:

(L-1)(B+X) + A(L(L-1) / 2)

= 6(40) + 8(7(6) / 2)

= 240 + 8(42 / 2)

= 240 + 8(21)

= 240 + 168

= 408

Needed for next level: 408 - 350 =

**58**

It's a nontrivial amount of calculation to do in RM2k3, but simple enough to code up in a common event and reference whenever you need it. Hope this helps you out!

Talk to the boy to see the experience and with the girl to get a quantity.

http://www.mediafire.com/file/31w9wv2cil8h9vx/hero+exp.rar

Pages:
1