Cerca nel Forum
Showing results for tags 'Title Skip 3'.
Trovato 1 risultato
-
Nome Script: Title Skip 3 Versione: N/D Autore/i: PK8 Informazioni: A differenza di molti script che danno l'opportunità di creare un proprio titolo ad eventi su mappa, i metodi vengono sovrascritti, mentre in questo si mantiene un'integrità sul codice in modo da essere compatibile con il restante degli script presenti sul proprio progetto. Istruzioni: Inserite lo script sopra Main. Le istruzioni sono all'interno dello script. Script: =begin Title Skip 3 (RMXP) by PK8 Created: 8/7/2012 - 8/8/2012 (XP), 8/9/2012 (VX), 8/10/2012 (Ace) Modified: --/--/---- ────────────────────────────────────────────────────────────────────────────── ■ Author's Notes The goal behind this version of my Title Skip script was to make sure I wasn't overriding any of RPG Maker's default methods. It was a pretty tough challenge so I had to come up with some odd ideas to pull it off. The trick here wasn't to skip the title screen, but to nullify several elements of the title screen such as visuals and audio. To do this, I needed to find a way to make the title scene automatically use the command_new_game method without making a sound while hiding the title graphic and the command window. It turns out that I had to make the @command_window and @sprite instance variables of Scene_Title accessible, alias the Initialize method of Window_Command to include an if conditional to check if $scene is a Scene_Title for the purpose of making @command_window and @sprite invisible. I'm not so sure if this works with the SDK but if it does then colour me surprised! I'm proud of this considering that unlike my last two versions of this script, this is NOT a rewrite of Scene_Title. ────────────────────────────────────────────────────────────────────────────── ■ Introduction If you're familiar with Title Skip scripts, you should be familiar with the functionality here and the opportunity such scripts allows for developers to build their own introductions. Unlike most Title Skip scripts (and even my older ones), no methods were overwritten. ────────────────────────────────────────────────────────────────────────────── ■ Features o No overwritten methods, ensuring decent compatibility. (It's not so much a feature, but I'd like to think of it as a selling point.) o You can battle test. (Certain Title Skip scripts do not do this.) o Seemingly a standard in Title Skip scripts, this script will now launch the Scene_Load scene should it detect a saved file. It can be turned off. ────────────────────────────────────────────────────────────────────────────── ■ Methods Aliased Game_Temp.initialize Window_Command.initialize Scene_Title.update Scene_Title.command_new_game ────────────────────────────────────────────────────────────────────────────── ■ Changelog v1 (01/05/2007): My first Title Skip script. It was a direct edit of Scene_Title. I didn't know how to script at the time. v2 (07/08/2008): It was an improvement over the first in that it wasn't a direct edit of the script, and it featured the option of going straight into the debug screen (which I'm not proud of implementing). v3 (08/07/2012): My third Title Skip script. For this attempt, I wanted to rewrite as very little of Scene_Title as possible, which was hard but I think I pulled it off. This drops the "Skip to Debug" option that was available in v2 and adds the "Skip to Continue" option that seems to be a standard in other Title Skip scripts. =end #============================================================================== # ** Configuration #============================================================================== module PK8 class Title_Skip #-------------------------------------------------------------------------- # * General Settings #-------------------------------------------------------------------------- # Turn script on (true) or off (false). Switch = true # Head to the Load scene before starting a new game? yes (true)/no (false) Continue_First = true end end #============================================================================== # ** Scene_Title #------------------------------------------------------------------------------ # This class performs title screen processing. #============================================================================== class Scene_Title #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :sprite, :command_window #-------------------------------------------------------------------------- # * Alias Listings #-------------------------------------------------------------------------- unless method_defined?(:pk8_titleskip_update) alias_method(:pk8_titleskip_update, :update) alias_method(:pk8_titleskip_command_new_game, :command_new_game) end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update pk8_titleskip_update command_new_game if PK8::Title_Skip::Switch == true end #-------------------------------------------------------------------------- # * Command: New Game (aliased method) #-------------------------------------------------------------------------- def command_new_game if PK8::Title_Skip::Switch == true # Temporarily replaces Decision sound effect with nothing. decision_se = $data_system.decision_se.name $data_system.decision_se.name = "" end # Start regular command_new_game method pk8_titleskip_command_new_game if PK8::Title_Skip::Switch == true # Gives the game back its Title BGM. (See Game Temp below) $data_system.title_bgm.name = $game_temp.title_bgm $game_temp.title_bgm = nil # Decision sound effect is back $data_system.decision_se.name = decision_se # If developer wants to head to Scene_Load before starting a new game. if PK8::Title_Skip::Continue_First == true # Nullifying $game_map.autoplay $game_system.bgm_stop Audio.bgs_stop # Checks @continue_enabled and sets a flag when going to Scene_Load. if @continue_enabled and $game_temp.titleskip_loadattempt == nil $game_temp.titleskip_loadattempt = true $scene = Scene_Load.new else $game_temp.titleskip_loadattempt = nil $game_map.autoplay end end end end end #============================================================================== # ** Window_Command #------------------------------------------------------------------------------ # This window deals with general command choices. #============================================================================== class Window_Command < Window_Selectable #-------------------------------------------------------------------------- # * Alias Listings #-------------------------------------------------------------------------- unless method_defined?(:pk8_titleskip_initialize) alias_method(:pk8_titleskip_initialize, :initialize) end #-------------------------------------------------------------------------- # * Object Initialization (aliased method) # width : window width # commands : command text string array #-------------------------------------------------------------------------- def initialize(*args) pk8_titleskip_initialize(*args) # Checks if $scene is Scene_Title to remove visibility of sprite and window. if PK8::Title_Skip::Switch == true if $scene.is_a?(Scene_Title) self.visible = false $scene.sprite.visible = false if $scene.sprite != nil end end end 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 :titleskip_loadattempt, :title_bgm #-------------------------------------------------------------------------- # * Alias Listings #-------------------------------------------------------------------------- unless method_defined?(:pk8_titleskip_initialize) alias_method(:pk8_titleskip_initialize, :initialize) end #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize pk8_titleskip_initialize if PK8::Title_Skip::Switch == true @titleskip_loadattempt = nil if $scene.is_a?(Scene_Title) @title_bgm = $data_system.title_bgm.name $data_system.title_bgm.name = "" end end end end Incompatibilità:Incompatibilità probabilmente con l'SDK.