wow so amazing!
Map as Title Screen
● ARCHIVED · READ-ONLY
-
-
@Broeckchen - I assume you're using Yami's Title Decorate. Put this script below that :D
-
Thank you so much! Apparently the error is somewhere in Yamis Scripts, since I still get it as long as I have them in the Script list, but without them it works now. <3 And it's really pretty!
-
This script does not work with this script:
the issue is that if this script (your script) is placed above or BELOW the above script you will not see the overlaySpoiler#==============================================================================# # ¥ Yami Engine Ace - Overlay Mapping# -- Last Updated: 2012.04.16# -- Level: Normal# -- Requires: n/a# #============================================================================== $imported = {} if $imported.nil?$imported["YSE-OverlayMapping"] = true #==============================================================================# ¥ Updates# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# 2012.04.16 - Reworked with Encrypted Game.# 2012.04.13 - Ported into Yami Engine.##==============================================================================# ¥ Introduction# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# This script based on Hanzo Kimura's idea. This will automatically load map's# overlay by map ID, and a map can have more than one image per layer, so you# don't have to create two or more map just for day/night or when an event occur.# #==============================================================================# ¥ Instructions# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# Create a folder in Graphics and name it Overlay.# Put all of your overlay into Graphics/Overlay.# Your overlay file will have the name: "Filename Prefix" + Map-ID + "-" + Number# which "Filename Prefix" is the one you will config below# Map-ID is your map's ID# Number is 1, 2, 3, ... using for Overlay Variables.## Example: Graphics/Overlay/ground2-1.png# Which means this will be ground layer, for map 2, variable = 1## Light/Shadow must be .jpg# Parallax/Ground must be .png##============================================================================== module YSA module OVERLAY #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # - Overlay Switches - #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # These are switches which are enable overlay layers. Turn them on to show # them in your maps. #-------------------------------------------------------------------------- # Default: ON #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- LIGHT_SWITCH = 1 # Turn on/off light layer SHADOW_SWITCH = 2 # Turn on/off shadow layer PARALLAX_SWITCH = 3 # Turn on/off parallax layer GROUND_SWITCH = 4 # Turn on/off ground layer #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # - Overlay Variables - #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # A map can have more than one image per layer, that means you can have a # different light/shadow for day and night, or have a different ground when # an event occured. #-------------------------------------------------------------------------- # Default: 1 #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- LIGHT_VARIABLE = 2 # Switch to another light SHADOW_VARIABLE = 2 # Switch to another shadow PARALLAX_VARIABLE = 1 # Switch to another parallax GROUND_VARIABLE = 1 # Switch to another ground #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # - Filename Prefix - #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # This will make this script automatic, it will check if there are layers in # overlay folder #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- LIGHT = "light" # Light layer's filename prefix SHADOW = "shadow" # Shadow layer's filename prefix PARALLAX = "par" # Parallax layer's filename prefix GROUND = "ground" # Ground layer's filename prefix #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # - Overlay Opacity - #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # This will make this script automatic, it will check if there are layers in # overlay folder #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- GROUND_OPACITY = 255 PARALLAX_OPACITY = 255 LIGHT_OPACITY = 128 SHADOW_OPACITY = 96 end #OVERLAYend # YSA #==============================================================================# ¥ Editting anything past this point may potentially result in causing# computer damage, incontinence, explosion of user's head, coma, death, and/or# halitosis so edit at your own risk.#============================================================================== #==============================================================================# ¡ Cache#============================================================================== module Cache #-------------------------------------------------------------------------- # new method: overlay #-------------------------------------------------------------------------- def self.overlay(filename) begin self.load_bitmap("Graphics/Overlay/", filename) rescue self.empty_bitmap end end end # Cache #==============================================================================# ¡ DataManager#============================================================================== module DataManager #-------------------------------------------------------------------------- # alias method: setup_new_game #-------------------------------------------------------------------------- class <<self; alias ovm_setup_new_game setup_new_game; end def self.setup_new_game ovm_setup_new_game setup_overlay_mapping end #-------------------------------------------------------------------------- # new method: setup_overlay_mapping #-------------------------------------------------------------------------- def self.setup_overlay_mapping # Control switches $game_switches[YSA::oVERLAY::LIGHT_SWITCH] = true $game_switches[YSA::oVERLAY::SHADOW_SWITCH] = true $game_switches[YSA::oVERLAY::GROUND_SWITCH] = true $game_switches[YSA::oVERLAY::pARALLAX_SWITCH] = true # Control variables $game_variables[YSA::oVERLAY::LIGHT_VARIABLE] = 1 $game_variables[YSA::oVERLAY::SHADOW_VARIABLE] = 1 $game_variables[YSA::oVERLAY::GROUND_VARIABLE] = 1 $game_variables[YSA::oVERLAY::pARALLAX_VARIABLE] = 1 end end # DataManager #==============================================================================# ¡ Spriteset_Map#============================================================================== class Spriteset_Map #-------------------------------------------------------------------------- # alias method: initialize #-------------------------------------------------------------------------- alias overlay_initialize initialize def initialize overlay_initialize create_overlay_map update end #-------------------------------------------------------------------------- # new method: create_overlay_map #-------------------------------------------------------------------------- def create_overlay_map @current_light = 0 @current_shadow = 0 @current_par = 0 @current_ground = 0 # Ground Layer @ground = Sprite.new(@viewport1) @ground.z = 1 @ground.opacity = YSA::oVERLAY::GROUND_OPACITY # Light Layer @light = Sprite.new(@viewport1) @light.opacity = YSA::oVERLAY::LIGHT_OPACITY @light.blend_type = 1 @light.z = 299 # Shadow Layer @shadow = Sprite.new(@viewport1) @shadow.opacity = YSA::oVERLAY::SHADOW_OPACITY @shadow.blend_type = 2 @shadow.z = 298 # Parallax Layer @par = Sprite.new(@viewport1) @par.opacity = YSA::oVERLAY::pARALLAX_OPACITY @par.z = 297 end #-------------------------------------------------------------------------- # alias method: dispose_parallax #-------------------------------------------------------------------------- alias overlay_dispose_parallax dispose_parallax def dispose_parallax overlay_dispose_parallax dispose_overlay_map end #-------------------------------------------------------------------------- # new method: dispose_overlay_map #-------------------------------------------------------------------------- def dispose_overlay_map @ground.dispose @light.dispose @shadow.dispose @par.dispose end #-------------------------------------------------------------------------- # alias method: update_parallax #-------------------------------------------------------------------------- alias overlay_update_parallax update_parallax def update_parallax overlay_update_parallax update_overlay end #-------------------------------------------------------------------------- # new method: update_overlay #-------------------------------------------------------------------------- def update_overlay update_om_ground update_om_par update_om_light update_om_shadow end #-------------------------------------------------------------------------- # new method: update_om_ground #-------------------------------------------------------------------------- def update_om_ground return unless @ground @ground.visible = $game_switches[YSA::oVERLAY::GROUND_SWITCH] if @ground.visible != $game_switches[YSA::oVERLAY::GROUND_SWITCH] @ground.ox = $game_map.display_x * 32 if @ground.ox != $game_map.display_x * 32 @ground.oy = $game_map.display_y * 32 if @ground.oy != $game_map.display_y * 32 if @current_ground != $game_variables[YSA::oVERLAY::GROUND_VARIABLE] filename = YSA::oVERLAY::GROUND filename += $game_map.map_id.to_s filename += "-" + $game_variables[YSA::oVERLAY::GROUND_VARIABLE].to_s @ground.bitmap = Cache.overlay(filename) @current_ground = $game_variables[YSA::oVERLAY::GROUND_VARIABLE] end end #-------------------------------------------------------------------------- # new method: update_om_par #-------------------------------------------------------------------------- def update_om_par return unless @par @par.visible = $game_switches[YSA::oVERLAY::pARALLAX_SWITCH] if @par.visible != $game_switches[YSA::oVERLAY::pARALLAX_SWITCH] @par.ox = $game_map.display_x * 32 if @par.ox != $game_map.display_x * 32 @par.oy = $game_map.display_y * 32 if @par.oy != $game_map.display_y * 32 if @current_par != $game_variables[YSA::oVERLAY::pARALLAX_VARIABLE] filename = YSA::oVERLAY::pARALLAX filename += $game_map.map_id.to_s filename += "-" + $game_variables[YSA::oVERLAY::pARALLAX_VARIABLE].to_s @par.bitmap = Cache.overlay(filename) @current_par = $game_variables[YSA::oVERLAY::pARALLAX_VARIABLE] end end #-------------------------------------------------------------------------- # new method: update_om_light #-------------------------------------------------------------------------- def update_om_light return unless @light @light.visible = $game_switches[YSA::oVERLAY::LIGHT_SWITCH] if @light.visible != $game_switches[YSA::oVERLAY::LIGHT_SWITCH] @light.ox = $game_map.display_x * 32 if @light.ox != $game_map.display_x * 32 @light.oy = $game_map.display_y * 32 if @light.oy != $game_map.display_y * 32 if @current_light != $game_variables[YSA::oVERLAY::LIGHT_VARIABLE] filename = YSA::oVERLAY::LIGHT filename += $game_map.map_id.to_s filename += "-" + $game_variables[YSA::oVERLAY::LIGHT_VARIABLE].to_s @light.bitmap = Cache.overlay(filename) @current_light = $game_variables[YSA::oVERLAY::LIGHT_VARIABLE] end end #-------------------------------------------------------------------------- # new method: update_om_shadow #-------------------------------------------------------------------------- def update_om_shadow return unless @shadow @shadow.visible = $game_switches[YSA::oVERLAY::SHADOW_SWITCH] if @shadow.visible != $game_switches[YSA::oVERLAY::SHADOW_SWITCH] @shadow.ox = $game_map.display_x * 32 if @shadow.ox != $game_map.display_x * 32 @shadow.oy = $game_map.display_y * 32 if @shadow.oy != $game_map.display_y * 32 if @current_shadow != $game_variables[YSA::oVERLAY::SHADOW_VARIABLE] filename = YSA::oVERLAY::SHADOW filename += $game_map.map_id.to_s filename += "-" + $game_variables[YSA::oVERLAY::SHADOW_VARIABLE].to_s @shadow.bitmap = Cache.overlay(filename) @current_shadow = $game_variables[YSA::oVERLAY::SHADOW_VARIABLE] end end end # Spriteset_Map #==============================================================================# ¡ Scene_Map#============================================================================== class Scene_Map < Scene_Base #-------------------------------------------------------------------------- # alias method: post_transfer #-------------------------------------------------------------------------- alias overlay_post_transfer post_transfer def post_transfer @spriteset.dispose_overlay_map @spriteset.create_overlay_map @spriteset.update overlay_post_transfer end end # Scene_Map #==============================================================================# # ¥ End of File# #============================================================================== -
Any word on this?
-
Kalacious, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.
Script compatibility issues are among the most difficult to solve, and usually take quite a while - if the original script creator's can look at them. If someone else has to analyse two complex scripts (neither he has written) for compatibility problems, that is usually very difficult.
One suggestion:
Try a combination of Tsukihime's new splash screen script
http://forums.rpgmakerweb.com/index.php?/topic/19123-splash-screen-map/
with a combination of picture command and show choices.
That would not be exactly the same, but it might be good enough to replace this script if the compatibility is better.
Or try Tsukihime's Overlay with this (but I have to admit I don't know wether Tsulihime's Overlay has the same functionality as Yami's, so this might not work) -
@Kalacious
Find this line on the "start" method at Scene_MapTitle (be sure that this script is below Yami's Overlay)
DataManager.create_game_objectsthen append this line:
Code:DataManager.setup_overlay_mapping -
Hello, I am having trouble with your script. I have made an Image and put in for the map and have installed the script correctly. But for some reason when I start it up and try to start a new game it doesn't go to the next screen. What am I doing wrong?
~Thanks -
Hey there man, I'm really liking how this script is handling, I just have a few questions in mind, if it is at all possible to do.
Say if I start a new game, and I want the new game selection to make a tiny event before the actual game starts, and then later on after events in the game, an alternate title screen will appear, is there a way to have this happen in this title screen script?
Pray that I explained that right. X_X; -
Use different map background (parallax or show picture) dependend on switches
-
Alright, stupid question. Is it possible to use a script call to change Starting_Map_ID in game? Sorry for the mega-necro.
-
Hi, just wanted to ask how to manipulate the script so the new game, continue and shut down don't show up? I know how to execute them with event and I want a little cutscene in the beggining. So, what do I remove to do that?
-
Fixed smiley faces and indents
scriptCode:#============================================================================== # ** Map as Title Screen v1.1 # Author: Acezon # Date: 16 June 2013 #------------------------------------------------------------------------------ # Version 1.1 # - Merged with the Yami TD compatible script # - Now compatible with Khas's Awesome Light Effects script # Version 1.0 # - Initial Release #------------------------------------------------------------------------------ # Just credit me. Free to use for commercial/non-commercial games. #============================================================================== $imported = {} if $imported.nil? $imported["Acezon-MapTitleScreen"] = true #============================================================================== # ** START Configuration #============================================================================== module Config # The id of the map you want the title to be displayed. Starting_Map_ID = 1 # Character's position (though he/she is invisible) # This feature is useful for large maps. X_Pos = 7 Y_Pos = 6 end #============================================================================== # ** END Configuration #============================================================================== #============================================================================== # ** Scene_Title #============================================================================== class Scene_Title < Scene_Base #-------------------------------------------------------------------------- # * Start #-------------------------------------------------------------------------- def start SceneManager.call(Scene_MapTitle) end #-------------------------------------------------------------------------- # * Terminate #-------------------------------------------------------------------------- def terminate SceneManager.snapshot_for_background Graphics.fadeout(Graphics.frame_rate) end end #============================================================================== # ** Scene_MapTitle #============================================================================== class Scene_MapTitle < Scene_Map #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :character_name # character graphic filename attr_accessor :character_index # character graphic index #-------------------------------------------------------------------------- # * Start #-------------------------------------------------------------------------- def start DataManager.create_game_objects $game_party.setup_starting_members $game_map.setup(Config::Starting_Map_ID) $game_player.moveto(Config::X_Pos, Config::Y_Pos) $game_player.followers.visible = false $game_player.refresh $game_player.make_encounter_count @character_name = $game_player.character_name @character_index = $game_player.character_index $game_player.set_graphic('', 0) $game_system.menu_disabled = true Graphics.frame_count = 0 super create_foreground create_background create_command_window play_title_music end #-------------------------------------------------------------------------- # * Update #-------------------------------------------------------------------------- def update # Yami's Title Decoration Compatibility Scriptlet if $imported["YSE-TD-VerticalCommand"] @command_sprite.each { |sprite| sprite.update @command_window.index == sprite.id ? sprite.activate : sprite.deactivate } end update_basic @spriteset.update $game_map.update(true) update_scene if scene_change_ok? end #-------------------------------------------------------------------------- # * Determine if Debug Call by F9 key #-------------------------------------------------------------------------- def update_call_debug # do nothing end #-------------------------------------------------------------------------- # * Get Transition Speed #-------------------------------------------------------------------------- def transition_speed return 20 end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate super dispose_background dispose_foreground dispose_command_sprite if $imported["YSE-TD-VerticalCommand"] SceneManager.snapshot_for_background end #-------------------------------------------------------------------------- # * Create Background #-------------------------------------------------------------------------- def create_background @sprite1 = Sprite.new @sprite1.bitmap = Cache.title1($data_system.title1_name) @sprite2 = Sprite.new @sprite2.bitmap = Cache.title2($data_system.title2_name) center_sprite(@sprite1) center_sprite(@sprite2) end #-------------------------------------------------------------------------- # * Create Foreground #-------------------------------------------------------------------------- def create_foreground @foreground_sprite = Sprite.new @foreground_sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height) @foreground_sprite.z = 100 draw_game_title if $data_system.opt_draw_title end #-------------------------------------------------------------------------- # * Draw Game Title #-------------------------------------------------------------------------- def draw_game_title @foreground_sprite.bitmap.font.size = 48 rect = Rect.new(0, 0, Graphics.width, Graphics.height / 2) @foreground_sprite.bitmap.draw_text(rect, $data_system.game_title, 1) end #-------------------------------------------------------------------------- # * Free Background #-------------------------------------------------------------------------- def dispose_background @sprite1.bitmap.dispose @sprite1.dispose @sprite2.bitmap.dispose @sprite2.dispose end #-------------------------------------------------------------------------- # * Free Foreground #-------------------------------------------------------------------------- def dispose_foreground @foreground_sprite.bitmap.dispose @foreground_sprite.dispose end #-------------------------------------------------------------------------- # * Move Sprite to Screen Center #-------------------------------------------------------------------------- def center_sprite(sprite) sprite.ox = sprite.bitmap.width / 2 sprite.oy = sprite.bitmap.height / 2 sprite.x = Graphics.width / 2 sprite.y = Graphics.height / 2 end #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def create_command_window @command_window = Window_TitleCommand.new @command_window.set_handler(:new_game, method(:command_new_game)) @command_window.set_handler(:continue, method(:command_continue)) @command_window.set_handler(:shutdown, method(:command_shutdown)) if $imported["YSE-TD-VerticalCommand"] @command_window.y = Graphics.height @command_sprite = [] i = 0 @command_window.symbol_list.each { |symbol| sprite = Sprite_TitleCommand.new(symbol, i); i += 1 @command_sprite.push(sprite) } @command_sprite.each { |sprite| sprite.show } end end #-------------------------------------------------------------------------- # * Dispose Command Sprites #-------------------------------------------------------------------------- def dispose_command_sprite @command_sprite.each { |sprite| sprite.dispose } end #-------------------------------------------------------------------------- # * Close Command Window #-------------------------------------------------------------------------- def close_command_window @command_window.close update until @command_window.close? end #-------------------------------------------------------------------------- # * [New Game] Command #-------------------------------------------------------------------------- def command_new_game close_command_window fadeout_all $game_system.menu_disabled = false $game_map.setup($data_system.start_map_id) $game_player.moveto($data_system.start_x, $data_system.start_y) $game_player.followers.visible = true $game_player.refresh $game_player.set_graphic(@character_name, @character_index) $game_map.autoplay SceneManager.goto(Scene_Map) end #-------------------------------------------------------------------------- # * [Continue] Command #-------------------------------------------------------------------------- def command_continue close_command_window fadeout_all SceneManager.call(Scene_Load) end #-------------------------------------------------------------------------- # * [Shut Down] Command #-------------------------------------------------------------------------- def command_shutdown close_command_window fadeout_all SceneManager.exit end #-------------------------------------------------------------------------- # * Play Title Screen Music #-------------------------------------------------------------------------- def play_title_music $data_system.title_bgm.play RPG::BGS.stop RPG::ME.stop end end -
Fixed smiley faces and indents
scriptCode:#============================================================================== # ** Map as Title Screen v1.1 # Author: Acezon # Date: 16 June 2013 #------------------------------------------------------------------------------ # Version 1.1 # - Merged with the Yami TD compatible script # - Now compatible with Khas's Awesome Light Effects script # Version 1.0 # - Initial Release #------------------------------------------------------------------------------ # Just credit me. Free to use for commercial/non-commercial games. #============================================================================== $imported = {} if $imported.nil? $imported["Acezon-MapTitleScreen"] = true #============================================================================== # ** START Configuration #============================================================================== module Config # The id of the map you want the title to be displayed. Starting_Map_ID = 1 # Character's position (though he/she is invisible) # This feature is useful for large maps. X_Pos = 7 Y_Pos = 6 end #============================================================================== # ** END Configuration #============================================================================== #============================================================================== # ** Scene_Title #============================================================================== class Scene_Title < Scene_Base #-------------------------------------------------------------------------- # * Start #-------------------------------------------------------------------------- def start SceneManager.call(Scene_MapTitle) end #-------------------------------------------------------------------------- # * Terminate #-------------------------------------------------------------------------- def terminate SceneManager.snapshot_for_background Graphics.fadeout(Graphics.frame_rate) end end #============================================================================== # ** Scene_MapTitle #============================================================================== class Scene_MapTitle < Scene_Map #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :character_name # character graphic filename attr_accessor :character_index # character graphic index #-------------------------------------------------------------------------- # * Start #-------------------------------------------------------------------------- def start DataManager.create_game_objects $game_party.setup_starting_members $game_map.setup(Config::Starting_Map_ID) $game_player.moveto(Config::X_Pos, Config::Y_Pos) $game_player.followers.visible = false $game_player.refresh $game_player.make_encounter_count @character_name = $game_player.character_name @character_index = $game_player.character_index $game_player.set_graphic('', 0) $game_system.menu_disabled = true Graphics.frame_count = 0 super create_foreground create_background create_command_window play_title_music end #-------------------------------------------------------------------------- # * Update #-------------------------------------------------------------------------- def update # Yami's Title Decoration Compatibility Scriptlet if $imported["YSE-TD-VerticalCommand"] @command_sprite.each { |sprite| sprite.update @command_window.index == sprite.id ? sprite.activate : sprite.deactivate } end update_basic @spriteset.update $game_map.update(true) update_scene if scene_change_ok? end #-------------------------------------------------------------------------- # * Determine if Debug Call by F9 key #-------------------------------------------------------------------------- def update_call_debug # do nothing end #-------------------------------------------------------------------------- # * Get Transition Speed #-------------------------------------------------------------------------- def transition_speed return 20 end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate super dispose_background dispose_foreground dispose_command_sprite if $imported["YSE-TD-VerticalCommand"] SceneManager.snapshot_for_background end #-------------------------------------------------------------------------- # * Create Background #-------------------------------------------------------------------------- def create_background @sprite1 = Sprite.new @sprite1.bitmap = Cache.title1($data_system.title1_name) @sprite2 = Sprite.new @sprite2.bitmap = Cache.title2($data_system.title2_name) center_sprite(@sprite1) center_sprite(@sprite2) end #-------------------------------------------------------------------------- # * Create Foreground #-------------------------------------------------------------------------- def create_foreground @foreground_sprite = Sprite.new @foreground_sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height) @foreground_sprite.z = 100 draw_game_title if $data_system.opt_draw_title end #-------------------------------------------------------------------------- # * Draw Game Title #-------------------------------------------------------------------------- def draw_game_title @foreground_sprite.bitmap.font.size = 48 rect = Rect.new(0, 0, Graphics.width, Graphics.height / 2) @foreground_sprite.bitmap.draw_text(rect, $data_system.game_title, 1) end #-------------------------------------------------------------------------- # * Free Background #-------------------------------------------------------------------------- def dispose_background @sprite1.bitmap.dispose @sprite1.dispose @sprite2.bitmap.dispose @sprite2.dispose end #-------------------------------------------------------------------------- # * Free Foreground #-------------------------------------------------------------------------- def dispose_foreground @foreground_sprite.bitmap.dispose @foreground_sprite.dispose end #-------------------------------------------------------------------------- # * Move Sprite to Screen Center #-------------------------------------------------------------------------- def center_sprite(sprite) sprite.ox = sprite.bitmap.width / 2 sprite.oy = sprite.bitmap.height / 2 sprite.x = Graphics.width / 2 sprite.y = Graphics.height / 2 end #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def create_command_window @command_window = Window_TitleCommand.new @command_window.set_handler(:new_game, method(:command_new_game)) @command_window.set_handler(:continue, method(:command_continue)) @command_window.set_handler(:shutdown, method(:command_shutdown)) if $imported["YSE-TD-VerticalCommand"] @command_window.y = Graphics.height @command_sprite = [] i = 0 @command_window.symbol_list.each { |symbol| sprite = Sprite_TitleCommand.new(symbol, i); i += 1 @command_sprite.push(sprite) } @command_sprite.each { |sprite| sprite.show } end end #-------------------------------------------------------------------------- # * Dispose Command Sprites #-------------------------------------------------------------------------- def dispose_command_sprite @command_sprite.each { |sprite| sprite.dispose } end #-------------------------------------------------------------------------- # * Close Command Window #-------------------------------------------------------------------------- def close_command_window @command_window.close update until @command_window.close? end #-------------------------------------------------------------------------- # * [New Game] Command #-------------------------------------------------------------------------- def command_new_game close_command_window fadeout_all $game_system.menu_disabled = false $game_map.setup($data_system.start_map_id) $game_player.moveto($data_system.start_x, $data_system.start_y) $game_player.followers.visible = true $game_player.refresh $game_player.set_graphic(@character_name, @character_index) $game_map.autoplay SceneManager.goto(Scene_Map) end #-------------------------------------------------------------------------- # * [Continue] Command #-------------------------------------------------------------------------- def command_continue close_command_window fadeout_all SceneManager.call(Scene_Load) end #-------------------------------------------------------------------------- # * [Shut Down] Command #-------------------------------------------------------------------------- def command_shutdown close_command_window fadeout_all SceneManager.exit end #-------------------------------------------------------------------------- # * Play Title Screen Music #-------------------------------------------------------------------------- def play_title_music $data_system.title_bgm.play RPG::BGS.stop RPG::ME.stop end end [/QUOTE]
Sorry if this is possible necroposting, but I think it's important to point out that the above script edit by Roninator2 has a very small mistake in how it's posted, and shouldn't include "/CODE][/SPOILER]" on the final two lines of the script, as the post above shows it. It should end after the second "end". It took me a few attempts to figure this out, as my scripting skills are minimal, and that's why I thought I'd post this message, to save others who might want to use this script the headache. It work excellently for the game I'm making! Thanks Acezon and Roninator2!