The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: BadWolf on November 18, 2012, 08:36:40 PM

Title: [XP] Save Changes for XP
Post by: BadWolf on November 18, 2012, 08:36:40 PM
Hey, I was wondering if there is a script that deletes the Save option from the start screen and makes it so that option can be added to certain events. In short makes it so you can make things on the world map save your progress and the option if not available in the start menu.
Title: Re: [XP] Save Changes for XP
Post by: Acolyte on November 19, 2012, 12:03:20 AM
By "Start Screen" do you mean "Main Menu"? Because you can do that by editing the default menu script I believe.

Adding the save menu to events is easy. On the third page of event commands in the second column at the bottom, there is a "call save screen" button. Just put that in an event.
Title: Re: [XP] Save Changes for XP
Post by: Wiimeiser on November 19, 2012, 06:23:08 AM
There should be an option to "Disable Save Access". If your game has an intro sequence, just slide it in there somewhere.
Title: Re: [XP] Save Changes for XP
Post by: Acolyte on November 19, 2012, 07:03:30 AM
That won't get rid of the option though.
Title: Re: [XP] Save Changes for XP
Post by: BadWolf on November 19, 2012, 12:48:19 PM
I'm talking about the circled option on the picture. How do I get rid of that?
Title: Re: [XP] Save Changes for XP
Post by: Mangomight on November 19, 2012, 06:36:24 PM
Well, a quick way of removing it completely would probably just be:
Code: [Select]
class Scene_Menu
  alias xp_dsble5_sve_upd_command update_command
  def update_command
    xp_dsble5_sve_upd_command
    if @command_window.index == 4
      $game_system.se_play($data_system.decision_se)
      $scene = Scene_End.new
    end
  end
end

class Window_Command
  alias xp_disable_sve12_init intialize
  def initialize(width, commands)
    commands.delete("Save")
    xp_disable_sve12_init(width, commands)
  end
end 
Title: Re: [XP] Save Changes for XP
Post by: BadWolf on November 19, 2012, 10:16:03 PM
I wouldn't know where to put that.
Title: Re: [XP] Save Changes for XP
Post by: ThallionDarkshine on November 20, 2012, 06:40:50 PM
Put it right under Scene_Debug.
Title: Re: [XP] Save Changes for XP
Post by: BadWolf on November 20, 2012, 09:25:05 PM
I tried it. It has a problem with line 9. The game won't open.
Title: Re: [XP] Save Changes for XP
Post by: Arturo-Sagahon on November 21, 2012, 03:44:13 AM
also you can edit the Scene_Menu.
try this, first make a backup of you game.

Code: [Select]
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs menu screen processing.
#==============================================================================

class Scene_Menu
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Status"
    s5 = "End Game"
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5])
    @command_window.index = @menu_index
    # If number of party members is 0
    if $game_party.actors.size == 0
      # Disable items, skills, equipment, and status
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    # If save is forbidden
    if $game_system.save_disabled
      # Disable save
      @command_window.disable_item(4)
    end
    # Make play time window
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 0
    @playtime_window.y = 224
    # Make steps window
    @steps_window = Window_Steps.new
    @steps_window.x = 0
    @steps_window.y = 320
    # Make gold window
    @gold_window = Window_Gold.new
    @gold_window.x = 0
    @gold_window.y = 416
    # Make status window
    @status_window = Window_MenuStatus.new
    @status_window.x = 160
    @status_window.y = 0
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @playtime_window.dispose
    @steps_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @playtime_window.update
    @steps_window.update
    @gold_window.update
    @status_window.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
      return
    end
    # If status window is active: call update_status
    if @status_window.active
      update_status
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # If command other than save or end game, and party members = 0
      if $game_party.actors.size == 0 and @command_window.index < 4
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Branch by command window cursor position
      case @command_window.index
      when 0  # item
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to item screen
        $scene = Scene_Item.new
      when 1  # skill
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0

      when 4  # end game
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to end game screen
        $scene = Scene_End.new
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when status window is active)
  #--------------------------------------------------------------------------
  def update_status
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Make command window active
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 1  # skill
        # If this actor's action limit is 2 or more
        if $game_party.actors[@status_window.index].restriction >= 2
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to skill screen
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to equipment screen
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to status screen
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
  end
end

EDIT:
and change this to:
Code: [Select]
#==============================================================================
# ** Scene_End
#------------------------------------------------------------------------------
#  This class performs game end screen processing.
#==============================================================================

