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 System

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 87
The price of freedom is steep.
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:
Code: [Select]
    #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


Code: [Select]
#===========================================
#  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.

*
Rep:
Level 87
The tent edition was a good choice.

Nice work.


********
Shadow Knight
Rep:
Level 91
Ruin that brick wall!
Project of the Month winner for October 2008
Is it possible that you include an item storage in the save point?
Be kind, everyone you meet is fighting a hard battle.

**
Rep:
Level 87
The price of freedom is steep.
The savepoint is just a command window really, and works the same as a menu system.  if you could find the item storage script I could impliment it for you.

**
Rep: +0/-0Level 85
lol I've already done this exact thing using common events. :/

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
Nice little script ^^
Can you tell my why you are using an instance variable to store the item id of the tent?
I would personally have preferred to use a CONSTANT and having it placed just below Scene_Savepoint < Scene_Base.
That way people would quicker find it ^^

As a suggestion you could consider adding a way to run a common event when you use the item instead of having hard coded the action of what happens when you use the item.
This could be generalized so you could have any arbitrary number of items (names retrieved from the items themselves) and each of these call their respective common event.
This would allow the script to be used much more dynamically and on a broader amount of areas. The price will be more complex configurations.
Still... something to consider ^_^

lol I've already done this exact thing using common events. :/
And therefore this script surely sucks :V

If you had included how you had made it with common events this that post might not have been too useless because then people could judge for themselves which system they preferred. Even then it would have been better to post in a separate thread.

*hugs*
 - Zeriab

***
Rep:
Level 86
Nice I love the Tent addition I was trying to do this Lol good job

**
Rep:
Level 82
It's Cool!!  :blizj:

**
Rep: +0/-0Level 83
looks nice but your picture's and your link are all broken is it a problem of my?

greetzz
atiebatie99
My work isn't really good because I'm just 14
year
My English isn't really good because I'm from Netherlands