Skip Title Screen

Discussion in 'JS Plugin Releases (RMMV)' started by SilverDash, Oct 31, 2015.

  1. SilverDash

    SilverDash Veteran Veteran

    Messages:
    385
    Likes Received:
    151
    First Language:
    Dutch
    Primarily Uses:
    RMMV
    Skip Title Screen v1.10
    Author:
    Squirting Elephant

    Introduction

    Skips the title screen so you can debug & playtest your game faster.

    Features
    - Skips the title screen. Still loads the titlescreen in case you had some initialization code there.
    - Can optionally fadeout the titlescreen.
    - Can also optionally load the titlescreen, and then immediately skip to the map.
    - Optionally does not skip the titlescreen if at least one savefile is present.

    How to Use
    Plug & play.

    Script
    Download v1.10
    Download Master Demo

    Version 1.02
    Code:
    //=============================================================================
    // SilvSkipTitle.js
    // Version: 1.02
    // License: Public Domain or CC0
    //=============================================================================
    /*:
     * @plugindesc v1.00 Skips Title Screen
       <SilverSkipTitle>
     * @author Silver
     *
     * @param Skip Title Screen Entirely
     * @desc Set to false to load the titlescreen briefly. true/false
     * @default true
     *
     * @param Skip If Savefile Present
     * @desc Skip the titlescreen if one or more savefiles are present? true/false
     * @default true
     *
     * @param FadeOut Title
     * @desc Only applies when SkipTitleScreenEntirely is set to false. true/false
     * @default false
     *
     * @help No credits required, modify as you see fit.
     */
    
    (function()
    {
    // Get Plugin Parameters
    var Silv = Silv || {};
    Silv.Parameters = $plugins.filter(function(p) { return p.description.contains('<SilverSkipTitle>'); })[0].parameters;
    Silv.SkipTitle = Silv.SkipTitle || {};
    Silv.SkipTitle.SkipTitleScreenEntirely = Silv.Parameters['Skip Title Screen Entirely'].toLowerCase() == 'true';
    Silv.SkipTitle.SkipIfSavefilePresent   = Silv.Parameters['Skip If Savefile Present'].toLowerCase() == 'true';
    Silv.SkipTitle.FadeOutTitle            = Silv.Parameters['FadeOut Title'].toLowerCase() == 'true';
    
    function ShowTitleScreen() { return DataManager.isAnySavefileExists() && !Silv.SkipTitle.SkipIfSavefilePresent; }
    
    // Skipping the title screen entirely
    var alias_methodSceneBootStart = Scene_Boot.prototype.start;
    Scene_Boot.prototype.start = function()
    {
        if (Silv.SkipTitle.SkipTitleScreenEntirely && !ShowTitleScreen())
        {
            Scene_Base.prototype.start.call(this);
            SoundManager.preloadImportantSounds();
            if (DataManager.isBattleTest()) {
                DataManager.setupBattleTest();
                SceneManager.goto(Scene_Battle);
            } else if (DataManager.isEventTest()) {
                DataManager.setupEventTest();
                SceneManager.goto(Scene_Map);
            } else {
                this.checkPlayerLocation();
                DataManager.setupNewGame();
                SceneManager.goto(Scene_Map);
            }
            this.updateDocumentTitle();
        }
        else
        {
            alias_methodSceneBootStart.apply(this, arguments);
        }
    };
    
    // Fading closing and optionally fading the titlescreen entirely.
    var alias_method_SceneTitleStart = Scene_Title.prototype.start;
    Scene_Title.prototype.start = function()
    {
        if(ShowTitleScreen)
        {
            alias_method_SceneTitleStart.apply(this, arguments);
        }
        else // Skip title screen
        {
            DataManager.setupNewGame();
            this._commandWindow.close();
    
            if (Silv.SkipTitle.FadeOutTitle) { this.fadeOutAll(); }
    
            SceneManager.goto(Scene_Map);
        }
    };
    })();
    

    License:
    Public Domain or CC0.
    Do whatever you want. No credits required.
     
    Last edited: Nov 4, 2019
    #1
    Corlagon, SOC, Mur and 3 others like this.
  2. mlogan

    mlogan Global Moderators Global Mod

    Messages:
    13,838
    Likes Received:
    7,638
    Location:
    Texas
    First Language:
    English
    Primarily Uses:
    RMMV
    Hi, I just wanted to let you know I tried out this script, but chose to go with another because when I use yours, there is a lag of 1-2 seconds where the title screen can still be seen. I just thought you might want to know in case it's something that can be fixed.
     
    #2
  3. SilverDash

    SilverDash Veteran Veteran

    Messages:
    385
    Likes Received:
    151
    First Language:
    Dutch
    Primarily Uses:
    RMMV
    Didn't know there is another one. Also there is no lag. It's just that you see the title screen very briefly so that any custom initialization code from there can still execute. Should probably add an option to skip that.
     
    Last edited by a moderator: Nov 2, 2015
    #3
  4. SilverDash

    SilverDash Veteran Veteran

    Messages:
    385
    Likes Received:
    151
    First Language:
    Dutch
    Primarily Uses:
    RMMV
    Updated, now by default skips the titlescreen entirely.
     
    #4
  5. SOC

    SOC "God is my Judge" Veteran

    Messages:
    553
    Likes Received:
    473
    Location:
    KY, USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Can you make it an option to only skip if there is no save file present?
     
    #5
    ∊η∊ηra likes this.
  6. ∊η∊ηra

    ∊η∊ηra Smoke and Mirrors Veteran

    Messages:
    258
    Likes Received:
    115
    Location:
    Manhattan
    First Language:
    English
    Primarily Uses:
    RMMV
    I was just getting ready to say the same thing. That would be a small but insanely useful add-on!
     
    #6
  7. SilverDash

    SilverDash Veteran Veteran

    Messages:
    385
    Likes Received:
    151
    First Language:
    Dutch
    Primarily Uses:
    RMMV
    I just added it. Set the "Skip If Savefile Present" parameter to false to apply it. Now let it 'be a small but insanely useful add-on!' :p
     
    Last edited by a moderator: Nov 3, 2015
    #7
    ∊η∊ηra and SOC like this.
  8. SOC

    SOC "God is my Judge" Veteran

    Messages:
    553
    Likes Received:
    473
    Location:
    KY, USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Thanks!

    And just in case anyone doesn't know how to save and use the plugin, copy and paste his script into a notepad file, then go to save as, change file type to all types, and add .js at the end of the filename you give it, like SilvSkipTitle.js
     
    #8
  9. Dinamic Creates

    Dinamic Creates Project Stealth | Project Dungeon Trios Veteran

    Messages:
    69
    Likes Received:
    24
    Location:
    México
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    I love the savefile update 
     
    #9
  10. Kuro Neko

    Kuro Neko Veteran Veteran

    Messages:
    173
    Likes Received:
    15
    First Language:
    English
    Is there anyway, for example, if no save data -> skip title, start at position x,y of map 1, if there's any save data, skip title, start at position x,y of map 2?


    Edit: Nevermind. I found a way to do so.
     
    Last edited by a moderator: Mar 17, 2016
    #10
  11. enmanuel

    enmanuel Warper Member

    Messages:
    2
    Likes Received:
    0
    how do I download it?
     
    #11
  12. BelieveSoft????☺???

    BelieveSoft????☺??? Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    Hindi
    Thank you so much! You have helped me a lot!
     
    #12
  13. Tonedawg181

    Tonedawg181 Tonedawg Gaming Veteran

    Messages:
    65
    Likes Received:
    19
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    uhhh, ive never seen a plugin do this... the code is saved in a .js and when u view it in notepad it all looks correct.... but for some reason when i put it into my game the entire plugin comes up blank, like i can select it in the list but the whole thing appears blank and it doesn't function. I'd really like this feature to save time on testing stuff. Ive used this copy and paste method several times to use plugins, and tired re-making it a few times so i dont think it's an error in that step. But i have never seen one once imported just completely show up blank in rpgmv... If anyone has an idea on how to fix it let me know.

    EDIT: turns out all I had to do with get rid of the space in the file name for the .js and it worked, great plugin I use it a lot while testing. :D
     
    Last edited: Dec 16, 2017
    #13
  14. BreakerZero

    BreakerZero Veteran Veteran

    Messages:
    600
    Likes Received:
    252
    First Language:
    English (USA)
    Primarily Uses:
    RMMV
    Not that I like the necropost idea or course seeing what I've had in the past, but even nearly one year later I can't help but think of another use for this plugin.

    I noticed in some recent games (Breath of the Wild from the Zelda series as one example) where instead of getting sent to the main menu on first run, it drops you straight into the action to master the basics (possibly even with an opening cutscene to set things up in terms of backstory). Only after you make any significant progress to have a save file in this configuration will the game switch to menu load for all future sessions for as long as you have an established progression record, and this plugin does its fair share to allow for you to add that mechanic to your own game.
     
    #14
  15. SilverDash

    SilverDash Veteran Veteran

    Messages:
    385
    Likes Received:
    151
    First Language:
    Dutch
    Primarily Uses:
    RMMV
    Updated for the latest version of RMMV.
    Also now you can select your starting scene in the parameter-list (or type your own).
    Fixed starting-lag (that could apparently occur on certain hardware?)
     
    #15
    Eliaquim and bazrat like this.
  16. FleshToDust

    FleshToDust Pixel Beginnings Veteran

    Messages:
    422
    Likes Received:
    2,332
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    Great work on the plugin and good to see you're still around.
    Your fullscreen plugin doesn't seem to work when combined with this though.
     
    Last edited: Nov 4, 2019
    #16
  17. SilverDash

    SilverDash Veteran Veteran

    Messages:
    385
    Likes Received:
    151
    First Language:
    Dutch
    Primarily Uses:
    RMMV
    Indeed it appears that my Fullscreen script had a dumb bug with the parameter caused after upgrading the script (because strings are now automatically converted to booleans):

    Code:
    SE.Params.Fullscreen.FullScreenIfTitleSkipped === 'true'
    // Should have been:
    SE.Params.Fullscreen.FullScreenIfTitleSkipped === true
    
    I just fixed it in my new MasterDemo or copy-paste it from below:
    Code:
    "use strict";
    /*:
    ╔════════════════╗
    ║ Plugin Manager ║
    ╚════════════════╝
     * @plugindesc v1.11 - Starts the game in fullscreen mode.
     * @author Squirting Elephant
      ╔════════════╗
      ║ Parameters ║
      ╚════════════╝
     * @param FullScreenIfTitleSkipped
     * @text Activate Fullscreen if Title Skipped?
     * @desc Also go into fullscreen-mode if the title-screen was skipped?
     * @type boolean
     * @on Yes
     * @off No
     * @default true
     *
       ╔══════╗
       ║ Help ║
       ╚══════╝
     * @help
     * License: Public Domain or CC0.
     *
     * Optional Plugin(s):
     * SE_SkipTitle (is required if you don't want to go full-screen when you skip the titlescreen).
     *
     * Alias created for:
     * * SceneManager.run()
     *
     * Version History:
     * v1.11 (04 Oktober 2019)
     * - Fixed a bug with the parameter.
     *
     * v1.10 (28 September 2019)
     * - Updated this plugin for the latest version of RMMV and SE_Keys.
     * - Changed the names from Silv --> SE.
    */
    
    /*╔═══════════════════════╗
      ║ Plugin Initialization ║
      ╚═══════════════════════╝*/
    var Imported = Imported || {};
    Imported.SE_Fullscreen = { name: 'SE_Fullscreen', version: 1.11, author: 'Squirting Elephant', date:'2019-09-28'};
    var SE = SE || {};
    
    /*╔════════════╗
      ║ Parameters ║
      ╚════════════╝*/
    SE.Params = SE.Params || {};
    SE.Params.Fullscreen = PluginManager.parameters('SE_Fullscreen');
    
    (function()
    {
      function parseParameters(string)
      {
        try
        {
          return JSON.parse(string, (key, value) => {
            try { return parseParameters(value); }
            catch (e) { return value; }
            });
        } catch (e) { return string; }
      };
    
      for (var key in SE.Params.Fullscreen) { SE.Params.Fullscreen[key] = SE.Params.Fullscreen[key].replace('\r', ''); } // Because: fix stupid RMMV bug (https://forums.rpgmakerweb.com/index.php?threads/parameter-string-does-not-equal-string.113697/)
      SE.Params.Fullscreen = parseParameters(JSON.stringify(SE.Params.Fullscreen));
    
    
      /*╔═════════════════════════╗
        ║ Alias: SceneManager.run ║
        ╚═════════════════════════╝*/
        var SEA_SceneManager_Run = SceneManager.run;
        SceneManager.run = function(sceneClass)
        {
            SEA_SceneManager_Run.apply(this, arguments);
            if ((Imported.SE_SkipTitle == null) || ((SE.Params.Fullscreen.FullScreenIfTitleSkipped === true) || (SE.Params.SkipTitle.StartScene === 'Scene_Title')))
            {
                Graphics._switchFullScreen();
            }
        };
    
    })();
    
    /*╔═════════════╗
      ║ End of File ║
      ╚═════════════╝*/
     
    #17
    FleshToDust and Eliaquim like this.

Share This Page