MZ Run a common event after a battle win (random encounter)

Is this possible?
I also have Visustella.
Not a Script Solution, but maybe it helps:
An Evented Workaround for standard Random Encounter would be:
If every Troop Event got an Eventpage running at Turn 0, 0 once in Battle.
There you could Turn a Switch to On.

That Switch will be the Page Condition for a Parallel Common Event, which executes your code and than it Turns itself Off by Switching the Switch Off again.
That means after the Battle the common Event would run.

Edit:
Sorry Scrap what i said, i overread the "WIN" in the Headline. That is not possible with the above.
Edit2: Ok it is possible thanks to Caethyril further down in this Thread XD.
Heya,

This is indeed possible with Visustella! The battle core, to be precise.

Navigate to the plugin settings, and then 'Mechanics Settings'. There you'll see a way to trigger a common event for a variety of battle outcomes such as victory, loss, escape, etc.
Easier in your case to just use the Battle Core parameter, but here's more detail on a non-plugin approach (just use Win Count instead of Escape Count):
To condense what's already been said: I'd suggest making a Common Event with either Parallel or Autorun trigger, assigned to a switch. Turn on that switch in a troop event with Condition: Turn 0, Span: Battle. This will cause the event to activate as soon as you return to the map (by default Autorun/Parallel events only run on the map, not in battle).

In that common event you can check whether the number of escapes has increased by comparing it against a running tally: Control Variables > Game Data > Other > Escape Count; if it's changed, do the things! Then turn the switch off at the end of the common event so that it only runs once. 😮‍💨

Common event example:
Code:
◆Comment:Check difference in escape count
◆Control Variables:#0008 escapes -= Escape Count
◆If:escapes ≠ 0
  ◆Comment:Escape count has changed!
  ◆Text:None, None, Window, Bottom
  :    :You got away!
  ◆
:End
◆Comment:Update escape count variable for next time
◆Control Variables:#0008 escapes = Escape Count
◆Comment:Turn off switch so event only runs once per battle
◆Control Switches:#0011 battle end = OFF
i overread the "WIN" in the Headline. That is not possible with the above
yes and no.

the way described will trigger the common event after every battle, and then the common event can check if the battle was a win or not and either abort or execute the rest of the event.

and since in default you have to win random battles or go to game over, this is even automatic in default and you would only have to check if you modified the game to continue after lost random battles anyway.
and since in default you have to win random battles or go to game over,
Escape and abort are also possible outcomes. 👋
Heya,

This is indeed possible with Visustella! The battle core, to be precise.

Navigate to the plugin settings, and then 'Mechanics Settings'. There you'll see a way to trigger a common event for a variety of battle outcomes such as victory, loss, escape, etc.
Excellent, thank you very much.

Original thread: https://forums.rpgmakerweb.com/threads/run-a-common-event-after-a-battle-win-random-encounter.151863/