End Phase Triggers MV
Have you ever had a situation where your troop events didn’t seem to run in battle? For example, when the last enemy has been defeated and you want more enemies to appear, you found that instead of the enemies appearing, you simply won the battle?
By default, when the last actor or enemy has been defeated, the game will immediately go to victory or defeat processing. This means that if you have an event that should run after the last enemy has fallen, that event will be ignored.
You may have discovered workarounds such as setting your enemies to “immortal” so that you can run your events, but is there an easier way to handle this?
The purpose of this plugin is to address the issue that I have described. By simply inserting this into your project, the game will perform an extra check before the end of battle to see whether there are any events that can be run, and proceed to run them!
Download
Plugin: download here (right-click and save as)
You may be interested in reading some dev logs I’ve written about the issue while designing this plugin:
Installation
Download the plugin and place it in the “plugins” folder in your project’s “js” folder. Then open your Plugin Manager (F10), double-click an empty row, and select the EndPhaseTriggers plugin.
Once it is in your list of plugins, turn the plugin on.
Usage
Plug and Play. Just enable it and it should work.
This is no longer detected by the RPG Maker MV. Please fix.
Hi, I tried the script, but it didn’t work when battle ended, I tried using the “gameTroop.isAllDead()” with the custom page conditions and a normal page with a check of “Enemy HP <= 0%” none of them worked.
I have an ATB system from Moghunter, but even with that disabled it still doesn’t work, that was the only script that changes the battle apart from visually.
Could it be related to the RM Version? i’m using the v1.5.0.
Figured it out, a visual plugin had a command to disable the message box on enemy selection, which ended up disabling for the entire battle.
Is it possible to combine this with Level Up Events? I really want to be able to run an event when an actor levels up, but before the player is sent back to the map, as I personally feel it can be annoying if there’s a cut-scene supposed to be happening but you have to sit through your characters level ups first.
You would need another plugin that allows you to run common events during battle. That’s…pretty much the only reason why common events don’t run.
Really nice plugin! How did you do the slime count after the battle? I want to move the party after a random encounter ended and I hope to do it with this plugin in the same way you showed the slime count. But it is not clear to me how you did it 🙁
i am trying to do a command where if the enemy’s hp is 0 or below that it shows a choice but the plugin does not seem to be working i did set it to on but it still does not work
never mind it is working now i dont know what was wrong
I have now the script but I don’t know how to use it…I will make an event, that says: if all enemies are dead than the game will end. Hope someone can help me…
If you want to check if all enemies are dead, you can create conditional branches that will check if each enemy has the death state applied.
If you use the custom page conditions plugin, you can use the condition
As the page condition, which will activate when all enemies are dead.
How would I check to see if the whole battle party has one state?
You can use the “every” method which allows you to pass in a function and execute the function over all elements in the array.
The method returns true if every function call returns true.
te
For example, you can take an array of battle party members and check if all members have state 1 inflicted.
How would I set a conditional branch that activates after all enemies are defeated?
Use Custom Page Conditions to set up the condition:
End phase triggers will then do a check to see if any pages can run before the battle ends and see that all enemies are dead.
Didn’t think you’d still provide support after all this time. Mind if I trouble you? I plan to use a skill that is in effect a non-looping victory pose.
I am not entirely sure whether you can execute actions during the end phase, but you can try using a force action on the user.
How can I call a command plugin when HP of party actors reach to 0?