Earned some gold and *blank* points - After Battle Common Event

Hi all -

I'm trying to get a common event which would award players with some custom skill points after defeating all enemies in battle. Right now, I have the event-battle play out, players are awarded gold, sent out of battle processing, then are given the points back on the map.

I've seen a few solutions to get events to play at the end of battle, but you can't really control the order of end of battle events happening (the making enemies immortal to get the event to play is nice, but then players are given points while the enemy is still present [unless I'm wrong about this]). 

I've also seen a script that lets players have a single event play at the end of every battle, but this means (without editing the script) that the number of skill points awarded would be limited (it'd be possible to change the amount with a good number of switches though...). 

So, there are a few options, but none seem 100% what I'm looking for. Any suggestions?

Also: what I'm looking for specifically is for the player to be awarded gold, then another text box awarding skill points, then the battle ends.

Thanks~~! ; )
Do you want everyone to earn the same skill points after the battle ends, based on what they defeated? If so look up Yanfly's JP manager. It is called JP in that script, but you could combine that with Yanfly's Skill Learning script to make it work. You may have to also go to Yanfly's Menu script to be able to use it, unless you wish to edit your menu script.

I think you can change the name somewhere in the script too, if you don't like JP.
If you want to run a single common event after the battle, then the solution is very simple - the entire workaround with immortal enemies is only when you need to run events specific to an enemy death...


1) make a switch "after battle event"


2) make a common event, set to parallel process and triggered on that switch.


3) inside the common event, make all calculations and rewards you want (usually based on variables of how many enemies, but I get to that later.


4) IMPORTANT: the last command of the CE has to be "control switch 'after battle event' OFF" to prevent it from running more than once.


5) now go to the troops database and make a troop event to run on turn 0, span = battle.


6) inside that event, control switch 'after battle event' ON


7) if neccessary, set variables on how much rewards you want to give for that troop


Finished.


Parallel processes are disabled on all menu screens and that includes the battlescreen. So even with the switch ON the CE will only run after the player has completed the battle and returned to map.


You only have problems handling escaping actors or enemies if that should change the rewards. That will get a bit more complicated than the short description above can handle...

Original thread: https://forums.rpgmakerweb.com/threads/earned-some-gold-and-blank-points-after-battle-common-event.41350/