RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Idle title intro

0 Members and 1 Guest are viewing this topic.

pokeball TDSOffline
***
Rep:
Level 84
-T D S-
Silver - GIAW 11 (Hard)Silver - Game In A Week VII
Idle Title intro
Version: 1.0
Author: TDS
Date: September 1, 2011

Version History


  • 1.0 09.01.2011 - Public release.

Description


Allows you to start a map for an intro after idling for a preset period of time in the title screen.

Features

  • Starts a map after a while idling in the title screen.
  • Interrupts intro in the map if desired.


Instructions

They're in the script.

Script


Code: [Select]
#==============================================================================
# ** TDS Idle Title Intro
#    Ver: 1.0
#------------------------------------------------------------------------------
#  * Description:
#  This script allows you to make an intro start after an amount of time has
#  passed idling in the title screen.
#------------------------------------------------------------------------------
#  * Features:
#  Starts a map after a while idling in the title screen.
#  Interrupts intro in the map if desired.
#------------------------------------------------------------------------------
#  * Instructions:
#  Edit the constants below the script information to set it up how you want.
#------------------------------------------------------------------------------
#  * Notes:
#  To make a good automatic intro make sure to use \! \^ commands in the text
#  box and use the "Return to title" event command at the end of your intro.
#------------------------------------------------------------------------------
#  * New Methods:
#  Scene_Title:
#  - reset_idle_intro_counter?
#    ^ Used to determine if any input has happened to interrupt the idle intro.
#  - start_idle_intro
#    ^ Used to start the idle intro in the map.
#
#  Scene_Map:
#  - interrupt_idle_intro?
#    ^ Used to interrupt the idle intro in the map and return to title.
#------------------------------------------------------------------------------
#  * Aliased Methods:
#  Game_Temp:
#  - initialize
#    ^ Aliased to initialize the viewing idle intro flag.
#
#  Scene_Title:
#  - initialize
#    ^ Aliased to initialize the idle intro counter.
#  - update
#    ^ Aliased to process the idle intro values and methods.
#
#  Scene_Map:
#  - update
#    ^ Aliased to process the idle intro interruption methods.
#------------------------------------------------------------------------------
# WARNING:
#
# Do not release, distribute or change my work without my expressed written
# consent, doing so violates the terms of use of this work.
#
# If you really want to share my work please just post a link to the original
# site.
#
# * Not Knowing English or understanding these terms will not excuse you in any
#   way from the consequenses.
#==============================================================================

#--------------------------------------------------------------------------
# * Constants
#--------------------------------------------------------------------------
# Idle Title Intro Wait (in frames)
IDLE_TITLE_INTRO_WAIT = 700
# Idle Title Intro Start Map ID
IDLE_TITLE_INTRO_START_MAP_ID = 1
# Idle Title Intro Start X Position
IDLE_TITLE_INTRO_START_X = 0 
# Idle Title Intro Start Y Position 
IDLE_TITLE_INTRO_START_Y = 0
# Idle Title Intro Start Screen Tone
IDLE_TITLE_INTRO_START_SCREEN_TONE = Tone.new(0, 0, 0, 0)
# If Idle Titlle intro in map can be interrupted once started
CAN_INTERRUPT_MAP_INDLE_TITLE_INTRO = true
# Array of Idle Interrupt Keys
IDLE_INTERRUPT_KEYS = [Input::A, Input::B, Input::C, Input::X, Input::Y,
Input::Z, Input::L, Input::R, Input::DOWN, Input::LEFT, Input::RIGHT,
Input::UP, Input::SHIFT, Input::CTRL, Input::ALT] 

#==============================================================================
# ** Game_Temp
#------------------------------------------------------------------------------
#  This class handles temporary data that is not included with save data.
# The instance of this class is referenced by $game_temp.
#==============================================================================

class Game_Temp
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias tds_idle_title_intro_game_temp_initialize     initialize    unless $@ 
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :viewing_idle_title_intro    # Viewing Idle Title Intro Flag 
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    # Run Original Method
    tds_idle_title_intro_game_temp_initialize
    # Set Viewing Title Idle intro flag to false
    @viewing_idle_title_intro = false
  end
end


#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
#  This class performs the title screen processing.
#==============================================================================

class Scene_Title < Scene_Base
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias tds_idle_title_intro_scene_title_initialize    initialize   unless $@
  alias tds_idle_title_intro_scene_title_update        update       unless $@ 
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    # Run Original Method
    tds_idle_title_intro_scene_title_initialize
    # Set Idle Intro Counter Initial Value
    @idle_intro_counter = 0
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Run Original Method
    tds_idle_title_intro_scene_title_update
    # Reset Idle Intro Counter
    @idle_intro_counter = 0 if reset_idle_intro_counter?
    # Increase Idle Intro Counter
    @idle_intro_counter += 1
    # Start Idle Intro Idle Intro Counter is equal or more to idle intro wait
    start_idle_intro if @idle_intro_counter >= IDLE_TITLE_INTRO_WAIT
  end
  #--------------------------------------------------------------------------
  # * Determine if idle title intro counter is to be reset
  #--------------------------------------------------------------------------
  def reset_idle_intro_counter?
    # Go Through Idle Interrup Keys
    IDLE_INTERRUPT_KEYS.each {|key|
      # Return true if Interrupt key has been pressed
      return true if Input.trigger?(key) or Input.press?(key) or Input.repeat?(key)
    }   
    # Return false by default
    return false
  end
  #--------------------------------------------------------------------------
  # * Start Idle Intro
  #--------------------------------------------------------------------------
  def start_idle_intro
    # Initial party
    $game_party.setup_starting_members
    # Initial map position
    $game_map.setup(IDLE_TITLE_INTRO_START_MAP_ID)
    $game_player.moveto(IDLE_TITLE_INTRO_START_X, IDLE_TITLE_INTRO_START_Y)
    $game_player.refresh
    $scene = Scene_Map.new
    # Start Game Map Tone change
    $game_map.screen.start_tone_change(IDLE_TITLE_INTRO_START_SCREEN_TONE, 0)
    # Set Viewing Idle Intro flag to true
    $game_temp.viewing_idle_title_intro = true
    RPG::BGM.fade(1500)
    close_command_window if @command_window != nil
    Graphics.fadeout(60)
    Graphics.wait(40)
    Graphics.frame_count = 0
    RPG::BGM.stop
    $game_map.autoplay
  end
end


#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  This class performs the map screen processing.
#==============================================================================

class Scene_Map < Scene_Base
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias tds_idle_title_intro_scene_map_update         update        unless $@   
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Run Original Method
    tds_idle_title_intro_scene_map_update
    # Call title If Viewing Idle Intro and idle intro is interrupted
    call_title if $game_temp.viewing_idle_title_intro and interrupt_idle_intro?
  end   
  #--------------------------------------------------------------------------
  # * Determine if idle intro should be interrupted
  #--------------------------------------------------------------------------
  def interrupt_idle_intro?
    # Return false if Idle Intro cannot be interrupted
    return false if !CAN_INTERRUPT_MAP_INDLE_TITLE_INTRO
    # Go Through Idle Interrup Keys
    IDLE_INTERRUPT_KEYS.each {|key|
      # Return true if Interrupt key has been pressed
      return true if Input.trigger?(key) or Input.press?(key) or Input.repeat?(key)
    }
    # Return false by default
    return false
  end 
end

Credit


  • TDS

Support


On this topic.

Known Compatibility Issues

There could be some compatibility issues with other custom title screen scripts.


Author's Notes


To make a good automatic intro make sure to use \! \^ commands in the text box and use the "Return to title" event command at the end of your intro.

Restrictions

Only for use in non-commercial games.

***
Rep:
Level 69
RESIDENT ADONKADONK
This is actually a pretty good thing to have! Good job!

I'm back.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Yeah, this looks great TDS. I don't know how I missed it earlier.

**
Rep: +0/-0Level 62
Somewhat new to VX.
This looked cool so I thought I would try it, but...


Apparently it clashes with something in Jet's time system.
It could be something simple but I don't understand enough to fix this.
Any ideas? The line is...
"if $game_time.map_infos[$game_map.map_id].indoors? || $game_time.map_infos[$game_map.map_id].no_tint?"

