Pre-title map(s)
Authors: Valdred
Version: 2.0
Type: Execute selected maps before the title screen
Key Term: Misc add-on
IntroductionMany people have requested a way to have one or more maps executed before the title screen so I decided to make this.
I guess it's mainly for cutscenes and stuff but it can be used for gameplay as well.
Features
- Fully featured maps before the title screen, made and set up just like other maps.
- Easy to use, I guess
ScreenshotsThe maps would look just like ordinary maps, no need for screenshots.
Script
#==============================================================================
# ** Maps before title
#------------------------------------------------------------------------------
# By Valdred
#------------------------------------------------------------------------------
# Having problems? Go to chaos-project.org or rmvxp.com
#==============================================================================
module Starting_Config #Set up players starting position BEFORE the title screen
Starting_map = 6 # id of starting map.
Starting_x = 7 # x-starting cordinate.
Starting_y = 7 # y-starting cordinate.
First_time_Only = true # Takes you to title if save file exist
end
#===============================================================================
# * Main Script
#===============================================================================
class Interpreter
def finish
$scene = Scene_Title.new
end
end
class Scene_Title
alias maps_before_title main
def main
# call battle test
if $BTEST
battle_test
return
end
if Starting_Config::First_time_Only
(0..3).each { |i|
if FileTest.exist?("Save#{i+1}.rxdata")
@continue_enabled = true
end}
end
if @continue_enabled
maps_before_title
elsif $maps_before_title_switch
maps_before_title
else
# 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 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(Starting_Config::Starting_map)
# Move player to initial position
$game_player.moveto(Starting_Config::Starting_x, Starting_Config::Starting_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
# Turns swith on
$maps_before_title_switch = true
# Sends you to the map
$scene = Scene_Map.new
end
end
end
Insert above main.
Instructions1. Put player starting position (you know, the square with an 's' inside) where you want the player to start
after the title screen.
2. Near the top of the script, you will find a configuration section.
Change '$starting_map' to the ID of the map you want the player to start at before the title. (the upper one of your maps got ID 1, the one bellow is ID 2 etc.) then change $starting_x and $starting_y
to the players starting position on the map. (to find out the cordinates of a spot, go to events-layer and click the spot. The cordinates will be in the bottom right of the editor)
3. When you want to proceed to the title screen. Use a 'script' event with this code:
CompatibilityWill probably not work with some scripts editing the title screen. That's all, I think.
Credits and Thanks
- Valdred for writing it
- Nathmatt for optimizing the code and adding a nice feature.
- Skaraflame and others for requesting it
Author's NotesIf you need help just tell, also if anyone feels like optimizing the script, just do it.