An unexpected bug was discovered by redtri17 of RPGMakerWeb.com. He noticed that he could not make a weapon use a pose not part of the basic template system. A simple one-line fix, all demos uploaded here have been upgraded. And thanks to redtri17 who is now in the system's credits.
The main post now includes a link to Charlie Fleed's Final Fantasy X-Like Battle System, now employing AnimBat! It was upgraded to version 3.3, but only as a result to minor changes and additions made within AnimBat! Otherwise, it is the same system and the same instructions that Charlie Fleed supplied still apply.
A link to Charlie Fleed's actual CTB topic is included within the first post.
I have tried to use a large party script, wanting to have 6 actors in battle, but when i try to use fomar0153's script I get an error of
"Script ' 4 - battle engine classes' line 121: NoMethodError occurred. undefined method "Moving" for #<array:0x8c7c990>" -when the second part is placed above AnimBat Scripts, happens when the battle starts.
and
"Script ' 4 - Battle Engine Classes' line 265: ArgumentError occurred. wrong number of arguments(0 for 1)." -when the second part is placed below AnimBat Scripts, happens when action is selected and target is confirmed.
The only other custom script i am using is the Universal Message System.
Fomar0153's Large Party is a system that I recommend. I've been familiar with it since Fomar0153 developed it in 2006 over at RMXP.Org, now known as HBGames.Org. It's initial page can be found .... (>HERE.<)
If this is where you acquired it, you may not have noticed that further down the initial post, Fomar0153 posted an edit that I gave him that was more compatible with various scripts such as Paradog, RTAB, the RMXP SDK and... Animated Battlers. This revision was dated in April 2007.
You 'CAN' get it there, but I only discovered that it will suffer a stack error if you hit the F12 key to reset your game. This is what many call the F12 bug. So below, I will post the two pages you need to past into your demo... altered in a simple manner to avoid the stack error.
Pg1-General
Code:
#===============================================================================
# ** Large Party System
# by Fomar0153
#-------------------------------------------------------------------------------
# This system allows you to break the 4 team barrier setup by RPGMaker XP. By
# using this code, you can have 5, 6 or even 10 member parties.
#
# NOTE: You may experience difficulties w/ 'draw_actor_hp' and 'draw_actor_sp'
# in combat due to the 'if... elsif...' block that controls the width of the
# HP and SP blocks. This problem will typically start with parties over five
# in size. Editing these defs is the only way to cancel this error.
#
#-------------------------------------------------------------------------------
# Part 1: General Systems
#-------------------------------------------------------------------------------
#
# (This script must be placed 'above' any Custom Battle System you're using.)
#
# This page of the code can enhance your project to allow parties of over four
# members. The controls are very simple. To establish a default number of
# party members, edit the PARTY SIZE value in the configuration section below.
# If you wish to alter the party size limit while the game is running, call on
# the $game_party.party_size value from a map event and change it there. But,
# remember that you'll need to run '$game_party.refresh' for the change to take
# effect.
#
#-------------------------------------------------------------------------------
# To Limit Parties below Four:
#
# "Only needed if you were to force parties to have fewer than four."
#
# By default, the party is set up for four team members and the default battle-
# system and most other systems are already designed to accomdate this. While
# this system allows you to increase the number of team members beyond four, it
# requires a minor edit to your default system (or custom battlesystem) to have
# parties forced to three or fewer members.
#
# In the Spriteset_Battle's update def, please remove/comment-out the following
# lines of code:
# @actor_sprites[0].battler = $game_party.actors[0]
# @actor_sprites[1].battler = $game_party.actors[1]
# @actor_sprites[2].battler = $game_party.actors[2]
# @actor_sprites[3].battler = $game_party.actors[3]
# These lines insert your party members into four preset slots. But, if you
# were to force a party smaller than four, an error would certainly occur.
# Fortunately, the Large Party system has this covered, and only by removing
# these lines is all that is needed to fix this error.
#
# You may need to remove these same lines in custom battlesystems as well...
#
#===============================================================================
PARTY_SIZE = 6
#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
# This class handles the party. It includes information on amount of gold
# and items. Refer to "$game_party" for the instance of this class.
#==============================================================================
class Game_Party
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :party_size # Current size of the party
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
if @fomarlarge_gameparty_stack.nil?
alias fomar_init initialize
@fomarlarge_gameparty_stack = true
end
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
fomar_init
@party_size = PARTY_SIZE
end
#--------------------------------------------------------------------------
# * Add an Actor
# actor_id : actor ID
#--------------------------------------------------------------------------
def add_actor(actor_id)
# Get Actor
actor = $game_actors[actor_id]
# If the party has less than 4 members and this actor is not in the party
if not @actors.include?(actor) and $game_party.actors.size < $game_party.party_size
# Add actor
@actors.push(actor)
# Refresh player
$game_player.refresh
end
end
#--------------------------------------------------------------------------
# * Adjust the maximum party value (permits addition & keeps within range)
#--------------------------------------------------------------------------
def party_size=(party_size)
# Prevent Nil values
@party_size = 4 if party_size == nil
# Set party size
@party_size = party_size
# Reset to default if an incorrect value
@party_size = 4 if party_size < 1
end
end
#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
# This window displays party member status on the menu screen.
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
if @fomarlarge_menustatus_stack.nil?
alias large_refresh refresh
@fomarlarge_menustatus_stack = true
end
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
unless $game_party.actors.size > 4
super(0, 0, 480, 480)
else
super(0, 0, 480, 160 * $game_party.actors.size)
end
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
large_refresh
self.height = 480
end
#--------------------------------------------------------------------------
# * Cursor Rectangle Update
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
return
end
row = @index / @column_max
if row < self.top_row
self.top_row = row
end
if row > self.top_row + (self.page_row_max - 1)
self.top_row = row - (self.page_row_max - 1)
end
cursor_width = self.width / @column_max - 32
x = @index % @column_max * (cursor_width + 32)
y = @index / @column_max * 116 - self.oy
self.cursor_rect.set(x, y, cursor_width, 96)
end
#--------------------------------------------------------------------------
# * Get Top Row
#--------------------------------------------------------------------------
def top_row
return self.oy / 116
end
#--------------------------------------------------------------------------
# * Set Top Row
# row : row shown on top
#--------------------------------------------------------------------------
def top_row=(row)
if row < 0
row = 0
end
if row > row_max - 1
row = row_max - 1
end
self.oy = row * 116
end
#--------------------------------------------------------------------------
# * Get Number of Rows Displayable on 1 Page
#--------------------------------------------------------------------------
def page_row_max
return 4
end
end
#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
# This class performs battle screen processing.
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
if @fomarlarge_scenebattle_stack.nil?
alias fomar_p3_scw phase3_setup_command_window
@fomarlarge_scenebattle_stack = true
end
#--------------------------------------------------------------------------
# * Actor Command Window Setup
#--------------------------------------------------------------------------
def phase3_setup_command_window
fomar_p3_scw
unless $game_party.actors.size > 4
@actor_command_window.x = @actor_index * 160
else
@actor_command_window.x = @actor_index * (640/$game_party.actors.size)
if @actor_command_window.x > 480
@actor_command_window.x = 480
end
end
end
end
Pg2 Battlestatus
Code:
#===============================================================================
# ** Large Party System
# by Fomar0158
#-------------------------------------------------------------------------------
# This system allows you to break the 4 team barrier setup by RPGMaker XP. By
# using this code, you can have 5, 6 or even 10 member parties.
#
# NOTE: You may experience difficulties w/ 'draw_actor_hp' and 'draw_actor_sp'
# in combat due to the 'if... elsif...' block that controls the width of the
# HP and SP blocks. This problem will typically start with parties over five
# in size. Editing these defs is the only way to cancel this error.
#
#-------------------------------------------------------------------------------
# Part 2: Battlesystem Code
#-------------------------------------------------------------------------------
#
# (This script must be placed 'below' any Custom Battle System you're using.)
# (Only the 1st half for the RTAB system. Not for use with ParaDog's system.)
#
# This page of the code is designed for use with the battlesystem you are using
# at the time. By default, it was originally set up for the default battlesys-
# tem alone. It has since been edited for use with the RTAB battle systems.
#
# To use with RTAB, remove or comment out the Window_BattleStatus code at the
# bottom of this script. It has been clearly marked. The ParaDog script has
# already been designed for large party scripts, so the use of this system is
# not required. RTAB on the other hand has a unique scrolling battlestatus
# window and would require another script to replace its own.
#===============================================================================
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
# This class handles the actor. It's used within the Game_Actors class
# ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :bstat_pos # To adjust the battlestatus window
#--------------------------------------------------------------------------
# * Get Battle Screen X-Coordinate
#--------------------------------------------------------------------------
def screen_x
# Return after calculating x-coordinate by order of members in party
if self.index != nil
unless $game_party.actors.size > 4
return self.index * 160 + 80
else
return self.index * (640/ $game_party.actors.size) +
(80/($game_party.actors.size/2))
end
else
return 0
end
end
end
#==============================================================================
# ** Spriteset_Battle
#------------------------------------------------------------------------------
# This class brings together battle screen sprites. It's used within
# the Scene_Battle class.
#==============================================================================
class Spriteset_Battle
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
if @fomarlarge_spritesetbattle_stack.nil?
alias fomar_update update
@fomarlarge_spritesetbattle_stack = true
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Added routine to load battlers during combat
unless @battlers_loaded
@actor_sprites = []
for i in 0...$game_party.party_size
@actor_sprites.push(Sprite_Battler.new(@viewport2))
end
@battlers_loaded = true
end
# Perform the original call
fomar_update
# 'Re-'Update actor sprite contents (corresponds with actor switching)
for i in 0...$game_party.party_size
@actor_sprites[i].battler = $game_party.actors[i]
end
end
end
#==============================================================================
#==============================================================================
#
# **** REMOVE FROM HERE DOWN TO WORK WITH THE RTAB SYSTEM ****
#
#==============================================================================
#==============================================================================
#==============================================================================
# ** Window_BattleStatus
#------------------------------------------------------------------------------
# This window displays the status of all party members on the battle screen.
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
if @fomarlarge_window_battlestatus.nil?
alias fomar_init initialize
alias fomar_refresh refresh
alias fomar_da_name draw_actor_name
alias fomar_da_state draw_actor_state
alias fomar_da_hp draw_actor_hp
alias fomar_da_sp draw_actor_sp
@fomarlarge_window_battlestatus = true
end
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
fomar_init
unless $game_party.actors.size > 4
@level_up_flags = [false, false, false, false]
else
@level_up_flags = []
for i in 0...$game_party.actors.size
@level_up_flags.push(false)
end
end
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
@bstat_width = (640 / $game_party.actors.size ) - 32
# Determine if the 1st position, 2nd position, 3rd...
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor.bstat_pos = (i * @bstat_width) + (32 * i)
end
# Call original
fomar_refresh
Graphics.frame_reset
end
#--------------------------------------------------------------------------
# * Draw Name
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#--------------------------------------------------------------------------
def draw_actor_name(actor, x, y)
x2 = actor.bstat_pos
fomar_da_name(actor, x2, y)
end
#--------------------------------------------------------------------------
# * Draw State
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#--------------------------------------------------------------------------
def draw_actor_state(actor, x, y, width = 120)
# Reset the width
if width > @bstat_width
width = @bstat_width
end
x2 = actor.bstat_pos
fomar_da_state(actor, x2, y, width)
end
#--------------------------------------------------------------------------
# * Draw HP
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#--------------------------------------------------------------------------
def draw_actor_hp(actor, x, y, width = 120)
# Reset the width
if width > @bstat_width
width = @bstat_width
end
x2 = actor.bstat_pos
if $game_party.actors.size < 6
fomar_da_hp(actor, x2, y, width)
else
fomar_da_hp(actor, x2, y, 48)
end
end
#--------------------------------------------------------------------------
# * Draw SP
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#--------------------------------------------------------------------------
def draw_actor_sp(actor, x, y, width = 120)
# Reset the width
if width > @bstat_width
width = @bstat_width
end
x2 = actor.bstat_pos
return
if $game_party.actors.size < 6
fomar_da_sp(actor, x2, y, width)
else
fomar_da_sp(actor, x2, y, 48)
end
end
end
HOWEVER, I have had issues with it from time to time in regards of the draw_actor_hp and draw_actor_sp methods in his BattleStatus code (with or without my F12 fix). Personally, I'd find a Large Party compatible Battlestatus script. But that's me.
Thank you so much, I looked over that entire thread multiple times, do not know how i missed that. Works flawlessly now, all six actors are there and perform their animations.
Yep. Just that the one I posted here should give you no problems if you hit F12.
Off-Topic: Look at how I wrapped the aliases in those IF...END blocks . That technique was given to me by SephirothSpawn, and makes it so those methods only get aliased once. Stops stacking errors.
redtri17 is now showing off. He reported another error, related to the first. I saw this at midnight, and figured it out 15 minutes later. How's that for analysis and system design?
We have to revisit the same method, the animbat_function_update_phase4_step3_pose_attack method. Just for cleanliness sake, just use THIS in its place. Yeah, it's the same line... but why take chances?
Look at the Hash Obtain2 method and how it looks. A clean method, it accepts a 'battler' as its initial value, recognizing it as an actor or enemy, and obtains the actor/enemy ID from it. But look further and see that it also accepts the ID of weapons or skills.
OOPS! I LEFT THAT PORTION OUT!
The fault does not lie within the hash_obtain2 method, but the base hash_obtain method which it uses. I needed to let it recognize if the value being sent into the method is an actual battler, or just some value to search... so replace the actual hash_obtain method with this! Erm, leaving hash_obtain2 untouched. That one's fine.
Code:
#--------------------------------------------------------------------------
# * Hash Value Obtain
# battler : battler being tested against (or ID if it is not a battler)
# default : default value
# testval : hash array
# minval : (optional) minimum value
# maxval : (optional) maximum value
#--------------------------------------------------------------------------
def hash_obtain(battler, default, testval, minval=nil, maxval=nil)
if battler.is_a?(Game_Battler)
id = (battler.is_a?(Game_Enemy)) ? -battler.id : battler.id
else
id = battler
end
returnval = default
return returnval if testval.nil?
returnval = testval[0] if testval.has_key?(0)
returnval = testval[id] if testval.has_key?(id)
unless default.nil?
returnval = minval if minval != nil && returnval < minval
returnval = maxval if maxval != nil && returnval > maxval
end
return returnval
end
And now, it's version 1.2!!! Dated 9/17/2019 (mm/dd/yyyy).
It'll take some time to generate all the demos. I have obligations to perform tomo--- this morning.
quick question, how do stop the system from zooming in when a battle is started. I'm using the Holders Template demo of Animbat and have created my own sideview battlebacks based off of the tilesets I'm using and when I test the battle they are super zoomed in and i loose like 90% of the detail i put into the images. I created them be making the battle background a map, then took a screenshot of the image and saved it in the correct resolution.
The demo showcasing Holder's graphics also contains the RTAB (or Real Time Active Battle) system by cogwheel, a Japanese scripter. That battlesystem features a camera zoom system. The intent there was to showcase that it can work with various battlesystems, though you can rip RTAB right out of it.
Hehehe.... since the battlers aren't zooming in/out, you must be referring to the zoom of the battleback to fit. The default battlesystem uses a 640x320 sized battleback. RTAB uses a 640x480 battleback.
Now for the official...
BUMP to Version 1.2
All the demos have been updated to the latest version, fixing an error which prevented accurate poses from being played out when a weapon is actively used upon a target. This did require a bit more work than the previous update as it required an alteration to the base system that extracts data from hash arrays within the Battlesystem itself.
i encountered a weird bug where only a limited amount of the custom battle sprites appear in a fight (red circles should contain sprites of Actors as they are within the battle) i am using the two different actor spritesheets only, is there a limit that a spritesheet of an actor can not be used as a enemy spritesheet at the same time, or is this a deeper bug?