Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-------------------------------------------------------------------------------
- # Don't remove this header!
- #-------------------------------------------------------------------------------
- # Disable Enemy Appear
- # by Trihan
- #
- # Version: 1.2
- #
- # This script is commissioned by Batworks Software.
- #-------------------------------------------------------------------------------
- #
- # To use, just use $game_system.appear_disabled = true to turn the enemy
- # appear message off, and $game_system.appear_disabled = false to turn it
- # back on.
- #
- #-------------------------------------------------------------------------------
- # Version History
- #-------------------------------------------------------------------------------
- # 1.2 - Disabled battle transition
- # 1.1 - Disabled battle BGM and start sound
- # 1.0 - Initial script.
- #-------------------------------------------------------------------------------
- module BattleManager
- def self.battle_start
- $game_system.battle_count += 1
- $game_party.on_battle_start
- $game_troop.on_battle_start
- if !$game_system.appear_disabled
- $game_troop.enemy_names.each do |name|
- next if (name == "Cliff")
- $game_message.add(sprintf(Vocab::Emerge, name))
- end
- if @preemptive
- $game_message.add(sprintf(Vocab::Preemptive, $game_party.name))
- elsif @surprise
- $game_message.add(sprintf(Vocab::Surprise, $game_party.name))
- end
- wait_for_message
- end
- end
- end
- class Game_System
- attr_accessor :appear_disabled
- alias :tlb_disableappear_initialize_8nf1 :initialize
- def initialize
- tlb_disableappear_initialize_8nf1
- @appear_disabled = false
- end
- end
- class Scene_Map < Scene_Base
- def pre_battle_scene
- Graphics.update
- Graphics.freeze
- @spriteset.dispose_characters
- BattleManager.save_bgm_and_bgs
- if !$game_system.appear_disabled
- BattleManager.play_battle_bgm
- Sound.play_battle_start
- end
- end
- alias :tlb_disableappear_perform_battle_transition_3gu3 :perform_battle_transition
- def perform_battle_transition
- if $game_system.appear_disabled
- Graphics.transition(0)
- Graphics.freeze
- else
- tlb_disableappear_perform_battle_transition_3gu3
- end
- end
- end
- class Scene_Battle < Scene_Base
- alias :tlb_disableappear_perform_transition_9ib2 :perform_transition
- def perform_transition
- if $game_system.appear_disabled
- Graphics.transition(0)
- Graphics.update
- else
- tlb_disableappear_perform_transition_9ib2
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement