Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Title Screen Menu

Hi im using a custom title screen menu and i want to know how to:
1. Add extra item to the title menu: Newgame, Continue, Extras, Shutdown
2. EDIT:Actually, I would like to know how to make an option teleport you to a specific map.
thanks ^_^

Code:
=begin
=========================================
Professional Title Screen ver. 2.0 English Translation
Script by パラ犬, Edited by Kio !! :D
http://rpg.para.s3p.net/
-->Released and translated by Sonicia.
Search for my name (Sonicia)for the customizing place where you can arange the 
graphics where you want them. Please credit Kio, who orginally made this script
compatable, and me for translating, releasing, and finding out how to use it.
Note, in a few rare spots there is still Japanese, since it was code I didnt
change it for fear of messing it up. All comments are translated by Sonicia.

Note: you need continue.png, continue_active.png, newgame.png,
newgame_active.png, shutdown.png, and shutdown_active.png in your game's
graphics\title folder. The graphics must be the same size, both active and inactive.
This means that if you have an arrow or text make that one first, duplicate, 
then erase the arrow and edit the rest of the picture or it will be set off.
=========================================

=========================================
Title menu picture
=========================================
=end
module PARA_TITLE_CUSTOM

# Menu command picture, (true/false)
IMG_MENU = true

#↓---Menu command picture Setting--- 
#Character string of menu command 
#MENU_NEWGAME = ?new game? # new game 
MENU_NEWGAME = "ニューゲーム" # ニューゲーム
#MENU_LOAD = ?continuing? # continuing 
MENU_LOAD = "コンティニュー" # コンティニュー
#MENU_END = ?shutdown? # shutdown 
MENU_END = "シャットダウン" # シャットダウン

# window frame (true/false)
WINDOW_TRANS = false
#Transparency of the window frame
WINDOW_OPACITY = 160

#Side size (horizontal?) of # window 
WINDOW_WIDTH = 192
#Vertical position of window (0: Coordinate appointment/
#1: The left edge/2: Center/3: Right hand edge) 
WINDOW_ALIGN = 2
#When # ?coordinate appointment? being, abscissa of the window 
WINDOW_POS_X = 0
#Vertical position of # window (0: Coordinate appointment/
#1: Top/2: Center/3: Bottom) 
WINDOW_VALIGN = 0
#When ?coordinate appointment? being, ordinate of the window 
WINDOW_POS_Y = 288


#==========================================
=begin
Sonicia
Customize the location and the graphics make sure you change
only the numbers, 250 is approxamtely the center of
the vertical screen.
Make sure that the command pictures are in the ?Graphics/Titles? folder
=end
#==========================================
=begin
#New Game Graphic
IMG_NEWGAME = ["newgame","newgame_active"]
IMG_NEWGAME_X = 100 # Horizontal position 
IMG_NEWGAME_Y = 160 # Vertical position 
#Continue Graphic
IMG_LOAD = ["continue","continue_active"]
IMG_LOAD_X = 250 # Horizontal position
IMG_LOAD_Y = 160 # Vertical position
#Shut Down Graphic
IMG_END = ["shutdown","shutdown_active"]
IMG_END_X = 400 # Horizontal position
IMG_END_Y = 160 # Vertical position
=end
#My orginal settings for reference Copy and paste if you need to
#New Game Graphic
IMG_NEWGAME = ["newgame","newgame_active"]
IMG_NEWGAME_X = 250 # Horizontal position 
IMG_NEWGAME_Y = 260 # Vertical position 
#Continue Graphic
IMG_LOAD = ["continue","continue_active"]
IMG_LOAD_X = 250 # Horizontal position
IMG_LOAD_Y = 300 # Vertical position
#Shut Down Graphic
IMG_END = ["shutdown","shutdown_active"]
IMG_END_X = 250 # Horizontal position
IMG_END_Y = 340 # Vertical position


#END CUSTOMIZABLE AREA
#============================================
#Synthetic method of picture (0: Usually/1: Addition/2: Subtraction) 
BLEND_TYPE = 0
end


#------------------------------------------------------------------------------

#======================================
# â–  Scene_Title
#======================================

