Needing help with custom leveling/EXP

Making my first game in RPG Maker 2003, and it's pretty fun, but I'm having a little bit of frustration with the leveling system.

Background: the game I'm making is sort of a vignette style - there's eventually going to be 8 sort of "mini" RPGs of about 2-3 hours long each. As such, there is no need for me to have 99 levels available.

Design:
1) I want my characters to max out at level 20.
2) I need the level growth to be way faster in the early levels, and way slower in the later ones, than the built-in leveling system seems to be capable of.

Need:
I'm looking for a solution that involves either:
- making the built-in leveler to top out at level 20 and calculate appropriate growth based on that,
or
- for the game to ignore the built-in leveler.

Reasons:
So far, I've figured out that I can trigger level up on the schedule that I want using a couple of variables (probably going to be a total of 16 to account for each story's main character) and adding a parallel process event on each map in which a character can gain exp. The issue is, the standard exp growth is also kind of active, so either:
- I can set the built-in exp growth to impossibly high so my event growth happens, but then on level up it shoots the exp up to where the character would be on that level (example: on playtest my character gained his first 10 exp, went to level 2 as per my event, but level 2 according to the built-in leveler was 2000 exp, so he automatically gained 2000 exp, which in my event was level 13. After 3 battles, most of which were 1 exp, character grew from level 1 to level 13)
or
- I can set the built-in level to sort of comparable at first, but later levels would be way too easy to achieve.

Any suggestions, or even alternative solution approaches, are appreciated!
I... actually think I found a way to do this!

Wanted to share because I did a decent amount of digging and found a lot of people wanting to do it but most answers were "it can't be done, sorry." So I thought I'd post my solution for anyone that might want to do this... and can decipher this mess. Figuring this out has made me convinced that anything can technically be done if you use your tools creatively (good advice for the real world, too, I guess.)

It's not elegant in any way shape or form, it's outright convoluted as all get out, but it technically works, and that's good enough for me (for now)!

1) Character setup: If you don't care about actual levels, then you can set your guys to have a max level of 1 and just manually add the stats as you go with the event detailed in step 7. If you want the actual level to display then make sure your heroes are able to actually level up, and you can put the stats on the levels on the Actor info page.

- It doesn't really matter what values you enter into the exp curve generator. We won't be using that, and the way we set it up, the game will just think the heroes always have the lowest amount of exp needed for the level until the level goes up. I guess just pick some numbers that looks nice to you.

2) You will need 2 variables (possibly per character depending on if everyone has different growth rates), one that will be the same as the character's level, and one that will keep track of the actual exp. Note that this will not be the same as the displayed exp (the automatically generated exp) like I mentioned above because that will always be the lowest amount needed for the level. See step 4 and 7 for the reason.

3) Create an invisible enemy. Trust me on this...
Make this invisible enemy do nothing as it's normal action. Make it invincible - can't take damage, can't have a stat change - I have all my states and elements have 0% on letter E, normal attacks miss, etc. [If any of you know how to make an enemy untargetable, please let me know!]
1637133838348.png


4) Make every enemy give you 0 Exp. Every single one. We'll take care of this later.
If you want drops and money, go ahead and put it on the enemy if you want. I don't because I added it later with the exp and I wanted to keep them all together, but if you want to, you do you.
1637134025962.png


5) When you make your troops, add your invisible monster to every battle in some sort of out of the way location and make it the last one in priority (i.e. add it last.) Again, trust me on this...

