MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
185
First Language
Meowish
Primarily Uses
Made for a request here.

This script allows the player to start a new game inside a Load Scene.

[IMG]http://s13.postimg.org/i179x8uc7/loadstart.png[/IMG]

Features:

Able to start new game in load scene

How to Use:

[1] Paste this script below Material and Above Main

[2] Change the "Start New Game" text in the script's setting area to whatever you like.

Compatibility:

This script is using overwrite method on file scene, load scene and save window. If you have other scripts that modifies how save/load is displayed, there may be a conflict.

Terms of Use:

Free for both Commercial and Non-commercial

Script:

Code:
#==============================================================================# ■ Meow Face Start New Game in Load Scene#------------------------------------------------------------------------------# Able to Start a New Game in Load Scene#==============================================================================# How to Use:# [1] Paste This script Below Material and Above Main#==============================================================================module MEOWLOADSTART#==============================================================================# Settings Area#==============================================================================  NEWGAME = "START NEW GAME" #Display Name for Start New Game in Load Scene#==============================================================================# End of Settings Area# Edit anything past this line at your own risk!#==============================================================================endclass Window_SaveFile < Window_Base  def initialize(height, index) #Overwrite    if SceneManager.scene_is?(Scene_Load)      super(0, (index+1) * height, Graphics.width, height)    else      super(0, index * height, Graphics.width, height)    end    @file_index = index    refresh    @selected = false  endendclass Window_StartNewGame < Window_Base  attr_reader   :selected  def initialize(height)    super(0, 0, Graphics.width, height)    @file_index = 0    refresh    @selected = false  end  def refresh    contents.clear    change_color(normal_color)    draw_text(6, line_height, 160, line_height, MEOWLOADSTART::NEWGAME)  end  def selected=(selected)    @selected = selected    update_cursor  end  def update_cursor    if @selected      cursor_rect.set(0, line_height, 160, line_height)    else      cursor_rect.empty    end  endendclass Scene_File < Scene_MenuBase  def create_savefile_windows #Overwrite    @savefile_windows = Array.new(item_max) do |i|      Window_SaveFile.new(savefile_height, i)    end    if SceneManager.scene_is?(Scene_Load)      @savefile_windows.unshift(Window_StartNewGame.new(savefile_height))    end    @savefile_windows.each {|window| window.viewport = @savefile_viewport }  endendclass Scene_Load < Scene_File  def first_savefile_index #Overwrite    DataManager.latest_savefile_index + 1  end  def on_savefile_ok #Overwrite    if @index == 0      start_new_game    else      super      if DataManager.load_game(@index-1)        on_load_success      else        Sound.play_buzzer      end    end  end  def start_new_game    Sound.play_ok    DataManager.setup_new_game    fadeout_all    $game_map.autoplay    SceneManager.goto(Scene_Map)  endend
 
Last edited by a moderator:

Lord Vectra

Master Eventer
Veteran
Joined
Dec 6, 2015
Messages
212
Reaction score
336
First Language
English
Primarily Uses
RMVXA
I like this script. I'v been looking for something like this for a long time.
 

Hosom

Villager
Member
Joined
Jan 19, 2016
Messages
7
Reaction score
0
First Language
Italian
Primarily Uses
@MeowFace sorry for heavy necroposting. haha.. but the script in your post, well. Look at that! The formattation is completly gone.. could you repost it? For me would take less time to make a new script than tring to fix that haha :)  thanks!
 

Hosom

Villager
Member
Joined
Jan 19, 2016
Messages
7
Reaction score
0
First Language
Italian
Primarily Uses
Err.. nevermind. Used notepad++ and fixed it. @MeowFace, with your permission, here is the code.. not good looking but working hahah :D

Code:
module MEOWLOADSTART
NEWGAME = "START NEW GAME" 
end

class Window_SaveFile < Window_Base
  def initialize(height, index)
  if SceneManager.scene_is?(Scene_Load)
  super(0, (index+1) * height, Graphics.width, height)
  else
  super(0, index * height, Graphics.width, height)
  end 

  @file_index = index
  refresh
  @selected = false
  end
  end
  
  class Window_StartNewGame < Window_Base
  attr_reader
  :selected
  def initialize(height)
  super(0, 0, Graphics.width, height)
  @file_index = 0
  refresh
  @selected = false
  end

  def refresh
  contents.clear
  change_color(normal_color)
  draw_text(6, line_height, 160, line_height, MEOWLOADSTART::NEWGAME)
  end
  def selected=(selected)
  @selected = selected
  update_cursor
  end
  def update_cursor
  if @selected
  cursor_rect.set(0, line_height, 160, line_height)
  else
  cursor_rect.empty
  end
  end
  end
  
  class Scene_File < Scene_MenuBase
  def create_savefile_windows
  @savefile_windows = Array.new(item_max) do |i|
  Window_SaveFile.new(savefile_height, i)
  end

  if SceneManager.scene_is?(Scene_Load)
  @savefile_windows.unshift(Window_StartNewGame.new(savefile_height))
  end 
  @savefile_windows.each {|window| window.viewport = @savefile_viewport }
  end
  end
  
  class Scene_Load < Scene_File
  def first_savefile_index 
  DataManager.latest_savefile_index + 1
  end

  def on_savefile_ok 
  if @index == 0
  start_new_game 
  else
  super
  if DataManager.load_game(@index-1)
  on_load_success
  else 
  Sound.play_buzzer
  end
  end
  end

  def start_new_game
  Sound.play_ok
  DataManager.setup_new_game
  fadeout_all
  $game_map.autoplay
  SceneManager.goto(Scene_Map)
  end