class Scene_Title
#--------------------------------------------------------------------------
# - Main processing 
#--------------------------------------------------------------------------
def main
#If battle test
if $BTEST
battle_test
return
end
# Load database
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
# Make system object
$game_system = Game_System.new
# Make title graphic
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
# Make command window
s1 = PARA_TITLE_CUSTOM::MENU_NEWGAME
s2 = PARA_TITLE_CUSTOM::MENU_LOAD
s3 = PARA_TITLE_CUSTOM::MENU_END
w = PARA_TITLE_CUSTOM::WINDOW_WIDTH
@command_window = Window_Command.new(w, [s1, s2, s3])
if PARA_TITLE_CUSTOM::WINDOW_TRANS
@command_window.opacity = 0
else
@command_window.back_opacity = PARA_TITLE_CUSTOM::WINDOW_OPACITY
end
# Position of the window 
case PARA_TITLE_CUSTOM::WINDOW_ALIGN
when 0
@command_window.x = PARA_TITLE_CUSTOM::WINDOW_POS_X
when 1
@command_window.x = 0
when 2
@command_window.x = ( 640 - @command_window.width ) / 2
when 3
@command_window.x = 640 - @command_window.width
end
case PARA_TITLE_CUSTOM::WINDOW_VALIGN
when 0
@command_window.y = PARA_TITLE_CUSTOM::WINDOW_POS_Y
when 1
@command_window.y = 0
when 2
@command_window.y = ( 480 - @command_window.height ) / 2
when 3
@command_window.y = 480 - @command_window.height
end
# Continue enabled determinant
# Check if at least one save file exists
# If enabled, make @continue_enabled true; if disabled, make it false
@continue_enabled = true
for i in 0..3
if FileTest.exist?("Save#{i+1}.rxdata")
@continue_enabled = true
end
end
# If continue is enabled, move cursor to "Continue"
# If disabled, display "Continue" text in gray
if @continue_enabled
@command_window.index = 1
else
@command_window.disable_item(1)
end
# Command Picture
if PARA_TITLE_CUSTOM::IMG_MENU
@command_window.visible = false
@command_img1 = Sprite.new
@command_img1.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])
@command_img1.x = PARA_TITLE_CUSTOM::IMG_NEWGAME_X
@command_img1.y = PARA_TITLE_CUSTOM::IMG_NEWGAME_Y
@command_img2 = Sprite.new
@command_img2.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])
@command_img2.x = PARA_TITLE_CUSTOM::IMG_LOAD_X
@command_img2.y = PARA_TITLE_CUSTOM::IMG_LOAD_Y
@command_img3 = Sprite.new
@command_img3.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE
@command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[0])
@command_img3.x = PARA_TITLE_CUSTOM::IMG_END_X
@command_img3.y = PARA_TITLE_CUSTOM::IMG_END_Y
# If continue is enabled, move cursor to "Continue"
# If disabled, display "Continue" text in gray
if @continue_enabled
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[1])
else
@command_img2.opacity = 160
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[1])
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])
end
end
# Play title BGM
$game_system.bgm_play($data_system.title_bgm)
# Stop playing ME and BGS
Audio.me_stop
Audio.bgs_stop
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of command window
@command_window.dispose
if PARA_TITLE_CUSTOM::IMG_MENU
@command_img1.dispose
@command_img2.dispose
@command_img3.dispose
end
# Graphics Dispose
@sprite.bitmap.dispose
@sprite.dispose
end


