Zy's Orb/Save Point Script
Authors: Zydragon
Version: v1.1
Type: Custom Save & Quit System
Key Term: Misc System
IntroductionAlright so this is my first finished script... Simple yes? I'm a noob coder at the moment
Basically this script allows an FF10 style Save Orb, with Quit and Cancel functions. You can easily set the orb to heal people as well for a true FF10 orb, or you can ask (if you're worse than a coding noob) and I'll add certain options on request.
I intend to work on this as my coding skills grow, probably adding Teleport functions, custom Save screens, possibly an Options menu, info bars, and MAYBE a few more windows showing character stats, time played etc.
Let me know if you have any problems, or any coding tips
Features
- FF10 Style Orb Save Point
- Plug and play
- Shouldn't mess with ANY other scripts
Screenshots
DemoOrb_Save_Demo v1.0
ScriptTo call the script use a script call event with:
$scene=Orb_
Menu.new
#===============================================================================
# ZYDRAGON'S ORB AND SAVE POINT MENU SCRIPT
# V1.1
#===============================================================================
#____Copyright_©____
#This Custom Menu System has been created by Zydragon™ and as such can not be
#used or distributed without formal acknowledgement and the acceptance of the
#creator. If this CMS is edited you must still acknowledge the original creator.
#
#____Version History____
#
# v1.0 9/2/2010 Created
# v1.1 10/2/2010 Save/End Fix & simplified (Thanks game_guy & nathmatt)
#
#
#____Compatability Issues____
#
#This CMS is, to my knowledge, completely compatable with all other
#RPG Maker XP scripts, as it messes with nothing and is all scripted
#within its own code.
#
#Scene_Save and Scene_End arent affected anymore. Enjoi.
#
#===============================================================================
#-------------------------------------------------------------------------------
#This CMS shows a small window in the center of the screen with selectable
#options. This CMS is made specifically for use with an Orb or Crystal Save
#Point scheme, much like FF10.
#
#To play custom Audio, export/move it to the file path Audio/BGM/SongName.mid
#and change the audio name in the options section below.
#-------------------------------------------------------------------------------
#===============================================================================
#START options section
#-------------------------------------------------------------------------------
PLAY_CUSTOM_AUDIO = true #Change to FALSE to play TITLE bgm instead
CUSTOM_AUDIO_PATH = "Audio/BGM/062-Slow05.mid" #Change "062-Slow05" to custom song's
#name. .mid recommended, no other
#types tested.
#-------------------------------------------------------------------------------
#END options section
#===============================================================================
#===============================================================================
#START Orb_Menu window
#-------------------------------------------------------------------------------
class Orb_Menu < Window_Base
def initialize(menu_index = 0)
@menu_index = menu_index #To show cursor position
end
def main
s1 = "Save"
s2 = "Quit"
s3 = "Cancel"
@window_orb = Window_Command.new(200, [s1, s2, s3]) #Creates array
@window_orb.x=220
@window_orb.y=176
@window_orb.index = @menu_index
@window_orb.back_opacity = 175
@spriteset = Spriteset_Map.new #Screenshots current map for background
if PLAY_CUSTOM_AUDIO == true
Audio.bgm_play(CUSTOM_AUDIO_PATH, 100, 100) #Custom BGM
else
$game_system.bgm_play($data_system.title_bgm) #Plays your title music in menu
end
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@spriteset.dispose
@window_orb.dispose
end
def update #Define UPDATE shown in MAIN
@window_orb.update
if Input.trigger?(Input::C) #If ENTER pressed...
case @window_orb.index
when 0 #Define SAVE option
$game_system.se_play($data_system.decision_se)
$scene = Scene_Orb_Save.new
when 1 #Define QUIT option
$game_system.se_play($data_system.decision_se)
$scene = Scene_Orb_End.new
when 2 #Define CANCEL option
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
$game_map.autoplay
end
end
if Input.trigger?(Input::B) #If ESCAPE pressed...
$game_system.se_play($data_system.cancel_se) #Play sound effect
$scene = Scene_Map.new #Exits to map
$game_map.autoplay
end
end
end
#-------------------------------------------------------------------------------
#END Orb Menu window
#===============================================================================
#===============================================================================
#START Orb Save detour
#-------------------------------------------------------------------------------
class Scene_Orb_Save < Scene_Save
def on_cancel
if Input.trigger?(Input::B) #If ESCAPE pressed
$game_system.se_play($data_system.decision_se)
$scene = Orb_Menu.new #Returns to Orb Menu if cancelled
return
end
end
def on_decision(filename)
$game_system.se_play($data_system.save_se)
file = File.open(filename, "wb")
write_save_data(file)
file.close
$scene = Orb_Menu.new #Returns to Orb Menu after save
end
end
#-------------------------------------------------------------------------------
#END Orb Save detour
#===============================================================================
#===============================================================================
#START Orb End detour
#-------------------------------------------------------------------------------
class Scene_Orb_End < Scene_End
def update
if Input.trigger?(Input::B) #If ESCAPE pressed...
$game_system.se_play($data_system.decision_se)
$scene = Orb_Menu.new #Returns to Orb Menu if cancelled
return
end
super
end
def command_cancel
$game_system.se_play($data_system.decision_se)
$scene = Orb_Menu.new #Returns to Orb Menu after CANCEL selected
end
end
#-------------------------------------------------------------------------------
#END Orb End detour
#===============================================================================
InstructionsScript pretty much tells you what to do... Completely plug and play in v1.1, just copy&paste
CompatibilityThis should be compatable with EVERY other CMS and script, since it's not a proper CMS and is only used for save orbs.
Credits and Thanks
- Zydragon (me obviously)
- game_guy (for Save and End fix)
- nathmatt (for the simplification)