end
 

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
185
First Language
Meowish
Primarily Uses
@MeowFace sorry for heavy necroposting. haha.. but the script in your post, well. Look at that! The formattation is completly gone.. could you repost it? For me would take less time to make a new script than tring to fix that haha :)  thanks!


Err.. nevermind. Used notepad++ and fixed it. @MeowFace, with your permission, here is the code.. not good looking but working hahah :D

Please avoid double posting, it's against the forum rules. The script is in a mess due to the the recent V3 > V4 forum migration. I was told to wait for a few more days and the codes should fix itself. If i change the code now it will revert anyway. So i'll check the "format" when they have finally done that patching to make sure everything is alright.
 

Hosom

Villager
Member
Joined
Jan 19, 2016
Messages
7
Reaction score
0
First Language
Italian
Primarily Uses
Please avoid double posting, it's against the forum rules. The script is in a mess due to the the recent V3 > V4 forum migration. I was told to wait for a few more days and the codes should fix itself. If i change the code now it will revert anyway. So i'll check the "format" when they have finally done that patching to make sure everything is alright.





Ok thanks for the info! :)  however really great script.. very usefull specially for "in game" title screen like the one that i am making!
 

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
185
First Language
Meowish
Primarily Uses
Ok thanks for the info! :)  however really great script.. very usefull specially for "in game" title screen like the one that i am making!

You are welcome! ;)
 

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
185
First Language
Meowish
Primarily Uses
The script in the top post is being messed up due to the recent V3 to V4 migration.


Please use this alternative version until the web staff is finally able to fix the top post.

Code:
#==============================================================================
# ■ Meow Face Start New Game in Load Scene
#------------------------------------------------------------------------------
# Able to Start a New Game in Load Scene
#==============================================================================
# How to Use:
# [1] Paste This script Below Material and Above Main
#==============================================================================
module MEOWLOADSTART
#==============================================================================
# Settings Area
#==============================================================================
  NEWGAME = "START NEW GAME" #Display Name for Start New Game in Load Scene
#==============================================================================
# End of Settings Area
# Edit anything past this line at your own risk!
#==============================================================================
end
class Window_SaveFile < Window_Base
  def initialize(height, index) #Overwrite
    if SceneManager.scene_is?(Scene_Load)
      super(0, (index+1) * height, Graphics.width, height)
    else
      super(0, index * height, Graphics.width, height)
    end
    @file_index = index
    refresh
    @selected = false
  end
end
class Window_StartNewGame < Window_Base
  attr_reader   :selected
  def initialize(height)
    super(0, 0, Graphics.width, height)
    @file_index = 0
    refresh
    @selected = false
  end
  def refresh
    contents.clear
    change_color(normal_color)
    draw_text(6, line_height, 160, line_height, MEOWLOADSTART::NEWGAME)
  end
  def selected=(selected)
    @selected = selected
    update_cursor
  end
  def update_cursor
    if @selected
      cursor_rect.set(0, line_height, 160, line_height)
    else
      cursor_rect.empty
    end
  end
end
class Scene_File < Scene_MenuBase
  def create_savefile_windows #Overwrite
    @savefile_windows = Array.new(item_max) do |i|
      Window_SaveFile.new(savefile_height, i)
    end
    if SceneManager.scene_is?(Scene_Load)
      @savefile_windows.unshift(Window_StartNewGame.new(savefile_height))
    end
    @savefile_windows.each {|window| window.viewport = @savefile_viewport }
  end
end
class Scene_Load < Scene_File
  def first_savefile_index #Overwrite
    DataManager.latest_savefile_index + 1
  end
  def on_savefile_ok #Overwrite
    if @index == 0
      start_new_game
    else
      super
      if DataManager.load_game(@index-1)
        on_load_success
      else
        Sound.play_buzzer
      end
    end
  end
  def start_new_game
    Sound.play_ok
    DataManager.setup_new_game
    fadeout_all
    $game_map.autoplay
    SceneManager.goto(Scene_Map)
  end
end
 

Latest Threads

Latest Posts

Latest Profile Posts

Whenever I start on a new chapter, it doesn't feel like the next episodes, but more like sequels :)
It can be frustrating that so many commercial games have used up titles that might otherwise be great for a project.
Light up explosions with QABS and Community Lighting.
qcPQHt9.gif

Forum statistics

Threads
110,655
Messages
1,054,987
Members
143,780
Latest member
Cararingo
Top