Savepoint System - like Final Fantasy
Version: 1.0
Author: Rubymattt
Description
This system is basically a Savepoint System, which allows the user to choose to Save, use a Tent or cancel. Tents recover the entire party, and are items from the database, so they're easy to manage.
Screenshot
Place above main, below materials, use $scene = Scene_Savepoint.new to call.
Tents are automatically figured by an item, but you need to set the ID yourself. Go down to lines 58-60:
Code:
#Edit Below ---------------------------------
@tent = 21 #ID of Tent item in database
#Stop Edit ----------------------------------
Change 21 to the ID of the Tent item in your database.
Script
#===========================================
# Final Fantasy Styled Savepoint System
# for RMVX
# v1.0
# by Rubymatt
#===========================================
class Scene_Savepoint < Scene_Base
def start
super
create_menu_background
create_command_window
end
def post_start
super
open_command_window
end
def terminate
super
dispose_command_window
dispose_menu_background
end
def update
super
update_menu_background
@command_window.update
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
case @command_window.index
when 0
Sound.play_decision
$scene = Scene_File.new(true, false, true)
when 1
if $game_party.item_number($data_items[@tent]) < 1
Sound.play_buzzer
else
Sound.play_recovery
$game_party.lose_item($data_items[@tent], 1, false)
for actor in $game_party.members
actor.recover_all
end
@command_window.dispose
create_command_window
@command_window.index = 1
@command_window.update
end
when 2
Sound.play_cancel
$scene = Scene_Map.new
end
end
end
def update_menu_background
super
@menuback_sprite.tone.set(0, 0, 0, 0)
end
def create_command_window
#Edit Below ---------------------------------
@tent = 21 #ID of Tent item in database
#Stop Edit ----------------------------------
s1 = Vocab::save
s2 = "Tent (" + $game_party.item_number($data_items[@tent]).to_s + " left)"
s3 = Vocab::cancel
@command_window = Window_Command.new(172, [s1, s2, s3])
@command_window.x = (544 - @command_window.width) / 2
@command_window.y = (416 - @command_window.height) / 2
if $game_party.item_number($data_items[@tent]) < 1
@command_window.draw_item(1, false)
end
end
def dispose_command_window
@command_window.dispose
end
def open_command_window
@command_window.open
begin
@command_window.update
Graphics.update
end until @command_window.openness == 255
end
def close_command_window
@command_window.close
begin
@command_window.update
Graphics.update
end until @command_window.openness == 0
end
def dispose_command_window
@command_window.dispose
end
end
Author's Notes / Credit
Give credit please, and enjoy use.