Insert this above main and call it Scene_Savepoint
#+++++++++++++++++++++++++++++++#
# Savepoint Ver 1 #
# By Rune #
#+++++++++++++++++++++++++++++++#
# Window_Savepoint #
class Window_Savepoint < Window_Base
def initialize
super(0, 0, 320, 64)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
def refresh
self.contents.clear
self.contents.font.name = "Tahoma"
self.contents.font.size = 22
self.contents.font.color = Color.new(0, 255, 0)
self.contents.draw_text(100, 0, 96, 32, "Savepoint")
end
end
# Window_Base edit #
class Window_Base
def draw_actor_graphic(actor, x, y)
bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
cw = bitmap.width / 4
ch = bitmap.height / 4
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
def draw_actor_name(actor, x, y)
self.contents.font.color = crisis_color
self.contents.draw_text(x, y, 120, 32, actor.name)
end
def draw_actor_class(actor, x, y)
self.contents.font.color = Color.new(0, 255, 0)
self.contents.draw_text(x, y, 236, 32, actor.class_name)
end
def draw_actor_level(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, "Level")
self.contents.font.color = normal_color
self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
end
def make_battler_state_text(battler, width, need_normal)
brackets_width = self.contents.text_size("[]").width
text = ""
for i in battler.states
if $data_states[i].rating >= 1
if text == ""
text = $data_states[i].name
else
new_text = text + "/" + $data_states[i].name
text_width = self.contents.text_size(new_text).width
if text_width > width - brackets_width
break
end
text = new_text
end
end
end
if text == ""
if need_normal
text = "[Normal]"
end
else
text = "[" + text + "]"
end
return text
end
def draw_actor_state(actor, x, y, width = 120)
text = make_battler_state_text(actor, width, true)
self.contents.font.color = actor.hp == 0 ? knockout_color : crisis_color
self.contents.draw_text(x, y, width, 32, text)
end
def draw_actor_exp(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x - 16, y - 8, 24, 32, "Exp")
self.contents.font.color = normal_color
self.contents.draw_text(x - 64, y + 16, 84, 32, actor.exp_s, 2)
self.contents.draw_text(x + 24, y + 16, 12, 32, "/", 1)
self.contents.draw_text(x + 36, y + 16, 84, 32, actor.next_exp_s)
end
def draw_actor_hp(actor, x, y, width = 144)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
if width - 32 >= 108
hp_x = x + width - 108
flag = true
elsif width - 32 >= 48
hp_x = x + width - 48
flag = false
end
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
self.contents.draw_text(hp_x - 44, y + 16, 48, 32, actor.hp.to_s, 2)
if flag
self.contents.font.color = normal_color
self.contents.draw_text(hp_x + 4, y + 16, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 16, y + 16, 48, 32, actor.maxhp.to_s)
end
end
def draw_actor_sp(actor, x, y, width = 144)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
if width - 32 >= 108
sp_x = x + width - 108
flag = true
elsif width - 32 >= 48
sp_x = x + width - 48
flag = false
end
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
self.contents.draw_text(sp_x - 44, y + 16, 48, 32, actor.sp.to_s, 2)
if flag
self.contents.font.color = normal_color
self.contents.draw_text(sp_x + 4, y + 16, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 16, y + 16, 48, 32, actor.maxsp.to_s)
end
end
end
# Window_MenuStatus edit #
class Window_MenuStatus
def initialize
super(0, 0, 640, 240)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
refresh
self.active = false
self.index = -1
end
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = i * 160
y = 116
actor = $game_party.actors[i]
draw_actor_graphic(actor, x + 16, y - 60)
draw_actor_name(actor, x + 32, y - 120)
draw_actor_class(actor, x + 32, y - 80)
draw_actor_level(actor, x + 32, y - 100)
draw_actor_state(actor, x + 16, y - 60)
draw_actor_exp(actor, x + 16, y + 50)
draw_actor_hp(actor, x, y - 40)
draw_actor_sp(actor, x, y)
end
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(@index * 160, 0, 128, self.height - 32)
end
end
end
# Window_HealCost #
class Window_HealCost < Window_Base
def initialize
super(0, 0, 160, 96)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
def refresh
@price = $game_variables[!!!!]
self.contents.clear
self.contents.font.name = "Tahoma"
self.contents.font.color = system_color
self.contents.font.size = 22
self.contents.draw_text(0, 0, 128, 32, "Heal Cost: ")
self.contents.font.color = normal_color
self.contents.draw_text(0, 32, 128, 32, @price.to_s, 1)
self.contents.font.color = system_color
self.contents.draw_text(86, 32, 128, 32, $data_system.words.gold)
end
end
# Actual Scene #
# Scene_Savepoint #
class Scene_Savepoint
def initialize(sav_index = 0)
@sav_index = sav_index
@price = $game_variables[!!!!]
end
def main
@spriteset = Spriteset_Map.new
s1 = "Cancel"
s2 = "Save"
s3 = "Heal"
@command_window = Window_Command.new(320, [s1, s2, s3], 3)
@command_window.index = @sav_index
@command_window.x = 160
@command_window.y = 176
if $game_party.actors.size == 0
@command_window.disable_item(1)
@command_window.disable_item(2)
end
@steps_window = Window_Steps.new
@steps_window.x = 480
@steps_window.y = 144
@status_window = Window_MenuStatus.new
@status_window.x = 0
@status_window.y = 240
@gold_window = Window_Gold.new
@gold_window.x = 480
@gold_window.y = 0
@heal_window = Window_HealCost.new
@heal_window.x = 0
@heal_window.y = 144
@savpnt_window = Window_Savepoint.new
@savpnt_window.x = 160
@savpnt_window.y = 112
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@spriteset.dispose
@command_window.dispose
@steps_window.dispose
@status_window.dispose
@gold_window.dispose
@heal_window.dispose
@savpnt_window.dispose
end
def refresh_options
if @price > $game_party.gold
@command_window.disable_item(2)
end
end
def update
@spriteset.update
@command_window.update
@steps_window.update
@status_window.update
@gold_window.update
@heal_window.update
@savpnt_window.update
if @command_window.active
update_command
return
end
if @status_window.active
update_status
return
end
end
def update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(4)
return
end
if Input.trigger?(Input::C)
if $game_party.actors.size == 0 and @command_window.index < 4
$game_system.se_play($data_system.buzzer_se)
return
end
case @command_window.index
when 0
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(4)
when 1
$game_system.se_play($data_system.decision_se)
$scene = Scene_Save.new
when 2
if @price > $game_party.gold
$game_system.se_play($data_system.buzzer_se)
return
end
Audio.se_play("Audio/SE/107-Heal03")
$game_party.lose_gold($game_variables[!!!!])
refresh_options
@status_window.refresh
@status_window.update
for actor in $game_party.actors
actor.recover_all
end
end
end
end
end
Instructions:
Make a variable and call it Heal Cost or something similar... you can change the value of this at different points in the game if you like
Ctrl + f to find !!!!
Change !!!! to the number of whatever variable you set as your heal cost...
Have fun
[EDIT]
To call, use this in a call script event.
$scene = Scene_Savepoint.new