- Joined
- Mar 24, 2014
- Messages
- 579
- Reaction score
- 220
- First Language
- English
- Primarily Uses
- RMVXA
Manual Defeat
by: Rinobi
This script allows automatic gameovers to be disabled via switch.
It functions within all applicable scenes and includes an additional switch to disable in-battle victories.
A simplistic yet powerful tool.
See script header for details.
by: Rinobi
This script allows automatic gameovers to be disabled via switch.
It functions within all applicable scenes and includes an additional switch to disable in-battle victories.
A simplistic yet powerful tool.
See script header for details.
Code:
module RINOBI module ManualDefeat
#==============================================================================
# # MANUAL DEFEAT
# -----------------------------------------------------------------------------
# 1.0 [09/04/2017] Completed
#-
# This script allows you to disable gameovers via switch. It functions within
# any scene and includes an addtional switch to disable battle victories. This
# is a simple but powerful tool in the right hands.
#==============================================================================
# # TERMS OF USE
#------------------------------------------------------------------------------
# 1. Preserve this header.
# 2. Do not re-upload this script.
# 3. Do not claim this script as your own work.
# 4. Do not release modified versions of this script.
#==============================================================================
# # SETTINGS
# -----------------------------------------------------------------------------
# Adjust the below settings to your liking.
#======================================================================
# >> Victory Defeat Switches
# ---------------------------------------------------------------------
# Adjust the below to a number representing global switches.
#======================================================================
VictorySwitch = 21 # When true, In-battle victories do not occur.
DefeatSwitch = 22 # When true, Gameover does not occur death.
#==============================================================================
# END OF SETTINGS
#==============================================================================
end end
#==============================================================================
# ** IMPORT SCRIPT
#------------------------------------------------------------------------------
$imported = {} if $imported.nil?
$imported[:RIN_ManualDefeat] = true
#==============================================================================
# ** BattleManager
#------------------------------------------------------------------------------
# This module manages battle progress.
#==============================================================================
module BattleManager
#--------------------------------------------------------------------------
# * Overwrite: Determine Win/Loss Results
#--------------------------------------------------------------------------
def self.judge_win_loss
if @phase
if !$game_switches[RINOBI::ManualDefeat::DefeatSwitch]
return process_abort if $game_party.members.empty?
return process_defeat if $game_party.all_dead? end
if !$game_switches[RINOBI::ManualDefeat::VictorySwitch]
return process_victory if $game_troop.all_dead? end
return process_abort if aborting?
end
return false
end
#--------------------------------------------------------------------------
# * Overwrite: Determine if Game Is Over
# Transition to the game over screen if the entire party is dead.
#--------------------------------------------------------------------------
def check_gameover
if !game_switches[RINOBI::ManualDefeat::DefeatSwitch]
SceneManager.goto(Scene_Gameover) if $game_party.all_dead? end
end
end
- [09/04/2017] Public Release.
Free for Commercial Use with given credit.
See script header for additional information.
See script header for additional information.
Attachments
Last edited: