I want only Save, Items, End Game, and Equip in my in-game menu.

Discussion in 'RGSS Script Requests' started by ThatOneWeridGUy, Jan 14, 2016.

  1. ThatOneWeridGUy

    ThatOneWeridGUy Villager Member

    Messages:
    7
    Likes Received:
    0
    First Language:
    English
    So, when you test a game, and you press escape, you get  menu. It has Item, Weapon, Status ect. How can I ONLY have Item, Equip, Save, and End game? I'm using RPG Maker XP.
     
    #1
  2. mjshi

    mjshi Jack of Most Trades Veteran

    Messages:
    915
    Likes Received:
    724
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A
    You'd probably need a script for that.
     
    #2
  3. ThatOneWeridGUy

    ThatOneWeridGUy Villager Member

    Messages:
    7
    Likes Received:
    0
    First Language:
    English
    ...

    Can You tell me the script?
     
    #3
  4. mjshi

    mjshi Jack of Most Trades Veteran

    Messages:
    915
    Likes Received:
    724
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A
    I'd have to make it.

    Currently writing it, please wait.
     
    #4
  5. mjshi

    mjshi Jack of Most Trades Veteran

    Messages:
    915
    Likes Received:
    724
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A
    Replace Scene_Menu:

    #==============================================================================# ** 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 = "Save" s6 = "End Game" @command_window = Window_Command.new(160, [s1, s3, s5, s6]) @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) end # If save is forbidden if $game_system.save_disabled # Disable save @command_window.disable_item(2) 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:: # 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 < 2 # 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 # 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 2 # save # If saving is forbidden if $game_system.save_disabled # 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 save screen $scene = Scene_Save.new when 3 # 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:: # 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 # equip # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to equipment screen $scene = Scene_Equip.new(@status_window.index) end return end endend 
    Replace Scene_Equip:

    #==============================================================================# ** Scene_Equip#------------------------------------------------------------------------------# This class performs equipment screen processing.#==============================================================================class Scene_Equip #-------------------------------------------------------------------------- # * Object Initialization # actor_index : actor index # equip_index : equipment index #-------------------------------------------------------------------------- def initialize(actor_index = 0, equip_index = 0) @actor_index = actor_index @equip_index = equip_index end #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main # Get actor @actor = $game_party.actors[@actor_index] # Make windows @help_window = Window_Help.new @left_window = Window_EquipLeft.new(@actor) @right_window = Window_EquipRight.new(@actor) @item_window1 = Window_EquipItem.new(@actor, 0) @item_window2 = Window_EquipItem.new(@actor, 1) @item_window3 = Window_EquipItem.new(@actor, 2) @item_window4 = Window_EquipItem.new(@actor, 3) @item_window5 = Window_EquipItem.new(@actor, 4) # Associate help window @right_window.help_window = @help_window @item_window1.help_window = @help_window @item_window2.help_window = @help_window @item_window3.help_window = @help_window @item_window4.help_window = @help_window @item_window5.help_window = @help_window # Set cursor position @right_window.index = @equip_index refresh # 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 @help_window.dispose @left_window.dispose @right_window.dispose @item_window1.dispose @item_window2.dispose @item_window3.dispose @item_window4.dispose @item_window5.dispose end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh # Set item window to visible @item_window1.visible = (@right_window.index == 0) @item_window2.visible = (@right_window.index == 1) @item_window3.visible = (@right_window.index == 2) @item_window4.visible = (@right_window.index == 3) @item_window5.visible = (@right_window.index == 4) # Get currently equipped item item1 = @right_window.item # Set current item window to @item_window case @right_window.index when 0 @item_window = @item_window1 when 1 @item_window = @item_window2 when 2 @item_window = @item_window3 when 3 @item_window = @item_window4 when 4 @item_window = @item_window5 end # If right window is active if @right_window.active # Erase parameters for after equipment change @left_window.set_new_parameters(nil, nil, nil) end # If item window is active if @item_window.active # Get currently selected item item2 = @item_window.item # Change equipment last_hp = @actor.hp last_sp = @actor.sp @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id) # Get parameters for after equipment change new_atk = @actor.atk new_pdef = @actor.pdef new_mdef = @actor.mdef # Return equipment @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id) @actor.hp = last_hp @actor.sp = last_sp # Draw in left window @left_window.set_new_parameters(new_atk, new_pdef, new_mdef) end end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # Update windows @left_window.update @right_window.update @item_window.update refresh # If right window is active: call update_right if @right_window.active update_right return end # If item window is active: call update_item if @item_window.active update_item return end end #-------------------------------------------------------------------------- # * Frame Update (when right window is active) #-------------------------------------------------------------------------- def update_right # If B button was pressed if Input.trigger?(Input:: # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to menu screen $scene = Scene_Menu.new(1) return end # If C button was pressed if Input.trigger?(Input::C) # If equipment is fixed if @actor.equip_fix?(@right_window.index) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # Activate item window @right_window.active = false @item_window.active = true @item_window.index = 0 return end # If R button was pressed if Input.trigger?(Input::R) # Play cursor SE $game_system.se_play($data_system.cursor_se) # To next actor @actor_index += 1 @actor_index %= $game_party.actors.size # Switch to different equipment screen $scene = Scene_Equip.new(@actor_index, @right_window.index) return end # If L button was pressed if Input.trigger?(Input::L) # Play cursor SE $game_system.se_play($data_system.cursor_se) # To previous actor @actor_index += $game_party.actors.size - 1 @actor_index %= $game_party.actors.size # Switch to different equipment screen $scene = Scene_Equip.new(@actor_index, @right_window.index) return end end #-------------------------------------------------------------------------- # * Frame Update (when item window is active) #-------------------------------------------------------------------------- def update_item # If B button was pressed if Input.trigger?(Input:: # Play cancel SE $game_system.se_play($data_system.cancel_se) # Activate right window @right_window.active = true @item_window.active = false @item_window.index = -1 return end # If C button was pressed if Input.trigger?(Input::C) # Play equip SE $game_system.se_play($data_system.equip_se) # Get currently selected data on the item window item = @item_window.item # Change equipment @actor.equip(@right_window.index, item == nil ? 0 : item.id) # Activate right window @right_window.active = true @item_window.active = false @item_window.index = -1 # Remake right window and item window contents @right_window.refresh @item_window.refresh return end endend
    Replace Scene_Save

    #==============================================================================# ** Scene_Save#------------------------------------------------------------------------------# This class performs save screen processing.#==============================================================================class Scene_Save < Scene_File #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super("Which file would you like to save to?") end #-------------------------------------------------------------------------- # * Decision Processing #-------------------------------------------------------------------------- def on_decision(filename) # Play save SE $game_system.se_play($data_system.save_se) # Write save data file = File.open(filename, "wb") write_save_data(file) file.close # If called from event if $game_temp.save_calling # Clear save call flag $game_temp.save_calling = false # Switch to map screen $scene = Scene_Map.new return end # Switch to menu screen $scene = Scene_Menu.new(2) end #-------------------------------------------------------------------------- # * Cancel Processing #-------------------------------------------------------------------------- def on_cancel # Play cancel SE $game_system.se_play($data_system.cancel_se) # If called from event if $game_temp.save_calling # Clear save call flag $game_temp.save_calling = false # Switch to map screen $scene = Scene_Map.new return end # Switch to menu screen $scene = Scene_Menu.new(2) end #-------------------------------------------------------------------------- # * Write Save Data # file : write file object (opened) #-------------------------------------------------------------------------- def write_save_data(file) # Make character data for drawing save file characters = [] for i in 0...$game_party.actors.size actor = $game_party.actors characters.push([actor.character_name, actor.character_hue]) end # Write character data for drawing save file Marshal.dump(characters, file) # Wrire frame count for measuring play time Marshal.dump(Graphics.frame_count, file) # Increase save count by 1 $game_system.save_count += 1 # Save magic number # (A random value will be written each time saving with editor) $game_system.magic_number = $data_system.magic_number # Write each type of game object Marshal.dump($game_system, file) Marshal.dump($game_switches, file) Marshal.dump($game_variables, file) Marshal.dump($game_self_switches, file) Marshal.dump($game_screen, file) Marshal.dump($game_actors, file) Marshal.dump($game_party, file) Marshal.dump($game_troop, file) Marshal.dump($game_map, file) Marshal.dump($game_player, file) endend 

    Replace Scene_End

    #==============================================================================# ** 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:: # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to menu screen $scene = Scene_Menu.new(3) 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(5) endend 
    Edit: I beg pardon for the double post. Have mercy ;_;
     
    Last edited by a moderator: Jan 14, 2016
    #5
  6. slimmmeiske2

    slimmmeiske2 Little Red Riding Hood Moderator

    Messages:
    5,729
    Likes Received:
    4,170
    Location:
    Belgium
    First Language:
    Dutch
    Primarily Uses:
    RMXP
    Not to take away from mjshi, but you can easily do that if you use this script.

    Edit: Ninja'd. I guess :)
     
    Last edited by a moderator: Jan 14, 2016
    #6
    MobiusXVI likes this.
  7. Shaz

    Shaz Veteran Veteran

    Messages:
    37,917
    Likes Received:
    11,586
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    mjshi, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


    Edit your post instead.


    I've moved this thread to RGSS Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.
     
    #7
  8. GameDevon

    GameDevon Animagical Person Member

    Messages:
    16
    Likes Received:
    20
    First Language:
    English
    #8
  9. slimmmeiske2

    slimmmeiske2 Little Red Riding Hood Moderator

    Messages:
    5,729
    Likes Received:
    4,170
    Location:
    Belgium
    First Language:
    Dutch
    Primarily Uses:
    RMXP
    No, that wouldn't work. Yanfly's plugin is for RPG Maker MV, the OP is looking for a script for RPG Maker XP. They use different scripting languages, so they aren't interchangeable.
     
    Last edited by a moderator: Jan 14, 2016
    #9
  10. GameDevon

    GameDevon Animagical Person Member

    Messages:
    16
    Likes Received:
    20
    First Language:
    English
    Oh woops I missed that! I'm so used to skimming text I always miss something haha forgive me  ;_;
     
    Last edited by a moderator: Jan 14, 2016
    #10
  11. MobiusXVI

    MobiusXVI Game Maker Veteran

    Messages:
    362
    Likes Received:
    84
    First Language:
    English
    Wow. Beat me to sharing my own script. 

    Anyways, @ThatOneWeridGUy, if you want to use my script, here's a pre-made customization for it. Just download my script from the link. Then replace the 'Customization' section with the one from below.

    Code:
    #==============================================================================# ** CUSTOMIZATION START#==============================================================================module Mobius	module Menu_Commands		# MENU LOOK OPTIONS #		# These options let you change how the menu looks				# MENU_OPACITY is used to make the menu somewhat transparent so that		# the background can be seen behind it. You can set this to an interger		# value between 0 (completely transparent) and 255 (completely opaque).		MENU_OPACITY = 128		# The BACKGROUND_BLENDING_COLOR is used to darken the background map		# picture so that it is less intrusive. I recommend leaving this as is,		# but if you want to change it, you can set the four numbers to any 		# integer values in the range 0-255. The numbers are RGBA.		BACKGROUND_BLENDING_COLOR = Color.new(16, 16, 16, 128)				######################################################################				# COMMAND OPTIONS #		# These options allow you to configure all of the menu commands.		# Big picture: Every command has a 'command key' associated it with. 		# This allows you to link several different settings to the same command.		# The keys are all of the type ':key_name'. That is a colon followed		# by the key's name. As a rule, the keys should be all lowercase.		# Additionally every command will need a key placed in the COMMAND_ORDER,		# COMMAND_NAMES, and COMMAND_CALLS options below. It's optional for		# COMMAND_ACTOR_SELECT, and COMMAND_ACTOR_REQUIRED.				# Order of Commands #		# Place all of your command keys in between the two square brackets.		# Each key should be separated from the others with a comma.		# The order in which these keys are placed will determine their order		# in game, i.e. the first (top) key will be the first (top) command.		COMMAND_ORDER = [						:item,												:equip,						:save,						:end_game,												]		# Command Display Names #		# This links your command keys to their display text in game.		# In general, these will be the same but they might vary a little.		# Think of this like setting a 'word' in the database. In fact,		# this overwrites the database setting, so be sure to define them here.		# Each entry is a pair like this - :command_key => "Display Name"		# Separate entries with commas. The order of these entries does NOT		# affect the order in game. 		COMMAND_NAMES = {						:item      => "Item",						:equip     => "Equip",						:save      => "Save",						:end_game  => "End Game",						}								# Command Script Calls #		# This links your command keys to their script call.		# In general, these will be very similar to their key.		# If a script says you can call it by doing this:		# $scene = Scene_CustomScript.new		# You will likely need the 'Scene_CustomScript' part. 		# Each entry is a pair like this - :command_key => "Script_Call"		# Separate entries with commas. The order of these entries does NOT		# affect the order in game.		COMMAND_CALLS = {						:item      => Scene_Item,						:equip     => Scene_Equip,						:save      => Scene_Save,						:end_game  => Scene_End,						}								# Does Command Need Actor Select? #		# This sets which commands need to select an actor in the menu		# before moving to the next scene. In the default scripts, the		# skills, equip, and status commands need to know which actor		# you want to set before they move to their scenes. It's possible		# some custom commands may need this as well. Just place the 		# command keys that need it here. If it doesn't need it, just 		# leave it out. The order of these entries does NOT affect 		# the order in game.		COMMAND_ACTOR_SELECT = [						:equip,						]								# Disable Command When Party Size Is Zero? #		# This sets which commands should be disabled when the party size		# is zero. In the default scripts, the item, skills, equip, and        # status commands are disabled when this is the case.		# It's possible some custom commands may need this as well. 		# Just place the command keys that need it here. If it doesn't 		# need it, just leave it out. The order of these entries 		# does NOT affect the order in game.		COMMAND_ACTOR_REQUIRED = [						:item,						:equip,						]										# Save Command Key Is? #		# This sets which command key is the 'save' command key, so		# that it can be disabled whenever you disable saving via events.		# In general, you can leave the default save key alone in the		# above options and therefore leave this one alone too.		SAVE_COMMAND = :save	endend#==============================================================================# ** CUSTOMIZATION END	#------------------------------------------------------------------------------ 
     
    #11
  12. ThatOneWeridGUy

    ThatOneWeridGUy Villager Member

    Messages:
    7
    Likes Received:
    0
    First Language:
    English
    Last edited by a moderator: Jan 15, 2016
    #12

Share This Page