class Scene_End
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    s1 = "To Title"
    s2 = "Shutdown"
    s3 = "Cancel"
    @command_window = Window_Command.new(192, [s1, s2, s3])
    @command_window.x = 320 - @command_window.width / 2
    @command_window.y = 240 - @command_window.height / 2
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame Update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of window
    @command_window.dispose
    # If switching to title screen
    if $scene.is_a?(Scene_Title)
      # Fade out screen
      Graphics.transition
      Graphics.freeze
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update command window
    @command_window.update
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to menu screen
      $scene = Scene_Menu.new(4)
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 0  # to title
        command_to_title
      when 1  # shutdown
        command_shutdown
      when 2  # quit
        command_cancel
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Process When Choosing [To Title] Command
  #--------------------------------------------------------------------------
  def command_to_title
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Fade out BGM, BGS, and ME
    Audio.bgm_fade(800)
    Audio.bgs_fade(800)
    Audio.me_fade(800)
    # Switch to title screen
    $scene = Scene_Title.new
  end
  #--------------------------------------------------------------------------
  # * Process When Choosing [Shutdown] Command
  #--------------------------------------------------------------------------
  def command_shutdown
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Fade out BGM, BGS, and ME
    Audio.bgm_fade(800)
    Audio.bgs_fade(800)
    Audio.me_fade(800)
    # Shutdown
    $scene = nil
  end
  #--------------------------------------------------------------------------
  # *  Process When Choosing [Cancel] Command
  #--------------------------------------------------------------------------
  def command_cancel
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Switch to menu screen
    $scene = Scene_Menu.new(4)
  end
end

Nos vemos Ajuaah! 8)
Title: Re: [XP] Save Changes for XP
Post by: BadWolf on November 21, 2012, 03:48:10 AM
Is that meant to replace parts or go as an add on
Title: Re: [XP] Save Changes for XP
Post by: Arturo-Sagahon on November 21, 2012, 03:51:50 AM
you must replace the 2 scripts, make a backup first. Scene_Menu & Scene_End.

Nos vemos Ajuaah!! 8)
Title: Re: [XP] Save Changes for XP
Post by: BadWolf on November 21, 2012, 03:58:25 AM
wait so that replaces the entire Scene_Menu & Scene_End scripts?
Title: Re: [XP] Save Changes for XP
Post by: Arturo-Sagahon on November 21, 2012, 04:05:36 AM
wait so that replaces the entire Scene_Menu & Scene_End scripts?

Yes... and this is change:

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi956.photobucket.com%2Falbums%2Fae49%2FASG331%2FSintiacutetulo001.png&hash=80d8e0327f25870e5705ad3f9adc0beff72ac4e1)

Nos vemos Ajuaah!! 8)
Title: Re: [XP] Save Changes for XP
Post by: BadWolf on November 22, 2012, 12:38:28 AM
It worked.
Title: Re: [XP] Save Changes for XP
Post by: Arturo-Sagahon on November 23, 2012, 05:18:20 AM
Well done. you can add or remove options in the script Scene_Menu,
check out "Frame Update (when status window is active)".

