#============================================================================== # ■ XP-RGSS-10 ショートカット [Ver.1.0.2] by Claimh #------------------------------------------------------------------------------ # ・マップ画面時に何らかのボタンを押すことで各画面へのショートカットできます。 # ・ボタンはHELPのInputを見て、確認してください。 # (注)ボタンがかぶらないようにしてください #============================================================================== module Short_cut #---------------------------------------------------------------------------- # カスタマイズSTART #---------------------------------------------------------------------------- # アイテム画面切り替えを使用する(使用しないならfalse) USE_ITEM_SHORT = true # スキル画面切り替えを使用する(使用しないならfalse) USE_SKILL_SHORT = true # 装備画面切り替えを使用する(使用しないならfalse) USE_EQUIP_SHORT = true # セーブ画面切り替えを使用する(使用しないならfalse) USE_SAVE_SHORT = true # アイテム画面に切り替え CHANGE_ITEM = Input::X # スキル画面に切り替え CHANGE_SKILL = Input::Y # 装備画面に切り替え CHANGE_EQUIP = Input::Z # セーブ画面に切り替え CHANGE_SAVE = Input::A #---------------------------------------------------------------------------- # カスタマイズEND #---------------------------------------------------------------------------- end #============================================================================== # ■ Scene_Map #============================================================================== class Scene_Map include Short_cut alias update_short update def update update_short menu_shortcut end #-------------------------------------------------------------------------- # ● ショートカット #-------------------------------------------------------------------------- def menu_shortcut # アイテムショートカット if Input.trigger?(CHANGE_ITEM) and USE_ITEM_SHORT # イベント実行中かメニュー禁止中でなければ unless $game_system.map_interpreter.running? or $game_system.menu_disabled # メニュー呼び出しフラグと SE 演奏フラグをセット $game_temp.menu_calling = true $game_temp.menu_beep = true $item_short = true call_item end end # スキルショートカット if Input.trigger?(CHANGE_SKILL) and USE_SKILL_SHORT # イベント実行中かメニュー禁止中でなければ unless $game_system.map_interpreter.running? or $game_system.menu_disabled # メニュー呼び出しフラグと SE 演奏フラグをセット $game_temp.menu_calling = true $game_temp.menu_beep = true $skill_short = true call_skill end end # 装備ショートカット if Input.trigger?(CHANGE_EQUIP) and USE_EQUIP_SHORT # イベント実行中かメニュー禁止中でなければ unless $game_system.map_interpreter.running? or $game_system.menu_disabled # メニュー呼び出しフラグと SE 演奏フラグをセット $game_temp.menu_calling = true $game_temp.menu_beep = true $equip_short = true call_equip end end # セーブショートカット if Input.trigger?(CHANGE_SAVE) and USE_SAVE_SHORT # イベント実行中かメニュー禁止中でなければ unless $game_system.map_interpreter.running? or $game_system.menu_disabled # メニュー呼び出しフラグと SE 演奏フラグをセット $game_temp.menu_calling = true $game_temp.menu_beep = true $save_short = true call_save end end end #-------------------------------------------------------------------------- # ● アイテムショートカット #-------------------------------------------------------------------------- def call_item # メニュー呼び出しフラグをクリア $game_temp.menu_calling = false # メニュー SE 演奏フラグがセットされている場合 if $game_temp.menu_beep # 決定 SE を演奏 $game_system.se_play($data_system.decision_se) # メニュー SE 演奏フラグをクリア $game_temp.menu_beep = false end # プレイヤーの姿勢を矯正 $game_player.straighten # アイテム画面に切り替え $scene = Scene_Item.new end #-------------------------------------------------------------------------- # ● スキルショートカット #-------------------------------------------------------------------------- def call_skill # メニュー呼び出しフラグをクリア $game_temp.menu_calling = false # メニュー SE 演奏フラグがセットされている場合 if $game_temp.menu_beep # 決定 SE を演奏 $game_system.se_play($data_system.decision_se) # メニュー SE 演奏フラグをクリア $game_temp.menu_beep = false end # プレイヤーの姿勢を矯正 $game_player.straighten # アイテム画面に切り替え $scene = Scene_Skill.new end #-------------------------------------------------------------------------- # ● 装備ショートカット #-------------------------------------------------------------------------- def call_equip # メニュー呼び出しフラグをクリア $game_temp.menu_calling = false # メニュー SE 演奏フラグがセットされている場合 if $game_temp.menu_beep # 決定 SE を演奏 $game_system.se_play($data_system.decision_se) # メニュー SE 演奏フラグをクリア $game_temp.menu_beep = false end # プレイヤーの姿勢を矯正 $game_player.straighten # アイテム画面に切り替え $scene = Scene_Equip.new end #-------------------------------------------------------------------------- # ● セーブショートカット #-------------------------------------------------------------------------- def call_save # メニュー呼び出しフラグをクリア $game_temp.menu_calling = false # メニュー SE 演奏フラグがセットされている場合 if $game_temp.menu_beep # 決定 SE を演奏 $game_system.se_play($data_system.decision_se) # メニュー SE 演奏フラグをクリア $game_temp.menu_beep = false end # プレイヤーの姿勢を矯正 $game_player.straighten # アイテム画面に切り替え $scene = Scene_Save.new end end #============================================================================== # ■ Scene_Item #============================================================================== class Scene_Item alias update_item_short update_item def update_item if Input.trigger?(Input::B) and $item_short $item_short = false # キャンセル SE を演奏 $game_system.se_play($data_system.cancel_se) # メニュー画面に切り替え $scene = Scene_Map.new return end update_item_short end end #============================================================================== # ■ Scene_Skill #============================================================================== class Scene_Skill alias update_skill_short update_skill def update_skill if Input.trigger?(Input::B) and $skill_short $skill_short = false # キャンセル SE を演奏 $game_system.se_play($data_system.cancel_se) # メニュー画面に切り替え $scene = Scene_Map.new return end update_skill_short end end #============================================================================== # ■ Scene_Equip #============================================================================== class Scene_Equip alias update_equip_short update_right def update_right if Input.trigger?(Input::B) and $equip_short $equip_short = false # キャンセル SE を演奏 $game_system.se_play($data_system.cancel_se) # メニュー画面に切り替え $scene = Scene_Map.new return end update_equip_short end end #============================================================================== # ■ Scene_Save #============================================================================== class Scene_Save alias update_save_short on_cancel def on_cancel if $save_short $save_short = false # キャンセル SE を演奏 $game_system.se_play($data_system.cancel_se) # メニュー画面に切り替え $scene = Scene_Map.new return end update_save_short end alias save_decision on_decision def on_decision(filename) if $save_short # セーブ SE を演奏 $game_system.se_play($data_system.save_se) # セーブデータの書き込み file = File.open(filename, "wb") write_save_data(file) file.close $save_short end save_decision(filename) $scene = Scene_Map.new end end