Victor engine state graphics + holders animated battlers issue

Hi everyone, I seem to have run into an issue that I can no longer fix on my own.
I have been using Victor Sants scripts to achieve this. Specifically his Animated battle script, and his State graphics script.

Victors Animated Battle

Victors State Graphics

Ive read both scripts up and down and cant seem to find a way to fix this issue.
______________________________________________________________________________________________________________________________________
THE ISSUE:
My game projects battle system requires my actors to change different battler graphics under different circumstances, through states.

Ive added the <state graphic extension: x> code to the required states, and when using the normal 3,4 battler graphics, the script works perfectly fine.


However Ive made the switch to using my own battlers which are adopted from holders animated battlers, and their battler spritesheet is 4,14 and the animated battle script requires me to have the [anim] suffix at the end.

the conflicting issue is that the extension I have for my states dont seem to be able to work with the battlers sprite sheets that have the [anim] suffix.

Ive read that the suffix for the state graphics change script has to come before the animated battlers suffix,and at most I have gotten the sprite to change in battle when the state is applied.

Now the character sprite sheet loads in, but is not animated anymore, and takes up a huge portion of the screen because its showing all the frames of the battle sheet, instead of one singular sprite thats animated


I have tried to contact victor through his patreon but unfortunately he is without a pc atm, and can not help at this time. Is there anyone with good knowledge of ruby programming or familiar with Rgss3 scripting that could help me out? this fix is vital to my project.

I just need the battlers to stay animated when they transform.
the fact that the characters do still transform in battle has led me to believe that this may be an issue within the animated battlers script. but im not sure where to go from there or even where to look.
bump
So you want to be able to use this custom spritesheet.
Have you tried to edit the custom one to resemble the original one? I mean, have you reduced the number of frames?
Or do you DESPERATELY need to get all those extra frames?
well it all started with the 3/4 sprite sheet, but yes. It is imperative that I have access to using at least 8 frames, I could do 4, but the animation doesnt look as smooth and im really trying to break the formula and show that rpgmaker can still be used to make amazing and high quality games. I originally started with the 3/4, but had full intentions of making the sprites 8/14. ive tried all 3 formats 3/4, 4/14 and even 6/4 at one point. but settled on 8 by 14 for simplicity and as it feels to be the best of both worlds in terms of fluidity and ease of use, as I am using other software to help animate my sprites and exporting to 8/14 is very helpful. the only one that is animated is the 3/4 however.
bump
Sometime ago I told another user, I think it was in RMXP, that he should take a look at Sprite_Battler where it would handle the usual 4x4 spritesheet. Go check if the script includes some calculation involving width and height either in a class like Sprite_Battler or Sprite_Character or similar. Usually I'd expect to find it in the update method or a method mentioned there.
it seems that the (state graphics) script does not have anything to do with those classes , but I can confirm that victors animated battler script does have an overwrite method for a sprite_battler class.
its located at line 5500, and there is a butt ton of stuff thats going on within that class, including some form of calculation with width and height. I will post the code.

Spoiler: animated battlers Sprite_battler class code
#==============================================================================
# ** Sprite_Battler
#------------------------------------------------------------------------------
# This sprite is used to display battlers. It observes a instance of the
# Game_Battler class and automatically changes sprite conditions.
#==============================================================================

class Sprite_Battler < Sprite_Base
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :battler
attr_reader :battler_name
#--------------------------------------------------------------------------
# * Overwrite method: update_bitmap
#--------------------------------------------------------------------------
def update_bitmap
setup_bitmap if graphic_changed?
end
#--------------------------------------------------------------------------
# * Overwrite method: init_visibility
#--------------------------------------------------------------------------
def init_visibility
@battler_visible = [email protected]?
self.opacity = 0 unless @battler_visible
end
#--------------------------------------------------------------------------
# * Overwrite method: update_origin
#--------------------------------------------------------------------------
def update_origin
update_rect if bitmap
end
#--------------------------------------------------------------------------
# * Alias method: initialize
#--------------------------------------------------------------------------
alias :initialize_ve_animated_battle :initialize
def initialize(viewport, battler = nil)
initialize_ve_animated_battle(viewport, battler)
init_variables
end
#--------------------------------------------------------------------------
# * Alias method: update_effect
#--------------------------------------------------------------------------
alias :update_effect_ve_animated_battle :update_effect
def update_effect
setup_collapse
update_effect_ve_animated_battle
update_pose
update_afterimage
update_pose_loop if $imported[:ve_loop_animation]
end
#--------------------------------------------------------------------------
# * Alias method: revert_to_normal
#--------------------------------------------------------------------------
alias :revert_to_normal_ve_animated_battle :revert_to_normal
def revert_to_normal
revert_to_normal_ve_animated_battle
update_rect if bitmap
end
#--------------------------------------------------------------------------
# * Alias method: setup_new_effect
#--------------------------------------------------------------------------
alias :setup_new_effect_ve_animated_battle :setup_new_effect
def setup_new_effect
if @battler_visible && !@invisible && @battler.poses.invisible
@invisible = true
@effect_type = :disappear
@effect_duration = 12
elsif @battler_visible && @invisible && [email protected]
@invisible = false
@effect_type = :appear
@effect_duration = 12
end
setup_new_effect_ve_animated_battle
end
#--------------------------------------------------------------------------
# * New method: init_variables
#--------------------------------------------------------------------------
def init_variables
@spin = 0
@frame = 0
@sufix = ""
@pose_sufix = ""
@anim_sufix = VE_SPRITE_SUFIX
@returning = 0
@frame_width = 0
@frame_height = 0
@icon_list = {}
@throw_list = []
@afterimage_wait = 0
@afterimage_sprites = []
start_effect🙂appear) if $game_system.intro_fade && [email protected]?
poses.clear_poses
setup_positions
end
#--------------------------------------------------------------------------
# * New method: setup_collapse
#--------------------------------------------------------------------------
def setup_collapse
if @battler.dead? && !@dead
@battler.perform_collapse_effect if !@fast_collapse
@battler.perform_fast_collapse if @fast_collapse
@fast_collapse = false
@dead = true
elsif @dead && [email protected]?
@dead = false
end
end
#--------------------------------------------------------------------------
# * New method: subject
#--------------------------------------------------------------------------
def subject
@pose_battler ? @pose_battler : @battler
end
#--------------------------------------------------------------------------
# * New method: poses
#--------------------------------------------------------------------------
def poses
@battler.poses
end
#--------------------------------------------------------------------------
# * New method: sprite_value
#--------------------------------------------------------------------------
def sprite_value(value)
@battler.sprite_value(value)
end
#--------------------------------------------------------------------------
# * New method: graphic_changed?
#--------------------------------------------------------------------------
def graphic_changed?
actor_name_change? || battler_name_change? || misc_change?
end
#--------------------------------------------------------------------------
# * New method: actor_name_change?
#--------------------------------------------------------------------------
def actor_name_change?
use_charset? && (@battler_name != @battler.character_name ||
@battler_index != @battler.character_index ||
@battler_hue != @battler.character_hue)
end
#--------------------------------------------------------------------------
# * New method: battler_name_change?
#--------------------------------------------------------------------------
def battler_name_change?
!use_charset? && (@battler_name != @battler.battler_name ||
@battler_hue != @battler.battler_hue)
end
#--------------------------------------------------------------------------
# * New method: misc_change?
#--------------------------------------------------------------------------
def misc_change?
(visual_equip? && @visual_items != @battler.visual_items) ||
@direction != poses.direction || @frame_size != poses.f_size ||
@sufix != poses.sufix
end
#--------------------------------------------------------------------------
# * New method: use_charset?
#--------------------------------------------------------------------------
def use_charset?
sprite_value🙂mode) == :charset
end
#--------------------------------------------------------------------------
# * New method: visual_equip?
#--------------------------------------------------------------------------
def visual_equip?
$imported[:ve_visual_equip]
end
#--------------------------------------------------------------------------
# * New method: collapse?
#--------------------------------------------------------------------------
def collapse?
@effect_type == :collapse || @effect_type == :custom_collapse
end
#--------------------------------------------------------------------------
# * New method: setup_bitmap
#--------------------------------------------------------------------------
def setup_bitmap
if use_charset?
@battler_name = @battler.character_name
@battler_hue = @battler.character_hue
@battler_index = @battler.character_index
else
@battler_name = @battler.battler_name
@battler_hue = @battler.battler_hue
end
@frame_size = poses.f_size
@sufix = poses.sufix
@direction = poses.direction
@visual_items = @battler.visual_items.dup if visual_equip?
init_bitmap
init_frame
init_visibility
end
#--------------------------------------------------------------------------
# * New method: init_bitmap
#--------------------------------------------------------------------------
def init_bitmap
self.bitmap = setup_bitmap_sprite
end
#--------------------------------------------------------------------------
# * New method: setup_bitmap_sprite
#--------------------------------------------------------------------------
def setup_bitmap_sprite
case sprite_value🙂mode)
when :charset
if visual_equip?
args = [@battler_name, @battler_hue, @visual_items, sufix]
Cache.character(*args)
else
Cache.character(get_character_name, @battler_hue)
end
when :single
Cache.battler(get_battler_name, @battler_hue)
when :sprite
Cache.battler(get_battler_name, @battler_hue)
else
Cache.battler(@battler_name, @battler_hue)
end
end
#--------------------------------------------------------------------------
# * New method: sufix
#--------------------------------------------------------------------------
def sufix
case sprite_value🙂mode)
when :charset then @sufix
when :sprite then @anim_sufix + @sufix
else @sufix
end
end
#--------------------------------------------------------------------------
# * New method: get_battler_name
#--------------------------------------------------------------------------
def get_battler_name
name = @battler_name + sufix
battler_exist?(name) ? name : @battler_name
end
#--------------------------------------------------------------------------
# * New method: get_character_name
#--------------------------------------------------------------------------
def get_character_name
name = @battler_name + sufix
character_exist?(name) ? name : @battler_name
end
#--------------------------------------------------------------------------
# * New method: init_frame
#--------------------------------------------------------------------------
def init_frame
@frame_width = bitmap.width / frame_number
@frame_height = bitmap.height / row_number
end
#--------------------------------------------------------------------------
# * New method: frame_number
#--------------------------------------------------------------------------
def frame_number
return poses.frames if single_char?
return poses.frames * 4 if multi_char?
return 1 unless battler_exist?(@battler_name + sufix)
return poses.f_size if poses.f_size
return sprite_value🙂frames) if sprite_value🙂mode) == :sprite
return 1
end
#--------------------------------------------------------------------------
# * New method: row_number
#--------------------------------------------------------------------------
def row_number
return 4 if single_char?
return 8 if multi_char?
return 1 unless battler_exist?(@battler_name + sufix)
return sprite_value🙂rows) if sprite_value🙂mode) == :sprite
return 1
end
#--------------------------------------------------------------------------
# * New method: single_char?
#--------------------------------------------------------------------------
def single_char?
use_charset? && (single_normal? && !visual_equip?)
end
#--------------------------------------------------------------------------
# * New method: multi_char?
#--------------------------------------------------------------------------
def multi_char?
use_charset? && (multi_normal? || visual_equip?)
end
#--------------------------------------------------------------------------
# * New method: single_normal?
#--------------------------------------------------------------------------
def single_normal?
!visual_equip? && @battler_name[/^[!]?[$]./]
end
#--------------------------------------------------------------------------
# * New method: multi_normal?
#--------------------------------------------------------------------------
def multi_normal?
!visual_equip? && !@battler_name[/^[!]?[$]./]
end
#--------------------------------------------------------------------------
# * New method: get_sign
#--------------------------------------------------------------------------
def get_sign
@visual_items.any? {|part| !part[:name][/^[!]?[$]./] }
end
#--------------------------------------------------------------------------
# * New method: update_rect
#--------------------------------------------------------------------------
def update_rect
setup_frame2
setup_rect
self.ox = @frame_width / 2
self.oy = @frame_height
self.mirror = pose_mirror
reset_frame if poses.reset
end
#--------------------------------------------------------------------------
# * New method: pose_mirror
#--------------------------------------------------------------------------
def pose_mirror
mirror = sprite_value🙂invert)
mirror = !mirror if timing && timing[:invert]
mirror = !mirror if right? && sprite_value🙂mirror)
mirror
end
#--------------------------------------------------------------------------
# * New method: down?
#--------------------------------------------------------------------------
def down?
poses.down?
end
#--------------------------------------------------------------------------
# * New method: left?
#--------------------------------------------------------------------------
def left?
poses.left?
end
#--------------------------------------------------------------------------
# * New method: right?
#--------------------------------------------------------------------------
def right?
poses.right?
end
#--------------------------------------------------------------------------
# * New method: up?
#--------------------------------------------------------------------------
def up?
poses.up?
end
#--------------------------------------------------------------------------
# * New method: timing
#--------------------------------------------------------------------------
def timing
poses.timing
end
#--------------------------------------------------------------------------
# * New method: setup_frame
#--------------------------------------------------------------------------
def setup_frame2
return if !poses.pose?
timing[:time] -= 1
timing[:time] = timing[:wait] if timing[:time] == 0
return if timing[:time] != timing[:wait]
return if poses.reset
update_frame
end
#--------------------------------------------------------------------------
# * New method: update_frame
#--------------------------------------------------------------------------
def update_frame
@max_frame = timing[:frame]
@min_frame = poses.f_init
update_frame_return if timing[:return] && !timing[:revert]
update_frame_revert if !timing[:return] && timing[:revert]
update_frame_normal if !timing[:return] && !timing[:revert]
poses.frame = [@frame, sprite_value🙂frames) - 1].min
end
#--------------------------------------------------------------------------
# * New method: update_frame_return
#--------------------------------------------------------------------------
def update_frame_return
@returning += 1
@frame = returning_value(@returning, @max_frame)
poses.reset = true if !timing[:loop] && @returning > @max_frame * 2 - 1
end
#--------------------------------------------------------------------------
# * New method: update_frame_revert
#--------------------------------------------------------------------------
def update_frame_revert
@frame -= 1
@frame = @max_frame if @frame < @min_frame
poses.reset = true if !timing[:loop] && @frame < @min_frame
end
#--------------------------------------------------------------------------
# * New method: update_frame_normal
#--------------------------------------------------------------------------
def update_frame_normal
@frame += 1
@frame = @min_frame if @frame < @min_frame || @frame > @max_frame + 1
poses.reset = true if !timing[:loop] && @frame > @max_frame
end
#--------------------------------------------------------------------------
# * New method: reset_frame
#--------------------------------------------------------------------------
def reset_frame
invert = timing[:invert]
poses.timing = {invert: invert}
poses.reset = false
@returning = 0
@frame = 0
@spin = 0
end
#--------------------------------------------------------------------------
# * New method: setup_rect
#--------------------------------------------------------------------------
def setup_rect
sign = @battler_name[/^[$]./]
if use_charset? && !sign
index = @battler_index
frame = (index % 4 * poses.frames + poses.frame) * @frame_width
row = (index / 4 * 4 + poses.row) * @frame_height
else
frame = [[poses.frame, 0].max, frame_number - 1].min * @frame_width
row = [[poses.row, 0].max, row_number - 1].min * @frame_height
end
self.src_rect.set(frame, row, @frame_width, @frame_height)
end
#--------------------------------------------------------------------------
# * New method: update_pose
#--------------------------------------------------------------------------
def update_pose
poses.pose_list.update
end
#--------------------------------------------------------------------------
# * New method: reset_pose
#--------------------------------------------------------------------------
def reset_pose
next_pose = get_idle_pose
return if next_pose == poses.pose_list.name
reset_frame
poses.clear_loop
poses.call_pose(next_pose)
poses.pose_list.setup_all_poses
end
#--------------------------------------------------------------------------
# * New method: get_idle_pose
#--------------------------------------------------------------------------
def get_idle_pose
value = :idle
value = :danger if @battler.danger?
value = :guard if @battler.guard?
value = poses.state_pose if poses.state_pose?
value = poses.active_pose if poses.active_pose
value = poses.cast_pose if cast_pose?
value = :escaping if escaping? && @battler.actor?
value = :dead if @battler.dead?
value
end
#--------------------------------------------------------------------------
# * New method: cast_pose?
#--------------------------------------------------------------------------
def cast_pose?
$imported[:ve_active_time_battle] && @battler.cast_action &&
@battler.cast_action.item
end
#--------------------------------------------------------------------------
# * New method: escaping?
#--------------------------------------------------------------------------
def escaping?
$imported[:ve_active_time_battle] && BattleManager.escaping? &&
VE_ATB_ESCAPING_ANIM
end
#--------------------------------------------------------------------------
# * New method: setup_positions
#--------------------------------------------------------------------------
def setup_positions
positions = {x: @battler.screen_x, y: @battler.screen_y, h: 0, j: 0}
poses.target_position = positions.dup
poses.current_position = positions.dup
poses.jumping = {count: 0, height: 0, speed: 10}
@fast_collapse = true if @battler.dead? && @battler.collapse_type != 3
reset_pose
end
#--------------------------------------------------------------------------
# * New method: position
#--------------------------------------------------------------------------
def position
poses.current_position
end
#--------------------------------------------------------------------------
# * New method: update_position
#--------------------------------------------------------------------------
def update_position
update_misc
update_movement
update_jumping
self.x = position[:x] + adjust_x
self.y = position[:y] + adjust_y
self.z = [[self.y / (Graphics.height / 100.0), 1].max, 100].min
self.ox = @frame_width / 2
self.oy = @frame_height + position[:h] + position[:j]
@spin += 1 if Graphics.frame_count % 2 == 0
self.angle = poses.angle + poses.spin * @spin
update_ajust
update_icon
update_throw
end
#--------------------------------------------------------------------------
# * New method: update_movement
#--------------------------------------------------------------------------
def update_ajust
angle_move🙂x, sprite_value🙂ox)) if sprite_value🙂ox)
angle_move🙂y, sprite_value🙂oy)) if sprite_value🙂oy)
end
#--------------------------------------------------------------------------
# * New method: angle_move
#--------------------------------------------------------------------------
def angle_move(axis, amount)
a = (360 - angle) * Math:😛I / 180
cos = Math.cos(a)
sin = Math.sin(a)
self.ox += (axis == :x ? -cos : -sin) * amount
self.oy += (axis == :x ? sin : -cos) * amount
end
#--------------------------------------------------------------------------
# * New method: update_misc
#--------------------------------------------------------------------------
def update_misc
poses.update_shake
poses.update_freeze
end
#--------------------------------------------------------------------------
# * New method: adjust_x
#--------------------------------------------------------------------------
def adjust_x
poses.x_adj + [1, -1].random * rand(poses.shake + 1)
end
#--------------------------------------------------------------------------
# * New method: adjust_y
#--------------------------------------------------------------------------
def adjust_y
poses.y_adj + [1, -1].random * rand(poses.shake + 1)
end
#--------------------------------------------------------------------------
# * New method: update_movement
#--------------------------------------------------------------------------
def update_movement
return if poses.frozen? || !poses.moving?
poses.teleport ? update_teleport_movement : update_normal_movement
end
#--------------------------------------------------------------------------
# * New method: update_teleport_movement
#--------------------------------------------------------------------------
def update_teleport_movement
poses.current_position[:x] = poses.target_position[:x]
poses.current_position[:y] = poses.target_position[:y]
poses.current_position[:h] = [poses.target_position[:h], 0].max
poses.teleport = false
end
#--------------------------------------------------------------------------
# * New method: update_afterimage
#--------------------------------------------------------------------------
def update_afterimage
update_afterimage_sprites
setup_afterimage_sprites if poses.afterimage && @afterimage_wait <= 0
end
#--------------------------------------------------------------------------
# * New method: update_afterimage_sprites
#--------------------------------------------------------------------------
def update_afterimage_sprites
@afterimage_wait -= 1 if @afterimage_wait > 0
@afterimage_sprites.each do |sprite|
sprite.update
next if sprite.opacity > 0
sprite.dispose
@afterimage_sprites.delete(sprite)
end
end
#--------------------------------------------------------------------------
# * New method: setup_afterimage_sprites
#--------------------------------------------------------------------------
def setup_afterimage_sprites
@afterimage_sprites.push(Sprite_AfterImage.new(self))
@afterimage_wait = poses.afterimage[:wait]
end
#--------------------------------------------------------------------------
# * New method: update_normal_movement
#--------------------------------------------------------------------------
def update_normal_movement
distance = set_distance
move = {x: 1.0, y: 1.0, h: 1.0}
if distance[:x].abs < distance[:y].abs
move[:x] = 1.0 / (distance[:y].abs.to_f / distance[:x].abs)
elsif distance[:y].abs < distance[:x].abs
move[:y] = 1.0 / (distance[:x].abs.to_f / distance[:y].abs)
elsif distance[:h].abs < distance[:x].abs
move[:h] = 1.0 / (distance[:x].abs.to_f / distance[:h].abs)
end
speed = set_speed(distance)
x = move[:x] * speed[:x]
y = move[:y] * speed[:y]
h = move[:h] * speed[:h]
set_movement(x, y, h)
end
#--------------------------------------------------------------------------
# * New method: set_distance
#--------------------------------------------------------------------------
def set_distance
x = poses.target_distance🙂x)
y = poses.target_distance🙂y)
h = poses.target_distance🙂h)
{x: x, y: y, h: h}
end
#--------------------------------------------------------------------------
# * New method: set_speed
#--------------------------------------------------------------------------
def set_speed(distance)
move_speed = poses.move_speed
x = move_speed * (distance[:x] == 0 ? 0 : (distance[:x] > 0 ? 8 : -8))
y = move_speed * (distance[:y] == 0 ? 0 : (distance[:y] > 0 ? 8 : -8))
h = move_speed * (distance[:h] == 0 ? 0 : (distance[:h] > 0 ? 8 : -8))
{x: x, y: y, h: h}
end
#--------------------------------------------------------------------------
# * New method: set_movement
#--------------------------------------------------------------------------
def set_movement(x, y, h)
target = poses.target_position
current = poses.current_position
current[:x] += x
current[:y] += y
current[:h] += h
current[:x] = target[:x] if in_distance?(current[:x], target[:x], x)
current[:y] = target[:y] if in_distance?(current[:y], target[:y], y)
current[:h] = target[:h] if in_distance?(current[:h], target[:h], h)
reset_move if poses.reset_move && !poses.moving?
end
#--------------------------------------------------------------------------
# * New method: reset_move
#--------------------------------------------------------------------------
def reset_move
poses.reset_move = nil
poses.call_pose🙂reset, :clear)
poses.targets_direction
end
#--------------------------------------------------------------------------
# * New method: in_distance?
#--------------------------------------------------------------------------
def in_distance?(x, y, z)
x.between?(y - z - 1, y + z + 1)
end
#--------------------------------------------------------------------------
# * New method: update_jumping
#--------------------------------------------------------------------------
def update_jumping
return if poses.jumping[:count] == 0 || poses.frozen?
jump = poses.jumping
jump[:count] = [jump[:count] - (1 * jump[:speed] / 10.0), 0].max.to_f
count = jump[:count]
speed = jump[:speed]
peak = jump[:height]
result = (peak ** 2 - (count - peak).abs ** 2) / 2
poses.current_position[:j] = [result, 0].max
if poses.current_position[:j] == 0
jump[:count] = 0
reset_move if jump[:reset]
end
end
#--------------------------------------------------------------------------
# * New method: update_icon
#--------------------------------------------------------------------------
def update_icon
poses.icon_list.each do |key, value|
@icon_list[key] = Sprite_Icon.new(value) unless @icon_list[key]
@icon_list[key].refresh(value) if @icon_list[key].changed_icon?(value)
end
@icon_list.each do |key, value|
value.update
delete_icon(key) if value && !poses.icon_list[key]
end
end
#--------------------------------------------------------------------------
# * New method: update_throw
#--------------------------------------------------------------------------
def update_throw
poses.throw_list.each do |value|
@throw_list.push(Sprite_Throw.new(value))
poses.throw_list.delete(value)
end
@throw_list.each_with_index do |value, index|
value.update
delete_throw(index) if value.disposing?
end
@throw_list.compact!
end
#--------------------------------------------------------------------------
# * New method: delete_icon
#--------------------------------------------------------------------------
def delete_icon(key)
@icon_list[key].dispose
@icon_list.delete(key)
end
#--------------------------------------------------------------------------
# * New method: delete_throw
#--------------------------------------------------------------------------
def delete_throw(index)
@throw_list[index].dispose
@throw_list.delete_at(index)
end
#--------------------------------------------------------------------------
# * New method: throwing?
#--------------------------------------------------------------------------
def throwing?
@throw_list.any? {|value| value.target == @battler }
end
#--------------------------------------------------------------------------
# * New method: update_pose_loop
#--------------------------------------------------------------------------
def update_pose_loop
if poses.pose_loop && !loop_anim?🙂pose_anim)
@pose_name = poses.pose_name
animation = {type: 😛ose_anim, anim: poses.pose_loop, loop: 1}
add_loop_animation(animation)
end
if poses.pose_loop && loop_anim?🙂pose_anim) &&
@pose_name_list != poses.pose_name.first
@pose_loop = nil
poses.pose_loop = nil
end_loop_anim🙂pose_anim)
end
end
end

#==============================================================================
# ** Spriteset_Battle
#------------------------------------------------------------------------------
# This class brings together battle screen sprites. It's used within the
# Scene_Battle class.
#==============================================================================

class Spriteset_Battle
#--------------------------------------------------------------------------
# * Overwrite method: create_actors
#--------------------------------------------------------------------------
def create_actors
@actor_sprites = $game_party.battle_members.reverse.collect do |actor|
Sprite_Battler.new(@viewport1, actor)
end
@actors_party = $game_party.battle_members.dup
end
#--------------------------------------------------------------------------
# * Overwrite method: update_actors
#--------------------------------------------------------------------------
def update_actors
update_party if $game_party.battle_members != @actors_party
@actor_sprites.each {|sprite| sprite.update }
end
#--------------------------------------------------------------------------
# * Alias method: initialize
#--------------------------------------------------------------------------
alias :initialize_ve_animated_battle :initialize
def initialize
init_action_plane
initialize_ve_animated_battle
end
#--------------------------------------------------------------------------
# * Alias method: update
#--------------------------------------------------------------------------
alias :update_ve_animated_battle :update
def update
update_ve_animated_battle
update_action_plane
end
#--------------------------------------------------------------------------
# * Alias method: dispose
#--------------------------------------------------------------------------
alias :dispose_ve_animated_battle :dispose
def dispose
dispose_ve_animated_battle
dispose_action_plane
end
#--------------------------------------------------------------------------
# * Alias method: create_pictures
#--------------------------------------------------------------------------
alias :create_pictures_ve_animated_battle :create_pictures
def create_pictures
battler_sprites.each {|battler| battler.setup_positions }
create_pictures_ve_animated_battle
end
#--------------------------------------------------------------------------
# * Alias method: create_viewports
#--------------------------------------------------------------------------
alias :create_viewports_ve_animated_battle :create_viewports
def create_viewports
create_viewports_ve_animated_battle
@viewport4 = Viewport.new
@viewport4.z = 200
end
#--------------------------------------------------------------------------
# * Alias method: update_viewports
#--------------------------------------------------------------------------
alias :update_viewports_ve_animated_battle :update_viewports
def update_viewports
update_viewports_ve_animated_battle
@viewport1.ox = [1, -1].random * rand($game_troop.screen.shake)
@viewport1.oy = [1, -1].random * rand($game_troop.screen.shake)
@back1_sprite.tone.set($game_troop.screen.low_tone) if @back1_sprite
@back2_sprite.tone.set($game_troop.screen.low_tone) if @back2_sprite
@viewport4.tone.set($game_troop.screen.high_tone)
end
#--------------------------------------------------------------------------
# * New method: update_party
#--------------------------------------------------------------------------
def update_party
@actor_sprites.each_index do |i|
next if $game_party.battle_members.include?(@actor_sprites.battler)
@actor_sprites.dispose
@actor_sprites = nil
end
$game_party.battle_members.collect do |actor|
next if @actors_party.include?(actor)
@actor_sprites.push(Sprite_Battler.new(@viewport1, actor))
end
@actor_sprites.compact!
@actors_party = $game_party.battle_members.dup
end
#--------------------------------------------------------------------------
# * New method: collapse?
#--------------------------------------------------------------------------
def collapse?
battler_sprites.compact.any? {|sprite| sprite.collapse? }
end
#--------------------------------------------------------------------------
# * New method: init_action_plane
#--------------------------------------------------------------------------
def init_action_plane
@action_plane = Plane_ActionPlane.new(@viewport1)
end
#--------------------------------------------------------------------------
# * New method: update_action_plane
#--------------------------------------------------------------------------
def update_action_plane
@action_plane.update
end
#--------------------------------------------------------------------------
# * New method: dispose_action_plane
#--------------------------------------------------------------------------
def dispose_action_plane
@action_plane.dispose
end
#--------------------------------------------------------------------------
# * New method: action_plane
#--------------------------------------------------------------------------
def action_plane(name, x, y, z, zx, zy, opacity, blend, duration)
@action_plane.setup(name, x, y, z, zx, zy, opacity, blend, duration)
end
#--------------------------------------------------------------------------
# * New method: delete_plane
#--------------------------------------------------------------------------
def delete_plane(duration)
@action_plane.delete(duration)
end
end