#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update command window
@command_window.update
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0 # New game
command_new_game
when 1 # Continue
command_continue
when 2 # Shutdown
command_shutdown
end
end
if PARA_TITLE_CUSTOM::IMG_MENU
if Input.repeat?(Input::UP) or Input.repeat?(Input::DOWN)
case @command_window.index
when 0 # New Game
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[1])
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])
@command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[0])
when 1 # Continue Game
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[1])
@command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[0])
when 2 # End Game
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])
@command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[1])
end
end
end
end
def command_new_game
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Stop BGM
Audio.bgm_stop
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each type of game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.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
# Set up initial party
$game_party.setup_starting_members
# Set up initial map position
$game_map.setup($data_system.start_map_id)
# Move player to initial position
$game_player.moveto($data_system.start_x, $data_system.start_y)
# Refresh player
$game_player.refresh
# Run automatic change for BGM and BGS set with map
$game_map.autoplay
# Update map (run parallel process event)
$game_map.update
# Switch to map screen
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Command: Continue
#--------------------------------------------------------------------------
def command_continue
# If continue is disabled
unless @continue_enabled
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to load screen
$scene = Scene_Load.new
end
#--------------------------------------------------------------------------
# * Command: Shutdown
#--------------------------------------------------------------------------
def command_shutdown
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Fade out BGM, BGS, and ME
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# Shutdown
$scene = nil
end
#--------------------------------------------------------------------------
# * Battle Test
#--------------------------------------------------------------------------
def battle_test
# Load database (for battle test)
$data_actors = load_data("Data/BT_Actors.rxdata")
$data_classes = load_data("Data/BT_Classes.rxdata")
$data_skills = load_data("Data/BT_Skills.rxdata")
$data_items = load_data("Data/BT_Items.rxdata")
$data_weapons = load_data("Data/BT_Weapons.rxdata")
$data_armors = load_data("Data/BT_Armors.rxdata")
$data_enemies = load_data("Data/BT_Enemies.rxdata")
$data_troops = load_data("Data/BT_Troops.rxdata")
$data_states = load_data("Data/BT_States.rxdata")
$data_animations = load_data("Data/BT_Animations.rxdata")
$data_tilesets = load_data("Data/BT_Tilesets.rxdata")
$data_common_events = load_data("Data/BT_CommonEvents.rxdata")
$data_system = load_data("Data/BT_System.rxdata")
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.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
# Set up party for battle test
$game_party.setup_battle_test_members
# Set troop ID, can escape flag, and battleback
$game_temp.battle_troop_id = $data_system.test_troop_id
$game_temp.battle_can_escape = true
$game_map.battleback_name = $data_system.battleback_name
# Play battle start SE
$game_system.se_play($data_system.battle_start_se)
# Play battle BGM
$game_system.bgm_play($game_system.battle_bgm)
# Switch to battle screen
$scene = Scene_Battle.new
end
end

Also, place these into your title folder.
 
Well, i got the teleporting script, but i cant figure out how to add the extra option.
The new option I'm trying to add is called extras and it should transfer you to another map. Heres what i edited so far. See if you can find the error. :s

Code:
=begin
=========================================
Professional Title Screen ver. 2.0 English Translation
Script by パラ犬, Edited by Kio !! :D
http://rpg.para.s3p.net/
-->Released and translated by Sonicia.
Search for my name (Sonicia)for the customizing place where you can arange the 
graphics where you want them. Please credit Kio, who orginally made this script
compatable, and me for translating, releasing, and finding out how to use it.
Note, in a few rare spots there is still Japanese, since it was code I didnt
change it for fear of messing it up. All comments are translated by Sonicia.

Note: you need continue.png, continue_active.png, newgame.png,
newgame_active.png, shutdown.png, and shutdown_active.png in your game's
graphics\title folder. The graphics must be the same size, both active and inactive.
This means that if you have an arrow or text make that one first, duplicate, 
then erase the arrow and edit the rest of the picture or it will be set off.
=========================================

=========================================
Title menu picture
=========================================
=end
module PARA_TITLE_CUSTOM

# Menu command picture, (true/false)
IMG_MENU = true

#↓---Menu command picture Setting--- 
#Character string of menu command 
#MENU_NEWGAME = ?new game? # new game 
MENU_NEWGAME = "ニューゲーム" # ニューゲーム
#MENU_LOAD = ?continuing? # continuing 
MENU_LOAD = "コンティニュー" # コンティニュー
#MENU_EXTRA
MENU_EXTRA = "Extras"
#MENU_END = ?shutdown? # shutdown 
MENU_END = "シャットダウン" # シャットダウン

# window frame (true/false)
WINDOW_TRANS = false
#Transparency of the window frame
WINDOW_OPACITY = 160

#Side size (horizontal?) of # window 
WINDOW_WIDTH = 192
#Vertical position of window (0: Coordinate appointment/
#1: The left edge/2: Center/3: Right hand edge) 
WINDOW_ALIGN = 2
#When # ?coordinate appointment? being, abscissa of the window 
WINDOW_POS_X = 0
#Vertical position of # window (0: Coordinate appointment/
#1: Top/2: Center/3: Bottom) 
WINDOW_VALIGN = 0
#When ?coordinate appointment? being, ordinate of the window 
WINDOW_POS_Y = 288


