[RESOLVED][RMVX REQUEST] - Skip Title Screen if no Saves.

Started by arisenhorizen, December 03, 2009, 02:24:44 am

Previous topic - Next topic

Jackolas


arisenhorizen


Jackolas

Spoiler: ShowHide
#==============================================================================
# ** First time Scene_Title Skip
#
# Script by              Jackolas
# version number         V0.52
#------------------------------------------------------------------------------
#  This Changes the title screen processing to allow a cutscene.
#------------------------------------------------------------------------------
# Place above all custom scripts and main.
# Edit the Config to your Cutscene map
#==============================================================================

module titlescenecutscene
  #--------------------------------------------------------------------------
  # * Configuration Begin
  #--------------------------------------------------------------------------
  def map_id 
    return 1          # The map of the cutscene
  end
  def map_x
    return 1          # The x of the cutscene
  end
  def map_y           
    return 1          # The y of the cutscene
  end
  #--------------------------------------------------------------------------
  # * Configuration END
  #-------------------------------------------------------------------------- 
end

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

class Scene_Title < Scene_Base
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    if $BTEST                         # If battle test
      battle_test                     # Start battle test
    else                              # If normal play
      check_continue                  # check for savegames
      if not @continue_enabled        # if no savegames are found
        command_cutscene              # Start game without start menu
      else                            # check normal game start
        super                         # Usual main processing
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Command: New Game
  #--------------------------------------------------------------------------
  def command_cutscene
    load_database                                 # Load database
    create_game_objects                           # Create game objects
    $game_party.setup_starting_members            # Initial party
    $game_map.setup(titlescenecutscene.map_id)     # Initial map position
    $game_player.moveto(titlescenecutscene.map_x, titlescenecutscene.map_y)
    $game_player.refresh
    $scene = Scene_Map.new
    $game_map.autoplay
  end
end


this should work than

arisenhorizen


Jackolas

last thing i can think of
Spoiler: ShowHide
#==============================================================================
# Script by              Jackolas
# version number         V0.52
#------------------------------------------------------------------------------
#  This Changes the title screen processing to allow a cutscene.
#------------------------------------------------------------------------------
# Place above all custom scripts and main.
# Edit the Config to your Cutscene map
#==============================================================================
class Scene_Title < Scene_Base

  #--------------------------------------------------------------------------
  # * Configuration Begin
  #--------------------------------------------------------------------------
  def map_id 
    return 1          # The map of the cutscene
  end
  def map_x
    return 1          # The x of the cutscene
  end
  def map_y           
    return 1          # The y of the cutscene
  end
  #--------------------------------------------------------------------------
  # * Configuration END
  #--------------------------------------------------------------------------

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

  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    if $BTEST                         # If battle test
      battle_test                     # Start battle test
    else                              # If normal play
      check_continue                  # check for savegames
      if not @continue_enabled        # if no savegames are found
        command_cutscene              # Start game without start menu
      else                            # check normal game start
        super                         # Usual main processing
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Command: New Game
  #--------------------------------------------------------------------------
  def command_cutscene
    load_database                                 # Load database
    create_game_objects                           # Create game objects
    $game_party.setup_starting_members            # Initial party
    $game_map.setup(map_id)                       # Initial map position
    $game_player.moveto(map_x, map_y)
    $game_player.refresh
    $scene = Scene_Map.new
    $game_map.autoplay
  end
end

G_G

December 03, 2009, 08:43:12 am #26 Last Edit: December 03, 2009, 08:45:21 am by game_guy
@jackolas: first letter of a module needs to be capitalized

EDIT: Fixed script, also methods in modules need to be
def self.method_name
#==============================================================================
# ** First time Scene_Title Skip
#
# Script by              Jackolas
# version number         V0.52
#------------------------------------------------------------------------------
#  This Changes the title screen processing to allow a cutscene.
#------------------------------------------------------------------------------
# Place above all custom scripts and main.
# Edit the Config to your Cutscene map
#==============================================================================

module Titlescenecutscene
 #--------------------------------------------------------------------------
 # * Configuration Begin
 #--------------------------------------------------------------------------
 def self.map_id  
   return 1          # The map of the cutscene
 end
 def self.map_x
   return 1          # The x of the cutscene
 end
 def self.map_y          
   return 1          # The y of the cutscene
 end
 #--------------------------------------------------------------------------
 # * Configuration END
 #--------------------------------------------------------------------------  
end

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

class Scene_Title < Scene_Base
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------
 def main
   if $BTEST                         # If battle test
     battle_test                     # Start battle test
   else                              # If normal play
     check_continue                  # check for savegames
     if not @continue_enabled        # if no savegames are found
       command_cutscene              # Start game without start menu
     else                            # check normal game start
       super                         # Usual main processing
     end
   end
 end
 #--------------------------------------------------------------------------
 # * Command: New Game
 #--------------------------------------------------------------------------
 def command_cutscene
   load_database                                 # Load database
   create_game_objects                           # Create game objects
   $game_party.setup_starting_members            # Initial party
   $game_map.setup(Titlescenecutscene.map_id)     # Initial map position
   $game_player.moveto(Titlescenecutscene.map_x, Titlescenecutscene.map_y)
   $game_player.refresh
   $scene = Scene_Map.new
   $game_map.autoplay
 end
end

arisenhorizen

December 03, 2009, 09:10:13 am #27 Last Edit: December 03, 2009, 09:26:01 am by arisenhorizen
Yep, it works, but what I had in mind was ...

for the first-time player,