#==============================================================================
# ** Window_BattleLog
#------------------------------------------------------------------------------
# This window shows the battle progress. Do not show the window frame.
#==============================================================================

class Window_BattleLog < Window_Selectable
#--------------------------------------------------------------------------
# * Overwrite method: wait_and_clear
#--------------------------------------------------------------------------
def wait_and_clear
end
#--------------------------------------------------------------------------
# * Overwrite method: wait
#--------------------------------------------------------------------------
def wait
end
#--------------------------------------------------------------------------
# * Overwrite method: back_to
#--------------------------------------------------------------------------
def back_to(line_number)
end
#--------------------------------------------------------------------------
# * Overwrite method: back_one
#--------------------------------------------------------------------------
def back_one
return unless last_text.empty?
@lines.pop
refresh
end
#--------------------------------------------------------------------------
# * Overwrite method: display_added_states
#--------------------------------------------------------------------------
def display_added_states(target)
target.result.added_state_objects.each do |state|
state_msg = target.actor? ? state.message1 : state.message2
next if state_msg.empty?
replace_text(target.name + state_msg)
end
end
#--------------------------------------------------------------------------
# * Alias method: wait_and_clear
#--------------------------------------------------------------------------
alias :add_text_ve_animated_battle :add_text
def add_text(text)
skip_second_line while @lines.size > max_line_number
add_text_ve_animated_battle(text)
end
#--------------------------------------------------------------------------
# * New method: skip_second_line
#--------------------------------------------------------------------------
def skip_second_line
first_line = @lines.shift
@lines.shift
@lines.unshift(first_line)
end
#--------------------------------------------------------------------------
# * New method: wait_message_end
#--------------------------------------------------------------------------
def wait_message_end
@method_wait.call(message_speed) if @method_wait && line_number > 0
clear
end
end