#==========================================
=begin
Sonicia
Customize the location and the graphics make sure you change
only the numbers, 250 is approxamtely the center of
the vertical screen.
Make sure that the command pictures are in the ?Graphics/Titles? folder
=end
#==========================================
=begin
#New Game Graphic
IMG_NEWGAME = ["newgame","newgame_active"]
IMG_NEWGAME_X = 100 # Horizontal position 
IMG_NEWGAME_Y = 160 # Vertical position 
#Continue Graphic
IMG_LOAD = ["continue","continue_active"]
IMG_LOAD_X = 250 # Horizontal position
IMG_LOAD_Y = 160 # Vertical position
#Shut Down Graphic
IMG_END = ["shutdown","shutdown_active"]
IMG_END_X = 400 # Horizontal position
IMG_END_Y = 160 # Vertical position
=end
#My orginal settings for reference Copy and paste if you need to
#New Game Graphic
IMG_NEWGAME = ["newgame","newgame_active"]
IMG_NEWGAME_X = 250 # Horizontal position 
IMG_NEWGAME_Y = 260 # Vertical position 
#Continue Graphic
IMG_LOAD = ["continue","continue_active"]
IMG_LOAD_X = 250 # Horizontal position
IMG_LOAD_Y = 300 # Vertical position
#Extras
IMG_EXTRA = ["extras","extras_active"]
IMG_EXTRA_X = 250 
IMG_EXTRA_Y = 340
#Shut Down Graphic
IMG_END = ["shutdown","shutdown_active"]
IMG_END_X = 250
IMG_END_Y = 380


#END CUSTOMIZABLE AREA
#============================================
#Synthetic method of picture (0: Usually/1: Addition/2: Subtraction) 
BLEND_TYPE = 0
end


#------------------------------------------------------------------------------

#======================================
# â–  Scene_Title
#======================================

class Scene_Title
#--------------------------------------------------------------------------
# - Main processing 
#--------------------------------------------------------------------------
def main
#If battle test
if $BTEST
battle_test
return
end
# Load database
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
# Make system object
$game_system = Game_System.new
# Make title graphic
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
# Make command window
s1 = PARA_TITLE_CUSTOM::MENU_NEWGAME
s2 = PARA_TITLE_CUSTOM::MENU_LOAD
s3 = PARA_TITLE_CUSTOM::MENU_EXTRA
s4 = PARA_TITLE_CUSTOM::MENU_END
s4 = PARA_TITLE_CUSTOM::MENU_END
w = PARA_TITLE_CUSTOM::WINDOW_WIDTH
@command_window = Window_Command.new(w, [s1, s2, s3, s4])
if PARA_TITLE_CUSTOM::WINDOW_TRANS
@command_window.opacity = 0
else
@command_window.back_opacity = PARA_TITLE_CUSTOM::WINDOW_OPACITY
end
# Position of the window 
case PARA_TITLE_CUSTOM::WINDOW_ALIGN
when 0
@command_window.x = PARA_TITLE_CUSTOM::WINDOW_POS_X
when 1
@command_window.x = 0
when 2
@command_window.x = ( 640 - @command_window.width ) / 2
when 3
@command_window.x = 640 - @command_window.width
end
case PARA_TITLE_CUSTOM::WINDOW_VALIGN
when 0
@command_window.y = PARA_TITLE_CUSTOM::WINDOW_POS_Y
when 1
@command_window.y = 0
when 2
@command_window.y = ( 480 - @command_window.height ) / 2
when 3
@command_window.y = 480 - @command_window.height
end
# Continue enabled determinant
# Check if at least one save file exists
# If enabled, make @continue_enabled true; if disabled, make it false
@continue_enabled = true
for i in 0..3
if FileTest.exist?("Save#{i+1}.rxdata")
@continue_enabled = true
end
end
# If continue is enabled, move cursor to "Continue"
# If disabled, display "Continue" text in gray
if @continue_enabled
@command_window.index = 1
else
@command_window.disable_item(1)
end
# Command Picture
if PARA_TITLE_CUSTOM::IMG_MENU
@command_window.visible = false
@command_img1 = Sprite.new
@command_img1.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])
@command_img1.x = PARA_TITLE_CUSTOM::IMG_NEWGAME_X
@command_img1.y = PARA_TITLE_CUSTOM::IMG_NEWGAME_Y
@command_img2 = Sprite.new
@command_img2.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])
@command_img2.x = PARA_TITLE_CUSTOM::IMG_LOAD_X
@command_img2.y = PARA_TITLE_CUSTOM::IMG_LOAD_Y
@command_img3 = Sprite.new
@command_img3.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE
@command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[0])
@command_img3.x = PARA_TITLE_CUSTOM::IMG_END_X
@command_img3.y = PARA_TITLE_CUSTOM::IMG_END_Y
# If continue is enabled, move cursor to "Continue"
# If disabled, display "Continue" text in gray
if @continue_enabled
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[1])
else
@command_img2.opacity = 160
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[1])
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])
end
end
# Play title BGM
$game_system.bgm_play($data_system.title_bgm)
# Stop playing ME and BGS
Audio.me_stop
Audio.bgs_stop
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of command window
@command_window.dispose
if PARA_TITLE_CUSTOM::IMG_MENU
@command_img1.dispose
@command_img2.dispose
@command_img3.dispose
end
# Graphics Dispose
@sprite.bitmap.dispose
@sprite.dispose
end


