Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # ■ +++ MOG - XAS Battle Cry (V1.0) +++
- #==============================================================================
- # By Moghunter
- # http://www.atelier-rgss.com
- #==============================================================================
- # System running multiple voices (sounds) for XAS.
- #===============================================================================
- module XAS_VOICE
- # Do not modify the parameters below. ----------------------------------------
- ACTOR_SKILL = []
- ACTOR_DAMAGE = []
- ACTOR_DEFEATED = []
- ACTOR_LEADER = []
- ENEMY_SKILL = []
- ENEMY_DAMAGE = []
- ENEMY_DEFEATED = []
- # ----------------------------------------------------------------------------
- # Definition volume of voice.
- VOLUME = 80
- # Example configuration general mode setting is the same for all
- # actions battler.
- #
- # ACTOR_SKILL[ A ] = { B=>["C","C","C"],
- #
- # A - ID do battler.
- # B - ID da skill. (Caso necessário)
- # C - Nome do arquivo de som.
- #
- #----------------------------------------------------------------------------
- # ACTOR ACTION
- #----------------------------------------------------------------------------
- ACTOR_SKILL[1] = {
- 1=>["M_Atk1","(None)","(None)", "(None)", "M_Atk3"],
- 2=>["M_Atk1","(None)","(None)", "(None)", "M_Atk3"],
- 3=>["M_Atk1","M_Atk1","M_Atk1", "M_Atk1", "M_Atk3"],
- 4=>["M_Atk1","M_Atk1","M_Atk1", "M_Atk1", "M_Atk3"],
- 5=>["M_Atk1","M_Atk1","M_Atk1", "M_Atk1", "M_Atk3"],
- 85=>["M_Atk1","M_Atk1","M_Atk1", "M_Atk1", "M_Atk3"],
- 25=>["M_Atk1","M_Atk1","M_Atk1", "M_Atk1", "M_Atk3"],
- 26=>["M_Atk1","M_Atk1","M_Atk1", "M_Atk1", "M_Atk3"],
- 13=>["M_Atk1"],
- 15=>["M_Atk1"],
- 19=>["V_SPECIAL1"]
- }
- ACTOR_SKILL[3] = {
- 6=>["A_ATTACK01","A_ATTACK03","A_ATTACK03"],
- 2=>["A_ATTACK01","A_ATTACK03","A_ATTACK03"],
- 8=>["A_MISC9","A_SKILL04"],
- 9=>["A_MISC9","A_SKILL04"],
- 10=>["A_MISC9","A_SKILL04"],
- 11=>["M_Atk1","M_Atk1","M_Atk1", "M_Atk1", "M_Atk3"],
- 12=>["A_ATTACK01","A_ATTACK03","A_ATTACK04"],
- 27=>["A_MISC9","A_SKILL04"],
- 28=>["A_MISC9","A_SKILL04"],
- 29=>["A_MISC9","A_SKILL04"],
- 30=>["A_MISC9","A_SKILL04"],
- 31=>["A_MISC2","A_MISC20"],
- 32=>["A_MISC16","A_MISC17","A_SKILL03"],
- 33=>["A_MISC2","A_MISC20"],
- 34=>["A_MISC16","A_MISC17"],
- 36=>["A_MISC18"],
- 38=>["A_MISC19"],
- 39=>["A_SKILL01","A_SKILL02","A_SKILL03"],
- 40=>["A_SKILL01","A_SKILL02","A_SKILL03"],
- 41=>["A_MISC2","A_MISC20"],
- 42=>["A_MISC2","A_MISC20"],
- 43=>["A_MISC2","A_MISC20"],
- 44=>["A_MISC16","A_MISC17"]
- }
- #----------------------------------------------------------------------------
- # ACTOR DAMAGE
- #----------------------------------------------------------------------------
- ACTOR_DAMAGE[1] = ["A_ATTACK04","A_ATTACK04","A_ATTACK04"]
- ACTOR_DAMAGE[3] = ["SA_Damage2","SA_Damage2","SA_Damage2"]
- #----------------------------------------------------------------------------
- # ACTOR DEFEATED
- #----------------------------------------------------------------------------
- ACTOR_DEFEATED[1] = ["SA_Damage1","SA_Damage1"]
- ACTOR_DEFEATED[3] = ["SA_Defeated"]
- #----------------------------------------------------------------------------
- # ACTOR LEADER
- #----------------------------------------------------------------------------
- ACTOR_LEADER[1] = ["sleep"]
- ACTOR_LEADER[2] = ["sleep"]
- #----------------------------------------------------------------------------
- # ENEMY SKILL
- #----------------------------------------------------------------------------
- ENEMY_SKILL[3] = {}
- #----------------------------------------------------------------------------
- # ENEMY DAMAGE
- #----------------------------------------------------------------------------
- ENEMY_DAMAGE[9] = []
- #----------------------------------------------------------------------------
- # ENEMY DEFEATED
- #----------------------------------------------------------------------------
- ENEMY_DEFEATED[4] = ["073-Animal08"]
- ENEMY_DEFEATED[5] = ["078-Small05"]
- ENEMY_DEFEATED[7] = ["080-Monster02"]
- end
- #===============================================================================
- # ■ XAS_ACTION
- #===============================================================================
- module XAS_ACTION
- #--------------------------------------------------------------------------
- # ● Execute User Effects
- #--------------------------------------------------------------------------
- alias x_voice_execute_user_effects execute_user_effects
- def execute_user_effects(skill)
- execute_voice_action(skill)
- x_voice_execute_user_effects(skill)
- end
- #--------------------------------------------------------------------------
- # ● Execute Voice Action
- #--------------------------------------------------------------------------
- def execute_voice_action(skill)
- return if self.force_action_times > 0
- if self.battler.is_a?(Game_Enemy)
- voice = XAS_VOICE::ENEMY_SKILL[self.battler.enemy_id]
- else
- voice = XAS_VOICE::ACTOR_SKILL[self.battler.actor_id]
- end
- if voice != nil
- voice_list = voice[skill.id]
- return if voice_list == nil
- voice_id = voice_list[rand(voice_list.size)]
- if $game_options
- volume = XAS_VOICE::VOLUME * $game_options.master_volume
- volume *= $game_options.se_volume
- else
- volume = XAS_VOICE::VOLUME
- end
- #~ Audio.se_play('Audio/SE/' + @name, volume.to_i, @pitch)
- Audio.se_play("Audio/SE/" + voice_id.to_s,volume.to_i,100) rescue nil
- #~ Audio.se_play("Audio/SE/" + voice_id.to_s,XAS_VOICE::VOLUME,100) rescue nil
- end
- end
- end
- #===============================================================================
- # ■ Sprite_Character
- #===============================================================================
- class Sprite_Character < Sprite_Base
- #--------------------------------------------------------------------------
- # ● Execute Damage Pop
- #--------------------------------------------------------------------------
- alias x_voice_execute_damage_pop execute_damage_pop
- def execute_damage_pop
- execute_voice
- x_voice_execute_damage_pop
- end
- #--------------------------------------------------------------------------
- # ● Execute Voice
- #--------------------------------------------------------------------------
- def execute_voice
- if @character.battler.damage.is_a?(Numeric) and
- @character.battler.damage.to_i > 0
- if @character.battler.is_a?(Game_Enemy)
- voice = XAS_VOICE::ENEMY_DAMAGE[@character.battler.enemy_id]
- else
- voice = XAS_VOICE::ACTOR_DAMAGE[@character.battler.actor_id]
- end
- end
- if voice != nil
- voice_id = voice[rand(voice.size)]
- if $game_options
- volume = XAS_VOICE::VOLUME * $game_options.master_volume
- volume *= $game_options.se_volume
- else
- volume = XAS_VOICE::VOLUME
- end
- #~ Audio.se_play('Audio/SE/' + @name, volume.to_i, @pitch)
- Audio.se_play("Audio/SE/" + voice_id.to_s,volume.to_i,100) rescue nil
- #~ Audio.se_play("Audio/SE/" + voice_id.to_s,XAS_VOICE::VOLUME,100) rescue nil
- end
- end
- end
- #===============================================================================
- # ■ Game Character
- #===============================================================================
- class Game_Character < Game_CharacterBase
- #--------------------------------------------------------------------------
- # ● Execute Enemy Defeaed Process
- #--------------------------------------------------------------------------
- alias x_voice_execute_enemy_defeated_process execute_enemy_defeated_process
- def execute_enemy_defeated_process
- execute_enemy_defeated_voice
- x_voice_execute_enemy_defeated_process
- end
- #--------------------------------------------------------------------------
- # ● Execute Actor Defeated Process
- #--------------------------------------------------------------------------
- alias x_voice_execute_actor_defeated_process execute_actor_defeated_process
- def execute_actor_defeated_process
- execute_actor_defeated_voice
- x_voice_execute_actor_defeated_process
- end
- #--------------------------------------------------------------------------
- # ● Execute Actor Defeated Voice
- #--------------------------------------------------------------------------
- def execute_actor_defeated_voice
- voice = XAS_VOICE::ACTOR_DEFEATED[self.battler.actor_id]
- if voice != nil
- voice_id = voice[rand(voice.size)]
- if $game_options
- volume = XAS_VOICE::VOLUME * $game_options.master_volume
- volume *= $game_options.se_volume
- else
- volume = XAS_VOICE::VOLUME
- end
- #~ Audio.se_play('Audio/SE/' + @name, volume.to_i, @pitch)
- Audio.se_play("Audio/SE/" + voice_id.to_s,volume.to_i,100) rescue nil
- #~ Audio.se_play("Audio/SE/" + voice_id.to_s,XAS_VOICE::VOLUME,100) rescue nil
- end
- end
- #--------------------------------------------------------------------------
- # ● Execute Enemy Defeated Voice
- #--------------------------------------------------------------------------
- def execute_enemy_defeated_voice
- voice = XAS_VOICE::ENEMY_DEFEATED[self.battler.enemy_id]
- if voice != nil
- voice_id = voice[rand(voice.size)]
- if $game_options
- volume = XAS_VOICE::VOLUME * $game_options.master_volume
- volume *= $game_options.se_volume
- else
- volume = XAS_VOICE::VOLUME
- end
- #~ Audio.se_play('Audio/SE/' + @name, volume.to_i, @pitch)
- Audio.se_play("Audio/SE/" + voice_id.to_s,volume.to_i,100) rescue nil
- #~ Audio.se_play("Audio/SE/" + voice_id.to_s,XAS_VOICE::VOLUME,100) rescue nil
- end
- end
- end
- #===============================================================================
- # ■ Game Player
- #===============================================================================
- class Game_Player < Game_Character
- #--------------------------------------------------------------------------
- # ● Change Leader
- #--------------------------------------------------------------------------
- alias x_voice_execute_change_leader_effect execute_change_leader_effect
- def execute_change_leader_effect
- x_voice_execute_change_leader_effect
- execute_change_leader_voice
- end
- #--------------------------------------------------------------------------
- # ● Execute Change Leader Voice
- #--------------------------------------------------------------------------
- def execute_change_leader_voice
- voice = XAS_VOICE::ACTOR_LEADER[self.battler.actor_id]
- if voice != nil
- voice_id = voice[rand(voice.size)]
- if $game_options
- volume = XAS_VOICE::VOLUME * $game_options.master_volume
- volume *= $game_options.se_volume
- else
- volume = XAS_VOICE::VOLUME
- end
- #~ Audio.se_play('Audio/SE/' + @name, volume.to_i, @pitch)
- Audio.se_play("Audio/SE/" + voice_id.to_s,volume.to_i,100) rescue nil
- #~ Audio.se_play("Audio/SE/" + voice_id.to_s,XAS_VOICE::VOLUME,100) rescue nil
- end
- end
- end
- $mog_rgss3_xas_battle_cry = true
Add Comment
Please, Sign In to add comment