#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
# This class performs battle screen processing.
#==============================================================================

class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# * Overwrite method: abs_wait_short
#--------------------------------------------------------------------------
def abs_wait_short
update_for_wait
end
#--------------------------------------------------------------------------
# * Overwrite method: apply_item_effects
#--------------------------------------------------------------------------
def apply_item_effects(target, item)
target.item_apply(@subject, item)
refresh_status
@log_window.display_action_results(target, item)
end
#--------------------------------------------------------------------------
# * Overwrite method: execute_action
#--------------------------------------------------------------------------
def execute_action
@subject.poses.activate
use_item
end
#--------------------------------------------------------------------------
# * Overwrite method: use_item
#--------------------------------------------------------------------------
def use_item
item = @subject.current_action.item
@log_window.display_use_item(@subject, item)
@subject.poses.action_pose(item)
@subject.use_item(item)
refresh_status
end
#--------------------------------------------------------------------------
# * Overwrite method: show_animation
#--------------------------------------------------------------------------
def show_animation(targets, animation_id)
if animation_id < 0
show_animated_battle_attack_animation(targets)
else
show_normal_animation(targets, animation_id)
end
end
#--------------------------------------------------------------------------
# * Overwrite method: invoke_counter_attack
#--------------------------------------------------------------------------
def invoke_counter_attack(target, item)
if target == @subject || target.poses.counter_on
return if retaliation_counter?(target, item)
target.counter = false if $imported[:ve_damage_pop]
apply_item_effects(apply_substitute(target, item), item)
return
end
target.poses.setup_counter(@subject, item)
@counter_flag.push(target)
end
#--------------------------------------------------------------------------
# * New method: retaliation_counter?(target, item)
#--------------------------------------------------------------------------
def retaliation_counter?(target, item)
$imported[:ve_retaliation_damage] && damage_on_counter?(target, item)
end
#--------------------------------------------------------------------------
# * Overwrite method: invoke_magic_reflection
#--------------------------------------------------------------------------
def invoke_magic_reflection(target, item)
if target == @subject
target.reflect = false if $imported[:ve_damage_pop]
apply_item_effects(apply_substitute(target, item), item)
return
end
@subject.poses.setup_reflect(item)
@reflect_flag.push(target)
end
#--------------------------------------------------------------------------
# * Overwrite method: apply_substitute
#--------------------------------------------------------------------------
def apply_substitute(target, item)
if check_substitute(target, item)
substitute = target.friends_unit.substitute_battler
if substitute && target != substitute
@substitution = {target: target, substitute: substitute}
substitute.poses.setup_substitute(target)
return substitute
end
end
target
end
#--------------------------------------------------------------------------
# * Alias method: create_spriteset
#--------------------------------------------------------------------------
alias :create_spriteset_ve_animated_battle :create_spriteset
def create_spriteset
create_spriteset_ve_animated_battle
setup_spriteset
end
#--------------------------------------------------------------------------
# * Alias method: update_basic
#--------------------------------------------------------------------------
alias :update_basic_ve_animated_battle :update_basic
def update_basic
update_basic_ve_animated_battle
update_sprite_action
end
#--------------------------------------------------------------------------
# * Alias method: process_action
#--------------------------------------------------------------------------
alias 😛rocess_action_ve_animated_battle 😛rocess_action
def process_action
return if active?
process_action_ve_animated_battle
end
#--------------------------------------------------------------------------
# * Alias method: turn_end
#--------------------------------------------------------------------------
alias :turn_end_ve_animated_battle :turn_end
def turn_end
turn_end_ve_animated_battle
@spriteset.battler_sprites.each {|sprite| sprite.reset_pose }
end
#--------------------------------------------------------------------------
# * Alias method: next_command
#--------------------------------------------------------------------------
alias :next_command_ve_animated_battle :next_command
def next_command
previous = BattleManager.actor
BattleManager.actor.input_pose if BattleManager.actor
next_command_ve_animated_battle
previous.poses.set_active_pose if previous
BattleManager.actor.command_pose if BattleManager.actor
end
#--------------------------------------------------------------------------
# * Alias method: prior_command
#--------------------------------------------------------------------------
alias 😛rior_command_ve_animated_battle 😛rior_command
def prior_command
BattleManager.actor.cancel_pose if BattleManager.actor
prior_command_ve_animated_battle
BattleManager.clear_active_pose
BattleManager.actor.command_pose if BattleManager.actor
end
#--------------------------------------------------------------------------
# * New method: close_window
#--------------------------------------------------------------------------
def close_window
abs_wait(10)
update_for_wait while @message_window.openness > 0
$game_message.clear
end
#--------------------------------------------------------------------------
# * New method: setup_spriteset
#--------------------------------------------------------------------------
def setup_spriteset
all_battle_members.each {|member| member.poses.default_direction }
BattleManager.all_movable_members.each do |member|
next if $game_system.no_intro || !member.intro_pose?
member.poses.call_pose🙂intro, :clear)
end
2.times { @spriteset.update }
end
#--------------------------------------------------------------------------
# * New method: log_window_wait?
#--------------------------------------------------------------------------
def log_window_wait?
@log_window.line_number > 0
end
#--------------------------------------------------------------------------
# * New method: log_window_clear
#--------------------------------------------------------------------------
def log_window_clear
@log_window.clear
end
#--------------------------------------------------------------------------
# * New method: show_animated_battle_attack_animation
#--------------------------------------------------------------------------
def show_animated_battle_attack_animation(targets)
if @subject.actor? || $imported[:ve_actor_battlers]
show_normal_animation(targets, @subject.atk_animation_id1, false)
else
Sound.play_enemy_attack
abs_wait_short
end
end
#--------------------------------------------------------------------------
# * New method: next_subject?
#--------------------------------------------------------------------------
def next_subject?
!@subject || [email protected]_action
end
#--------------------------------------------------------------------------
# * New method: active?
#--------------------------------------------------------------------------
def active?
all_battle_members.any? {|member| member.poses.active? }
end
#--------------------------------------------------------------------------
# * New method: active
#--------------------------------------------------------------------------
def active
all_battle_members.select {|member| member.poses.active? }.first
end
#--------------------------------------------------------------------------
# * New method: update_sprite_action
#--------------------------------------------------------------------------
def update_sprite_action
@old_subject = @subject
all_battle_members.each do |subject|
@subject = subject
call_animation if @subject.poses.call_anim
call_effect if @subject.poses.call_effect
call_end if @subject.poses.call_end
end
@subject = @old_subject
end
#--------------------------------------------------------------------------
# * New method: call_animation
#--------------------------------------------------------------------------
def call_animation
@subject.poses.call_anim = false
animation = @subject.poses.animation
targets = @subject.poses.anim_targets.dup
@subject.poses.animation = 0
@subject.poses.anim_targets.clear
show_animation(targets, animation)
end
#--------------------------------------------------------------------------
# * New method: call_effect
#--------------------------------------------------------------------------
def call_effect
@counter_flag = []
@reflect_flag = []
@substitution = nil
@subject.poses.call_effect = false
targets = @subject.poses.targets.dup
item = @subject.poses.current_item
@subject.poses.targets.clear
targets.each {|target| item.repeats.times { invoke_item(target, item) } }
@counter_flag.each {|target| @log_window.display_counter(target, item) }
@reflect_flag.each {|target| @log_window.display_reflection(target, item) }
if @substitution
substitute = @substitution[:substitute]
target = @substitution[:target]
@log_window.display_substitute(substitute, target)
end
end
#--------------------------------------------------------------------------
# * New method: call_end
#--------------------------------------------------------------------------
def call_end
@subject.poses.call_end = false
process_action_end if @subject.alive? && @old_subject == @subject
@log_window.wait_message_end
end
end

