Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =begin =========================================================================
- Dekita's v1.1
- ★ Débug Functions™ ★
- ================================================================================
- Script Information:
- ====================
- This script creates some new debug functions.
- ================================================================================
- ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
- ================================================================================
- 1. You must give credit to "Dekita"
- 2. You are NOT allowed to repost this script.(or modified versions)
- 3. You are NOT allowed to convert this script.(into other game engines e.g RGSS2)
- 4. You are NOT allowed to use this script for Commercial games.
- 5. ENJOY!
- "FINE PRINT"
- By using this script you hereby agree to the above terms and conditions,
- if any violation of the above terms occurs "legal action" may be taken.
- Not understanding the above terms and conditions does NOT mean that
- they do not apply to you.
- If you wish to discuss the terms and conditions in further detail you can
- contact me at http://dekitarpg.wordpress.com/ or DekitaRPG@gmail.com
- ================================================================================
- History:
- =========
- D /M /Y
- 10/01/2o13 - Added More Features,
- 07/01/2o13 - Started && Finished,
- ================================================================================
- INSTRUCTIONS:
- ==============
- Place this script UNDER "▼ Materials" and ABOVE "▼ Main" in your script editor.
- =end #==========================================================================#
- module Debug_Functions
- # Format of arrays :
- # Effect = [ key, [ array of scenes the feature can be used ] ]
- # e.g
- # S_D_Key = [ :F7 , [ Scene_Map , Scene_Battle ] ]
- # This means that this feature is useable by pressing F7 key while
- # on the map or in battle
- # Possible Keys :
- # note : F9 usually calls the debug scene if used on the map.
- #:F5, :F6, :F7, :F8, :F9, :SHIFT, :CTRL, :ALT
- #:X = (A Key), :Y = (S Key), :Z = (D Key), :L = (Q Key), :R = (W Key)
- # The Key To Press for "Instant Battle" ( if battle can be triggered )
- I_B_Key = [ :F5 , [ Scene_Map ] ]
- # The Key To Press for "Instant Game Shutdown"
- S_D_Key = [ :F9 , [ Scene_Map , Scene_Battle ] ]
- # Key(s) for Instant Heal(s)
- Heal_ALL_Key = [ :F6 , [ Scene_Map , Scene_Battle ] ]
- Heal_HP_Key = [ :X , [ Scene_Map , Scene_Battle ] ]
- Heal_MP_Key = [ :Y , [ Scene_Map , Scene_Battle ] ]
- Fill_TP_Key = [ :Z , [ Scene_Map , Scene_Battle ] ]
- # Key to make all alive party members hp = 1, mp = 0, tp = 0
- Hurt_Pty_Key = [ :F6 , [ Scene_Map , Scene_Battle ] ]
- # Key to kill all enemies
- Enemy_Wipe_Key = [ :F7 ] # Only works in scene battle
- # BIG NOTE :
- # The above only works with scenes that inherit from scene base.
- # Therefor it *may* not work in some custom scenes made by other scripts .
- # unless you put the input method into the scene update yourself ;P
- # Skip Title Scene ?
- Skip_Title = false#true
- end #####################
- # CUSTOMISATION END #
- #####################
- #===============================================================================#
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- # #
- # http://dekitarpg.wordpress.com/ #
- # #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- #===============================================================================#
- # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
- # YES?\.\. #
- # OMG, REALLY? \| #
- # WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
- # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
- #===============================================================================#
- $imported = {} if $imported.nil?
- $imported[:Dekita_Debug_Functions] = true
- #==============================================================================
- module SceneManager
- #==============================================================================
- def self.scene_is_one_of(scenes)
- scenes.each { |pos_scene| @scene.instance_of?(pos_scene) }
- end
- end
- #==============================================================================
- class Game_Player < Game_Character
- #==============================================================================
- def encounter_by_key
- return if Input.press?(:CTRL)
- return if $game_party.encounter_none?
- return if in_airship?
- return if @move_route_forcing
- @encounter_count = 0
- end
- end
- #==============================================================================
- class Scene_Base
- #==============================================================================
- include Debug_Functions
- alias :up_fir_ib_SB :update
- def update
- up_fir_ib_SB
- update_dekitas_debug
- end
- def update_dekitas_debug
- return unless $TEST || $BTEST
- shutdown_game_now if Input.trigger?(S_D_Key[0]) && SceneManager.scene_is_one_of(S_D_Key[1])
- instant_fight if Input.trigger?(I_B_Key[0]) && SceneManager.scene_is_one_of(I_B_Key[1])
- heal_everyfuckingthing if Input.trigger?(Heal_ALL_Key[0]) && SceneManager.scene_is_one_of(Heal_ALL_Key[1])
- heal_all_hp_dam if Input.trigger?(Heal_HP_Key[0]) && SceneManager.scene_is_one_of(Heal_HP_Key[1])
- heal_all_mp_dam if Input.trigger?(Heal_MP_Key[0]) && SceneManager.scene_is_one_of(Heal_MP_Key[1])
- fill_all_tp if Input.trigger?(Fill_TP_Key[0]) && SceneManager.scene_is_one_of(Fill_TP_Key[1])
- hurt_party_via_key if Input.trigger?(Hurt_Pty_Key[0]) && SceneManager.scene_is_one_of(Hurt_Pty_Key[1])
- kill_all_enemies if Input.trigger?(Enemy_Wipe_Key[0]) && SceneManager.scene_is?(Scene_Battle)
- end
- def shutdown_game_now
- SceneManager.exit
- end
- def instant_fight
- $game_player.encounter_by_key
- end
- def heal_everyfuckingthing
- Sound.play_recovery
- $game_party.members.each {|memb| memb.recover_all}
- end
- def hurt_party_via_key
- Sound.play_actor_damage
- $game_party.alive_members.each {|m| m.hp = 1 ; m.mp = 0 ; m.tp = 0 }
- end
- def heal_all_hp_dam
- Sound.play_recovery
- $game_party.members.each {|memb| memb.hp = memb.mhp}
- end
- def heal_all_mp_dam
- Sound.play_recovery
- $game_party.alive_members.each {|memb| memb.mp = memb.mmp}
- end
- def fill_all_tp
- Sound.play_recovery
- $game_party.alive_members.each {|memb| memb.tp = memb.max_tp}
- end
- def kill_all_enemies
- end
- end
- #===============================================================================
- class Scene_Title < Scene_Base
- #===============================================================================
- if Debug_Functions::Skip_Title && $TEST
- def start
- super
- SceneManager.clear
- Graphics.freeze
- instant_game
- end
- def instant_game
- if DataManager.save_file_exists?
- index = DataManager.last_savefile_index
- DataManager.load_game(index)
- else
- DataManager.setup_new_game
- end
- $game_map.autoplay
- SceneManager.goto(Scene_Map)
- end
- def dispose_background
- end
- def dispose_foreground
- end
- end
- end
- #==============================================================================
- class Scene_Battle < Scene_Base
- #==============================================================================
- alias :heft_battle :heal_everyfuckingthing
- alias :hpvk_battle :hurt_party_via_key
- alias :hahd_battle :heal_all_hp_dam
- alias :hamd_battle :heal_all_mp_dam
- alias :fat_battle :fill_all_tp
- alias :kae_battle :kill_all_enemies
- def heal_everyfuckingthing
- heft_battle
- @status_window.refresh
- end
- def hurt_party_via_key
- hpvk_battle
- @status_window.refresh
- end
- def heal_all_hp_dam
- hahd_battle
- @status_window.refresh
- end
- def heal_all_mp_dam
- hamd_battle
- @status_window.refresh
- end
- def fill_all_tp
- fat_battle
- @status_window.refresh
- end
- def kill_all_enemies
- kae_battle
- $game_troop.alive_members.each {|enemy|
- enemy.hp = 0 ; enemy.perform_collapse_effect }
- BattleManager.judge_win_loss
- @log_window.wait
- @log_window.wait_for_effect
- end
- end
- #==============================================================================#
- # - SCRIPT END - #
- #==============================================================================#
- # http://dekitarpg.wordpress.com/ #
- #==============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement