MRA_BattleScreenEffects
Brought to you by Mr. Anonymous
Introduction
This script provides a function to activate or deactive a map’s tone and weather effects carrying over into battle.
Features
- Activate/Deactive map weather or tint independantly through the use of switches defined in the customization block.
- Completely aliased all default methods, which means there shouldn’t be any compatibility issues.
Screenshot

Installation
Insert above main. This should probably go underneath any weather or battle-system related scripts.
Script
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/ ◆ Battle Screen Effects – MRA_BattleScreenEffects ◆ VX ◆
#_/ ◇ Last Update: 2008/09/27 ◇
#_/ ◆ Created by Mr. Anonymous ◆
#_/ ◆ Creator’s Blog: ◆
#_/ ◆ http://mraprojects.wordpress.com ◆
#_/—————————————————————————-
#_/ This script enables weather and screen tone to carry over from the map
#_/ screen into battle.
#_/============================================================================
#_/ Aliased Methods: Spriteset_Battle’s initialize, dispose, update,
#_/ update_viewports
#_/============================================================================
#_/ Install: Insert above main.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#=============================================================================#
# ★ Customization ★ #
#=============================================================================#
module MRA
module BattleScreenEffects
# ★ Weather Switch ID ★
# This allows you to designate a switch that enables or disables the
# continuation of weather from the map into battle.
WEATHER_SWITCH_ID = 14
# ★ Screen Tone Switch ID ★
# This allows you to designate a switch that enables or disables the
# continuation of screen tone from the map into battle.
TONE_SWITCH_ID = 13
end
end
#=============================================================================#
# ★ End Customization ★ #
#=============================================================================#
#==============================================================================
# ** Spriteset_Battle
#——————————————————————————
# This class brings together battle screen sprites. It’s used within the
# Scene_Battle class.
#==============================================================================
class Spriteset_Battle
#————————————————————————–
# * Object Initialization
#————————————————————————–
alias initialize_mra_battle_screen_effects initialize
def initialize
if $game_switches[MRA::BattleScreenEffects::WEATHER_SWITCH_ID]
create_weather
end
initialize_mra_battle_screen_effects
end
#————————————————————————–
# * Dispose
#————————————————————————–
alias dispose_mra_battle_screen_effects dispose
def dispose
dispose_mra_battle_screen_effects
if $game_switches[MRA::BattleScreenEffects::WEATHER_SWITCH_ID]
dispose_weather
end
end
#————————————————————————–
# * Frame Update
#————————————————————————–
alias update_mra_battle_screen_effects update
def update
update_mra_battle_screen_effects
if $game_switches[MRA::BattleScreenEffects::WEATHER_SWITCH_ID]
update_weather
end
end
#————————————————————————–
# * Update Viewport
#————————————————————————–
alias update_viewports_mra_battle_screen_effects update_viewports
def update_viewports
update_viewports_mra_battle_screen_effects
if $game_switches[MRA::BattleScreenEffects::TONE_SWITCH_ID]
@viewport1.tone = $game_map.screen.tone
else
@viewport1.tone = $game_troop.screen.tone
end
end
#————————————————————————–
# * Create Weather
#————————————————————————–
def create_weather
@weather = Spriteset_Weather.new(@viewport2)
end
#————————————————————————–
# * Dispose of Weather
#————————————————————————–
def dispose_weather
@weather.dispose
end
#————————————————————————–
# * Update Weather
#————————————————————————–
def update_weather
@weather.type = $game_map.screen.weather_type
@weather.max = $game_map.screen.weather_max
@weather.ox = $game_map.display_x / 8
@weather.oy = $game_map.display_y / 8
@weather.update
end
end
Customize
The script allows you to define two switches to control weather and tint. Please, please note that these functions are not active by default – that is to say the switches are not automatically turned on. You must do so manually within an event.
Additional Notes
This script was requested by #rmvx IRC regular Jeff.
Filed under: Completed Scripts, Original Scripts | Tagged: RMVX, rmvx scripts, rpg, RPG Maker VX | 1 Comment »