Individual Troop Victory MEs
#1
Individual Troop Victory MEs
Version: 1

Introduction
This script allows game makers to give a specific Troop ID their own victory MEs when your party defeats them. Useful for Boss battles and other stuff.

Features
  • Give a specific troop ID a unique victory music effect when defeated.
  • Set the song, volume and pitch.

Screenshots
No screencaps.

Demo
No demo.

Script
Code:
=begin
????????????????????????????????????????????????????????????????????????????????
? Individual Troop Victory MEs                                                 ?
? by PK8                                                                       ?
? September 29th, 2009                                                         ?
? http://rmvxp.com                                                             ?
????????????????????????????????????????????????????????????????????????????????
? ? Table of Contents                                                          ?
? ?? Author's Notes                - Line 16?18                                ?
? ?? Introduction & Description    - Line 20?22                                ?
? ?? Features                      - Line 24?26                                ?
? ?? How to Use                    - Line 28?30                                ?
? ?? Methods Aliased               - Line 32,33                                ?
? ?? Thanks                        - Line 35,36                                ?
????????????????????????????????????????????????????????????????????????????????
? ? Author's Notes                                                             ?
? This script was requested by a user in HBGames.org's IRC channel and I was   ?
? interested in creating this script so... here you go!                        ?
????????????????????????????????????????????????????????????????????????????????
? ? Introduction & Description                                                 ?
? This script allows game makers to give a specific Troop ID their own victory ?
? MEs when your party defeats them. Useful for Boss battles and other stuff.   ?
????????????????????????????????????????????????????????????????????????????????
? ? Features                                                                   ?
? ? Give a specific troop ID a unique victory music effect when defeated.      ?
? ? Set the song, volume and pitch.                                            ?
????????????????????????????????????????????????????????????????????????????????
? ? How to Use                                                                 ?
? To give a troop ID their own victory ME, simply type this:                   ?
? Troops_Victory[id] = ["file", volume, pitch]                                 ?
????????????????????????????????????????????????????????????????????????????????
? ? Methods Aliased                                                            ?
? ? start_phase5 of Scene_Battle                                               ?
????????????????????????????????????????????????????????????????????????????????
? ? Thanks                                                                     ?
? ? JoeYoung requested something like this in the HBGames.org's IRC channel.   ?
????????????????????????????????????????????????????????????????????????????????
=end

#------------------------------------------------------------------------------
# * Customise
#------------------------------------------------------------------------------
class PK8
  Troops_Victory = {} # Do not touch this.
  
  #            [id] = [ME File, Volume, Pitch]
  Troops_Victory[1] = ["002-Victory02", 100, 100]
  Troops_Victory[2] = ["003-Victory03", 100, 100]
end

#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================
class Scene_Battle
  alias_method(:pk8_troops_victoryme_start_phase_5, :start_phase5)
  def start_phase5
    pk8_troops_victoryme_start_phase_5
    start_troop_victory
  end
  
  #----------------------------------------------------------------------------
  # * Start Troop Victory
  #----------------------------------------------------------------------------
  def start_troop_victory
    PK8::Troops_Victory.each_key { | i |
    # If Troop ID equals the key.
    if $game_temp.battle_troop_id == i
      if PK8::Troops_Victory[i][0] != nil and !PK8::Troops_Victory[i][0].empty?
        # Sets ME volume to 100 if nil.
        PK8::Troops_Victory[i][1] = 100 if PK8::Troops_Victory[i][1] == nil
        # Sets ME pitch to 100 if nil.
        PK8::Troops_Victory[i][2] = 100 if PK8::Troops_Victory[i][2] == nil
        # Plays ME.
        Audio.me_play("Audio/ME/#{PK8::Troops_Victory[i][0]}",
        PK8::Troops_Victory[i][1], PK8::Troops_Victory[i][2])
      end
      break
    end }
  end
end

Instructions
Instructions are in the script.

FAQ
Awaiting question.

Compatibility
This aliases start_phase5 of Scene_Battle.

Credits and Thanks
JoeYoung for requesting a script like this in HBGames.org's IRC channel.

Author's Notes
This script was requested by a user in HBGames.org's IRC channel and I was interested in creating this script so... here you go!

Terms and Conditions
Exclusive to RMVXP.co.cc and HBGames.org.
Reply }
#2
It's the little things that make a big difference. A different victory song can give off a dramatic effect for certain battles. Definitely useful.
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   ACBS FIX SCRIPT #1: Victory Cries Patch DerVVulfman 1 4,698 08-08-2019, 02:53 PM
Last Post: aeliath
   Troop : Self-Switches Kain Nobel 0 4,441 06-03-2016, 09:40 AM
Last Post: Kain Nobel
   Individual Battle Commands by Charlie Fleed, Version 1.0 Charlie Fleed 3 11,289 01-25-2014, 12:15 PM
Last Post: Charlie Fleed
   Troop : Self Switches Kain Nobel 1 5,838 02-02-2013, 01:07 PM
Last Post: yamina-chan
   Individual Battle Commands RPG Advocate 4 10,864 10-09-2011, 04:44 AM
Last Post: DerVVulfman
   Advanced Individual Battle Commands Trickster 6 15,834 01-29-2011, 04:30 AM
Last Post: DerVVulfman
   Individual Troop Themes XP PK8 5 10,009 10-03-2009, 06:36 PM
Last Post: Alpha-Mad
   Individual Troop Battlebacks PK8 3 8,767 10-02-2009, 10:57 AM
Last Post: Cloak of Laser Cannon
   Variable-Based Battle Victory MEs PK8 4 8,130 09-29-2009, 12:58 PM
Last Post: Alpha-Mad
   Enemy Troop Extender SephirothSpawn 0 4,766 03-02-2008, 07:18 AM
Last Post: SephirothSpawn



Users browsing this thread: 2 Guest(s)