#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update command window
@command_window.update
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0 # New game
command_new_game
when 1 # Continue
command_continue
when 2 # Shutdown
command_extras
when 3 #Shutdown
command_shutdown
end
end
if PARA_TITLE_CUSTOM::IMG_MENU
if Input.repeat?(Input::UP) or Input.repeat?(Input::DOWN)
case @command_window.index
when 0 # New Game
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[1])
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])
@command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[0])
when 1 # Continue Game
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[1])
@command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[0])
when 2 # End Game
@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])
@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])
@command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[1])
end
end
end
end
def command_new_game
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Stop BGM
Audio.bgm_stop
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each type of game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.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
# Set up initial party
$game_party.setup_starting_members
# Set up initial map position
$game_map.setup($data_system.start_map_id)
# Move player to initial position
$game_player.moveto($data_system.start_x, $data_system.start_y)
# Refresh player
$game_player.refresh
# Run automatic change for BGM and BGS set with map
$game_map.autoplay
# Update map (run parallel process event)
$game_map.update
# Switch to map screen
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Command: Continue
#--------------------------------------------------------------------------
def command_continue
# If continue is disabled
unless @continue_enabled
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to load screen
$scene = Scene_Load.new
end
#--------------------------------------------------------------------------
# * Command: Shutdown
#--------------------------------------------------------------------------
def command_shutdown
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Fade out BGM, BGS, and ME
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# Shutdown
$scene = nil
end
#--------------------------------------------------------------------------
# * Command: Extras
#--------------------------------------------------------------------------
def command_extras
$game_map.setup(3)
$game_player.moveto(13 ,9)
$game_player.refresh
$game_map.autoplay
$game_map.update
$scene = Scene_Map.new
end

#--------------------------------------------------------------------------
# * Battle Test
#--------------------------------------------------------------------------
def battle_test
# Load database (for battle test)
$data_actors = load_data("Data/BT_Actors.rxdata")
$data_classes = load_data("Data/BT_Classes.rxdata")
$data_skills = load_data("Data/BT_Skills.rxdata")
$data_items = load_data("Data/BT_Items.rxdata")
$data_weapons = load_data("Data/BT_Weapons.rxdata")
$data_armors = load_data("Data/BT_Armors.rxdata")
$data_enemies = load_data("Data/BT_Enemies.rxdata")
$data_troops = load_data("Data/BT_Troops.rxdata")
$data_states = load_data("Data/BT_States.rxdata")
$data_animations = load_data("Data/BT_Animations.rxdata")
$data_tilesets = load_data("Data/BT_Tilesets.rxdata")
$data_common_events = load_data("Data/BT_CommonEvents.rxdata")
$data_system = load_data("Data/BT_System.rxdata")
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.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
# Set up party for battle test
$game_party.setup_battle_test_members
# Set troop ID, can escape flag, and battleback
$game_temp.battle_troop_id = $data_system.test_troop_id
$game_temp.battle_can_escape = true
$game_map.battleback_name = $data_system.battleback_name
# Play battle start SE
$game_system.se_play($data_system.battle_start_se)
# Play battle BGM
$game_system.bgm_play($game_system.battle_bgm)
# Switch to battle screen
$scene = Scene_Battle.new
end
end
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top