Pages: 1
So Rm2k3 lets you store the EXP of a character in a variable, but only the current EXP, not the EXP needed for the next level. So if I want to manually track that, and my max lvl is 99, do I have to make 99 conditional branches for every character that check their levels and enters a value inside a variable?

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?
I'd suggest looking up the RM2k3 EXP algorithm and implement that in event code. Take a character's level (and if each character has different EXP curve parameters the ID too), calculate the EXP needed to reach character level+1, then subtract their current EXP. It'd be better than the hell of 99 conditional branches. idk the algorithm off the top of my head and my google-fu can't find it but it's hopefully in the help documentation.
IDK if my solution is the roughly the same as GRS's. But when setting a character's level it'll set their EXP to what's required. You could duplicate a hero with the same exp table and have their level always = the real characters level but +1 and grab their exp from there.
It's definitely more convenient than mine, that's a clever trick!
I don't really understand what both of you just said, but I'll look through the help file
To expand on Darken's solution: We have Hero Higgins who at some point we want to find the EXP to next level on. To do so we make a clone of HH in the database with the exact same EXP curve, we'll call it Clone Higgins. Then when you want to find HH's EXP to their next level you take Clone Higgins and set their level to HH's level+1. RM2k3 will give Clone Higgins the amount of EXP needed to reach that level which you can then assign to a variable. You take Clone Higgin's EXP and subtract Hero Higgin's current EXP and that will give you the EXP HH needs to reach the next level.

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)
(this will add Hero Higgin's level 10, to Clone Higgin's lv1 giving him level 11)
3) Assign Clone Higgin's current EXP to variable 2. Since Clone Higgins level was set to lv11 in step 2 his current EXP would be 14,350, the EXP required to reach lv11 with our curve.
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.
Ah. I see what you're saying.

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?
Personally trying to make a custom EXP curve in 2k3 sounds like hell but all those dynRPG(?) plugins might've made it more convenient. I haven't used 2k/3 for ages though so I can't offer any real support on this though. Hopefully some 2k/3 power users can help, or maybe a new thread about trying to create a custom EXP curve might get them to pop in?
To me, resetting the experience every level seems like it'd be pretty tedious. To your point about SNES RPGs doing this, I don't know if that's even true. A quick glance at all the major final fantasy games of the SNES era keeps a cumulative total of EXP, and then tells you how much is needed for the next level. BUT! Regardless, here is how you calculate experience needed.

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 )

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!
In my project I use this method to get the experience.
Talk to the boy to see the experience and with the girl to get a quantity.
Pages: 1