じ☆ve冰风 发表于 2026-8-2 09:21:45

Manual Defeat / Gameover

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.




Spoiler: Script                Code:       
module RINOBI module ManualDefeat
#==============================================================================
# # MANUAL DEFEAT
# -----------------------------------------------------------------------------
# 1.0 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
      return process_abort   if $game_party.members.empty?
      return process_defeatif $game_party.all_dead? end
      if !$game_switches
      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
    SceneManager.goto(Scene_Gameover) if $game_party.all_dead? end
end
end

Spoiler: Downloadrin_manualdefeat_v100.txtSpoiler: Change Log

[*] Public Release.
Spoiler: Terms Of UseFree for Commercial Use with given credit.
See script header for additional information.


本贴来自国际rpgmaker官方论坛作者:Rinobi处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/manual-defeat-gameover.83645/
页: [1]
查看完整版本: Manual Defeat / Gameover