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.

You may also like...

22 Responses

  1. It’s very interesting! If you need help, look here: hitman agency

  2. dobry sklep says:

    Hello, I read your blog on a regular basis.
    Your story-telling style is awesome, keep it up!!

  3. dobry sklep says:

    I just could not go away your website prior to suggesting
    that I actually enjoyed the usual information a person supply to your guests?
    Is going to be back incessantly to inspect new posts I saw similar here:
    %random_link% and also here: %random_link%

  4. e-commerce says:

    You actually make it appear really easy with your presentation however I find this topic to be actually something which I think I might never understand.
    It sort of feels too complex and extremely wide for me.
    I’m looking forward in your next put up, I’ll try to get the dangle of
    it! I saw similar here: sklep internetowy
    and also here: %random_link%

  5. I have been browsing online greater than 3 hours as of late, but I
    by no means found any fascinating article like yours.
    It is lovely price sufficient for me. In my opinion, if
    all webmasters and bloggers made just right
    content material as you probably did, the web will
    be much more helpful than ever before. https://seraphina.top

  6. Anonymous says:

    This is no longer detected by the RPG Maker MV. Please fix.

  7. Richilye says:

    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.

    • Richilye says:

      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.

  8. AngryAragami says:

    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.

    • Hime says:

      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.

  9. Cryptor says:

    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 🙁

  10. JKK600 says:

    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

  11. Theo James says:

    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…

    • Hime says:

      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

      $gameTroop.isAllDead()
      

      As the page condition, which will activate when all enemies are dead.

  12. Sundricat says:

    How would I check to see if the whole battle party has one state?

    • Hime says:

      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.

      $gameParty.battleMembers().every( function(actor) { return actor.isStateAffected(1) }, this)
      
  13. Sundricat says:

    How would I set a conditional branch that activates after all enemies are defeated?

    • Hime says:

      Use Custom Page Conditions to set up the condition:

      $gameTroop.isAllDead()
      

      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.

      • SpellcraftQuill says:

        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.

Leave a Reply

Your email address will not be published. Required fields are marked *