1. cutscene plays. (and this isn't part of the game actually).
2. I use the "Return to Title" command, (or you could put this in your script)
3. Player go back to the title screen and starts new game. (continue button not available since they didn't save game, anyway, I don't want to have this continue button available. It looks weird since they only watched a cutscene and didn't actually play the game).
4. I autosave the moment the player starts a new game so that the cutscene don't repeats.

but what's happening is that,

1. cutscene plays.
2. I use the "Return to Title" command,
3. The cutscene replays.

it seems to me as if this cutscene "replaces" the Title Screen and not skips it.

The others are perfect. But can you pls solve the above problem.

Thanks. :)


Jackolas

December 03, 2009, 09:19:58 am #28 Last Edit: December 07, 2009, 11:00:32 am by Jackolas
Quoteand this isn't part of the game actually

there is the real problem :P

anyway.. in the latest version  (the 1 Game_Guy posted) you can set a start position for your cutscene and the start position of your game somewhere else.

also g_g.. .thanks for the fix. learned a new thing :P

edit:
Spoiler: ShowHide
#==============================================================================
# ** Cutscene Script [VX]
#
# Script by              Jackolas
# Thanks:                Game_Guy (for fixing bugs)
#
# version number         V0.6
#------------------------------------------------------------------------------
#  This allows you to skip the title screen and go to a cutscene when there is
#  no save game.
#------------------------------------------------------------------------------
# How to use:
#
# Place above all custom scripts and main.
# Edit the Config to your Cutscene map
#
# Also replace in the Main script             $scene = Scene_Title.new
# For                                         $scene = Cutscene_Title.new
#==============================================================================

module CutsceneStart
 #--------------------------------------------------------------------------
 # * Configuration Begin
 #--------------------------------------------------------------------------
 def self.map_id  
   return 1          # The map id of the cutscene
 end
 def self.map_x
   return 1          # The x of the cutscene
 end
 def self.map_y          
   return 1          # The y of the cutscene
 end
 #--------------------------------------------------------------------------
 # * Configuration END
 #--------------------------------------------------------------------------  
end

#==============================================================================
# ** Cutscene Script
#------------------------------------------------------------------------------
#  This class performs the title screen processing.
#==============================================================================
class Cutscene_Title < Scene_Base
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------
 def main
   if $BTEST                         # If battle test
     $scene = Scene_Title.new        # change to Battle test
   else                              # Check if not Battle test
     check_savegame_on               # check for savegames
     if not @savegame_enabled        # if no savegames are found
       command_cutscene              # Start Cutscene
     else                            # if savegames are found
       $scene = Scene_Title.new      # start menu
     end
   end
 end
 #--------------------------------------------------------------------------
 # * Command: New Game
 #--------------------------------------------------------------------------
 def command_cutscene
   load_database
   create_game_objects
   $game_party.setup_starting_members
   $game_map.setup(CutsceneStart.map_id)
   $game_player.moveto(CutsceneStart.map_x, CutsceneStart.map_y)
   $game_player.refresh
   $scene = Scene_Map.new
   $game_map.autoplay
 end
 #--------------------------------------------------------------------------
 # * Load Database
 #--------------------------------------------------------------------------
 def load_database
   $data_actors        = load_data("Data/Actors.rvdata")
   $data_classes       = load_data("Data/Classes.rvdata")
   $data_skills        = load_data("Data/Skills.rvdata")
   $data_items         = load_data("Data/Items.rvdata")
   $data_weapons       = load_data("Data/Weapons.rvdata")
   $data_armors        = load_data("Data/Armors.rvdata")
   $data_enemies       = load_data("Data/Enemies.rvdata")
   $data_troops        = load_data("Data/Troops.rvdata")
   $data_states        = load_data("Data/States.rvdata")
   $data_animations    = load_data("Data/Animations.rvdata")
   $data_common_events = load_data("Data/CommonEvents.rvdata")
   $data_system        = load_data("Data/System.rvdata")
   $data_areas         = load_data("Data/Areas.rvdata")
 end
 #--------------------------------------------------------------------------
 # * Create Game Objects
 #--------------------------------------------------------------------------
 def create_game_objects
   $game_temp          = Game_Temp.new
   $game_message       = Game_Message.new
   $game_system        = Game_System.new
   $game_switches      = Game_Switches.new
   $game_variables     = Game_Variables.new
   $game_self_switches = Game_SelfSwitches.new
   $game_actors        = Game_Actors.new
   $game_party         = Game_Party.new
   $game_troop         = Game_Troop.new
   $game_map           = Game_Map.new
   $game_player        = Game_Player.new
 end
 #--------------------------------------------------------------------------
 # * Determine if Continue is Enabled
 #--------------------------------------------------------------------------
 def check_savegame_on
   @savegame_enabled = (Dir.glob('Save*.rvdata').size > 0)
 end
end

Read the how to use in the script

arisenhorizen

o.o an idea..? YAY.

Oh and, do anyone have an idea on how to autosave after I start "New Game", or at any point of the game without having the player to actually save game? (I suppose I need a autosave script? But then again, an autosave script will be tricky, since I don't think you can determine when the autosave is going to work).


Jackolas

k.. try again. I suggest read the how to use in the script.

this way the cut scene will only open when you start the game and have no save games.

arisenhorizen

December 03, 2009, 09:54:57 am #31 Last Edit: December 03, 2009, 09:58:45 am by arisenhorizen
YAY, IT WORKKKEEED.

But lol, I have another problem. I need to autosave the moment "New Game" starts so that it doesn't repeat the cutscene everytime I start it or perharps I could manupulate when I want to autosave the game. (some people don't remember to save game before shutting down, lol).

EDIT : I gotta sleep now, but I will get back tmr.

Jackolas

http://rmrk.net/index.php/topic,33752.0.html

there is your auto save. (hope it works)
(should give no problems with my script)


arisenhorizen

Thanks~! It worked perfectly~!

Finally problem resolved.

Thanks for helping me for like the nth time.  :shy:

Jackolas