#==============================================================================
# ** Animated Battlers VX Add-On #1:
# Animated Battler Formations
#------------------------------------------------------------------------------
# by DerVVulfman
# version 1.0
# 05-20-2008
# RGSS2 / RPGMaker VX
#==============================================================================
#
# INTRODUCTION:
#
# Rather than reinstitute the formation system I included and hardwired into
# "Minkoff's Animated Battlers - Enhanced", I decided to use an outside script
# that is highly customizable. With this add-on, the end user can design the
# battle formations for the actor battlers. They will start out and remain
# lined up in the order the end user sets up.
#
# The system recognizes the 'Mirror Effect' system in Animated Battlers VX,
# and will adjust and reverse the battler positions accordingly. You need not
# worry about creating duplicate formation entries for both left and right
# sided formations.
#
#------------------------------------------------------------------------------
#
# CREATING THE FORMATIONS:
#
# This system allows you to create multiple formations. This is accomplished
# by the way you use the 'ABATVX_FORMATION' array. The syntax is as follows:
#
# ABATVX_FORMATION = { id => [ formation set ], id => [formation set],... }
#
# So... with that, you can make multiple sets of formations which you can
# switch to while the game is running..
#
# Now... each formation set holds the x and y position for each actor battler
# in combat. Not by their 'Actor ID' mind you, merely by party member order.
# So the first member in your party,regardless of their position in your actor
# database, will be first battler position defined in the formation set. The
# layout for each formation set is as follows:
#
# [ [Battler 1's X & Y], [Battler 2's X & Y],... ]
#
# Most people would set a formation set with allowances for 4 battlers. But if
# you wanted to use a large party script to increase the number of members in
# your battle party, you can add more than 4 battler arrays like so:
#
# ...ON = { 0 => [ [350,200], [395,235], [440,270], [485,305], [530,340] ],
# 1 => [ [530,200], [485,235], [440,275], [395,305], [350,340] ] }
#
#------------------------------------------------------------------------------
#
# SCRIPT CALL:
#
# There's only one script call you should be familiar with right now, and that
# is the script call that changes the formation you want to use in battle. By
# default, the system uses the formation set by ID #0. But you can change the
# formation being used with the following call:
#
#
# The call is simple: $game_system.abatvx_form_id = number
#
# Where the number is the ID number of your formation. That's it.
#
#
#------------------------------------------------------------------------------
#
# TERMS AND CONDITIONS:
#
# Free to use, even in commercial projects. Just note that I need some form
# of due credit... even a mere mention in some end titles.
#
#==============================================================================
# THE FORMATION
# SETTING ARRAY
# ==============
# ID Battler 1 Battler 2 Battler 3 Battler 4
ABATVX_FORMATION = { 0 => [ [350, 200], [395, 235], [440, 270], [485, 305] ],
1 => [ [485, 200], [440, 235], [395, 270], [350, 305] ] }
#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
# This class handles system-related data. Also manages vehicles and BGM, etc.
# The instance of this class is referenced by $game_system.
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :abatvx_form_id # Formation ID
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias init_game_system initialize
def initialize
init_game_system
@abatvx_form_id = 0 # Initial formation
end
end
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
# This class handles actors. It's used within the Game_Actors class
# ($game_actors) and referenced by the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Actor X Coordinate
#--------------------------------------------------------------------------
def screen_x
return self.abatvx_bypass_x if self.abatvx_form_bypass == true
if $game_system.abatvx_mirror
return 544 - ABATVX_FORMATION[$game_system.abatvx_form_id][self.index][0]
else
return ABATVX_FORMATION[$game_system.abatvx_form_id][self.index][0]
end
end
#--------------------------------------------------------------------------
# * Actor Y Coordinate
#--------------------------------------------------------------------------
def screen_y
return self.abatvx_bypass_y if self.abatvx_form_bypass == true
return ABATVX_FORMATION[$game_system.abatvx_form_id][self.index][1]
end
end