55 minutes ago(This post was last modified: 54 minutes ago by DerVVulfman.)
MUSIC EFFECT FADE Version: 1.0
Introduction
This simple scriptette takes advantage of a feature built into RPGMaker's built-in Audio module, and allows you to fade out music events in much the same way as you could background music and ambient sound effects.
Indeed, no alteration was made to the Audio class. However, this feature has always been available despite no method defined for it within the Game_System class nor any map event akin to [Fade Out BGM] or the like.
Script
I can't believe EnterBrain neglected to include THIS
Code:
#==============================================================================
# ** MUSIC EFFECT FADE
#------------------------------------------------------------------------------
# by DerVVulfman
# version 1.0
# 05-29-2025 (mm/dd/yyyy)
# RGSS / RPGMaker XP
#==============================================================================
#
# INTRODUCTION:
#
# This simple scriptette takes advantage of a feature built into RPGMaker's
# built-in Audio module, and allows you to fade out music events in much
# the same way as you could background music and ambient sound effects.
#
# Indeed, no alteration was made to the Audio class. However, this feature
# has always been available despite no method defined for it within the
# Game_System class nor any map event akin to [Fade Out BGM] or the like.
#
# To use upon an already playing ME/Music Event, run either script call:
#
# * $game_system.me_fade(time)
# * me_fade(time)
# - time : duration in seconds
#
# EX: $game_system.me_fade(0.5)
# - Fades out the currently playing ME in 1/2 a second
#
# This is to be executed after music events are already playing, and inten-
# def for music events that are considered longer than normal. Such longer
# music events would be akin to victory music from a Final Fantasy game.
#
#==============================================================================
#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
# This class handles data surrounding the system. Backround music, etc.
# is managed here as well. Refer to "$game_system" for the instance of
# this class.
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# * Fade Out Music Effect
# time : fade-out time (in seconds)
#--------------------------------------------------------------------------
def me_fade(time)
Audio.me_fade(time * 1000)
end
end
#==============================================================================
# ** Interpreter
#------------------------------------------------------------------------------
# This interpreter runs event commands. This class is used within the
# Game_System class and the Game_Event class.
#==============================================================================
class Interpreter
#--------------------------------------------------------------------------
# * Fade Out Music Effect
# time : fade-out time (in seconds)
#--------------------------------------------------------------------------
def me_fade(time)
$game_system.me_fade(time)
end
end
Instructions
Just paste this below Scene_Debug and above Main. And use either script command noted in the script to fade out the music event effect.
Compatibility
ABSOLUTELY NO INCOMPATABILITIES! I don't think anyone noticed this.
Author's Notes
WHY HAD NO ONE NOTICED THIS!?!?
Terms and Conditions
Yell at Enterbrainless for not including this in the base system even though I did no alteration to the Audio class itself. THEY HAD THIS FEATURE POSSIBLE ALL THESE YEARS!!!
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)