End of battle event? (still need help)

Hello, another question! Sorry if its been answered before, I really did try searching through this forum, but the Search function doesn't seem to be working for me (0 results no matter what I type)  + there's only so many pages I can go through before going a little nuts.

I'm just wondering if there's an easy way to run an event (in this case, full MP regen) once a battle is over. I tried doing an event to add +9999 MP whenever the player is back on the map (didn't use the recover all since I didn't want to regen HP), but the problem with this is that it works continuously. Meaning, if you use the heal Skill from your menu, you'll automatically regen what MP you just spent, which I don't want, so that was a bust. I have no idea how to make this happen only once post-battle, can anyone help?

ive tried using Hime's End Phase Triggers plugin, but I couldn't get it to work for some reason, it would just go straight to the victory screen after all enemies were defeated no matter what event was supposed to play before it. Maybe I'm just doing it wrong. If anyone could manage to get the effect I want, using whatever plugins, please let me know how. this is really driving me crazy 🙁
I'm not sure about this, but I think parallel-process or autorun common events don't run while in battle. So you could do the following:


1. At battle start, turn Switch "Battled" ON.


2. Have a common event autorun with that switch as a condition. In it, restore MP and do whatever else you want to do after battle. Lastly, turn the switch OFF again.


It that doesn't work, maybe there's a way to check whether you're actually still in battle or not. You could continuously check if there are enemies alive or something like that. I mean, it's all super-easy if you resort to plugins, but I, personally, try to solve problems with events only. 🙂
I'm not sure about this, but I think parallel-process or autorun common events don't run while in battle. So you could do the following:


1. At battle start, turn Switch "Battled" ON.


2. Have a common event autorun with that switch as a condition. In it, restore MP and do whatever else you want to do after battle. Lastly, turn the switch OFF again.


It that doesn't work, maybe there's a way to check whether you're actually still in battle or not. You could continuously check if there are enemies alive or something like that. I mean, it's all super-easy if you resort to plugins, but I, personally, try to solve problems with events only. 🙂


Super sorry if it's obvious, but how I go about doing this? I've only just started learning the program and one thing that's eluding me is conditions involving battle. What would the step-by-step be of starting an event at the beginning of a battle be? And how do I get an event to happen at the end of battle? I feel so silly not being able to find these things FFF 
Battle events are set in the troops tab. For a battle start event, you just put "Turn 0" as a condition. As far as I know, "Don't run" SHOULD work, but doesn't. Unless they fixed it. Just test it with a test message to see if/when your event runs. 🙂  In each troop, you call a common event on turn 0 that contains your battle start stuff that's supposed to happen. In this case, toggling the switch.


For the battle end event, I'm not sure myself, either. I think having a common event that is set as autorun with said switch as a condition MIGHT work. I THINK that event doesn't run while in battle, so it will be started once you leave the battle. But I may be wrong. If I am, we need to figure out another solution.


You do use standard encounters, right? With visual encounters, i.e. enemy sprites, it would be much easier, since you could call the battle end stuff directly from the enemy sprite event itself.
Battle events are set in the troops tab. For a battle start event, you just put "Turn 0" as a condition. As far as I know, "Don't run" SHOULD work, but doesn't. Unless they fixed it. Just test it with a test message to see if/when your event runs. 🙂  In each troop, you call a common event on turn 0 that contains your battle start stuff that's supposed to happen. In this case, toggling the switch.


For the battle end event, I'm not sure myself, either. I think having a common event that is set as autorun with said switch as a condition MIGHT work. I THINK that event doesn't run while in battle, so it will be started once you leave the battle. But I may be wrong. If I am, we need to figure out another solution.


You do use standard encounters, right? With visual encounters, i.e. enemy sprites, it would be much easier, since you could call the battle end stuff directly from the enemy sprite event itself.


hnn ;; I just can't seem to get this to work.  Maybe I'm doing something wrong.
I found a plugin that's supposed to allow events to run at the end of battle, but it's not working for me for some reason. It'll run my 'enemy death check' and proceed with the event if there's atleast one enemy left alive, but if all enemies are dead it just skips right to the victory screen, which the plugin SHOULD be preventing but isn't. this is driving me absolutely bonkers sdhfhdf this should be so much easier to accomplish haha

im not sure what you mean by standard encounters? I am just using default enemies for now, nothing special except for some of yanfly's animited animations effects.
As far as I know, "Don't run" SHOULD work, but doesn't. Unless they fixed it.

"Don't Run" has always worked - the problem always was that people didn't understand it and assumed a wrong interpretation. That "RUN" has absolutely nothing to do with the escape command.


It comes from "to run a program", which means " to execute a program".


Or in other words: the condition "don't run" means "never process this event" - and that is exactly what it does, never starting the event.


It's a shut-off so that you don't need to delete an event if you're bughunting and don't want that event to happen.
Set up the troop event as Turn 0 + 0, Span = Battle.  If you struggle to get it working, or you don't want to set this up for every single troop event, you could use my Battle Result Switches plugin, and specify the same switch id for all 4 battle outcomes.  At the end of every battle, that switch will be turned on.  It will be up to your parallel process common event, conditioned by that switch, to do what you need to do and then turn the switch off again.





I hope that links properly.  This forum seems to want to quote the thread rather than just provide a link.
Set up the troop event as Turn 0 + 0, Span = Battle.  If you struggle to get it working, or you don't want to set this up for every single troop event, you could use my Battle Result Switches plugin, and specify the same switch id for all 4 battle outcomes.  At the end of every battle, that switch will be turned on.  It will be up to your parallel process common event, conditioned by that switch, to do what you need to do and then turn the switch off again.


I still couldn't get it to work after trying turn 0+0 / span=battle, could've been a plugin issue. I tried your plug-in, and it does seem to work -- it triggers the event at battle end (yay!) and now my last problem is how to get the common event to /stop/ running. It seems to want to give the player 9999+ constantly. I tried Event Erase and Exit Event Processing, but it still continues on. Normally for this sort of thing I use a self-switch and a blank 2nd event page, but there arent' event pages for common events...atleast not that I can see. Am i missing something ;;
It will be up to your parallel process common event, conditioned by that switch, to do what you need to do and then turn the switch off again.



Erase event only works on map events (including a map event that has a call to a common event and the erase event command is in the common event).  Yours is neither.  And Exit Event Processing does not work on autorun or parallel process events of any kind, because that command simply moves the index to the bottom of the list, and in parallal/autorun events, once it reaches the bottom of the list, it goes back to the top and starts over.


You just need to do a Control Switches to turn the switch off at the end of the common event.

Original thread: https://forums.rpgmakerweb.com/threads/end-of-battle-event-still-need-help.55233/