Nos vemos Ajuaah!! 8)
Title: buy prescription drugs online without prescription 304 mg
Post by: Williamhom on August 22, 2019, 01:54:48 PM
canadian pharmacys (http://onlinepharmacyif.com/) canada meds no prescription <a href=http://onlinepharmacyif.com/>reputable online pharmacies usa/#no prescription pharmacy online</a>
Title: discountpharmacyonlineusa.com 107 mg
Post by: Williamhom on August 22, 2019, 01:55:23 PM
discount 0nelinr pharmancy (http://onlinepharmacyif.com/) top online pharmacy <a href=http://onlinepharmacyif.com/>buy medication without an rx/#mexico pharmacy drugs</a>
Title: online pharmacies in usa without perscription 292 mg
Post by: Williamhom on August 22, 2019, 01:55:50 PM
adderall canada pharmacy (http://onlinepharmacyif.com/) buy antibiotics online without a prescription <a href=http://onlinepharmacyif.com/>buying drugs online no prescription/#buying drugs online no prescription</a>
Title: canadian pharmacy viagra brand 302 mg
Post by: Williamhom on August 22, 2019, 01:56:14 PM
trusted canada pharmacy (http://onlinepharmacyif.com/) best india pharmacies online <a href=http://onlinepharmacyif.com/>no predcription online pharmacy/#buy viagra legally online us pharmacy</a>
Title: generic viagra in us pharmacies 112 mg
Post by: Williamhom on August 22, 2019, 01:56:39 PM
canadianfarmacy (http://onlinepharmacyif.com/) list of canada online pharmacies <a href=http://onlinepharmacyif.com/>www.onlinepharmaciescanada.com/#are online pharmacies without prescriptions legal?</a>
Title: online pharmacy no prescription 169 mg
Post by: Williamhom on August 22, 2019, 01:57:03 PM
discount online pharmacy (http://onlinepharmacyif.com/) safe online pharmacies <a href=http://onlinepharmacyif.com/>walgreens canada online/#canada pharmacy no prescription antibiotics</a>
Title: canada pharmacy no prescription antibiotics 99 mg
Post by: Williamhom on August 22, 2019, 01:57:31 PM
discountpharmacyonlineusa.com (http://onlinepharmacyif.com/) online pharmacy no prescription <a href=http://onlinepharmacyif.com/>generic viagra in us pharmacies/#canadian pharmacy on line</a>
Title: buy prescription online pharmacy 73 mg
Post by: Williamhom on August 22, 2019, 01:57:57 PM
no prescription pharmacy online (http://onlinepharmacyif.com/) on line oharmacy <a href=http://onlinepharmacyif.com/>canada pharmacy on line no prescription/#list of canada online pharmacies</a>
Title: mexican pharmacies online 63 mg
Post by: Williamhom on August 22, 2019, 01:58:24 PM
uk online pharmacy without rx (http://onlinepharmacyif.com/) mexican online pharmacies <a href=http://onlinepharmacyif.com/>canadapharmacts/#online canadian pharmacies</a>
Title: best online pharmacies in canada 40 mg
Post by: Williamhom on August 22, 2019, 01:58:57 PM
online pharm (http://onlinepharmacyif.com/) canadian pharmacy on line <a href=http://onlinepharmacyif.com/>www.viagaraonlinepharmacyusa.com/#no prescirtion pharavies</a>
Title: tramadol on line in usa 494 mg
Post by: Williamhom on August 22, 2019, 01:59:32 PM
www.viagaraonlinepharmacyusa.com (http://onlinepharmacyif.com/) canadianonlinepharmacy.com <a href=http://onlinepharmacyif.com/>canadianpharm365.com/#canadian pharmacy</a>
Title: canada meds no prescription 379 mg
Post by: Williamhom on August 22, 2019, 02:00:00 PM
no prescription canada drugs (http://onlinepharmacyif.com/) online pharmacies in us <a href=http://onlinepharmacyif.com/>uk online pharmacy without rx/#pharmacy website</a>
Title: canadian pharmacys 136 mg
Post by: Williamhom on August 22, 2019, 02:00:36 PM
canadian trust pharmacy (http://onlinepharmacyif.com/) no predcription online pharmacy <a href=http://onlinepharmacyif.com/>best online oharmacy no prescription/#real online pharmacies</a>
Title: best online pharmacies in canada 212 mg
Post by: Williamhom on August 22, 2019, 02:01:01 PM
walmart pharmacy online (http://onlinepharmacyif.com/) buy tramadol online uk no prescription <a href=http://onlinepharmacyif.com/>online pharmacy no prescription required/#buy medication without an rx</a>
Title: reputable online pharmacy for generic viagra 109 mg
Post by: Williamhom on August 22, 2019, 02:01:37 PM
canadian pharmacy no prescription viagra (http://onlinepharmacyif.com/) pharmacy schools online <a href=http://onlinepharmacyif.com/>online medications without prescriptions/#online rx pharmacy medication</a>
Title: reputable mexican pharmacies online 39 mg
Post by: Williamhom on August 22, 2019, 02:02:06 PM
canadianpharm365.com (http://onlinepharmacyif.com/) pharmacy unscripted <a href=http://onlinepharmacyif.com/>online pharmacy uj/#cvs canada prescription online</a>
Title: canada pharmacy on line no prescription 386 mg
Post by: Williamhom on August 22, 2019, 02:02:36 PM
canada pharmacy on line no prescription (http://onlinepharmacyif.com/) best online pharmacy viagra <a href=http://onlinepharmacyif.com/>cheap online pharmacy/#canadian pharmacy no prescription viagra</a>
Title: legitimate online pharmacies in canada 400 mg
Post by: Williamhom on August 22, 2019, 02:03:03 PM
online phamacy (http://onlinepharmacyif.com/) walgreen pharmacy no prescription needed <a href=http://onlinepharmacyif.com/>foreign online pharmacies/#mexican pharmacy online</a>
Title: mexican online pharmacy reviews 319 mg
Post by: Williamhom on August 22, 2019, 02:03:29 PM
largest online pharmacy cialis (http://onlinepharmacyif.com/) what is a good online pharmacy <a href=http://onlinepharmacyif.com/>online prescription drugs vipps/#pharmacy website</a>
Title: xanax from mexico pharmacy 146 mg
Post by: Williamhom on August 22, 2019, 02:04:02 PM
uk online pharmacy without rx (http://onlinepharmacyif.com/) best online oharmacy no prescription <a href=http://onlinepharmacyif.com/>online pharmacies in the uk/#mexican pharmacy online phentermine</a>