RPG Maker Forums

Hello everyone!
I've been tinkering around with my Exp system, wanting to create a level difference based exp gaining system like the one we can see in CrossCode for example.
Needing help to set this up, I asked for help on the forum:
Here's a link to the related thread: https://forums.rpgmakerweb.com/index.php?threads/exp-gain-tweaking-help-needed.109998/
(Credits to @mathmaster74 for his help and advice on this case)

Here's what mathmaster74 recommended me to do:
Set up a battle event page for each enemy in the troop. Set the condition to Enemy HP (X) <= 0%, where X is the EnemyID you set this page up for. Then enter the following Event commands:
◆Script:for (var i = 1; i <= $gameParty.aliveMembers().length; i++) { //Sets a loop to award Exp to each alive party member.
: : var Difference = ($gameActors.actor(i).level + 5).clamp(0, 11); //See below for full explanation.
: : var Multiplier = [5, 4.3, 3.7, 3.2, 2.8, 2.4, 2, 1.8, 1.6, 1.4, 1.2, 1][Difference]; //Multiplier amounts can be changed and/or added to.
: : var ExPts = 80 * Multiplier / $gameParty.aliveMembers().length; //80 is the amount of Base Exp enemy is worth. Change to suit.
: : $gameActors.actor(i).gainExp(ExPts); //Awards proper Exp per formula each time an enemy dies up until the last one.
: :};
◆Control Variables:#0001 EnemiesDefeated += 1 //Keeps count of enemies defeated.
◆If:EnemiesDefeated = 2 //The value here should be the number of enemies minus 1. Condition runs when only 1 enemy is left.
◆Change Enemy State:Entire Troop, + Immortal //"Entire Troop" at this point is the last enemy.

:End
◆If:#1 Bat is affected by Immortal //This was page #1 in my example. The enemy denoted here should match enemy the page is made for.
◆Change Enemy State:Entire Troop, - Immortal //Allows battle to end now that last enemy is defeated and Exp is awarded for it.

:End

Difference was set up based on an example provided by a user who originally asked for the script. They had set up tiers for level differences as follows: actor - enemy = -6, actor - enemy = -5, actor - enemy = -4, ..., actor - enemy = 4, and actor - enemy > 4, so that there were 11 differences in level that earned unique multipliers. Since their differences started at -6, a modifier of +6 was applied to compute difference. Since the var Difference returned a NaN error if the enemy level was referenced globally, I just plugged in the actual enemy level (something you should be able to decide upon if you're making each page for the target enemy) as a minus, and then combined with the modifier of +6 (because the clamp starts at 0...so shift -6 up to 0, -5 up to 1, etc.) In this example, the enemy is level 1, so actor - enemy + modifier = actor - 1 + 6, which reduces to actor + 5.

Multiplier was also set up according to the specific original request. If they had wanted 12 level differences with unique multipliers, that's easily added in by giving one more value in the [Multiplier list] and setting upper bound of clamp to 12.
After testing out all the script and formulas mathmaster54 recommended, everything technically works. My only problem is how to display gained Exp to the player, as there is no way to inform how much exp he gained from killing an enemy (Aftermath plugins like Yanfly's won't display gained Exp as it isn't gained conventionally.)

Ideally, gained exp could be displayed right when it is obtained, like a popup on top of the defeated enemy EDIT: On top of each actor! This will allow the player to check instantly how efficient his exp farming is, while granting him satisfaction from seeing his work on killing that enemy paying out.

That is my request: I need a plugin that can do that, which is displaying a popup saying " + [ExPts] Exp" once an enemy is defeated. Simple, yet impossible for me with close to 0 knowledge in creating JS plugins :/

Also, as a bonus, it would be perfect if we could have similar popups if an actor levels up in combat, like a fancy popup showing up on their portrait (I'm using front view battle system)

Also, I would feel bad if @mathmaster74 's work was all for nothing, i wanted to show him we can make a working system from his work and ideas :)

Thanks in advance for your help!

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,049
Messages
1,018,546
Members
137,835
Latest member
yetisteven
Top