Plugin to run common events before\after battle?

Is there any plugin to run a common event before a battle? And one for run a common event After a battle?
For the built-in random encounter system, right? 😅
  • Before battle: you can use a troop event with Condition: Turn 0, Span: Battle.
    • Turn 0 happens before the first input phase (after emerge messages).

  • After battle: you can turn on a switch in the Turn 0 troop event. Make an Autorun/Parallel common event assigned to that switch, and make the common event turn its switch off at the end so that it only triggers once per battle.
    • This common event should run when you return to the map.
      (By default, Autorun/Parallel events only run on the map.)
If you need different timing then I think you'll need to either design your own random encounter system using events, or find a plugin (I don't know of one but maybe someone else does). 👋
For the built-in random encounter system, right? 😅
  • Before battle: you can use a troop event with Condition: Turn 0, Span: Battle.
    • Turn 0 happens before the first input phase (after emerge messages).

  • After battle: you can turn on a switch in the Turn 0 troop event. Make an Autorun/Parallel common event assigned to that switch, and make the common event turn its switch off at the end so that it only triggers once per battle.
    • This common event should run when you return to the map.
      (By default, Autorun/Parallel events only run on the map.)
If you need different timing then I think you'll need to either design your own random encounter system using events, or find a plugin (I don't know of one but maybe someone else does). 👋

Brilliant! I never thought about that.

I use Yanfly Utility common events to trigger events when the battle ends, but it doesn't work to tigger events before battle.
Thanks
I am also testing this script, it let you trigger a common event before the battle:


Sadly is giving me some errors with some yanfly puggins.

Original thread: https://forums.rpgmakerweb.com/threads/plugin-to-run-common-events-before-after-battle.130935/