How to make Undertale-type sparing in battles?

I'm trying to make the battles go like this:Being able to spare enemies after performing ACT commands, and having enemies have unique ACTs and things you need to do in the ACT menu to spare them. I'm putting this thread in this forum because it'll most likely need a script to be possible.
Check out SmRndmDude on Youtube (I believe he is here too). He does several things with Undertale's battle system for MV.
here is a link to a video tuToriel (lol undertale puns XD)


the only ones I can find are for rpg maker mv but I think you can get the idea
Actually this is possible without scripts, or maybe you could need "Yanfly's Base Troop events", but it's somewhat complicated.
 


1)Make an animation of about 30 frames with nothing on it, and an empty state. Call them Empty or something like that.


2) Make skills that call common events, set the scope to All enemies, animation to Empty and add a feature to Add state-Empty. The common events open a given switch, for make things easier, call the skills, switches and common events the same, example: the Talk skill, calls Talk common event,which sets switch Talk to on.


3) Make a troop event page that needs a Switch to work, set the span to moment.


4) The first page needs the actor to learn the skills (or ACT commands) needed to spare a specific enemy, set the condition to Turn 0 and span Battle.


5) Make the content you need to advance in the Spare process, you would maybe need a Spare variable, and it adds 1 with every condition fulfilled. In order to avoid infinite loops, set the current switch to off.


6) When you sucessfully spare an enemy, call a common event that erases ALL the spare skills, including those that are not in that specific battle.


Note that the content about sparing enemies will be different in each battle depending on what you will put in there, and this only works in battles against one enemy.


I don't expect to overwhelm you, sorry if this seems too hard to do, but it's the way I found easier to do this.
Check out SmRndmDude on Youtube (I believe he is here too). He does several things with Undertale's battle system for MV.

I'm looking for a VX Ace one, though.
I'm looking for a VX Ace one, though.



Ahh. My bad.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-undertale-type-sparing-in-battles.66112/