Editing scripts to suit my needs I've learned some simple yet useful things, and this is the result of what I've learned so far, a simple configurable Scene_Menu modification.
Description
The scope of this script is to edit simple values in the Scene_Menu, such as windows coordinates and opacity. It also provides the option to have a picture as background.
Screenshots
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg84.imageshack.us%2Fimg84%2F2686%2F48352948.png&hash=872e2e5f7d5f0a2a497abbf5f11c8c43d3749bfb)
Instructions
Paste this script ? Materials but above ? Main in your Script Editor.
Compatibility
Does not work with other Menu Scripts.
Script
#==============================================================================
# Scene_Menu Customization
#------------------------------------------------------------------------------
# The scope of this script is to edit simple values in the Scene_Menu, such as
# windows coordinates and opacity. It also provides the option to have a picture
# as background.
#
#==============================================================================
# Instructions
#------------------------------------------------------------------------------
# Paste this script ? Materials but above ? Main in your Script Editor.
#
#==============================================================================
# Compatibility
#------------------------------------------------------------------------------
# Does not work with other Menu Scripts.
#
#==============================================================================
#==============================================================================
# Configuration start here.
#==============================================================================
module SM_S
# Background picture, place inside "Graphics\System" folder.
# Omit file extension (.jpg/.png), leave "" for no picture. Case sensitive.
MenuBack = "Gameover"
# Opacity of the background picture. Insert a value between 0 and 255.
# 0 = invisible, 255 = full opacity. 255 is default value.
MenuBackOpacity = 255
# X coordinate of the command window. 0 is default value.
CommandsX = 0
# Y coordinate of the command window. 0 is default value.
CommandsY = 0
# Opacity of the command window. Insert a value between 0 and 255.
# 0 = invisible, 255 = full opacity. 255 is default value.
CommandsOpacity = 255
# X coordinate of the status window.
# 160 is default value.
StatusX = 160
# Opacity of the status window. Insert a value between 0 and 255.
# 0 = invisible, 255 = full opacity. 255 is default value.
StatusOpacity = 255
# X coordinate of the gold window. 0 is default value.
GoldX = 0
# Y coordinate of the gold window. 360 is default value.
GoldY = 360
# Opacity of the gold window. Insert a value between 0 and 255.
# 0 = invisible, 255 = full opacity. 255 is default value.
GoldOpacity = 255
end
#==============================================================================
# Configuration ends here.
#==============================================================================
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================
class Scene_Menu < Scene_Base
#--------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
create_menu_background
create_command_window
@command_window.x = SM_S::CommandsX
@command_window.y = SM_S::CommandsY
@command_window.opacity = SM_S::CommandsOpacity
@gold_window = Window_Gold.new(SM_S::GoldX, SM_S::GoldY)
@gold_window.opacity = SM_S::GoldOpacity
@status_window = Window_MenuStatus.new(SM_S::StatusX, 0)
@status_window.opacity = SM_S::StatusOpacity
end
#--------------------------------------------------------------------------
# * Create Menu Background
#--------------------------------------------------------------------------
def create_menu_background
@menuback_sprite = Sprite.new
@menuback_sprite.bitmap = Cache.system(SM_S::MenuBack)
@menuback_sprite.opacity = SM_S::MenuBackOpacity
update_menu_background
end
end
Thanks for sharing. Remember though that there is no need to include methods that you do not modify, so long as you are not directly replacing the default script. Either way, simple edits like this are a good way to start learning how to script. I hope you keep at it.
Quotethere is no need to include methods that you do not modify
I did not know, thanks for telling me.
I'll be more careful next time.
EDIT: well, since it was a rather easy job, I updated the script.
Changed @menuback to @menuback_sprite.
*hangs head in shame*