The map I set it to was outside.. so why would it even clash with this?
"Kindness won't go unrewarded. Good things come to generous people."
"If pro is the opposite of con, what is the opposite of progress?"

pokeball TDSOffline
***
Rep:
Level 84
-T D S-
Silver - GIAW 11 (Hard)Silver - Game In A Week VII
That is a strange bug, if you could provide a small demo with the bug I'll get right on fixing it.

I suspect it has something to do with how the intro is started from the title screen and not creating the $game_time global variable.

**
Rep: +0/-0Level 62
Somewhat new to VX.
Wow you replied fast.
I made a demo that replicates this bug, with only your Idle title and Jet's time system scripts.
http://www.megaupload.com/?d=4MKPHXTK
Thanks for replying so quick. :]
"Kindness won't go unrewarded. Good things come to generous people."
"If pro is the opposite of con, what is the opposite of progress?"

pokeball TDSOffline
***
Rep:
Level 84
-T D S-
Silver - GIAW 11 (Hard)Silver - Game In A Week VII
This should work.

Code: [Select]
#==============================================================================
# ** TDS Idle Title Intro
#     Ver: 1.0
#      by TDS
#------------------------------------------------------------------------------
#  * Description:
#  This script allows you to make an intro start after an amount of time has
#  passed idling in the title screen.
#------------------------------------------------------------------------------
#  * Features:
#  Starts a map after a while idling in the title screen.
#  Interrupts intro in the map if desired.
#------------------------------------------------------------------------------
#  * Instructions:
#  Edit the constants below the script information to set it up how you want.
#------------------------------------------------------------------------------
#  * Notes:
#  To make a good automatic intro make sure to use \! \^ commands in the text
#  box and use the "Return to title" event command at the end of your intro.
#------------------------------------------------------------------------------
#  * New Methods:
#  Scene_Title:
#  - reset_idle_intro_counter?
#    ^ Used to determine if any input has happened to interrupt the idle intro.
#  - start_idle_intro
#    ^ Used to start the idle intro in the map.
#
#  Scene_Map:
#  - interrupt_idle_intro?
#    ^ Used to interrupt the idle intro in the map and return to title.
#------------------------------------------------------------------------------
#  * Aliased Methods:
#  Game_Temp:
#  - initialize
#    ^ Aliased to initialize the viewing idle intro flag.
#
#  Scene_Title:
#  - initialize
#    ^ Aliased to initialize the idle intro counter.
#  - update
#    ^ Aliased to process the idle intro values and methods.
#
#  Scene_Map:
#  - update
#    ^ Aliased to process the idle intro interruption methods.
#------------------------------------------------------------------------------
# WARNING:
#
# Do not release, distribute or change my work without my expressed written
# consent, doing so violates the terms of use of this work.
#
# If you really want to share my work please just post a link to the original
# site.
#
# * Not Knowing English or understanding these terms will not excuse you in any
#   way from the consequenses.
#==============================================================================

#--------------------------------------------------------------------------
# * Constants
#--------------------------------------------------------------------------
# Idle Title Intro Wait (in frames)
IDLE_TITLE_INTRO_WAIT = 700
# Idle Title Intro Start Map ID
IDLE_TITLE_INTRO_START_MAP_ID = 1
# Idle Title Intro Start X Position
IDLE_TITLE_INTRO_START_X = 0 
# Idle Title Intro Start Y Position 
IDLE_TITLE_INTRO_START_Y = 0
# Idle Title Intro Start Screen Tone
IDLE_TITLE_INTRO_START_SCREEN_TONE = Tone.new(0, 0, 0, 0)
# If Idle Titlle intro in map can be interrupted once started
CAN_INTERRUPT_MAP_INDLE_TITLE_INTRO = true
# Array of Idle Interrupt Keys
IDLE_INTERRUPT_KEYS = [Input::A, Input::B, Input::C, Input::X, Input::Y,
Input::Z, Input::L, Input::R, Input::DOWN, Input::LEFT, Input::RIGHT,
Input::UP, Input::SHIFT, Input::CTRL, Input::ALT] 

#==============================================================================
# ** Game_Temp
#------------------------------------------------------------------------------
#  This class handles temporary data that is not included with save data.
# The instance of this class is referenced by $game_temp.
#==============================================================================

