FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!

Prologue System




#==============================================================================
# Prologue System
# Version: 1.0
# Author: KaizokuRufi
# Date: 14th November 2009
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Description:
# This is just a modified version of the Scene_Title, with an added prologue
# system. The prologue system was used in Valkyrie Profile: Lenneth, and I'm
# suprised that no one else made one of these scripts. This script allows you
# to create a button on the title that leads you to a map other than the
# original starting point. It also has a common event mode so you can enter
# a common event. These might be useful for:
# A Prologue System
# Mini-game Mode
# New game+
# and other things that your game might need.
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Instructions:
# Well, its a pretty easy script to set up. First, you have to change the
# Prologue_Vocab to whatever you want (e.g Mini-game Mode, New game+, etc)
# Keep the quotation marks there. Next, if you want to trigger a common
# event, leave Event_Mode on true. Otherwise, make Event_Mode false.
# Event_ID is the common event you want to activate. For example, if the ID
# was set as one, it'd trigger the first common event on the list. Map_ID
# is the ID of the map which you want to transfer your player to. Map_X is
# the X co-ordinate of the map, and Map_Y is the Y co-ordinate of the map.
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Compatability:
# I haven't tested compatability with any custom title scripts so if
# anyone finds a problem please tell me. In fact, I don't think there are
# any custom title scripts.
#===============================================================================

module KAIZOKU
PROLOGUE_VOCAB = "Prologue"
EVENT_MODE = true
EVENT_ID = 1
MAP_ID = 2
MAP_X = 10
MAP_Y = 14
end
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
# This class performs the title screen processing.
#==============================================================================

class Scene_Title < Scene_Base
#--------------------------------------------------------------------------
# * KaizokuRufi Edit - Frame Update
#--------------------------------------------------------------------------
def update
super
@command_window.update
if Input.trigger?(Input::C)
case @command_window.index
when 0 #New game
command_new_game
when 1 # Continue
command_continue
when 2 # Shutdown
command_prologue
when 3
command_shutdown
end
end
end
#--------------------------------------------------------------------------
# * KaizokuRufi Edit - Create Command Window
#--------------------------------------------------------------------------
def create_command_window
s1 = Vocab::new_game
s2 = Vocab::continue
s3 = Vocab::shutdown
s4 = KAIZOKU::PROLOGUE_VOCAB
@command_window = Window_Command.new(172, [s1, s2, s4, s3])
@command_window.x = (544 - @command_window.width) / 2
@command_window.y = 288
if @continue_enabled # If continue is enabled
@command_window.index = 1 # Move cursor over command
else # If disabled
@command_window.draw_item(1, false) # Make command semi-transparent
end
@command_window.openness = 0
@command_window.open
end
#--------------------------------------------------------------------------
# * KaizokuRufi Edit - Command: Prologue
#--------------------------------------------------------------------------
def command_prologue
@kai = KAIZOKU::EVENT_MODE #Defines the Event mode
confirm_player_location
Sound.play_decision
$game_party.setup_starting_members
$game_map.setup(KAIZOKU::MAP_ID) #Defines the map ID
$game_player.moveto(KAIZOKU::MAP_X, KAIZOKU::MAP_Y) #Defines X and Y
$game_player.refresh
RPG::BGM.fade(1500)
close_command_window
Graphics.fadeout(60)
Graphics.wait(40)
Graphics.frame_count = 0
RPG::BGM.stop
$game_map.autoplay
if @kai = true then #If the Event Mode is true
$game_temp.common_event_id = KAIZOKU::EVENT_ID #This common event takes place
end

$scene = Scene_Map.new
end
end



0 blog comments below




FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.