03-30-2025, 12:27 AM
(This post was last modified: 03-30-2025, 11:19 PM by DerVVulfman.)
Lina's GameOver MEs
Version: 1.1
Version: 1.1
Introduction
Isn't it boring that you always have the same music play when your party gets killed in battle? With Lina's GameOver MEs, you can define different melodies to play depending upon the enemy troop being faced or by a single event command for unique situations.
Features
- A simple hash-array system where you can define the music
- A simple script call for individualized gameover music
- No overwritten code
Screenshots
It is... audio.
Demo
(CLICKIE CLICK!)
A box.com link. Look for the Download link in the top right of the screen
Script
Hey, Lina!
Code:
#==============================================================================
# Lina's GameOver MEs
# -------------------------------------------------------------------------
# version 1.1
# by DerVVulfman
# 03-30-2025 (MM-DD-YYYY)
# RGSS / RPGMaker XP
#==============================================================================
#
# INTRODUCTION:
# =============
#
# Isn't it boring that you always have the same music play when your party
# gets killed in battle? With Lina's GameOver MEs, you can define different
# melodies to play depending upon the enemy troop being faced or by a single
# event command for unique situations.
#
#
#------------------------------------------------------------------------------
#
# FEATURES:
# =========
#
# * A simple hash-array system where you can define the music
# * A simple script call for individualized gameover music
# * No overwritten code
#
#
#------------------------------------------------------------------------------
#
# INSTRUCTIONS:
# =============
#
# Paste below Scene Debug and above main. Individual use is defined below:
#
#
#------------------------------------------------------------------------------
#
# CONFIGURATION:
# ==============
#
# Go to the Lina_GOME module. For any actual Troop in your database that is
# meant to have a custom Gameover ME file, create a TROOP entry. The key to
# that TROOP entry is the ID of the Troop within the database.
#
# EX: TROOP[6] (Assumes that this entry is for Troop #6: 'Sahagin*3').
#
# Assigned to each TROOP entry created is an array that defines the music ME
# that is meant to play. At bare minimum, you need to supply the name of the
# music file (from within the Audio\ME folder). However, you can also define
# volume and pitch changes to each.
#
# EX: TROOP[8] = ["013-Gag02", 70, 120]
#
# The above would play the comical "Gag 2" music event at a lighter 70% vol-
# ume with a slightly higher rate than normal.
#
#
#------------------------------------------------------------------------------
#
# SCRIPT CALLS:
# =============
#
# You can use the 'lina_gome' script call to define a Gameover Music Event to
# any individually triggered battle. The script call is quite simple:
#
# SYNTAX: lina_gome(filename [, volume [, pitch]] )
# * filename : the filename in the Audio/ME folder
# * volume : (Optional - Default: 100) Range: 0-100
# * pitch : (Optional - Default: 100) Range: 50-150
#
# Because the volume and pitch are optional values, you need only change the
# filename if you are fine using a standard 100% music volume and 100% pitch.
#
# Paste below Scene Debug and above main. All methods that handle actor stats
#
#
#------------------------------------------------------------------------------
#
# NOTES:
# ======
#
# Gameover Music Events defined with a script call will overwrite any defined
# for a TROOP. They are also one-shots, meaning they're erased and reset once
# it the battlesystem has performed.... whether the party survives or not.
#
# Defining a filename of "" erases gameover music for that instance.
#
#
#==============================================================================
#
# COMPATABILITY:
# ==============
#
# Designed for RPGMaker XP.
#
#
#==============================================================================
#
# TERMS and CONDITIONS:
# =====================
#
# Free for use, even in commercial scripts. Due credit to all involved is
# the only requirement.
#
#
#==============================================================================
#==============================================================================
# ** Lina_GOME
#------------------------------------------------------------------------------
# This module is the configuration module. Please perform changes only within
# this page unless you are an experienced scripter.
#==============================================================================
module Lina_GOME
#--------------------------------------------------------------------------
TROOP = {} # Do Not Touch
#--------------------------------------------------------------------------
# TROOP
# =====
# The only actual configurable. Here, you define the autio music event for
# any individual troop in your battlesystem.
# -------------------------------------------------------------------------
#
TROOP[34] = ["GameOver", 80, 100] # Assigns a custom ME to troop #34
end
#==============================================================================
# ** Game_Temp
#------------------------------------------------------------------------------
# This class handles temporary data that is not included with save data.
# Refer to "$game_temp" for the instance of this class.
#==============================================================================
class Game_Temp
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :troop_go_me # temp game over music
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias gtemp_linagom_initialize initialize
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
#
gtemp_linagom_initialize # Original method call
@troop_go_me = nil # Create new value
#
end
end
#==============================================================================
# ** Interpreter
#------------------------------------------------------------------------------
# This interpreter runs event commands. This class is used within the
# Game_System class and the Game_Event class.
#==============================================================================
class Interpreter
#--------------------------------------------------------------------------
# * Set the Game Over file
# name :
# vol : main flag
# pitch :
#--------------------------------------------------------------------------
def lina_gome(name='', vol=nil, pch=nil)
#
if name.nil? # if invalid file
$game_temp.troop_go_me = nil # Set an empty temp
return # Exit method
end
#
vol = 100 if vol.nil? # Default volume
pch = 100 if pch.nil? # Default pitch
#
vol = (vol < 0) ? 0 : ((vol >100) ? 100 : vol) # Keep within ranges
pch = (pch < 50) ? 50 : ((pch >150) ? 150 : pch) # volume and pitch
#
file = RPG::AudioFile.new(name, vol, pch) # Define the audio
$game_temp.troop_go_me = file # Set the temp
#
end
end
#==============================================================================
# ** Scene_Gameover
#------------------------------------------------------------------------------
# This class performs game over screen processing.
#==============================================================================
class Scene_Gameover
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias sgameover_linagom_main main
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
#
fred = $data_system.gameover_me # Copy original ME
#
unless $game_temp.troop_go_me.nil? # Only if valid
$data_system.gameover_me = $game_temp.troop_go_me # Substitution
$game_temp.troop_go_me = nil # Erase temp value
end
#
sgameover_linagom_main # Original method call
#
$data_system.gameover_me = fred # Restore ME
#
end
end
#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
# This class performs battle screen processing.
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias sbattle_linagom_main main
alias sbattle_linagom_battle_end battle_end
alias sbattle_linagom_start_phase5 start_phase5
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
#
linagom_main_change # Determine if change
sbattle_linagom_main # Original method call
#
end
#--------------------------------------------------------------------------
# * Main Processing (when performing change to the gameover ME)
#--------------------------------------------------------------------------
def linagom_main_change
#
return unless $game_temp.troop_go_me.nil? # Exit if one exists
#
id = $game_temp.battle_troop_id # Get Troop ID
#
if Lina_GOME::TROOP.has_key?(id) # If a config exists
go_array = Lina_GOME::TROOP[id] # Get config data
end
#
return if go_array.nil? # Exit on empty data
#
name = go_array[0] # Get audio filename
vol = go_array[1] # Get audio volume
pch = go_array[2] # Get audio pitch
#
return if name.nil? # Exit if invalid file
#
vol = 100 if vol.nil? # Default volume
pch = 100 if pch.nil? # Default pitch
#
vol = (vol < 0) ? 0 : ((vol >100) ? 100 : vol) # Keep within ranges
pch = (pch < 50) ? 50 : ((pch >150) ? 150 : pch) # volume and pitch
#
file = RPG::AudioFile.new(name, vol, pch) # Define the audio
$game_temp.troop_go_me = file # Set the temp
#
end
#--------------------------------------------------------------------------
# * Battle Ends
# result : results (0:win 1:lose 2:escape)
#--------------------------------------------------------------------------
def battle_end(result)
#
$game_temp.troop_go_me = nil # Erase the temp
sbattle_linagom_battle_end(result) # Original method call
#
end
#--------------------------------------------------------------------------
# * Start After Battle Phase
#--------------------------------------------------------------------------
def start_phase5
#
sbattle_linagom_start_phase5 # Original method call
$game_temp.troop_go_me = nil # Erase the temp
#
end
end
Instructions
Plenty within the script.
FAQ
I decided to give it a little 1995 Anime touch.
Compatibility
Designed for RPGMaker XP.
Credits and Thanks
Hajime Kanzaka for the characters, and Ozamu Tezuka and Vink for the music in the demo.
Terms and Conditions
The script is free for use, even in commercial scripts. Due credit to all involved is the only requirement. The resources are NOT available for use and only in the demo as altered/edited content under the fair use clause.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links