End Phase Triggers MV

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

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.

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

You may also like...

12 Responses

  1. 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 🙁

  2. 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

  3. 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.

  4. 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)
      
  5. Sundricat says:

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

Leave a Reply

Your email address will not be published.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax