LOGIN
SEARCH
PROFILE
keys: ↑ ↓
LOGOUT
INDEX
MEMBERS
keys: ↑ ↓
HOME
PORTAL
PLAY ALONG
PLAY with WORDS
PLAY with GRAPHICS
PLAY with SOUNDS
PLAY with CODES
PLAY with PROJECTS
keys: ← →
Guest Access
Register:
Members:



View previous topic View next topic Go down Message [Page 1 of 1]

EVENTALIST
EVENTALIST
#1 Kill all Enemies, including "Appear halfway"
Loading

mr_wiggles

EVENTALIST
 EVENTALIST
EVENTALIST
profile

Kill All Enemies




  • Author: Mr_Wiggles | Version: 1.3 | Date: 11/20/15

Description:



This script will make sure that every enemy in the troop is dead before calling the end battle process. This plugin ensures that any Scene_Battle 'event proccessing' that are to run after certain enemies die are still called when the $gameTroop reads allIsDead. That any enemies that die and are set to trigger a battle event set up in the Game Troop will finish their jobs and be called before closing the Battle Scene abruptly when there are still enemies waiting to be spawned into battle.


Version History:




  • Version 1.3 (11/20/150) - Few patches done with escape bug and party dead bug.



Script:

Code:

//================================================================================
// KillAllEnemies.js
//================================================================================
/*: @author Mr_Wiggles
 *   Date: 11/20/15
 *   Version: 1.3
 * -------------------------------------------------------------------------------
 * @plugindesc Makes sure all enemies apear to be fought in battle if ment to.
 *
 * @help Version 1.1 Party game over bug patch.
 */ //============================================================================
//--------------------------------------------------------------------------------
// Auto run: Sets plugin items that are user defined in RMMV.
//--------------------------------------------------------------------------------
(function() {
  //------------------------------
  var _Scene_Battle_killAllUpdate = Scene_Battle.prototype.update;
  Scene_Battle.prototype.update = function() {
    if (BattleManager._phase === 'battleEnd' && !BattleManager.isEscaped()) {
    var condition1 = $gameTroop.members().length != $gameTroop.deadMembers().length;
      if (condition1 && !$gameParty.isAllDead()) {
        $gameTroop.setupBattleEvent();
        BattleManager.updateEvent();
        BattleManager._phase = 'turnEnd';
      }
     }
     _Scene_Battle_killAllUpdate.call(this);
  };
  //------------------------------
  Game_Troop.prototype.isAllDead = function() {
    return this.members().length === this.deadMembers().length;
  };
//================================================================================
})(); // End of plugin block.
EVENTALIST
Show Signature
EVENTALIST
Administrator
Administrator
#2 Re: Kill all Enemies, including "Appear halfway"
Loading

G@MeF@Ce

Administrator
Administrator
Administrator
profile
Nice! works like a charm +

This will come in handy especially when you create a boss battle for example a hydra with 5 heads, don't matter which sequence you target the heads just as long as you destroy them all check +
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr http://www.youtube.com/user/MrGameface101?feature=watch
EVENTALIST
EVENTALIST
#3 Re: Kill all Enemies, including "Appear halfway"
Loading

mr_wiggles

EVENTALIST
 EVENTALIST
EVENTALIST
profile
I was having a battle scene where the enemies set to "appear halfway"; (right click enemy battler sprite in troop editor); would get called for Morphing enemies that change when they die. However the Battle Scene was calling its end method before finishing the battle event list. So when I killed an enemy it would end the battle even though it had another stage to fight. Now this makes sure any enemies that are truly not dead, "appear halfway" flagged, will still get a chance to fight.

It also means that this script will prevent the battle from ending if there are any enemies that have health left. Even if you can not see those enemies on the screen. You can get around this by making a battle event in the Troop Editor check for "end battle" command. In other words, you manually check to make sure there are no hidden enemies holding up the battle. You can make all of the ones that are hidden appear for a fight as well this way.

You will only have to do the above if you have an enemy set to appear halfway in that battle troop, it is not required for any troop battles that do not have surprise enemies/enemy forms.
EVENTALIST
Show Signature
EVENTALIST
Global Moderator
Global Moderator
#4 Re: Kill all Enemies, including "Appear halfway"
Loading

swoop

Global Moderator
Global Moderator
Global Moderator
profile
so cool, i get it but i dont!!! keep up the amazing work wiggles
Global Moderator
Show Signature


"be the change you wish to see in the world~ ghandi"


http://creatureofopinions.blogspot.com/
Global Moderator
http://creatureofopinions.blogspot.com/
EVENTALIST
EVENTALIST
#5 Re: Kill all Enemies, including "Appear halfway"
Loading

mr_wiggles

EVENTALIST
 EVENTALIST
EVENTALIST
profile
I patched a bug with game over screen hang up when all party members are dead.
EVENTALIST
Show Signature
EVENTALIST
Administrator
Administrator
#6 Re: Kill all Enemies, including "Appear halfway"
Loading

G@MeF@Ce

Administrator
Administrator
Administrator
profile
oh nice, didn't notice... pasting new version, thanks for the update +
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr http://www.youtube.com/user/MrGameface101?feature=watch
EVENTALIST
EVENTALIST
#7 Re: Kill all Enemies, including "Appear halfway"
Loading

mr_wiggles

EVENTALIST
 EVENTALIST
EVENTALIST
profile
Update to patch bug when battle escaping.
EVENTALIST
Show Signature
EVENTALIST

Sponsored content

profile

View previous topic View next topic Back to top Message [Page 1 of 1]

 

Chatbox system disabled
Personal messaging disabled