6) Now we're gonna need some battle events. I haven't tested this with battles that have actual game mechanic events yet, so you may want to play around to see if it needs to be on the first few pages or the last (I reckon last - rightmost, highest number - but as I said, I haven't tested.)

- It may be easier to make one page then copy-paste for the rest of the enemies. Set the page to have a condition to "Enemy [#: Name]'s HP [0]".
1637134125112.png


- Add a conditional branch, check "Set handling when conditions do not apply". The condition should be Enemy [the ones still alive] can move. You may need a bit of a cascading tree to check each enemy EXCEPT your invisible friend.

- When the condition to move is met, leave it blank. (Not sure how this would be affected by something like a stun or sleep status... More research may be needed, but for now this is what we have to work with.)

- On the innermost Else, have your battle victory. Play your battle end music, add the total EXP you want your heroes to get to your Exp Variable (NOT by changing exp!!!), add an additional victory message if you want (the default one will still show, so this one is extra and will play first). You may want to add a text box saying how much they earned if you want your players to know. If you want to do the gold and drops here instead of on the enemies, put that line and add it to your text box.


[edit:]
I found an easier way to do it using a kill counter! (The above didn't really work right anyway.)
Your condition for the battle event is going to still be Enemy HP = 0, and you'll still need a page for each enemy.

- Add a variable, I call mine "Enemies". We will refer to this to tell when our victory should run.

- Also add a bunch of switches - you'll need enough to have one for each enemy in any given troop (except invisible monster). I have 10 dedicated to this purpose because I won't have more than 10 enemies in a troop at any time. (I labeled them "Enemy 1" through "Enemy 10").

- Add a conditional branch, have the condition be your variable "Enemies" = your total number of enemies. (i.e. I have a troop of 5 bees, so I want to set the variable check to 5). Check "set handling when conditions do not apply."

- In your main condition, put in your victory music & animation if you have it, add to the Exp variable (again, don't add the character's exp, but use the variable), your additional victory message, your "You earned stuff" message, etc.

- On the "Else" line, add another conditional branch, this time you do not need to set handling when conditions don't apply. Your condition here would be your Enemy [#] switch is OFF. Control variables, and add +1 to your "Enemies" variable. This is so that if all of the enemies are not dead yet, it will increase the count that the victory condition refers to. You also will need to turn one of the enemy switches on - the same one that you referred to on this conditional branch - so it doesn't keep adding the count for that critter each turn.

- At the end, just remember to set the "Enemies" variable back to 0, and batch turn off the Enemy switches.

1637709279314.png



[/edit]

- After all your exp/gold/drop commands and notifications etc are in, kill your invisible enemy by changing it's state to "Death". Don't worry about it's well-being; this is it very purpose, to make sure all that stuff ran before the end of the battle!

1637134162304.png


- Copy and paste, altering each page to condition the 0 HP for for each enemy EXCEPT of course your invisible friend, who gets to repeatedly sacrifice itself to the greater good of a messy but custom exp system. These pages are to ensure that it won't matter which enemy the player kills in what order, it will play the victory stuff when everyone (but the invisible friend) is at 0 HP.

7) Now the fun part! On a map where exp can be gained, place a new event that uses the transparent tile and and also out of the way. Set it to run "parallel process". Add a page for each level. If you go up to 99, have fun! (I'd already decided before this solution to stop at 20.)

- Have the condition for each page that the Level variable be the level your hero is going up from (i.e. if hero is leveling up from 1 to 2, the condition variable should be equal to 1)

- Add a conditional branch, and do not check the "Set handling when conditions do not apply"

- Manually increase the character's level. This will automatically update the system generated exp to be the minimum amount of exp needed for that level. Which, if you have your exp variable tied to your auto exp, this can make the leveling actually automatically happen before you want it to! Or bring your hero's level DOWN! So don't tie the auto exp to the exp variable... And that's also why all our enemies officially give 0 exp, and unofficially give exp to that Exp variable.

1637134340388.png


- If you are not using a number level system, manually increase the max HP, MP, etc for the other parameters.

- Feel free to add level up text. Sure, it will display on the map screen rather than the battle screen, and show before any other event text, but you gotta make a few sacrifices for the custom system.

- Make sure to also include a command to increase the level variable.

- Copy-paste this event into every map where exp can be gained. (No need to put it in the inn map, for example, unless your heroes can gain exp in the inn.)

8) To make the whole thing start working, make sure you have some way to set the level variables equal to your corresponding character at the very beginning of the game.

And... there you have it! A technically working custom Exp based level up system!

Limitations:
- There will be an EXP displayed on the status page that will not be the same as the value used to calculate the levels. You can create a key item to display, "[Character] has \v[n] experience points." where n is the exp variable.
- Level up text displays on map screen after the battle. If there is event text that plays right after the battle, the level up text plays first.
- Until I figure out how to remove an enemy from being targeted, there is just a random targetable invisible enemy on every battle.
- Might not work as intended if the enemies are stunned or asleep... resolved!

If I figure out anything more thorough I'll update if I can.

Original thread: https://forums.rpgmakerweb.com/threads/needing-help-with-custom-leveling-exp.142135/