Guest Access
EVENTALIST
EVENTALIST
EVENTALIST
profile
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.
mr_wiggles
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
Administrator
profile
G@MeF@Ce
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 +
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
Show Signature
EVENTALIST
EVENTALIST
EVENTALIST
profile
mr_wiggles
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.
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
Global Moderator
profile
swoop
profile
so cool, i get it but i dont!!! keep up the amazing work wiggles
Global Moderator
Show Signature
EVENTALIST
EVENTALIST
EVENTALIST
profile
mr_wiggles
profile
I patched a bug with game over screen hang up when all party members are dead.
EVENTALIST
Show Signature
EVENTALIST
Administrator
Administrator
Administrator
profile
G@MeF@Ce
profile
oh nice, didn't notice... pasting new version, thanks for the update +
Administrator
Show Signature
EVENTALIST
EVENTALIST
EVENTALIST
profile
mr_wiggles
profile
Update to patch bug when battle escaping.
EVENTALIST
Show Signature
EVENTALIST