class Game_Temp
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias tds_idle_title_intro_game_temp_initialize     initialize    unless $@ 
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :viewing_idle_title_intro    # Viewing Idle Title Intro Flag 
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    # Run Original Method
    tds_idle_title_intro_game_temp_initialize
    # Set Viewing Title Idle intro flag to false
    @viewing_idle_title_intro = false
  end
end


#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
#  This class performs the title screen processing.
#==============================================================================

class Scene_Title < Scene_Base
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias tds_idle_title_intro_scene_title_initialize    initialize   unless $@
  alias tds_idle_title_intro_scene_title_update        update       unless $@ 
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    # Run Original Method
    tds_idle_title_intro_scene_title_initialize
    # Set Idle Intro Counter Initial Value
    @idle_intro_counter = 0
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Run Original Method
    tds_idle_title_intro_scene_title_update
    # Reset Idle Intro Counter
    @idle_intro_counter = 0 if reset_idle_intro_counter?
    # Increase Idle Intro Counter
    @idle_intro_counter += 1
    # Start Idle Intro Idle Intro Counter is equal or more to idle intro wait
    start_idle_intro if @idle_intro_counter >= IDLE_TITLE_INTRO_WAIT
  end
  #--------------------------------------------------------------------------
  # * Determine if idle title intro counter is to be reset
  #--------------------------------------------------------------------------
  def reset_idle_intro_counter?
    # Go Through Idle Interrup Keys
    IDLE_INTERRUPT_KEYS.each {|key|
      # Return true if Interrupt key has been pressed
      return true if Input.trigger?(key) or Input.press?(key) or Input.repeat?(key)
    }   
    # Return false by default
    return false
  end
  #--------------------------------------------------------------------------
  # * Start Idle Intro
  #--------------------------------------------------------------------------
  def start_idle_intro
    # Add Game Time Global Variable
    $game_time = Game_Time.new   
    # Initial party
    $game_party.setup_starting_members
    # Initial map position
    $game_map.setup(IDLE_TITLE_INTRO_START_MAP_ID)
    $game_player.moveto(IDLE_TITLE_INTRO_START_X, IDLE_TITLE_INTRO_START_Y)
    $game_player.refresh
    $scene = Scene_Map.new
    # Start Game Map Tone change
    $game_map.screen.start_tone_change(IDLE_TITLE_INTRO_START_SCREEN_TONE, 0)
    # Set Viewing Idle Intro flag to true
    $game_temp.viewing_idle_title_intro = true
    RPG::BGM.fade(1500)
    close_command_window if @command_window != nil
    Graphics.fadeout(60)
    Graphics.wait(40)
    Graphics.frame_count = 0
    RPG::BGM.stop
    $game_map.autoplay
  end
end


#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  This class performs the map screen processing.
#==============================================================================

class Scene_Map < Scene_Base
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias tds_idle_title_intro_scene_map_update         update        unless $@   
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Run Original Method
    tds_idle_title_intro_scene_map_update
    # Call title If Viewing Idle Intro and idle intro is interrupted
    call_title if $game_temp.viewing_idle_title_intro and interrupt_idle_intro?
  end   
  #--------------------------------------------------------------------------
  # * Determine if idle intro should be interrupted
  #--------------------------------------------------------------------------
  def interrupt_idle_intro?
    # Return false if Idle Intro cannot be interrupted
    return false if !CAN_INTERRUPT_MAP_INDLE_TITLE_INTRO
    # Go Through Idle Interrup Keys
    IDLE_INTERRUPT_KEYS.each {|key|
      # Return true if Interrupt key has been pressed
      return true if Input.trigger?(key) or Input.press?(key) or Input.repeat?(key)
    }
    # Return false by default
    return false
  end 
end

The time object is created when the intro starts to avoid any errors, so the time HUD will be visible. I don't know if you could make it not visible not visible by a switch or something.

**
Rep: +0/-0Level 62
Somewhat new to VX.
Just tried it, it works perfectly now.
Thanks.  ;D
"Kindness won't go unrewarded. Good things come to generous people."
"If pro is the opposite of con, what is the opposite of progress?"