#==============================================================================
# ** Sprite_AfterImag
#------------------------------------------------------------------------------
# This sprite is used to display battlers afterimages.
#==============================================================================

class Sprite_AfterImage < Sprite_Battler
#--------------------------------------------------------------------------
# * New method: initialize
#--------------------------------------------------------------------------
def initialize(sprite)
info = sprite.battler.poses.afterimage
@afterimage_opacity = [info[😮pacity], sprite.opacity].min
@afterimage_fade = info[:fade]
@afterimage_color = info[:color]
@afterimage_blend = info[:blend]
@original_battler = sprite.battler
@battler_icons = @original_battler.poses.icon_list.dup
@poses = @original_battler.poses.clone
super(sprite.viewport, @original_battler.dup)
update_icon
end
#--------------------------------------------------------------------------
# * New method: poses
#--------------------------------------------------------------------------
def poses
@poses
end
#--------------------------------------------------------------------------
# * New method: update
#--------------------------------------------------------------------------
def update
super
self.color.set(*@afterimage_color)
self.blend_type = @afterimage_blend
self.opacity = @afterimage_opacity
@afterimage_opacity -= @afterimage_fade
update_icon
end
#--------------------------------------------------------------------------
# * New method: init_bitmap
#--------------------------------------------------------------------------
def init_bitmap
self.bitmap = setup_bitmap_sprite.clone
end
#--------------------------------------------------------------------------
# * New method: setup_positions
#--------------------------------------------------------------------------
def setup_positions
poses.current_position = @original_battler.poses.current_position.dup
poses.target_position = poses.current_position
@sufix = poses.sufix = @original_battler.poses.sufix
@frame = poses.frame = @original_battler.poses.frame
@direction = poses.direction = @original_battler.poses.direction
poses.jumping = {count: 0, height: 0, speed: 10}
end
#--------------------------------------------------------------------------
# * New method: update_icon
#--------------------------------------------------------------------------
def update_icon
@battler_icons.each do |key, value|
@icon_list[key] = Sprite_Icon.new(value) unless @icon_list[key]
@icon_list[key].refresh(value) if @icon_list[key].changed_icon?(value)
end
@icon_list.each do |key, value|
value.update
value.opacity = self.opacity
value.blend_type = self.blend_type
value.color.set(*@afterimage_color)
delete_icon(key) if value && !@battler_icons[key]
end
end
#--------------------------------------------------------------------------
# * New method: update_pose
#--------------------------------------------------------------------------
def update_pose
end
#--------------------------------------------------------------------------
# * New method: update_afterimage
#--------------------------------------------------------------------------
def update_afterimage
end
end

#==============================================================================
# ** Sprite_IconBase
#------------------------------------------------------------------------------
# This the base sprite used to display icons and throw animations.
#==============================================================================

