RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Savepoint

0 Members and 1 Guest are viewing this topic.

*******
Rep:
Level 90
Returned from the dead.
Here's us a nice little script I put together :D

Spoiler for Script + Instructions:
Insert this above main and call it Scene_Savepoint
Code: [Select]
#+++++++++++++++++++++++++++++++#
#                        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 ;8
[EDIT]
    To call, use this in a call script event.
Code: [Select]
$scene = Scene_Savepoint.new


Spoiler for Screeny:

This script goes well with this script
« Last Edit: May 22, 2009, 04:06:33 PM by Rune »
Sincerely,
Your conscience.

*
A Random Custom Title
Rep:
Level 96
wah
Wow, that seems pretty cool! Also, there's 3 "!!!!"s so... don't forget the other two and reply with "it's not working" or something. XP

*******
Rep:
Level 90
Returned from the dead.
Thanks ;8
If anyone has any queries i'm right here ;8
Sincerely,
Your conscience.

********
moew
Rep:
Level 91
Queen Princess
2013 Most Missed Member2012 Most Missed Member;o hee hee <3For being a noted contributor to the RMRK Wiki
Can you make the Savepoint text another color?
:taco: :taco: :taco:

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
Cool, but kind of useless since you don't need a script to make a savepoint.

********
moew
Rep:
Level 91
Queen Princess
2013 Most Missed Member2012 Most Missed Member;o hee hee <3For being a noted contributor to the RMRK Wiki
But you could use it as a special savepoint. I think of a hospital.
:taco: :taco: :taco:

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
Ferenn, edit the line in bold to change the savepoint color:

  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

Just edit the variables in the () to change the color. Additionally, if you have Trickster's MACL, you could use Color.red, etc.

********
moew
Rep:
Level 91
Queen Princess
2013 Most Missed Member2012 Most Missed Member;o hee hee <3For being a noted contributor to the RMRK Wiki
Ah, thanks.  ;8

Though it was a detail, I'm glad for the help.
:taco: :taco: :taco:

*******
Rep:
Level 90
Returned from the dead.
Cool, but kind of useless since you don't need a script to make a savepoint.

Some people like fancy savepoints :P
Sincerely,
Your conscience.

********
moew
Rep:
Level 91
Queen Princess
2013 Most Missed Member2012 Most Missed Member;o hee hee <3For being a noted contributor to the RMRK Wiki
How do I call it?  :tpg:
:taco: :taco: :taco:

*******
Rep:
Level 90
Returned from the dead.
Argh! >.< I knew there was someting I was forgetting...

Use this
Code: [Select]
$scene = Scene_Savepoint.new

[EDIT]
First post edited
« Last Edit: May 20, 2007, 01:22:32 PM by Rune »
Sincerely,
Your conscience.

********
moew
Rep:
Level 91
Queen Princess
2013 Most Missed Member2012 Most Missed Member;o hee hee <3For being a noted contributor to the RMRK Wiki
I get an error saying

Script 'RuneSave' line 199: Argument Error Occured

wrong number of arguments(3 for 2)

 :tpg:
:taco: :taco: :taco:

*******
Rep:
Level 90
Returned from the dead.
« Last Edit: May 20, 2007, 01:30:46 PM by Rune »
Sincerely,
Your conscience.

********
moew
Rep:
Level 91
Queen Princess
2013 Most Missed Member2012 Most Missed Member;o hee hee <3For being a noted contributor to the RMRK Wiki
That's the script name. ;8
:taco: :taco: :taco:

*******
Rep:
Level 90
Returned from the dead.
Put this before the Scene itself...
Spoiler for:
Code: [Select]
class Window_Command < Window_Selectable
  def initialize(width, commands, column_max = 1, style = 0, inf_scroll = 1)
    super(0, 0, width, (commands.size * 1.0 / column_max).ceil * 32 + 32)
    @inf_scroll = inf_scroll
    @item_max = commands.size
    @commands = commands
    @column_max = column_max
    @style = style
    self.contents = Bitmap.new(width - 32, (@item_max * 1.0 / @column_max).ceil * 32)
    self.contents.font.name = "Tahoma"
    self.contents.font.size = 22
    refresh
    self.index = 0
  end
  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i, normal_color)
    end
  end
  def draw_item(index, color)
    self.contents.font.color = color
    rect = Rect.new(index%@column_max * (self.width / @column_max) + 4, 32 * (index/@column_max), self.width / @column_max - 40, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.draw_text(rect, @commands[index], @style)
  end
  def disable_item(index)
    draw_item(index, disabled_color)
  end
  def update_help
    @help_window.set_actor($game_party.actors[$scene.actor_index])
  end
end

That scriptlet's in the script mentioned in my first post
This script goes well with this script
So either add that scriptlet or get the mentioned script
Sincerely,
Your conscience.

pokeball :)OfflineMale
********
Cheese
Rep:
Level 95
?
Watch out for: HaloOfTheSun

********
moew
Rep:
Level 91
Queen Princess
2013 Most Missed Member2012 Most Missed Member;o hee hee <3For being a noted contributor to the RMRK Wiki
Now it's working  ;8
:taco: :taco: :taco:

*******
Rep:
Level 90
Returned from the dead.
Me likely. :D

 :tpg: Thanks :tpg:
Script Database ahoy!! ;8

Now it's working  ;8

Glad to be of assistanceing... ness... whatever ;8
Sincerely,
Your conscience.

*******
Rep:
Level 90
Returned from the dead.
Thought this might need a little bump...

Spoiler for:
If this wasn't needed, shoot me
Sincerely,
Your conscience.

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
Why would you bump a topic that's been inactive for not even a week? On top of that it's in the database. You don't see all the other scripters bumping our topics.

*******
Rep:
Level 90
Returned from the dead.
True...
Seems like ages since I posted this though...
Sincerely,
Your conscience.

**
Rep: +0/-0Level 86
dude nice script... im learning c#
anywho....
umm is there a way i can take out the heal party and just have the save,  but when you save it auto heals? 

P.s gotta love the bean  :bean:

*******
Rep:
Level 90
Returned from the dead.
Um... hold on... haven't touched scripting in ages...

Right!

Take out
Code: [Select]
s3 = "Heal"
And then take out the s3 in the line beneath it and change the end 3 to a 2.

Take out
Code: [Select]
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

After where it says
Code: [Select]
$scene = Scene_Save.new
add
Code: [Select]
        for actor in $game_party.actors
          actor.recover_all
        end

This hasn't been tested yet, so say if you have any problems ;)
Sincerely,
Your conscience.

***
Rep:
Level 86
I hate everyone except the ones I don't hate...
 ??? Is it possible to not heal at all (It'd be cheating in most games to just exit and enter again to heal yourself...)?
« Last Edit: December 23, 2007, 08:36:17 AM by Demonic Blade »
I wonder how many of my-reps are there for a reason, and not just because some jackass wanted to show off in front of some other jackasses...?
Probably a lot of them - and those people sure as hell don't deserve my pity, let alone my disgust.
That's right, let's see some more -Rep'ing! BOOYEAH!!

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Umm, he explains that in the post above. Take out everything he says and then don't add anything.