#=============================================================================== # # Yanfly Engine RD - Debug Shortcuts # Last Date Updated: 2009.05.16 # Level: Easy, Normal # # When testing your own games, battles can get very old, especially after you've # done them over and over and would like to continue on to test other things. # Now there are buttons you can bind to produce various shortcuts to make things # go a little bit faster for you during testing. # # These are not cheat codes or anything of the sort. When players run the game, # it will not activate for them. The only ways to use this is through RPG Maker # VX's default Test Run mode from the map editor or battle editor. # #=============================================================================== # WARNING and DISCLAIMER #=============================================================================== # # If you somehow get stuck windows or whatever from using these debug shortcuts # and you can't clear them, I won't offer solutions to fix them. After all, this # is done for testing purposes, and as an individual testing your own game, you # have to acknowledge how your own game works, not me. # #=============================================================================== # Instructions #=============================================================================== # # These debugging shortcuts will only work when you're testing a game through # either the map editor or the enemy troops editor. It doesn't work for a normal # player when launching it from the exe file. # # Key F5 - Default Shortcuts # -------------------------- # - Super Buff Allies - (added 2009.04.28) # Press F5 to completely heal your allies and buff them with a group of status # effects. Dead members will be revived. Works at actor action select. # # - Increase Gold Inside Shops - (added 2009.04.29) # Press F5 while inside a shop to increase your gold by a set increment. # Press F6 while inside a shop to decrease your gold by a set increment. # # Key F6 - Default Shortcuts # -------------------------- # - Call Save Menu - (added 2009.04.29) # Press F8 while on the field map to open up the save menu. This will open up # regardless of whether or not the save menu is disabled. # # - Decrease Gold Inside Shops - (added 2009.04.29) # Press F5 while inside a shop to increase your gold by a set increment. # Press F6 while inside a shop to decrease your gold by a set increment. # # - Decrease Morale in Battle - (added 2009.05.16) # Press F6 to decrease morale inside battle. # Press F7 to reset morale inside battle. # Press F8 to increase morale inside battle. # # Key F7 - Default Shortcuts # -------------------------- # - Decrease Morale in Battle - (added 2009.05.16) # Press F6 to decrease morale inside battle. # Press F7 to reset morale inside battle. # Press F8 to increase morale inside battle. # # Key F8 - Default Shortcuts # -------------------------- # - Decrease Morale in Battle - (added 2009.05.16) # Press F6 to decrease morale inside battle. # Press F7 to reset morale inside battle. # Press F8 to increase morale inside battle. # # Key F9 - Default Shortcuts # -------------------------- # - Instant Kill Enemies - (added 2009.04.27) # Press F9 to instantly kill all enemies inside battle. This will still grant # your party experience, gold, and drops. Works at battle actor action select. # # - Unlock All Classes - (added 2009.05.01) # For Subclass Selection System only. Unlocks all classes for the actor. Works # only in the class selection and learn skill screen when choosing what to set. # # Common Event Launch Shortcuts (added 2009.05.08) # ------------------------------------------------ # Hold down either Control, Alt, or Shift. Then press F5, F6, F7, F8, or F9. # The desired common event you've inputted below in the module will launch. # This way, if none of the debug shortcuts can fulfill your debugging needs, # you can produce your own shortcuts. # #=============================================================================== # # Compatibility # - Alias: Scene_Battle, update # - Alias: Scene_Map, update_call_debug # #=============================================================================== $imported = {} if $imported == nil $imported["DebugShortcuts"] = true module YE module TOOLS # You can disable the kill enemies button here or rebind it to another key. # Use it when your actors are choosing between Attack, Skill, Defend, Item. ENABLE_KILL_ENEMIES = true KILL_ENEMIES_BUTTON = Input::F9 # You can disable the buff party button here or rebind it to another key. # You can also set what states to give your party members. ENABLE_BUFF_PARTY = true BUFF_PARTY_BUTTON = Input::F5 STATES_GIVEN = [9, 10, 11, 12] # You can save your game on the field map when no events are running. This # will pull up the save menu regardless of whether or not saving is enabled. ENABLE_SAVE_GAME = true SAVE_GAME_BUTTON = Input::F6 # Use this at the shop and it'll increase or decrease your gold amount by # a set increment. ENABLE_SHOP_GOLD = true SHOP_GOLD_UP_BUTTON = Input::F5 SHOP_GOLD_DN_BUTTON = Input::F6 SHOP_GOLD_INCREMENT = 10000 #---COMMON EVENT LAUNCHES FROM CTRL BUTTON--- # These debug shortcuts will require you to hold down Control and then # pressing the respective button to launch the desired common event. # For the values, input the common event's ID you wish to launch. CTRL_F5_COMMON_EVENT = 1 CTRL_F6_COMMON_EVENT = 2 CTRL_F7_COMMON_EVENT = 3 CTRL_F8_COMMON_EVENT = 4 CTRL_F9_COMMON_EVENT = 5 #---COMMON EVENT LAUNCHES FROM ALT BUTTON--- # These debug shortcuts will require you to hold down Alt and then # pressing the respective button to launch the desired common event. # For the values, input the common event's ID you wish to launch. ALT_F5_COMMON_EVENT = 6 ALT_F6_COMMON_EVENT = 7 ALT_F7_COMMON_EVENT = 8 ALT_F8_COMMON_EVENT = 9 ALT_F9_COMMON_EVENT = 10 #---COMMON EVENT LAUNCHES FROM SHIFT BUTTON--- # These debug shortcuts will require you to hold down Shift and then # pressing the respective button to launch the desired common event. # For the values, input the common event's ID you wish to launch. SHIFT_F5_COMMON_EVENT = 11 SHIFT_F6_COMMON_EVENT = 12 SHIFT_F7_COMMON_EVENT = 13 SHIFT_F8_COMMON_EVENT = 14 SHIFT_F9_COMMON_EVENT = 15 #---SUBCLASS SELECTION SYSTEM--- # This part of the debug shortcuts is only available if you're using the # Subclass Selection System script. Otherwise, you don't have to worry about # it at all. ENABLE_SSS_SHORTCUTS = true UNLOCK_ALL_CLASSES = Input::F9 CLASS_JP_UP_BUTTON = Input::F5 CLASS_JP_DN_BUTTON = Input::F6 CLASS_JP_INCREMENT = 1000 #---BATTLER STAT MORALE--- # This part of the debug shortcuts is only available if you're using the # Battler Stat Morale script. ENABLE_BSM_SHORTCUTS = true BSM_INCREASE_BUTTON = Input::F8 BSM_RESET_BUTTON = Input::F7 BSM_DECREASE_BUTTON = Input::F6 BSM_CHANGE_INCREMENT = 500 end end #=============================================================================== # Editting anything past this point may potentially result in causing computer # damage, incontinence, explosion of user's head, coma, death, and/or halitosis. # Therefore, edit at your own risk. #=============================================================================== if $TEST or $BTEST #============================================================================== # Scene_Battle #============================================================================== class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # alias update party #-------------------------------------------------------------------------- alias update_party_command_selection_ds update_party_command_selection unless $@ def update_party_command_selection if Input.trigger?(YE::TOOLS::KILL_ENEMIES_BUTTON) and YE::TOOLS::ENABLE_KILL_ENEMIES debug_kill_enemies elsif Input.trigger?(YE::TOOLS::BUFF_PARTY_BUTTON) and YE::TOOLS::ENABLE_BUFF_PARTY for actor in $game_party.members debug_buff_allies(actor) end Sound.play_recovery elsif Input.trigger?(YE::TOOLS::BSM_INCREASE_BUTTON) and YE::TOOLS::ENABLE_BSM_SHORTCUTS debug_morale_change(2) elsif Input.trigger?(YE::TOOLS::BSM_DECREASE_BUTTON) and YE::TOOLS::ENABLE_BSM_SHORTCUTS debug_morale_change(1) elsif Input.trigger?(YE::TOOLS::BSM_RESET_BUTTON) and YE::TOOLS::ENABLE_BSM_SHORTCUTS debug_morale_change(0) end update_party_command_selection_ds end #-------------------------------------------------------------------------- # alias update actor command #-------------------------------------------------------------------------- alias supdate_actor_command_selection_ds update_actor_command_selection unless $@ def update_actor_command_selection if Input.trigger?(YE::TOOLS::KILL_ENEMIES_BUTTON) and YE::TOOLS::ENABLE_KILL_ENEMIES debug_kill_enemies elsif Input.trigger?(YE::TOOLS::BUFF_PARTY_BUTTON) and YE::TOOLS::ENABLE_BUFF_PARTY debug_buff_allies(@active_battler) Sound.play_recovery elsif Input.trigger?(YE::TOOLS::BSM_INCREASE_BUTTON) and YE::TOOLS::ENABLE_BSM_SHORTCUTS debug_morale_actor(2, @active_battler) elsif Input.trigger?(YE::TOOLS::BSM_DECREASE_BUTTON) and YE::TOOLS::ENABLE_BSM_SHORTCUTS debug_morale_actor(1, @active_battler) elsif Input.trigger?(YE::TOOLS::BSM_RESET_BUTTON) and YE::TOOLS::ENABLE_BSM_SHORTCUTS debug_morale_actor(0, @active_battler) end supdate_actor_command_selection_ds end #-------------------------------------------------------------------------- # debug kill enemies - 2009.04.27 #-------------------------------------------------------------------------- def debug_kill_enemies Sound.play_enemy_damage for enemy in $game_troop.existing_members enemy.add_state(1) enemy.perform_collapse end end #-------------------------------------------------------------------------- # debug buff allies - 2009.04.28 #-------------------------------------------------------------------------- def debug_buff_allies(actor) actor.recover_all for state_id in YE::TOOLS::STATES_GIVEN actor.add_state(state_id) end if $imported["CustomSkillEffects"] actor.rage = YE::BATTLE::MAX_RAGE end @status_window.refresh if @status_window != nil end #-------------------------------------------------------------------------- # debug morale change #-------------------------------------------------------------------------- def debug_morale_change(type) return unless $imported["BattlerStatMorale"] for actor in $game_party.existing_members case type when 0; value = YE::BATTLE::STAT::MORALE_DEFAULT when 1; value = actor.morale + -1 * YE::TOOLS::BSM_CHANGE_INCREMENT when 2; value = actor.morale + YE::TOOLS::BSM_CHANGE_INCREMENT end actor.morale = value end for member in $game_troop.existing_members case type when 0; value = YE::BATTLE::STAT::MORALE_DEFAULT when 1; value = member.morale + YE::TOOLS::BSM_CHANGE_INCREMENT when 2; value = member.morale + -1 * YE::TOOLS::BSM_CHANGE_INCREMENT end member.morale = value end @status_window.refresh if @status_window != nil Sound.play_cursor end #-------------------------------------------------------------------------- # debug morale actor #-------------------------------------------------------------------------- def debug_morale_actor(type, actor) return unless $imported["BattlerStatMorale"] case type when 0; value = YE::BATTLE::STAT::MORALE_DEFAULT when 1; value = actor.morale + -1 * YE::TOOLS::BSM_CHANGE_INCREMENT when 2; value = actor.morale + YE::TOOLS::BSM_CHANGE_INCREMENT end actor.morale = value @status_window.refresh if @status_window != nil Sound.play_cursor end end #============================================================================== # Scene_Map #============================================================================== class Scene_Map < Scene_Base #-------------------------------------------------------------------------- # alias update debug #-------------------------------------------------------------------------- alias update_call_debug_ds update_call_debug unless $@ def update_call_debug if Input.press?(Input::CTRL) and Input.trigger?(Input::F5) $game_temp.common_event_id = YE::TOOLS::CTRL_F5_COMMON_EVENT elsif Input.press?(Input::CTRL) and Input.trigger?(Input::F6) $game_temp.common_event_id = YE::TOOLS::CTRL_F6_COMMON_EVENT elsif Input.press?(Input::CTRL) and Input.trigger?(Input::F7) $game_temp.common_event_id = YE::TOOLS::CTRL_F7_COMMON_EVENT elsif Input.press?(Input::CTRL) and Input.trigger?(Input::F8) $game_temp.common_event_id = YE::TOOLS::CTRL_F8_COMMON_EVENT elsif Input.press?(Input::CTRL) and Input.trigger?(Input::F9) $game_temp.common_event_id = YE::TOOLS::CTRL_F9_COMMON_EVENT elsif Input.press?(Input::ALT) and Input.trigger?(Input::F5) $game_temp.common_event_id = YE::TOOLS::ALT_F5_COMMON_EVENT elsif Input.press?(Input::ALT) and Input.trigger?(Input::F6) $game_temp.common_event_id = YE::TOOLS::ALT_F6_COMMON_EVENT elsif Input.press?(Input::ALT) and Input.trigger?(Input::F7) $game_temp.common_event_id = YE::TOOLS::ALT_F7_COMMON_EVENT elsif Input.press?(Input::ALT) and Input.trigger?(Input::F8) $game_temp.common_event_id = YE::TOOLS::ALT_F8_COMMON_EVENT elsif Input.press?(Input::ALT) and Input.trigger?(Input::F9) $game_temp.common_event_id = YE::TOOLS::ALT_F9_COMMON_EVENT elsif Input.press?(Input::SHIFT) and Input.trigger?(Input::F5) $game_temp.common_event_id = YE::TOOLS::SHIFT_F5_COMMON_EVENT elsif Input.press?(Input::SHIFT) and Input.trigger?(Input::F6) $game_temp.common_event_id = YE::TOOLS::SHIFT_F6_COMMON_EVENT elsif Input.press?(Input::SHIFT) and Input.trigger?(Input::F7) $game_temp.common_event_id = YE::TOOLS::SHIFT_F7_COMMON_EVENT elsif Input.press?(Input::SHIFT) and Input.trigger?(Input::F8) $game_temp.common_event_id = YE::TOOLS::SHIFT_F8_COMMON_EVENT elsif Input.press?(Input::SHIFT) and Input.trigger?(Input::F9) $game_temp.common_event_id = YE::TOOLS::SHIFT_F9_COMMON_EVENT elsif Input.trigger?(YE::TOOLS::BUFF_PARTY_BUTTON) debug_buff_allies if YE::TOOLS::ENABLE_BUFF_PARTY elsif Input.trigger?(YE::TOOLS::SAVE_GAME_BUTTON) debug_save_game if YE::TOOLS::ENABLE_SAVE_GAME else update_call_debug_ds end end #-------------------------------------------------------------------------- # debug buff allies - 2009.04.28 #-------------------------------------------------------------------------- def debug_buff_allies for actor in $game_party.members actor.recover_all for state_id in YE::TOOLS::STATES_GIVEN actor.add_state(state_id) end end @status_window.refresh if @status_window != nil Sound.play_recovery end #-------------------------------------------------------------------------- # debug save game - 2009.04.29 #-------------------------------------------------------------------------- def debug_save_game Sound.play_save $game_temp.next_scene = "save" end end #============================================================================== # Scene_Shop #============================================================================== class Scene_Shop < Scene_Base #-------------------------------------------------------------------------- # alias Frame Update #-------------------------------------------------------------------------- alias update_ds_shop update unless $@ def update if Input.trigger?(YE::TOOLS::SHOP_GOLD_UP_BUTTON) debug_shop_gold(1) elsif Input.trigger?(YE::TOOLS::SHOP_GOLD_DN_BUTTON) debug_shop_gold(-1) end update_ds_shop end #-------------------------------------------------------------------------- # shop gold up/down increments. - 2009.04.29 #-------------------------------------------------------------------------- def debug_shop_gold(direction) if YE::TOOLS::ENABLE_SHOP_GOLD amount = YE::TOOLS::SHOP_GOLD_INCREMENT * direction Sound.play_shop $game_party.gain_gold(amount) @gold_window.refresh end end end #============================================================================== # Scene_Class_Change #============================================================================== if $imported["SubclassSelectionSystem"] class Scene_Class_Change #-------------------------------------------------------------------------- # alias update_command_window #-------------------------------------------------------------------------- alias update_command_window_ds_sc update_command_window unless $@ def update_command_window if YE::TOOLS::ENABLE_SSS_SHORTCUTS if Input.trigger?(YE::TOOLS::UNLOCK_ALL_CLASSES) Sound.play_equip @actor.unlock_all_classes @class_window.refresh end end update_command_window_ds_sc end #-------------------------------------------------------------------------- # alias update_class_window #-------------------------------------------------------------------------- alias update_class_window_ds_sc update_class_window unless $@ def update_class_window if YE::TOOLS::ENABLE_SSS_SHORTCUTS class_id = $data_classes[@actor.unlocked_classes[@class_window.index]].id if Input.trigger?(YE::TOOLS::CLASS_JP_UP_BUTTON) Sound.play_equip @actor.change_jp(class_id, YE::TOOLS::CLASS_JP_INCREMENT) @actor_window.refresh @class_window.refresh elsif Input.trigger?(YE::TOOLS::CLASS_JP_DN_BUTTON) Sound.play_equip @actor.change_jp(class_id, -YE::TOOLS::CLASS_JP_INCREMENT) @actor_window.refresh @class_window.refresh end end update_class_window_ds_sc end end #=============================================================================== # Scene Learn Skill #=============================================================================== class Scene_Learn_Skill < Scene_Base #-------------------------------------------------------------------------- # alias update_command_window #-------------------------------------------------------------------------- alias update_command_window_ds_ls update_command_window unless $@ def update_command_window if YE::TOOLS::ENABLE_SSS_SHORTCUTS if Input.trigger?(YE::TOOLS::UNLOCK_ALL_CLASSES) Sound.play_equip @actor.unlock_all_classes @class_window.refresh end end update_command_window_ds_ls end #-------------------------------------------------------------------------- # alias update_class_window #-------------------------------------------------------------------------- alias update_class_window_ds_ls update_class_window unless $@ def update_class_window if YE::TOOLS::ENABLE_SSS_SHORTCUTS class_id = $data_classes[@actor.unlocked_classes[@class_window.index]].id if Input.trigger?(YE::TOOLS::CLASS_JP_UP_BUTTON) Sound.play_equip @actor.change_jp(class_id, YE::TOOLS::CLASS_JP_INCREMENT) @status_window.refresh(class_id) @class_window.refresh elsif Input.trigger?(YE::TOOLS::CLASS_JP_DN_BUTTON) Sound.play_equip @actor.change_jp(class_id, -YE::TOOLS::CLASS_JP_INCREMENT) @status_window.refresh(class_id) @class_window.refresh end end update_class_window_ds_ls end end end # End Import #=============================================================================== end #=============================================================================== # # END OF FILE # #===============================================================================