class Sprite_IconBase < Sprite_Base
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :data
attr_reader :user
attr_reader :icon
attr_reader :value
attr_reader :target
#--------------------------------------------------------------------------
# * New method: initialize
#--------------------------------------------------------------------------
def initialize(viewport)
super(viewport)
@right = user.right?
@left = user.left?
@down = user.down?
@up = user.up?
@spin = 0
@zooming = 0
@fade_in = 0
@fade_out = 0
self.zoom_x = @Data[:izm]
self.zoom_y = @Data[:izm]
end
#--------------------------------------------------------------------------
# * New method: refresh
#--------------------------------------------------------------------------
def refresh(value)
@User = value.user
@target = value.target
@icon = value.icon
@Data = value.data.dup
end
#--------------------------------------------------------------------------
# * New method: changed_icon?
#--------------------------------------------------------------------------
def changed_icon?(value)
@User != value.user || @target != value.target || @icon != value.icon ||
@Data != value.data
end
#--------------------------------------------------------------------------
# * New method: update
#--------------------------------------------------------------------------
def update
super
update_zoom
update_angle
update_opacity
update_position
end
#--------------------------------------------------------------------------
# * New method: update_opacity
#--------------------------------------------------------------------------
def update_opacity
if @Data[:fin] > 0
@fade_in += 1
self.opacity = [@fade_in * @Data[:fin], @Data[😮]].min
elsif @Data[:fout] > 0
@fade_out += 1
self.opacity = [@data[😮] - @fade_out * @Data[:fin], 0].max
else
self.opacity = @Data[😮]
end
end
#--------------------------------------------------------------------------
# * New method: update_angle
#--------------------------------------------------------------------------
def update_angle
@spin += 1 if Graphics.frame_count % 2 == 0
self.angle = @Data[:a] + @Data[:spin] * @spin
self.angle *= -1 if @right
self.angle -= 90 if @up
self.angle += 90 if @down
self.angle = 360 + self.angle if self.angle < 0
end
#--------------------------------------------------------------------------
# * New method: update_zoom
#--------------------------------------------------------------------------
def update_zoom
if self.zoom_x < @Data[:ezm]
@zooming += 1
self.zoom_x = [@data[:izm] + @zooming * @Data[:szm], @Data[:ezm]].min
self.zoom_y = [@data[:izm] + @zooming * @Data[:szm], @Data[:ezm]].min
elsif self.zoom_x > @Data[:ezm]
@zooming += 1
self.zoom_x = [@data[:izm] - @zooming * @Data[:szm], @Data[:ezm]].max
self.zoom_y = [@data[:izm] - @zooming * @Data[:szm], @Data[:ezm]].max
end
end
#--------------------------------------------------------------------------
# * New method: setup_icon
#--------------------------------------------------------------------------
def setup_icon
@current_icon = @icon
if @icon.string?
self.bitmap = Cache.picture(icon)
self.src_rect.set(0, 0, bitmap.width, bitmap.height)
@icon_ox = bitmap.width / 2
@icon_oy = bitmap.height / 2
else
self.bitmap = Cache.system("Iconset")
size = bitmap.width / 16
self.src_rect.set(icon % 16 * size, icon / 16 * size, size, size)
@icon_ox = size / 2
@icon_oy = size / 2
end
end
end

#==============================================================================
# ** Sprite_Icon
#------------------------------------------------------------------------------
# This sprite is used to display icons.
#==============================================================================

class Sprite_Icon < Sprite_IconBase
#--------------------------------------------------------------------------
# * New method: initialize
#--------------------------------------------------------------------------
def initialize(value)
refresh(value)
super(target.sprite.viewport)
setup_icon
end
#--------------------------------------------------------------------------
# * New method: update_position
#--------------------------------------------------------------------------
def update_position
setup_icon if @current_icon != @icon
self.x = user.sprite.x
self.y = user.sprite.y - 1
self.z = user.sprite.z + (@Data[:above] ? 1 : 0)
self.ox = @icon_ox
self.oy = @icon_oy
self.mirror = @right
update_movement
end
#--------------------------------------------------------------------------
# * New method: update_movement
#--------------------------------------------------------------------------
def update_movement
if @right || @left
angle_move🙂x, (@right ? adjust_x : -adjust_x))
angle_move🙂y, adjust_y)
elsif @up || @down
angle_move🙂x, (@down ? adjust_y : -adjust_y))
angle_move🙂y, (@down ? adjust_x : -adjust_x) - 8)
end
end
#--------------------------------------------------------------------------
# * New method: angle_move
#--------------------------------------------------------------------------
def angle_move(axis, amount)
a = (360 - angle) * Math:😛I / 180
cos = Math.cos(a)
sin = Math.sin(a)
self.ox += (axis == :x ? -cos : -sin) * amount
self.oy += (axis == :x ? sin : -cos) * amount
end
#--------------------------------------------------------------------------
# * New method: adjust_x
#--------------------------------------------------------------------------
def adjust_x
user.sprite.ox / 2 - @Data[:x]
end
#--------------------------------------------------------------------------
# * New method: adjust_y
#--------------------------------------------------------------------------
def adjust_y
@Data[:y] - (position[:h] + position[:j] + user.sprite.oy) / 2
end
#--------------------------------------------------------------------------
# * New method: position
#--------------------------------------------------------------------------
def position
user.sprite.position
end
end

#==============================================================================
# ** Sprite_Throw
#------------------------------------------------------------------------------
# This sprite is used to display throw animations.
#==============================================================================

class Sprite_Throw < Sprite_IconBase
#--------------------------------------------------------------------------
# * New method: initialize
#--------------------------------------------------------------------------
def initialize(value)
refresh(value)
super(target.sprite.viewport)
setup_throw
end
#--------------------------------------------------------------------------
# * New method: setup_throw
#--------------------------------------------------------------------------
def setup_throw
set_initial_position
setup_arc
setup_icon
setup_animation if $imported[:ve_loop_animation] && @Data[:anim]
end
#--------------------------------------------------------------------------
# * New method: set_initial_position
#--------------------------------------------------------------------------
def set_initial_position
value = set_initial_values(user, target)
value = set_initial_values(target, user) if @Data[:return]
@current_position[:x] += @Data[:init_x] + value[:init_ox]
@current_position[:y] += @Data[:init_y] + value[:init_oy]
@target_position[:x] += @Data[:end_x] + value[:end_ox]
@target_position[:y] += @Data[:end_y] + value[:end_oy]
@initial_position = @current_position.dup
end
#--------------------------------------------------------------------------
# * New method: set_initial_values
#--------------------------------------------------------------------------
def set_initial_values(battler1, battler2)
@current_position = battler1.sprite.position.dup
@target_position = battler2.sprite.position.dup
x1 = battler1.right? ? -@data[:init_x] : @Data[:init_x]
y1 = battler1.up? ? -@data[:init_x] : @Data[:init_x]
x2 = battler2.right? ? -@data[:end_x] : @Data[:end_x]
y2 = battler2.up? ? -@data[:end_y] : @Data[:end_y]
{init_ox: x1, init_oy: y1, end_ox: x2, end_oy: y2}
end
#--------------------------------------------------------------------------
# * New method: setup_arc
#--------------------------------------------------------------------------
def setup_arc
@Arc = {}
x_plus = (target_distance🙂x) / 32.0).abs
y_plus = (target_distance🙂y) / 32.0).abs
speed = Math.sqrt((x_plus ** 2) + (y_plus ** 2)) / @Data[:speed]
@Arc[:speed] = @Data[:arc] * 5.0 / [speed, 1].max
@Arc[:height] = @Data[:arc]
@Arc[:count] = @Data[:arc] * 2
@current_position[:a] = 0
end
#--------------------------------------------------------------------------
# * New method: setup_icon
#--------------------------------------------------------------------------
def setup_icon
super
self.angle = @Data[:a]
end
#--------------------------------------------------------------------------
# * New method: setup_animation
#--------------------------------------------------------------------------
def setup_animation
animation = {type: :throw, anim: @Data[:anim], loop: 1}
add_loop_animation(animation)
end
#--------------------------------------------------------------------------
# * New method: update
#--------------------------------------------------------------------------
def update
super
update_move
update_arc
end
#--------------------------------------------------------------------------
# * New method: update_move
#--------------------------------------------------------------------------
def update_move
distance = set_distance
move = {x: 1.0, y: 1.0}
if distance[:x].abs < distance[:y].abs
move[:x] = 1.0 / (distance[:y].abs.to_f / distance[:x].abs)
elsif distance[:y].abs < distance[:x].abs
move[:y] = 1.0 / (distance[:x].abs.to_f / distance[:y].abs)
end
speed = set_speed(distance)
x = move[:x] * speed[:x]
y = move[:y] * speed[:y]
set_movement(x, y)
end
#--------------------------------------------------------------------------
# * New method: set_distance
#--------------------------------------------------------------------------
def set_distance
{x: target_distance🙂x), y: target_distance🙂y)}
end
#--------------------------------------------------------------------------
# * New method: target_distance
#--------------------------------------------------------------------------
def target_distance(symbol)
@target_position[symbol] - @current_position[symbol]
end
#--------------------------------------------------------------------------
# * New method: set_speed
#--------------------------------------------------------------------------
def set_speed(distance)
x = @Data[:speed] * (distance[:x] == 0 ? 0 : (distance[:x] > 0 ? 8 : -8))
y = @Data[:speed] * (distance[:y] == 0 ? 0 : (distance[:y] > 0 ? 8 : -8))
{x: x, y: y}
end
#--------------------------------------------------------------------------
# * New method: set_movement
#--------------------------------------------------------------------------
def set_movement(x, y)
target = @target_position
current = @current_position
current[:x] += x
current[:y] += y
current[:x] = target[:x] if in_distance?(current[:x], target[:x], x)
current[:y] = target[:y] if in_distance?(current[:y], target[:y], y)
end
#--------------------------------------------------------------------------
# * New method: in_distance?
#--------------------------------------------------------------------------
def in_distance?(x, y, z)
x.between?(y - z - 1, y + z + 1)
end
#--------------------------------------------------------------------------
# * New method: update_arc
#--------------------------------------------------------------------------
def update_arc
return if @Arc[:count] == 0
@Arc[:count] = [@arc[:count] - (1 * @Arc[:speed] / 10.0), 0].max.to_f
count = @Arc[:count]
speed = @Arc[:speed]
peak = @Arc[:height]
result = (peak ** 2 - (count - peak).abs ** 2) / 2
@current_position[:a] = @Data[:revert] ? -result : result
end
#--------------------------------------------------------------------------
# * New method: update_position
#--------------------------------------------------------------------------
def update_position
setup_icon if @current_icon != @icon
self.x = current[:x]
self.y = current[:y] - current[:h] - current[:a]
self.z = [target.sprite.z, user.sprite.z].max
self.ox = @icon_ox
self.oy = @icon_oy
self.mirror = @right || @up
end
#--------------------------------------------------------------------------
# * New method: current
#--------------------------------------------------------------------------
def current
@current_position
end
#--------------------------------------------------------------------------
# * New method: disposing?
#--------------------------------------------------------------------------
def disposing?
current[:x] == @target_position[:x] && current[:y] == @target_position[:y]
end
end

#==============================================================================
# ** Plane_ActionPlane
#------------------------------------------------------------------------------
# This is the plane used to display action plane images
#==============================================================================

class Plane_ActionPlane < Plane
#--------------------------------------------------------------------------
# * New method: initialize
#--------------------------------------------------------------------------
def initialize(viewport)
super(viewport)
@settings = {x: 0, y: 0, opacity: 0, zoom_x: 1.0, zoom_y: 1.0}
@duration = 1
end
#--------------------------------------------------------------------------
# * New method: dispose
#--------------------------------------------------------------------------
def dispose
bitmap.dispose if bitmap
super
end
#--------------------------------------------------------------------------
# * New method: setup
#--------------------------------------------------------------------------
def setup(name, x, y, z, zoom_x, zoom_y, opacity, blend, duration)
self.bitmap = Cache.picture(name)
self.z = z
@settings[:x] = x
@settings[:y] = y
@settings[:zoom_x] = zoom_x / 100.0
@settings[:zoom_y] = zoom_y / 100.0
@settings[😮pacity] = opacity
@blend_type = blend
@DELETE = false
@duration = [duration, 1].max
end
#--------------------------------------------------------------------------
# * New method: delete
#--------------------------------------------------------------------------
def delete(duration = 60)
@settings[😮pacity] = 0
@duration = [duration, 1].max
@DELETE = true
end
#--------------------------------------------------------------------------
# * New method: value
#--------------------------------------------------------------------------
def value
@settings
end
#--------------------------------------------------------------------------
# * New method: update
#--------------------------------------------------------------------------
def update
update_position
update_opacity
update_zoom
update_delete
@duration -= 1 if @duration > 0
end
#--------------------------------------------------------------------------
# * New method: update_position
#--------------------------------------------------------------------------
def update_position
self.ox += value[:x]
self.oy += value[:y]
end
#--------------------------------------------------------------------------
# * New method: update_opacity
#--------------------------------------------------------------------------
def update_opacity
return if @duration == 0
d = @duration
self.opacity = (self.opacity * (d - 1) + value[😮pacity]) / d
end
#--------------------------------------------------------------------------
# * New method: update_zoom
#--------------------------------------------------------------------------
def update_zoom
return if @duration == 0
d = @duration
self.zoom_x = (self.zoom_x * (d - 1) + value[:zoom_x]) / d
self.zoom_y = (self.zoom_y * (d - 1) + value[:zoom_y]) / d
end
#--------------------------------------------------------------------------
# * New method: update_delete
#--------------------------------------------------------------------------
def update_delete
return if !@delete || @duration > 0
self.bitmap.dispose
self.bitmap = nil
@settings = {x: 0, y: 0, opacity: 0, zoom_x: 100.0, zoon_y: 100.0}
@blend_type = 0
@DELETE = false
end
end

Im not exactly sure what to change when going in here however.
Perhaps playing with the values defined in the frame_number and row_number methods might help you change the way they're displayed in battle. I haven't tested it because I've got no spare time to do it myself but probably you'd need to add another condition there that represent the frames and rows you actually need for your battlers.
wow youre literally a genius. I just went in and changed the return values to 8 and 14 and it worked perfectly.
thank you so much.

Original thread: https://forums.rpgmakerweb.com/threads/victor-engine-state-graphics-holders-animated-battlers-issue.125313/