Joined
Jan 25, 2022
Messages
76
Reaction score
65
First Language
English
Primarily Uses
RMVXA
This is probably a big request, but I'm not experienced with scripting, and figured I'd post this here to see if anyone would be willing to help or give advice.

Anyway, I'm using Galv's Animated Battlers to add animations to my side-view battle system. However, there are a few things I need it to do that the script doesn't have support for.
  1. When an Actor takes an Action, I want them to first walk a few steps forward, playing a walking animation. Then play the animation for certain Actions (swing weapon for attacks, cast magic spells, etc.), and not for others (Taking damage, K.O.'d, etc.) After, they'd walk backward, returning to their place.

  2. I need a way to change the Actors' spritesheet in-game. This is so I can implement visually distinct animations for each weapon type in the game. So instead of using a generic 'Swing' animation, the attack animation will properly reflect whether the Actor is using a Sword, Whip, Staff, etc. Perhaps by using notetags. Ideally, it would allow for different sprites/animations based on the weapon itself (displaying a unique graphic for each weapon in the database). The biggest hurtle would being able for this system to differentiate between which actor is using the weapon.
Alternatively, if anyone already knows of a script that includes these features in addition to the ones in Galv's script, I'd be glad to check it out.

Here is a simple visual aide:
battle_2.png
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
4,478
Reaction score
1,248
First Language
English
Primarily Uses
RMVXA
Took a quick look. From what I see (and I may misunderstand the script)
Your request may require a complete rewrite of the script.
It has a method called perform_travel where is saves the target and further down is update_move_forward which gets the difference from your battler and the enemy.
So everything is setup to move the battlers to the enemy, unless it's a range skill or weapon.

What you're asking though I can do with Victor Sant Animated Battlers + Actor Battlers.
There are others as well
Reedo's sideview battle system for one
Can't find the others anymore.
 
Joined
Jan 25, 2022
Messages
76
Reaction score
65
First Language
English
Primarily Uses
RMVXA
Took a quick look. From what I see (and I may misunderstand the script)
Your request may require a complete rewrite of the script.
It has a method called perform_travel where is saves the target and further down is update_move_forward which gets the difference from your battler and the enemy.
So everything is setup to move the battlers to the enemy, unless it's a range skill or weapon.

What you're asking though I can do with Victor Sant Animated Battlers + Actor Battlers.
There are others as well
Reedo's sideview battle system for one
Can't find the others anymore.
I had looked at and was pleased with Victor's script. However, I use several Yanfly scripts including Ace Core Engine. I'm wary of it being too much of a pain to have to switch over.

Before Galv's, I was using Yanfly's Visual Battlers, though it was pretty basic. Would that one be out of the picture? I can imagine a lot would need to be written for it to work.

Edit: Just looked at Reedo's script. All I could find that still had it was this thread. Unless something's messed up on my end, the script was all compressed together in the post like this:

################################################################################# RSSBSACE - Reedo's Simple Side Battle System (for VX ACE)## Version 1.7b## September 30, 2013## By Reedo################################################################################# REFERENCES#### None. This is an original script by Reedo.################################################################################# FEATURES#### + Draw the party on the right side of the screen, facing left, using the actor graphic specified in the database and in a formation fitting the Ace battle background layout.## + Place a shadow on the ground beneath living actors.## + Show the actor's stepping animation on their turn and when acting if able to take actions.## + Make the actor step toward the enemy when taking an action other than guarding.## + Show animations for all actor actions as defined in the database for the particular action being performed.## + Show animations for all enemy actions as defined in the database, or a default animation if none is defined (e.g. normal attack)## + Flash the actor red when they successfully receive a hostile action.## + Show dead actors as faded, whitened, and rotated to lay on their back.## + Make living actors perform a "victory dance" when the battle ends (they jump and spin).## + Optionally "mirror" enemy images to make them face to the right.## = Version 1.2 =## + Actors step back when guarding.## + Actors start facing backward and jump when surprised.## + Actors start facing down and flashing white on preemptive strike.## = Version 1.4 =## + Actors turn and move half a step to the right when attempting to flee.## = Version 1.6 =## + Show weapon or skill icon as moving (swinging, punching or pulsing) graphic during actions.## (by popular demand!)## + Now compatible with "battle test" from within the database.## = Version 1.7 =## + Additional options for weapon icon movement by weapon type.## + Corrected animations to only play on RSSBS visual battlers.## + Corrected bug on escape (caught by Macatlas - thanks!).## + Corrected bug on no weapon equipped (caught by comprisedpuma).################################################################################### COMPATIBILITY#### Should be compatible with most other scripts.#### OVERWRITES (1)## Spriteset_Battle.update_actors#### STATE CHANGES (1)## Map scroll position (display_x, display_y) is stored and set to 0,0 when## battle begins, and then is restored when battle ends.################################################################################# REQUIREMENTS#### None for installation and operation.#### However, enemy troops will need to be repositioned manually in the database## editor. This script may work best with all custom enemy images designed for## side-battle view.################################################################################# INSTALLATION#### Plug-and-play.#### Insert below Materials, above other add-on scripts.################################################################################# RIGHTS & RESTRICTIONS#### As with most Reedo scripts, this script is free to re-use, as-is, ## in personal, educational, and commercial RPGVX Ace development projects, ## providing that: this script is credited in writing displayed readily ## to the user of the final compiled code assembly.#### Reedo retains all rights of intellect and ownership.## You forego all rights of warranty by utilizing this script.################################################################################################################################################################ USER OPTIONS###############################################################################module REEDO_SBS ACTOR_START_TOP = 6.2 # Top position (in tiles) for first actor in party ACTOR_START_LEFT = 14.5 # Left position (in tiles) for first actor in party ACTOR_STAGGER = true # Enables staggered layout. Set false and chance start left to 12 for angled line. ACTOR_STAGGER_HORZ = 1.0 # The amount to recess each actor to the right (in tiles) ACTOR_STAGGER_VERT = 0.5 # The vertical spacing between characters (in tiles) ACTOR_STEPS_IN_OUT = 10 # The number of steps to take when moving to attack ACTOR_STEP_DISTANCE = 0.1 # The distance to move with each step (in tiles) ACTOR_DEATH_OPACITY = 125 # Transparency of dead actors ACTOR_DEATH_TONE = Tone.new(128, 128, 128, 0) # Overlay color of dead actors ACTOR_DEATH_ANGLE = 270 # Rotation angle of dead actor sprite ACTOR_DEATH_OFFSET_X = -0.6 # Offset in tiles for dead actors ACTOR_DEATH_OFFSET_Y = -0.2 # Offset in tiles for dead actors VICTORY_DANCE_ENABLED = true # Actors spin and jump on victory if alive and movable VICTORY_DANCE_JUMP_HEIGHT = 1.3 # The number of tiles an actor moves upward VICTORY_DANCE_JUMP_HOVER = 4 # The number of frames to wait in the air VICTORY_DANCE_JUMP_WAIT = 70 # The number of frames before jumping again ACTOR_SHADOW_IMAGE = "Shadow" # The name of the system image to use ACTOR_SHADOW_CUSTOM_PICTURE = nil # The name of a resource picture to use instead; nil to use system image PREEMPTIVE_TIME = 120 # The number of frames to flash white on preemptive strike SURPRISE_TIME = 90 # The number of frames to jump facing backward on surprise DAMAGE_RED_TIME = 15 # Number of frames actor turns red when damaged ATTACK_SKILL_ID = 1 # The Id in the database for the skill used as the default attack ENEMY_DEFAULT_ATTACK = 7 # AnimationId for enemy actions with no animation ACTION_SPRITE_INCREMENT = 5 # The amount of movement for swinging or pulsing action icons UNARMED_ICON = 175 # The icon to use if the actor has no weapon equipped. UNARMED_STYLE = 2 # The style to use when there is no weapon equipped. PUNCH_SPEED = 0.4 PUNCH_DISTANCE = 32 PULSE_WEAPON_TYPES = [] # Weapons with these weapon type ids will pulse like items or skills NO_MOVE_WEAPON_TYPES = [] # Weapons with these weapon type ids will show without moving PUNCH_WEAPON_TYPES = [2, 6, 10] # Weapons with these weapon type ids will move toward the enemy and back # All other weapon type ids will swing # Specify the ID of enemies who should have their image flipped in battle FLIP_ENEMY = [ 2, 3, 4, 5, 8, 10, 12, 13, 14, 16, 17, 18, 19, 21, 22, 23, 25, 28, 29, ] FORCE_AUTOTILE_BACKGROUND = true # attempt to use tile-based background on all mapsend################################################################################# MAIN SCRIPT################################################################################# EDITS BEYOND THIS POINT ARE AT YOUR OWN RISK!!!###############################################################################module BattleManager class << self alias reedo_sbs_bm_process_victory process_victory alias reedo_sbs_bm_process_escape process_escape alias reedo_sbs_bm_gain_exp gain_exp end def self.gain_exp if $imported && $imported["YEA-VictoryAftermath"] tmp_gc = [] $game_party.all_members.each do |actor| tmp_gc.push(actor.reedo_sbs_gc) actor.reedo_sbs_gc = nil if actor.reedo_sbs_gc end reedo_sbs_bm_gain_exp $game_party.all_members.each_with_index do |actor, i| actor.reedo_sbs_gc = tmp_gc end else reedo_sbs_bm_gain_exp end end def self.process_victory SceneManager.scene.reedo_victory_dance = true if REEDO_SBS::VICTORY_DANCE_ENABLED reedo_sbs_bm_process_victory end def self.process_escape SceneManager.scene.reedo_turn_and_run SceneManager.scene.reedo_cancel_run if !reedo_sbs_bm_process_escape end def self.reedo_preemptive? @preemptive end def self.reedo_surprise? @surprise end def self.reedo_get_actor_index return @actor_index endendclass Game_Action def reedo_guard? return item == $data_skills[subject.guard_skill_id] endendclass Game_Actor attr_accessor :reedo_sbs_gc attr_accessor :reedo_damage_time attr_accessor :reedo_is_acting alias reedo_sbs_ga_initialize initialize def initialize(actor_id) reedo_sbs_ga_initialize(actor_id) @reedo_damage_time = 0 @reedo_is_acting = false end alias reedo_sbs_ga_perform_damage_effect perform_damage_effect def perform_damage_effect @reedo_damage_time = REEDO_SBS::DAMAGE_RED_TIME reedo_sbs_ga_perform_damage_effect endendclass Game_Character attr_accessor :opacity attr_accessor :priority_type attr_accessor :reedo_start_top attr_accessor :reedo_jump_delta attr_accessor :reedo_shadow_sprite attr_accessor :reedo_is_dead attr_accessor :reedo_action_sprite attr_accessor :reedo_action_sprite_increment attr_accessor :reedo_action_style def reedo_step_on cmd = RPG::MoveCommand.new(Game_Character::ROUTE_STEP_ANIME_ON) process_move_command(cmd) end def reedo_step_off cmd = RPG::MoveCommand.new(Game_Character::ROUTE_STEP_ANIME_OFF) process_move_command(cmd) end def reedo_create_action_sprite(view) @reedo_action_style = 1 @reedo_action_sprite_increment = REEDO_SBS::ACTION_SPRITE_INCREMENT @reedo_action_sprite = Sprite_Base.new(view) @reedo_action_sprite.bitmap = Bitmap.new(24, 24) @reedo_action_sprite.src_rect = Rect.new(0, 0, 24, 24) @reedo_action_sprite.ox = 24 @reedo_action_sprite.oy = 24 @reedo_action_sprite.x = (self.x * 32) - 28 @reedo_action_sprite.y = (self.y * 32) + 18 @reedo_action_sprite.z = (self.priority_type * 100) + 1 @reedo_action_sprite.visible = false end def reedo_create_shadow_sprite(view) @reedo_shadow_sprite = Sprite_Base.new(view) bmp = Cache.picture(REEDO_SBS::ACTOR_SHADOW_CUSTOM_PICTURE) if REEDO_SBS::ACTOR_SHADOW_CUSTOM_PICTURE != nil bmp = Cache.system(REEDO_SBS::ACTOR_SHADOW_IMAGE) if bmp == nil @reedo_shadow_sprite.bitmap = bmp @reedo_shadow_sprite.src_rect = Rect.new(0, 0, bmp.width, bmp.height) @reedo_shadow_sprite.x = (self.x * 32) @reedo_shadow_sprite.y = (self.y * 32) @reedo_shadow_sprite.z = (self.priority_type * 100) - 1 end alias reedo_sbs_gc_update update def update reedo_sbs_gc_update @shadow_sprite.update if @shadow_sprite != nil end def reedo_draw_icon(icon_index) @reedo_action_sprite.bitmap.clear @reedo_action_sprite.visible = (icon_index > 0) return if icon_index < 0 bitmap = Cache.system("Iconset") rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24) @reedo_action_sprite.bitmap.blt(0, 0, bitmap, rect, 255) endendclass Spriteset_Battle alias reedo_sbs_ssb_initialize initialize def initialize @reedo_dance_wait = 0 reedo_sbs_ssb_initialize end alias reedo_sbs_ssb_dispose dispose def dispose for actor in $game_party.battle_members actor.reedo_sbs_gc.reedo_action_sprite.dispose actor.reedo_sbs_gc.reedo_shadow_sprite.dispose actor.reedo_sbs_gc = nil end @reedo_sprite_chars.each {|sprite| sprite.dispose } reedo_sbs_ssb_dispose end alias reedo_sbs_ssb_create_actors create_actors def create_actors dispose_actors if @actor_sprites != nil reedo_sbs_ssb_create_actors @reedo_game_chars = [] @reedo_sprite_chars = [] @actor_sprites = [] @reedo_surprise_time = 0 @reedo_preemptive_time = 0 i = 1 for actor in $game_party.battle_members gc = Game_Character.new gc.set_graphic(actor.character_name, actor.character_index) if BattleManager.reedo_surprise? gc.set_direction(6) @reedo_surprise_time = REEDO_SBS::SURPRISE_TIME elsif BattleManager.reedo_preemptive? @reedo_preemptive_time = REEDO_SBS::pREEMPTIVE_TIME @reedo_preemptive_tone = 0 @reedo_preemptive_delta = 10 gc.set_direction(2) else gc.set_direction(4) end gc.priority_type = i bc = Sprite_Character.new(@viewport1, gc) sb = Sprite_Battler.new(@viewport1, actor) top = REEDO_SBS::ACTOR_START_TOP + (i * REEDO_SBS::ACTOR_STAGGER_VERT) left = REEDO_SBS::ACTOR_START_LEFT if REEDO_SBS::ACTOR_STAGGER left += REEDO_SBS::ACTOR_STAGGER_HORZ if i % 2 == 0 else left += REEDO_SBS::ACTOR_STAGGER_HORZ * i end gc.reedo_is_dead = false gc.reedo_start_top = top gc.reedo_jump_delta = -0.1 gc.moveto(left, top) gc.reedo_create_shadow_sprite(@viewport1) gc.reedo_create_action_sprite(@viewport1) bc.update @actor_sprites.push(sb) @reedo_sprite_chars.push(bc) @reedo_game_chars.push(gc) actor.reedo_sbs_gc = gc i += 1 end end alias reedo_sbs_ssb_create_enemies create_enemies def create_enemies reedo_sbs_ssb_create_enemies for sprite in @enemy_sprites sprite.mirror = true if REEDO_SBS::FLIP_ENEMY.include?(sprite.battler.enemy_id) end end alias reedo_sbs_ssb_create_blurry_background_bitmap create_blurry_background_bitmap def create_blurry_background_bitmap if REEDO_SBS::FORCE_AUTOTILE_BACKGROUND && !$BTEST tryName1 = battleback1_name return reedo_sbs_ssb_create_blurry_background_bitmap if tryName1 == nil wall = Cache.battleback1(tryName1) tryName2 = battleback2_name bitmap = Bitmap.new(640, 480) bitmap.blt(0, 0, wall, wall.rect) if tryName2 != nil floor = Cache.battleback2(tryName2) bitmap.blt(0, 320, floor, floor.rect) end bitmap else reedo_sbs_ssb_create_blurry_background_bitmap end end def reedo_update_victory_dance if @reedo_dance_wait == 0 @actor_sprites.each_with_index do |sprite, i| if sprite.battler.alive? && sprite.battler.movable? gc = @reedo_game_chars gc.moveto(gc.x, gc.y + gc.reedo_jump_delta) if gc.y < gc.reedo_start_top - REEDO_SBS::VICTORY_DANCE_JUMP_HEIGHT gc.reedo_jump_delta = 0.1 @reedo_dance_wait = REEDO_SBS::VICTORY_DANCE_JUMP_HOVER end if gc.y > gc.reedo_start_top gc.reedo_jump_delta = -0.1 gc.set_direction(4) @reedo_dance_wait = REEDO_SBS::VICTORY_DANCE_JUMP_WAIT end if ((gc.y - REEDO_SBS::VICTORY_DANCE_JUMP_HEIGHT) * 10).to_int % (REEDO_SBS::VICTORY_DANCE_JUMP_HEIGHT / 4 * 10).to_int == 0 if @reedo_dance_wait == 0 case gc.direction when 4; gc.set_direction(2) when 2; gc.set_direction(6) when 6; gc.set_direction(8) when 8; gc.set_direction(4) end end end end end else @reedo_dance_wait -= 1 end end def reedo_update_surprise @actor_sprites.each_with_index do |sprite, i| if sprite.battler.alive? && sprite.battler.movable? gc = @reedo_game_chars if @reedo_surprise_time > 1 gc.moveto(gc.x, gc.y + gc.reedo_jump_delta) if gc.y < gc.reedo_start_top - REEDO_SBS::VICTORY_DANCE_JUMP_HEIGHT gc.reedo_jump_delta = 0.1 end if gc.y > gc.reedo_start_top gc.reedo_jump_delta = -0.1 end else gc.moveto(gc.x, gc.reedo_start_top) gc.set_direction(4) end end end @reedo_surprise_time -= 1 end def reedo_update_preemptive @actor_sprites.each_with_index do |sprite, i| if sprite.battler.alive? && sprite.battler.movable? sc = @reedo_sprite_chars if @reedo_preemptive_time > 1 sc.tone.set(@reedo_preemptive_tone,@reedo_preemptive_tone,@reedo_preemptive_tone) @reedo_preemptive_tone += @reedo_preemptive_delta @reedo_preemptive_delta *= -1 if @reedo_preemptive_tone >= 255 @reedo_preemptive_delta *= -1 if @reedo_preemptive_tone <= 0 else sc.tone.set(0,0,0) @reedo_game_chars.set_direction(4) end end end @reedo_preemptive_time -= 1 end def update_actors dance = false run = false if SceneManager.scene.is_a?(Scene_Battle) run = SceneManager.scene.reedo_run_away dance = SceneManager.scene.reedo_victory_dance reedo_update_victory_dance if dance end reedo_update_surprise if @reedo_surprise_time > 0 reedo_update_preemptive if @reedo_preemptive_time > 0 @actor_sprites.each_with_index do |sprite, i| gc = @reedo_game_chars sc = @reedo_sprite_chars if sprite.battler.movable? && (BattleManager.reedo_get_actor_index == i || sprite.battler.reedo_is_acting || dance || run) gc.reedo_step_on else gc.reedo_step_off end if gc.reedo_action_sprite.visible then if gc.reedo_action_style == 0 # swing gc.reedo_action_sprite.angle += gc.reedo_action_sprite_increment gc.reedo_action_sprite_increment *= -1 if (gc.reedo_action_sprite.angle > 90) || (gc.reedo_action_sprite.angle < 0) elsif gc.reedo_action_style == 1 # pulse gc.reedo_action_sprite.zoom_x += (gc.reedo_action_sprite_increment * 0.01) gc.reedo_action_sprite.zoom_y += (gc.reedo_action_sprite_increment * 0.01) gc.reedo_action_sprite_increment *= -1 if (gc.reedo_action_sprite.zoom_x > 2.0) || (gc.reedo_action_sprite.zoom_x < 1.0) elsif gc.reedo_action_style == 2 # punch gc.reedo_action_sprite.x += (gc.reedo_action_sprite_increment * REEDO_SBS::pUNCH_SPEED) gc.reedo_action_sprite_increment *= -1 if (gc.reedo_action_sprite.x < gc.reedo_shadow_sprite.x - REEDO_SBS::pUNCH_DISTANCE) || (gc.reedo_action_sprite.x > gc.reedo_shadow_sprite.x) end gc.reedo_action_sprite.update else gc.reedo_action_sprite.angle = 0 gc.reedo_action_sprite.zoom_x = 1.0 gc.reedo_action_sprite.zoom_y = 1.0 gc.reedo_action_sprite.x = gc.reedo_shadow_sprite.x end if sprite.battler.dead? if gc.reedo_is_dead == false gc.moveto(gc.x + REEDO_SBS::ACTOR_DEATH_OFFSET_X, gc.y + REEDO_SBS::ACTOR_DEATH_OFFSET_Y) gc.reedo_shadow_sprite.visible = false gc.opacity = REEDO_SBS::ACTOR_DEATH_OPACITY sc.angle = REEDO_SBS::ACTOR_DEATH_ANGLE sc.tone.set(REEDO_SBS::ACTOR_DEATH_TONE) gc.reedo_is_dead = true end else if gc.reedo_is_dead == true gc.moveto(gc.x - REEDO_SBS::ACTOR_DEATH_OFFSET_X, gc.y - REEDO_SBS::ACTOR_DEATH_OFFSET_Y) gc.reedo_shadow_sprite.visible = true gc.opacity = 255 sc.angle = 0 sc.tone.set(0,0,0) gc.reedo_is_dead = false end if sprite.battler.reedo_damage_time > 0 sc.tone.set(255,0,0) if sc.tone.red == 0 sprite.battler.reedo_damage_time -= 1 else sc.tone.set(0,0,0) if sc.tone.red == 255 end end sc.update gc.update sprite.update end end def reedo_game_char(index) @reedo_game_chars[index] end def reedo_sprite_char(index) @reedo_sprite_chars[index] end def reedo_actor_sprites @actor_sprites endendclass Scene_Battle attr_accessor :reedo_victory_dance attr_accessor :reedo_run_away attr_reader :subject alias reedo_sbs_sb_start start def start @reedo_victory_dance = false @reedo_run_away = false if !$BTEST @reedo_map_x = $game_map.display_x @reedo_map_y = $game_map.display_y $game_map.set_display_pos(0, 0) else $game_map = Game_Map.new $game_map.setup(1) end reedo_sbs_sb_start end alias reedo_sbs_sb_terminate terminate def terminate if !$BTEST $game_map.set_display_pos(@reedo_map_x, @reedo_map_y) end reedo_sbs_sb_terminate end alias reedo_sbs_sb_execute_action execute_action def execute_action if @subject.is_a?(Game_Actor) @subject.reedo_is_acting = true @spriteset.update_actors wait(15) if !@subject.current_action.reedo_guard? reedo_move_inout(-REEDO_SBS::ACTOR_STEP_DISTANCE) gc = @subject.reedo_sbs_gc iconidx = -1 if @subject.current_action.item.is_a?(RPG::Skill) if @subject.current_action.item.id == REEDO_SBS::ATTACK_SKILL_ID iconidx = @subject.weapons[0].icon_index if @subject.weapons[0] iconidx = REEDO_SBS::UNARMED_ICON if iconidx < 0 if iconidx == REEDO_SBS::UNARMED_ICON gc.reedo_action_style = REEDO_SBS::UNARMED_STYLE elsif REEDO_SBS::NO_MOVE_WEAPON_TYPES.include?(@subject.weapons[0].wtype_id) gc.reedo_action_style = 3 #none elsif REEDO_SBS::pUNCH_WEAPON_TYPES.include?(@subject.weapons[0].wtype_id) gc.reedo_action_style = 2 #punch elsif REEDO_SBS::pULSE_WEAPON_TYPES.include?(@subject.weapons[0].wtype_id) gc.reedo_action_style = 1 #pulse else gc.reedo_action_style = 0 #swing end else iconidx = @subject.current_action.item.icon_index gc.reedo_action_style = 1 #pulse end elsif @subject.current_action.item.is_a?(RPG::Item) iconidx = @subject.current_action.item.icon_index gc.reedo_action_style = 1 end gc.reedo_draw_icon(iconidx) else reedo_move_inout(REEDO_SBS::ACTOR_STEP_DISTANCE / 2) end end reedo_sbs_sb_execute_action if @subject.is_a?(Game_Actor) if !@subject.current_action.reedo_guard? gc = @subject.reedo_sbs_gc gc.reedo_draw_icon(-1) reedo_move_inout(REEDO_SBS::ACTOR_STEP_DISTANCE) else reedo_move_inout(-(REEDO_SBS::ACTOR_STEP_DISTANCE / 2)) end @subject.reedo_is_acting = false end end alias reedo_sbs_sb_show_animation show_animation def show_animation(targets, animation_id) oktargets = [] targets.each do |sprite| if sprite.is_a?(Game_Actor) if animation_id == -1 sprite.reedo_sbs_gc.animation_id = REEDO_SBS::ENEMY_DEFAULT_ATTACK else sprite.reedo_sbs_gc.animation_id = animation_id end else oktargets.push(sprite) end end reedo_sbs_sb_show_animation(oktargets, animation_id) end def reedo_move_inout(dist) i = 0 while i < REEDO_SBS::ACTOR_STEPS_IN_OUT gc = @subject.reedo_sbs_gc gc.moveto(gc.x + dist, gc.y) gc.reedo_shadow_sprite.x = (gc.x * 32) update_for_wait i += 1 end end def reedo_turn_and_run @reedo_run_away = true @spriteset.update_actors wait(15) @spriteset.reedo_actor_sprites.each_with_index do |sprite, i| gc = @spriteset.reedo_game_char(i) gc.set_direction(6) gc.moveto(gc.x + 0.5, gc.y) gc.reedo_shadow_sprite.x = (gc.x * 32) end end def reedo_cancel_run @reedo_run_away = false @spriteset.reedo_actor_sprites.each_with_index do |sprite, i| gc = @spriteset.reedo_game_char(i) gc.set_direction(4) gc.moveto(gc.x - 0.5, gc.y) gc.reedo_shadow_sprite.x = (gc.x * 32) end return false endend

Embarassingly, I don't exactly know how to go about re-formatting the whole thing to be readable. But I'll try my best.
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
4,478
Reaction score
1,248
First Language
English
Primarily Uses
RMVXA
Unless something's messed up on my end, the script was all compressed together in the post like this:
Page 6 has a link to another site with the script.
Apparently the site is down again. Happens every few days.
So here is the script. It almost does what you want. The difference is that is shows the weapon like an animation frames - back and forth.
Ruby:
###############################################################################
##  RSSBSACE - Reedo's Simple Side Battle System (for VX ACE)
##  Version 1.7b
##  September 30, 2013
##  By Reedo
###############################################################################
##  REFERENCES
##
##  None.  This is an original script by Reedo.
###############################################################################
##  FEATURES
##
##  + Draw the party on the right side of the screen, facing left, using the actor graphic specified in the database and in a formation fitting the Ace battle background layout.
##  + Place a shadow on the ground beneath living actors.
##  + Show the actor's stepping animation on their turn and when acting if able to take actions.
##  + Make the actor step toward the enemy when taking an action other than guarding.
##  + Show animations for all actor actions as defined in the database for the particular action being performed.
##  + Show animations for all enemy actions as defined in the database, or a default animation if none is defined (e.g. normal attack)
##  + Flash the actor red when they successfully receive a hostile action.
##  + Show dead actors as faded, whitened, and rotated to lay on their back.
##  + Make living actors perform a "victory dance" when the battle ends (they jump and spin).
##  + Optionally "mirror" enemy images to make them face to the right.
##    = Version 1.2 =
##  + Actors step back when guarding.
##  + Actors start facing backward and jump when surprised.
##  + Actors start facing down and flashing white on preemptive strike.
##   = Version 1.4 =
##  + Actors turn and move half a step to the right when attempting to flee.
##    = Version 1.6 =
##  + Show weapon or skill icon as moving (swinging, punching or pulsing) graphic during actions.
##    (by popular demand!)
##  + Now compatible with "battle test" from within the database.
##    = Version 1.7 =
##  + Additional options for weapon icon movement by weapon type.
##  + Corrected animations to only play on RSSBS visual battlers.
##  + Corrected bug on escape (caught by Macatlas - thanks!).
##  + Corrected bug on no weapon equipped (caught by comprisedpuma).
##
###############################################################################
##  COMPATIBILITY
##
##  Should be compatible with most other scripts.
##
##  OVERWRITES (1)
##    Spriteset_Battle.update_actors
##
##  STATE CHANGES (1)
##    Map scroll position (display_x, display_y) is stored and set to 0,0 when
##    battle begins, and then is restored when battle ends.
###############################################################################
##  REQUIREMENTS
##
##  None for installation and operation.
##
##  However, enemy troops will need to be repositioned manually in the database
##  editor. This script may work best with all custom enemy images designed for
##  side-battle view.
###############################################################################
##  INSTALLATION
##
##  Plug-and-play.
##
##  Insert below Materials, above other add-on scripts.
###############################################################################
##  RIGHTS & RESTRICTIONS
##
##  As with most Reedo scripts, this script is free to re-use, as-is,
##  in personal, educational, and commercial RPGVX Ace development projects,
##  providing that:  this script is credited in writing displayed readily
##  to the user of the final compiled code assembly.
##
##  Reedo retains all rights of intellect and ownership.
##  You forego all rights of warranty by utilizing this script.
###############################################################################

###############################################################################
##  USER OPTIONS
###############################################################################
module REEDO_SBS
  ACTOR_START_TOP = 6.2     # Top position (in tiles) for first actor in party
  ACTOR_START_LEFT = 12.5   # Left position (in tiles) for first actor in party
  ACTOR_STAGGER = false      # Enables staggered layout. Set false and chance start left to 12 for angled line.
  ACTOR_STAGGER_HORZ = 1.0  # The amount to recess each actor to the right (in tiles)
  ACTOR_STAGGER_VERT = 0.5  # The vertical spacing between characters (in tiles)
  ACTOR_STEPS_IN_OUT = 10   # The number of steps to take when moving to attack
  ACTOR_STEP_DISTANCE = 0.1 # The distance to move with each step (in tiles)
 
  ACTOR_DEATH_OPACITY = 125   # Transparency of dead actors
  ACTOR_DEATH_TONE = Tone.new(128, 128, 128, 0)  # Overlay color of dead actors
  ACTOR_DEATH_ANGLE = 270     # Rotation angle of dead actor sprite
  ACTOR_DEATH_OFFSET_X = -0.6 # Offset in tiles for dead actors
  ACTOR_DEATH_OFFSET_Y = -0.2 # Offset in tiles for dead actors
 
  VICTORY_DANCE_ENABLED = true      # Actors spin and jump on victory if alive and movable
  VICTORY_DANCE_JUMP_HEIGHT = 1.3   # The number of tiles an actor moves upward
  VICTORY_DANCE_JUMP_HOVER = 4      # The number of frames to wait in the air
  VICTORY_DANCE_JUMP_WAIT = 70      # The number of frames before jumping again
 
  ACTOR_SHADOW_IMAGE = "Shadow"       # The name of the system image to use
  ACTOR_SHADOW_CUSTOM_PICTURE = nil   # The name of a resource picture to use instead; nil to use system image
 
  PREEMPTIVE_TIME = 120   # The number of frames to flash white on preemptive strike
  SURPRISE_TIME = 90      # The number of frames to jump facing backward on surprise
  DAMAGE_RED_TIME = 15    # Number of frames actor turns red when damaged
 
  ATTACK_SKILL_ID = 1     # The Id in the database for the skill used as the default attack
  ENEMY_DEFAULT_ATTACK = 7    # AnimationId for enemy actions with no animation
  ACTION_SPRITE_INCREMENT = 5 # The amount of movement for swinging or pulsing action icons
 
  UNARMED_ICON = 175    # The icon to use if the actor has no weapon equipped.
  UNARMED_STYLE = 2     # The style to use when there is no weapon equipped.
  PUNCH_SPEED = 0.4
  PUNCH_DISTANCE = 32
  PULSE_WEAPON_TYPES = []         # Weapons with these weapon type ids will pulse like items or skills
  NO_MOVE_WEAPON_TYPES = []       # Weapons with these weapon type ids will show without moving
  PUNCH_WEAPON_TYPES = [2, 6, 10] # Weapons with these weapon type ids will move toward the enemy and back
                                  # All other weapon type ids will swing
 
  # Specify the ID of enemies who should have their image flipped in battle
  FLIP_ENEMY = [
                2, 3, 4, 5, 8, 10, 12, 13, 14, 16, 17,
                18, 19, 21, 22, 23, 25, 28, 29,
                
               ]
 
  FORCE_AUTOTILE_BACKGROUND = true # attempt to use tile-based background on all maps

end
###############################################################################
##  MAIN SCRIPT
###############################################################################
##  EDITS BEYOND THIS POINT ARE AT YOUR OWN RISK!!!
###############################################################################
module BattleManager
  class << self
    alias reedo_sbs_bm_process_victory process_victory
    alias reedo_sbs_bm_process_escape process_escape
    alias reedo_sbs_bm_gain_exp gain_exp
  end
 
  def self.gain_exp
    if $imported && $imported["YEA-VictoryAftermath"]
      tmp_gc = []
      $game_party.all_members.each do |actor|
        tmp_gc.push(actor.reedo_sbs_gc)
        actor.reedo_sbs_gc = nil if actor.reedo_sbs_gc
      end
      reedo_sbs_bm_gain_exp
      $game_party.all_members.each_with_index do |actor, i|
        actor.reedo_sbs_gc = tmp_gc[i]
      end
    else
      reedo_sbs_bm_gain_exp
    end
  end
 
  def self.process_victory
    SceneManager.scene.reedo_victory_dance = true if REEDO_SBS::VICTORY_DANCE_ENABLED
    reedo_sbs_bm_process_victory
  end
 
  def self.process_escape
    SceneManager.scene.reedo_turn_and_run
    SceneManager.scene.reedo_cancel_run if !reedo_sbs_bm_process_escape
  end
 
  def self.reedo_preemptive?
    @preemptive
  end
 
  def self.reedo_surprise?
    @surprise
  end
 
  def self.reedo_get_actor_index
    return @actor_index
  end
end

class Game_Action
  def reedo_guard?
    return item == $data_skills[subject.guard_skill_id]
  end
end

class Game_Actor
  attr_accessor :reedo_sbs_gc
  attr_accessor :reedo_damage_time
  attr_accessor :reedo_is_acting
 
  alias reedo_sbs_ga_initialize initialize
  def initialize(actor_id)
    reedo_sbs_ga_initialize(actor_id)
    @reedo_damage_time = 0
    @reedo_is_acting = false
  end
 
  alias reedo_sbs_ga_perform_damage_effect perform_damage_effect
  def perform_damage_effect
    @reedo_damage_time = REEDO_SBS::DAMAGE_RED_TIME
    reedo_sbs_ga_perform_damage_effect
  end
end

class Game_Character
  attr_accessor :opacity
  attr_accessor :priority_type
  attr_accessor :reedo_start_top
  attr_accessor :reedo_jump_delta
  attr_accessor :reedo_shadow_sprite
  attr_accessor :reedo_is_dead
  attr_accessor :reedo_action_sprite
  attr_accessor :reedo_action_sprite_increment
  attr_accessor :reedo_action_style
 
  def reedo_step_on
    cmd = RPG::MoveCommand.new(Game_Character::ROUTE_STEP_ANIME_ON)
    process_move_command(cmd)
  end
 
  def reedo_step_off
    cmd = RPG::MoveCommand.new(Game_Character::ROUTE_STEP_ANIME_OFF)
    process_move_command(cmd)
  end
 
  def reedo_create_action_sprite(view)
    @reedo_action_style = 1
    @reedo_action_sprite_increment = REEDO_SBS::ACTION_SPRITE_INCREMENT
    @reedo_action_sprite = Sprite_Base.new(view)
    @reedo_action_sprite.bitmap = Bitmap.new(24, 24)
    @reedo_action_sprite.src_rect = Rect.new(0, 0, 24, 24)
    @reedo_action_sprite.ox = 24
    @reedo_action_sprite.oy = 24
    @reedo_action_sprite.x = (self.x * 32) - 28
    @reedo_action_sprite.y = (self.y * 32) + 18
    @reedo_action_sprite.z = (self.priority_type * 100) + 1
    @reedo_action_sprite.visible = false
  end
 
  def reedo_create_shadow_sprite(view)
    @reedo_shadow_sprite = Sprite_Base.new(view)
    bmp = Cache.picture(REEDO_SBS::ACTOR_SHADOW_CUSTOM_PICTURE) if REEDO_SBS::ACTOR_SHADOW_CUSTOM_PICTURE != nil
    bmp = Cache.system(REEDO_SBS::ACTOR_SHADOW_IMAGE) if bmp == nil
    @reedo_shadow_sprite.bitmap = bmp
    @reedo_shadow_sprite.src_rect = Rect.new(0, 0, bmp.width, bmp.height)
    @reedo_shadow_sprite.x = (self.x * 32)
    @reedo_shadow_sprite.y = (self.y * 32)
    @reedo_shadow_sprite.z = (self.priority_type * 100) - 1
  end
 
  alias reedo_sbs_gc_update update
  def update
    reedo_sbs_gc_update
    @shadow_sprite.update if @shadow_sprite != nil
  end
 
  def reedo_draw_icon(icon_index)
    @reedo_action_sprite.bitmap.clear
    @reedo_action_sprite.visible = (icon_index > 0)
    return if icon_index < 0
    bitmap = Cache.system("Iconset")
    rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
    @reedo_action_sprite.bitmap.blt(0, 0, bitmap, rect, 255)
  end
end

class Spriteset_Battle
  alias reedo_sbs_ssb_initialize initialize
  def initialize
    @reedo_dance_wait = 0
    reedo_sbs_ssb_initialize
  end
 
  alias reedo_sbs_ssb_dispose dispose
  def dispose
    for actor in $game_party.battle_members
      actor.reedo_sbs_gc.reedo_action_sprite.dispose
      actor.reedo_sbs_gc.reedo_shadow_sprite.dispose
      actor.reedo_sbs_gc = nil
    end
    @reedo_sprite_chars.each {|sprite| sprite.dispose }
    reedo_sbs_ssb_dispose
  end
 
  alias reedo_sbs_ssb_create_actors create_actors
  def create_actors
    dispose_actors if @actor_sprites != nil
    reedo_sbs_ssb_create_actors

    @reedo_game_chars = []
    @reedo_sprite_chars = []
    @actor_sprites = []
    @reedo_surprise_time = 0
    @reedo_preemptive_time = 0
    
    i = 1
    for actor in $game_party.battle_members
      gc = Game_Character.new
      gc.set_graphic(actor.character_name, actor.character_index)
      if BattleManager.reedo_surprise?
        gc.set_direction(6)
        @reedo_surprise_time = REEDO_SBS::SURPRISE_TIME
      elsif BattleManager.reedo_preemptive?
        @reedo_preemptive_time = REEDO_SBS::PREEMPTIVE_TIME
        @reedo_preemptive_tone = 0
        @reedo_preemptive_delta = 10
        gc.set_direction(2)
      else
        gc.set_direction(4)
      end
      gc.priority_type = i
      bc = Sprite_Character.new(@viewport1, gc)
      sb = Sprite_Battler.new(@viewport1, actor)
      top = REEDO_SBS::ACTOR_START_TOP + (i * REEDO_SBS::ACTOR_STAGGER_VERT)
      left = REEDO_SBS::ACTOR_START_LEFT
      if REEDO_SBS::ACTOR_STAGGER
        left += REEDO_SBS::ACTOR_STAGGER_HORZ if i % 2 == 0
      else
        left += REEDO_SBS::ACTOR_STAGGER_HORZ * i
      end
      gc.reedo_is_dead = false
      gc.reedo_start_top = top
      gc.reedo_jump_delta = -0.1
      gc.moveto(left, top)
      gc.reedo_create_shadow_sprite(@viewport1)
      gc.reedo_create_action_sprite(@viewport1)
      bc.update
      @actor_sprites.push(sb)   
      @reedo_sprite_chars.push(bc)
      @reedo_game_chars.push(gc)
      actor.reedo_sbs_gc = gc
      i += 1
    end
  end
 
  alias reedo_sbs_ssb_create_enemies create_enemies
  def create_enemies
    reedo_sbs_ssb_create_enemies
    for sprite in @enemy_sprites
      sprite.mirror = true if REEDO_SBS::FLIP_ENEMY.include?(sprite.battler.enemy_id)
    end
  end
 
  alias reedo_sbs_ssb_create_blurry_background_bitmap create_blurry_background_bitmap
  def create_blurry_background_bitmap
    if REEDO_SBS::FORCE_AUTOTILE_BACKGROUND && !$BTEST
      tryName1 = battleback1_name
      return reedo_sbs_ssb_create_blurry_background_bitmap if tryName1 == nil
      wall = Cache.battleback1(tryName1)
      tryName2 = battleback2_name
      bitmap = Bitmap.new(640, 480)
      bitmap.blt(0, 0, wall, wall.rect)
      if tryName2 != nil
        floor = Cache.battleback2(tryName2)
        bitmap.blt(0, 320, floor, floor.rect)
      end
      bitmap
    else
      reedo_sbs_ssb_create_blurry_background_bitmap
    end
  end
 
  def reedo_update_victory_dance
    if @reedo_dance_wait == 0
      @actor_sprites.each_with_index do |sprite, i|
        if sprite.battler.alive? && sprite.battler.movable?
          gc = @reedo_game_chars[i]
          gc.moveto(gc.x, gc.y + gc.reedo_jump_delta)
          if gc.y < gc.reedo_start_top - REEDO_SBS::VICTORY_DANCE_JUMP_HEIGHT
            gc.reedo_jump_delta = 0.1
            @reedo_dance_wait = REEDO_SBS::VICTORY_DANCE_JUMP_HOVER
          end
          if gc.y > gc.reedo_start_top
            gc.reedo_jump_delta = -0.1
            gc.set_direction(4)
            @reedo_dance_wait = REEDO_SBS::VICTORY_DANCE_JUMP_WAIT
          end
          if ((gc.y - REEDO_SBS::VICTORY_DANCE_JUMP_HEIGHT) * 10).to_int % (REEDO_SBS::VICTORY_DANCE_JUMP_HEIGHT / 4 * 10).to_int == 0
            if @reedo_dance_wait == 0
              case gc.direction
                when 4; gc.set_direction(2)
                when 2; gc.set_direction(6)
                when 6; gc.set_direction(8)
                when 8; gc.set_direction(4)
              end
            end
          end
        end
      end
    else
      @reedo_dance_wait -= 1
    end
  end
 
  def reedo_update_surprise
    @actor_sprites.each_with_index do |sprite, i|
      if sprite.battler.alive? && sprite.battler.movable?
        gc = @reedo_game_chars[i]
        if @reedo_surprise_time > 1
          gc.moveto(gc.x, gc.y + gc.reedo_jump_delta)
          if gc.y < gc.reedo_start_top - REEDO_SBS::VICTORY_DANCE_JUMP_HEIGHT
            gc.reedo_jump_delta = 0.1
          end
          if gc.y > gc.reedo_start_top
            gc.reedo_jump_delta = -0.1
          end
        else
          gc.moveto(gc.x, gc.reedo_start_top)
          gc.set_direction(4)
        end
      end
    end
    @reedo_surprise_time -= 1
  end
 
  def reedo_update_preemptive
    @actor_sprites.each_with_index do |sprite, i|
      if sprite.battler.alive? && sprite.battler.movable?
        sc = @reedo_sprite_chars[i]
        if @reedo_preemptive_time > 1
          sc.tone.set(@reedo_preemptive_tone,@reedo_preemptive_tone,@reedo_preemptive_tone)
          @reedo_preemptive_tone += @reedo_preemptive_delta
          @reedo_preemptive_delta *= -1 if @reedo_preemptive_tone >= 255
          @reedo_preemptive_delta *= -1 if @reedo_preemptive_tone <= 0
        else
          sc.tone.set(0,0,0)
          @reedo_game_chars[i].set_direction(4)
        end
      end
    end
    @reedo_preemptive_time -= 1
  end
 
  def update_actors
    dance = false
    run = false
    if SceneManager.scene.is_a?(Scene_Battle)
      run = SceneManager.scene.reedo_run_away
      dance = SceneManager.scene.reedo_victory_dance
      reedo_update_victory_dance if dance
    end
    reedo_update_surprise if @reedo_surprise_time > 0
    reedo_update_preemptive if @reedo_preemptive_time > 0

    @actor_sprites.each_with_index do |sprite, i|
      gc = @reedo_game_chars[i]
      sc = @reedo_sprite_chars[i]
      if sprite.battler.movable?  && (BattleManager.reedo_get_actor_index == i || sprite.battler.reedo_is_acting || dance || run)
        gc.reedo_step_on
      else
        gc.reedo_step_off
      end
      
      if gc.reedo_action_sprite.visible then
        if gc.reedo_action_style == 0 # swing
          gc.reedo_action_sprite.angle += gc.reedo_action_sprite_increment
          gc.reedo_action_sprite_increment *= -1 if (gc.reedo_action_sprite.angle > 90) || (gc.reedo_action_sprite.angle < 0)
        elsif gc.reedo_action_style == 1 # pulse
          gc.reedo_action_sprite.zoom_x += (gc.reedo_action_sprite_increment * 0.01)
          gc.reedo_action_sprite.zoom_y += (gc.reedo_action_sprite_increment * 0.01)
          gc.reedo_action_sprite_increment *= -1 if (gc.reedo_action_sprite.zoom_x > 2.0) || (gc.reedo_action_sprite.zoom_x < 1.0)
        elsif gc.reedo_action_style == 2 # punch
          gc.reedo_action_sprite.x += (gc.reedo_action_sprite_increment * REEDO_SBS::PUNCH_SPEED)
          gc.reedo_action_sprite_increment *= -1 if (gc.reedo_action_sprite.x < gc.reedo_shadow_sprite.x - REEDO_SBS::PUNCH_DISTANCE) || (gc.reedo_action_sprite.x > gc.reedo_shadow_sprite.x)
        end
        gc.reedo_action_sprite.update
      else
        gc.reedo_action_sprite.angle = 0
        gc.reedo_action_sprite.zoom_x = 1.0
        gc.reedo_action_sprite.zoom_y = 1.0
        gc.reedo_action_sprite.x = gc.reedo_shadow_sprite.x
      end
      
      if sprite.battler.dead?
        if gc.reedo_is_dead == false
          gc.moveto(gc.x + REEDO_SBS::ACTOR_DEATH_OFFSET_X, gc.y + REEDO_SBS::ACTOR_DEATH_OFFSET_Y)
          gc.reedo_shadow_sprite.visible = false
          gc.opacity = REEDO_SBS::ACTOR_DEATH_OPACITY
          sc.angle = REEDO_SBS::ACTOR_DEATH_ANGLE
          sc.tone.set(REEDO_SBS::ACTOR_DEATH_TONE)
          gc.reedo_is_dead = true
        end
      else
        if gc.reedo_is_dead == true
          gc.moveto(gc.x - REEDO_SBS::ACTOR_DEATH_OFFSET_X, gc.y - REEDO_SBS::ACTOR_DEATH_OFFSET_Y)
          gc.reedo_shadow_sprite.visible = true
          gc.opacity = 255
          sc.angle = 0
          sc.tone.set(0,0,0)
          gc.reedo_is_dead = false
        end
        if sprite.battler.reedo_damage_time > 0
          sc.tone.set(255,0,0) if sc.tone.red == 0
          sprite.battler.reedo_damage_time -= 1
        else
          sc.tone.set(0,0,0) if sc.tone.red == 255
        end
      end
      sc.update
      gc.update
      sprite.update
    end
  end
 
  def reedo_game_char(index)
    @reedo_game_chars[index]
  end
 
  def reedo_sprite_char(index)
    @reedo_sprite_chars[index]
  end
 
  def reedo_actor_sprites
    @actor_sprites
  end
end

class Scene_Battle
  attr_accessor :reedo_victory_dance
  attr_accessor :reedo_run_away
  attr_reader :subject
    
  alias reedo_sbs_sb_start start
  def start
    @reedo_victory_dance = false
    @reedo_run_away = false
    if !$BTEST
      @reedo_map_x = $game_map.display_x
      @reedo_map_y = $game_map.display_y
      $game_map.set_display_pos(0, 0)
    else
      $game_map = Game_Map.new
      $game_map.setup(1)
    end
    reedo_sbs_sb_start
  end
 
  alias reedo_sbs_sb_terminate terminate
  def terminate
    if !$BTEST
      $game_map.set_display_pos(@reedo_map_x, @reedo_map_y)
    end
    reedo_sbs_sb_terminate
  end
 
  alias reedo_sbs_sb_execute_action execute_action
  def execute_action
    if @subject.is_a?(Game_Actor)
      @subject.reedo_is_acting = true
      @spriteset.update_actors
      wait(15)
      if !@subject.current_action.reedo_guard?
        reedo_move_inout(-REEDO_SBS::ACTOR_STEP_DISTANCE)
        gc = @subject.reedo_sbs_gc
        iconidx = -1
        if @subject.current_action.item.is_a?(RPG::Skill)
          if @subject.current_action.item.id == REEDO_SBS::ATTACK_SKILL_ID
            iconidx = @subject.weapons[0].icon_index if @subject.weapons[0]
            iconidx = REEDO_SBS::UNARMED_ICON if iconidx < 0
            if iconidx == REEDO_SBS::UNARMED_ICON
              gc.reedo_action_style = REEDO_SBS::UNARMED_STYLE
            elsif REEDO_SBS::NO_MOVE_WEAPON_TYPES.include?(@subject.weapons[0].wtype_id)
              gc.reedo_action_style = 3 #none
            elsif REEDO_SBS::PUNCH_WEAPON_TYPES.include?(@subject.weapons[0].wtype_id)
              gc.reedo_action_style = 2 #punch
            elsif REEDO_SBS::PULSE_WEAPON_TYPES.include?(@subject.weapons[0].wtype_id)
              gc.reedo_action_style = 1 #pulse
            else
              gc.reedo_action_style = 0 #swing
            end
          else
            iconidx = @subject.current_action.item.icon_index
            gc.reedo_action_style = 1 #pulse
          end
        elsif @subject.current_action.item.is_a?(RPG::Item)
          iconidx = @subject.current_action.item.icon_index
          gc.reedo_action_style = 1
        end
        gc.reedo_draw_icon(iconidx)
      else
        reedo_move_inout(REEDO_SBS::ACTOR_STEP_DISTANCE / 2)
      end
    end
    reedo_sbs_sb_execute_action
    if @subject.is_a?(Game_Actor)
      if !@subject.current_action.reedo_guard?
        gc = @subject.reedo_sbs_gc
        gc.reedo_draw_icon(-1)
        reedo_move_inout(REEDO_SBS::ACTOR_STEP_DISTANCE)
      else
        reedo_move_inout(-(REEDO_SBS::ACTOR_STEP_DISTANCE / 2))
      end
      @subject.reedo_is_acting = false
    end
  end
 
  alias reedo_sbs_sb_show_animation show_animation
  def show_animation(targets, animation_id)
    oktargets = []
    targets.each do |sprite|
      if sprite.is_a?(Game_Actor)
        if animation_id == -1
          sprite.reedo_sbs_gc.animation_id = REEDO_SBS::ENEMY_DEFAULT_ATTACK
        else
          sprite.reedo_sbs_gc.animation_id = animation_id
        end
      else
        oktargets.push(sprite)
      end
    end
     reedo_sbs_sb_show_animation(oktargets, animation_id)
  end
 
  def reedo_move_inout(dist)
    i = 0
    while i < REEDO_SBS::ACTOR_STEPS_IN_OUT
      gc = @subject.reedo_sbs_gc
      gc.moveto(gc.x + dist, gc.y)
      gc.reedo_shadow_sprite.x = (gc.x * 32)
      update_for_wait
      i += 1
    end   
  end
 
  def reedo_turn_and_run
    @reedo_run_away = true
    @spriteset.update_actors
    wait(15)
    @spriteset.reedo_actor_sprites.each_with_index do |sprite, i|
      gc = @spriteset.reedo_game_char(i)
      gc.set_direction(6)
      gc.moveto(gc.x + 0.5, gc.y)
      gc.reedo_shadow_sprite.x = (gc.x * 32)
    end
  end
 
  def reedo_cancel_run
    @reedo_run_away = false
    @spriteset.reedo_actor_sprites.each_with_index do |sprite, i|
      gc = @spriteset.reedo_game_char(i)
      gc.set_direction(4)
      gc.moveto(gc.x - 0.5, gc.y)
      gc.reedo_shadow_sprite.x = (gc.x * 32)
    end
    return false
  end
end

I'll inspect yanfly visual battlers, but yes it may be the simple one you want.
Yanfly visual battlers has the step forward motion but no weapons.

I've also see an example of Tankentai battle system that would work. Other examples have the battlers moving to the enemy, but it looks like you can configure it to just move slightly forward.
 
Last edited:
Joined
Jan 25, 2022
Messages
76
Reaction score
65
First Language
English
Primarily Uses
RMVXA
Page 6 has a link to another site with the script.
Apparently the site is down again. Happens every few days.
So here is the script. It almost does what you want. The difference is that is shows the weapon like an animation frames - back and forth.
Ruby:
###############################################################################
##  RSSBSACE - Reedo's Simple Side Battle System (for VX ACE)
##  Version 1.7b
##  September 30, 2013
##  By Reedo
###############################################################################
##  REFERENCES
##
##  None.  This is an original script by Reedo.
###############################################################################
##  FEATURES
##
##  + Draw the party on the right side of the screen, facing left, using the actor graphic specified in the database and in a formation fitting the Ace battle background layout.
##  + Place a shadow on the ground beneath living actors.
##  + Show the actor's stepping animation on their turn and when acting if able to take actions.
##  + Make the actor step toward the enemy when taking an action other than guarding.
##  + Show animations for all actor actions as defined in the database for the particular action being performed.
##  + Show animations for all enemy actions as defined in the database, or a default animation if none is defined (e.g. normal attack)
##  + Flash the actor red when they successfully receive a hostile action.
##  + Show dead actors as faded, whitened, and rotated to lay on their back.
##  + Make living actors perform a "victory dance" when the battle ends (they jump and spin).
##  + Optionally "mirror" enemy images to make them face to the right.
##    = Version 1.2 =
##  + Actors step back when guarding.
##  + Actors start facing backward and jump when surprised.
##  + Actors start facing down and flashing white on preemptive strike.
##   = Version 1.4 =
##  + Actors turn and move half a step to the right when attempting to flee.
##    = Version 1.6 =
##  + Show weapon or skill icon as moving (swinging, punching or pulsing) graphic during actions.
##    (by popular demand!)
##  + Now compatible with "battle test" from within the database.
##    = Version 1.7 =
##  + Additional options for weapon icon movement by weapon type.
##  + Corrected animations to only play on RSSBS visual battlers.
##  + Corrected bug on escape (caught by Macatlas - thanks!).
##  + Corrected bug on no weapon equipped (caught by comprisedpuma).
##
###############################################################################
##  COMPATIBILITY
##
##  Should be compatible with most other scripts.
##
##  OVERWRITES (1)
##    Spriteset_Battle.update_actors
##
##  STATE CHANGES (1)
##    Map scroll position (display_x, display_y) is stored and set to 0,0 when
##    battle begins, and then is restored when battle ends.
###############################################################################
##  REQUIREMENTS
##
##  None for installation and operation.
##
##  However, enemy troops will need to be repositioned manually in the database
##  editor. This script may work best with all custom enemy images designed for
##  side-battle view.
###############################################################################
##  INSTALLATION
##
##  Plug-and-play.
##
##  Insert below Materials, above other add-on scripts.
###############################################################################
##  RIGHTS & RESTRICTIONS
##
##  As with most Reedo scripts, this script is free to re-use, as-is,
##  in personal, educational, and commercial RPGVX Ace development projects,
##  providing that:  this script is credited in writing displayed readily
##  to the user of the final compiled code assembly.
##
##  Reedo retains all rights of intellect and ownership.
##  You forego all rights of warranty by utilizing this script.
###############################################################################

###############################################################################
##  USER OPTIONS
###############################################################################
module REEDO_SBS
  ACTOR_START_TOP = 6.2     # Top position (in tiles) for first actor in party
  ACTOR_START_LEFT = 12.5   # Left position (in tiles) for first actor in party
  ACTOR_STAGGER = false      # Enables staggered layout. Set false and chance start left to 12 for angled line.
  ACTOR_STAGGER_HORZ = 1.0  # The amount to recess each actor to the right (in tiles)
  ACTOR_STAGGER_VERT = 0.5  # The vertical spacing between characters (in tiles)
  ACTOR_STEPS_IN_OUT = 10   # The number of steps to take when moving to attack
  ACTOR_STEP_DISTANCE = 0.1 # The distance to move with each step (in tiles)
 
  ACTOR_DEATH_OPACITY = 125   # Transparency of dead actors
  ACTOR_DEATH_TONE = Tone.new(128, 128, 128, 0)  # Overlay color of dead actors
  ACTOR_DEATH_ANGLE = 270     # Rotation angle of dead actor sprite
  ACTOR_DEATH_OFFSET_X = -0.6 # Offset in tiles for dead actors
  ACTOR_DEATH_OFFSET_Y = -0.2 # Offset in tiles for dead actors
 
  VICTORY_DANCE_ENABLED = true      # Actors spin and jump on victory if alive and movable
  VICTORY_DANCE_JUMP_HEIGHT = 1.3   # The number of tiles an actor moves upward
  VICTORY_DANCE_JUMP_HOVER = 4      # The number of frames to wait in the air
  VICTORY_DANCE_JUMP_WAIT = 70      # The number of frames before jumping again
 
  ACTOR_SHADOW_IMAGE = "Shadow"       # The name of the system image to use
  ACTOR_SHADOW_CUSTOM_PICTURE = nil   # The name of a resource picture to use instead; nil to use system image
 
  PREEMPTIVE_TIME = 120   # The number of frames to flash white on preemptive strike
  SURPRISE_TIME = 90      # The number of frames to jump facing backward on surprise
  DAMAGE_RED_TIME = 15    # Number of frames actor turns red when damaged
 
  ATTACK_SKILL_ID = 1     # The Id in the database for the skill used as the default attack
  ENEMY_DEFAULT_ATTACK = 7    # AnimationId for enemy actions with no animation
  ACTION_SPRITE_INCREMENT = 5 # The amount of movement for swinging or pulsing action icons
 
  UNARMED_ICON = 175    # The icon to use if the actor has no weapon equipped.
  UNARMED_STYLE = 2     # The style to use when there is no weapon equipped.
  PUNCH_SPEED = 0.4
  PUNCH_DISTANCE = 32
  PULSE_WEAPON_TYPES = []         # Weapons with these weapon type ids will pulse like items or skills
  NO_MOVE_WEAPON_TYPES = []       # Weapons with these weapon type ids will show without moving
  PUNCH_WEAPON_TYPES = [2, 6, 10] # Weapons with these weapon type ids will move toward the enemy and back
                                  # All other weapon type ids will swing
 
  # Specify the ID of enemies who should have their image flipped in battle
  FLIP_ENEMY = [
                2, 3, 4, 5, 8, 10, 12, 13, 14, 16, 17,
                18, 19, 21, 22, 23, 25, 28, 29,
               
               ]
 
  FORCE_AUTOTILE_BACKGROUND = true # attempt to use tile-based background on all maps

end
###############################################################################
##  MAIN SCRIPT
###############################################################################
##  EDITS BEYOND THIS POINT ARE AT YOUR OWN RISK!!!
###############################################################################
module BattleManager
  class << self
    alias reedo_sbs_bm_process_victory process_victory
    alias reedo_sbs_bm_process_escape process_escape
    alias reedo_sbs_bm_gain_exp gain_exp
  end
 
  def self.gain_exp
    if $imported && $imported["YEA-VictoryAftermath"]
      tmp_gc = []
      $game_party.all_members.each do |actor|
        tmp_gc.push(actor.reedo_sbs_gc)
        actor.reedo_sbs_gc = nil if actor.reedo_sbs_gc
      end
      reedo_sbs_bm_gain_exp
      $game_party.all_members.each_with_index do |actor, i|
        actor.reedo_sbs_gc = tmp_gc[i]
      end
    else
      reedo_sbs_bm_gain_exp
    end
  end
 
  def self.process_victory
    SceneManager.scene.reedo_victory_dance = true if REEDO_SBS::VICTORY_DANCE_ENABLED
    reedo_sbs_bm_process_victory
  end
 
  def self.process_escape
    SceneManager.scene.reedo_turn_and_run
    SceneManager.scene.reedo_cancel_run if !reedo_sbs_bm_process_escape
  end
 
  def self.reedo_preemptive?
    @preemptive
  end
 
  def self.reedo_surprise?
    @surprise
  end
 
  def self.reedo_get_actor_index
    return @actor_index
  end
end

class Game_Action
  def reedo_guard?
    return item == $data_skills[subject.guard_skill_id]
  end
end

class Game_Actor
  attr_accessor :reedo_sbs_gc
  attr_accessor :reedo_damage_time
  attr_accessor :reedo_is_acting
 
  alias reedo_sbs_ga_initialize initialize
  def initialize(actor_id)
    reedo_sbs_ga_initialize(actor_id)
    @reedo_damage_time = 0
    @reedo_is_acting = false
  end
 
  alias reedo_sbs_ga_perform_damage_effect perform_damage_effect
  def perform_damage_effect
    @reedo_damage_time = REEDO_SBS::DAMAGE_RED_TIME
    reedo_sbs_ga_perform_damage_effect
  end
end

class Game_Character
  attr_accessor :opacity
  attr_accessor :priority_type
  attr_accessor :reedo_start_top
  attr_accessor :reedo_jump_delta
  attr_accessor :reedo_shadow_sprite
  attr_accessor :reedo_is_dead
  attr_accessor :reedo_action_sprite
  attr_accessor :reedo_action_sprite_increment
  attr_accessor :reedo_action_style
 
  def reedo_step_on
    cmd = RPG::MoveCommand.new(Game_Character::ROUTE_STEP_ANIME_ON)
    process_move_command(cmd)
  end
 
  def reedo_step_off
    cmd = RPG::MoveCommand.new(Game_Character::ROUTE_STEP_ANIME_OFF)
    process_move_command(cmd)
  end
 
  def reedo_create_action_sprite(view)
    @reedo_action_style = 1
    @reedo_action_sprite_increment = REEDO_SBS::ACTION_SPRITE_INCREMENT
    @reedo_action_sprite = Sprite_Base.new(view)
    @reedo_action_sprite.bitmap = Bitmap.new(24, 24)
    @reedo_action_sprite.src_rect = Rect.new(0, 0, 24, 24)
    @reedo_action_sprite.ox = 24
    @reedo_action_sprite.oy = 24
    @reedo_action_sprite.x = (self.x * 32) - 28
    @reedo_action_sprite.y = (self.y * 32) + 18
    @reedo_action_sprite.z = (self.priority_type * 100) + 1
    @reedo_action_sprite.visible = false
  end
 
  def reedo_create_shadow_sprite(view)
    @reedo_shadow_sprite = Sprite_Base.new(view)
    bmp = Cache.picture(REEDO_SBS::ACTOR_SHADOW_CUSTOM_PICTURE) if REEDO_SBS::ACTOR_SHADOW_CUSTOM_PICTURE != nil
    bmp = Cache.system(REEDO_SBS::ACTOR_SHADOW_IMAGE) if bmp == nil
    @reedo_shadow_sprite.bitmap = bmp
    @reedo_shadow_sprite.src_rect = Rect.new(0, 0, bmp.width, bmp.height)
    @reedo_shadow_sprite.x = (self.x * 32)
    @reedo_shadow_sprite.y = (self.y * 32)
    @reedo_shadow_sprite.z = (self.priority_type * 100) - 1
  end
 
  alias reedo_sbs_gc_update update
  def update
    reedo_sbs_gc_update
    @shadow_sprite.update if @shadow_sprite != nil
  end
 
  def reedo_draw_icon(icon_index)
    @reedo_action_sprite.bitmap.clear
    @reedo_action_sprite.visible = (icon_index > 0)
    return if icon_index < 0
    bitmap = Cache.system("Iconset")
    rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
    @reedo_action_sprite.bitmap.blt(0, 0, bitmap, rect, 255)
  end
end

class Spriteset_Battle
  alias reedo_sbs_ssb_initialize initialize
  def initialize
    @reedo_dance_wait = 0
    reedo_sbs_ssb_initialize
  end
 
  alias reedo_sbs_ssb_dispose dispose
  def dispose
    for actor in $game_party.battle_members
      actor.reedo_sbs_gc.reedo_action_sprite.dispose
      actor.reedo_sbs_gc.reedo_shadow_sprite.dispose
      actor.reedo_sbs_gc = nil
    end
    @reedo_sprite_chars.each {|sprite| sprite.dispose }
    reedo_sbs_ssb_dispose
  end
 
  alias reedo_sbs_ssb_create_actors create_actors
  def create_actors
    dispose_actors if @actor_sprites != nil
    reedo_sbs_ssb_create_actors

    @reedo_game_chars = []
    @reedo_sprite_chars = []
    @actor_sprites = []
    @reedo_surprise_time = 0
    @reedo_preemptive_time = 0
   
    i = 1
    for actor in $game_party.battle_members
      gc = Game_Character.new
      gc.set_graphic(actor.character_name, actor.character_index)
      if BattleManager.reedo_surprise?
        gc.set_direction(6)
        @reedo_surprise_time = REEDO_SBS::SURPRISE_TIME
      elsif BattleManager.reedo_preemptive?
        @reedo_preemptive_time = REEDO_SBS::PREEMPTIVE_TIME
        @reedo_preemptive_tone = 0
        @reedo_preemptive_delta = 10
        gc.set_direction(2)
      else
        gc.set_direction(4)
      end
      gc.priority_type = i
      bc = Sprite_Character.new(@viewport1, gc)
      sb = Sprite_Battler.new(@viewport1, actor)
      top = REEDO_SBS::ACTOR_START_TOP + (i * REEDO_SBS::ACTOR_STAGGER_VERT)
      left = REEDO_SBS::ACTOR_START_LEFT
      if REEDO_SBS::ACTOR_STAGGER
        left += REEDO_SBS::ACTOR_STAGGER_HORZ if i % 2 == 0
      else
        left += REEDO_SBS::ACTOR_STAGGER_HORZ * i
      end
      gc.reedo_is_dead = false
      gc.reedo_start_top = top
      gc.reedo_jump_delta = -0.1
      gc.moveto(left, top)
      gc.reedo_create_shadow_sprite(@viewport1)
      gc.reedo_create_action_sprite(@viewport1)
      bc.update
      @actor_sprites.push(sb)  
      @reedo_sprite_chars.push(bc)
      @reedo_game_chars.push(gc)
      actor.reedo_sbs_gc = gc
      i += 1
    end
  end
 
  alias reedo_sbs_ssb_create_enemies create_enemies
  def create_enemies
    reedo_sbs_ssb_create_enemies
    for sprite in @enemy_sprites
      sprite.mirror = true if REEDO_SBS::FLIP_ENEMY.include?(sprite.battler.enemy_id)
    end
  end
 
  alias reedo_sbs_ssb_create_blurry_background_bitmap create_blurry_background_bitmap
  def create_blurry_background_bitmap
    if REEDO_SBS::FORCE_AUTOTILE_BACKGROUND && !$BTEST
      tryName1 = battleback1_name
      return reedo_sbs_ssb_create_blurry_background_bitmap if tryName1 == nil
      wall = Cache.battleback1(tryName1)
      tryName2 = battleback2_name
      bitmap = Bitmap.new(640, 480)
      bitmap.blt(0, 0, wall, wall.rect)
      if tryName2 != nil
        floor = Cache.battleback2(tryName2)
        bitmap.blt(0, 320, floor, floor.rect)
      end
      bitmap
    else
      reedo_sbs_ssb_create_blurry_background_bitmap
    end
  end
 
  def reedo_update_victory_dance
    if @reedo_dance_wait == 0
      @actor_sprites.each_with_index do |sprite, i|
        if sprite.battler.alive? && sprite.battler.movable?
          gc = @reedo_game_chars[i]
          gc.moveto(gc.x, gc.y + gc.reedo_jump_delta)
          if gc.y < gc.reedo_start_top - REEDO_SBS::VICTORY_DANCE_JUMP_HEIGHT
            gc.reedo_jump_delta = 0.1
            @reedo_dance_wait = REEDO_SBS::VICTORY_DANCE_JUMP_HOVER
          end
          if gc.y > gc.reedo_start_top
            gc.reedo_jump_delta = -0.1
            gc.set_direction(4)
            @reedo_dance_wait = REEDO_SBS::VICTORY_DANCE_JUMP_WAIT
          end
          if ((gc.y - REEDO_SBS::VICTORY_DANCE_JUMP_HEIGHT) * 10).to_int % (REEDO_SBS::VICTORY_DANCE_JUMP_HEIGHT / 4 * 10).to_int == 0
            if @reedo_dance_wait == 0
              case gc.direction
                when 4; gc.set_direction(2)
                when 2; gc.set_direction(6)
                when 6; gc.set_direction(8)
                when 8; gc.set_direction(4)
              end
            end
          end
        end
      end
    else
      @reedo_dance_wait -= 1
    end
  end
 
  def reedo_update_surprise
    @actor_sprites.each_with_index do |sprite, i|
      if sprite.battler.alive? && sprite.battler.movable?
        gc = @reedo_game_chars[i]
        if @reedo_surprise_time > 1
          gc.moveto(gc.x, gc.y + gc.reedo_jump_delta)
          if gc.y < gc.reedo_start_top - REEDO_SBS::VICTORY_DANCE_JUMP_HEIGHT
            gc.reedo_jump_delta = 0.1
          end
          if gc.y > gc.reedo_start_top
            gc.reedo_jump_delta = -0.1
          end
        else
          gc.moveto(gc.x, gc.reedo_start_top)
          gc.set_direction(4)
        end
      end
    end
    @reedo_surprise_time -= 1
  end
 
  def reedo_update_preemptive
    @actor_sprites.each_with_index do |sprite, i|
      if sprite.battler.alive? && sprite.battler.movable?
        sc = @reedo_sprite_chars[i]
        if @reedo_preemptive_time > 1
          sc.tone.set(@reedo_preemptive_tone,@reedo_preemptive_tone,@reedo_preemptive_tone)
          @reedo_preemptive_tone += @reedo_preemptive_delta
          @reedo_preemptive_delta *= -1 if @reedo_preemptive_tone >= 255
          @reedo_preemptive_delta *= -1 if @reedo_preemptive_tone <= 0
        else
          sc.tone.set(0,0,0)
          @reedo_game_chars[i].set_direction(4)
        end
      end
    end
    @reedo_preemptive_time -= 1
  end
 
  def update_actors
    dance = false
    run = false
    if SceneManager.scene.is_a?(Scene_Battle)
      run = SceneManager.scene.reedo_run_away
      dance = SceneManager.scene.reedo_victory_dance
      reedo_update_victory_dance if dance
    end
    reedo_update_surprise if @reedo_surprise_time > 0
    reedo_update_preemptive if @reedo_preemptive_time > 0

    @actor_sprites.each_with_index do |sprite, i|
      gc = @reedo_game_chars[i]
      sc = @reedo_sprite_chars[i]
      if sprite.battler.movable?  && (BattleManager.reedo_get_actor_index == i || sprite.battler.reedo_is_acting || dance || run)
        gc.reedo_step_on
      else
        gc.reedo_step_off
      end
     
      if gc.reedo_action_sprite.visible then
        if gc.reedo_action_style == 0 # swing
          gc.reedo_action_sprite.angle += gc.reedo_action_sprite_increment
          gc.reedo_action_sprite_increment *= -1 if (gc.reedo_action_sprite.angle > 90) || (gc.reedo_action_sprite.angle < 0)
        elsif gc.reedo_action_style == 1 # pulse
          gc.reedo_action_sprite.zoom_x += (gc.reedo_action_sprite_increment * 0.01)
          gc.reedo_action_sprite.zoom_y += (gc.reedo_action_sprite_increment * 0.01)
          gc.reedo_action_sprite_increment *= -1 if (gc.reedo_action_sprite.zoom_x > 2.0) || (gc.reedo_action_sprite.zoom_x < 1.0)
        elsif gc.reedo_action_style == 2 # punch
          gc.reedo_action_sprite.x += (gc.reedo_action_sprite_increment * REEDO_SBS::PUNCH_SPEED)
          gc.reedo_action_sprite_increment *= -1 if (gc.reedo_action_sprite.x < gc.reedo_shadow_sprite.x - REEDO_SBS::PUNCH_DISTANCE) || (gc.reedo_action_sprite.x > gc.reedo_shadow_sprite.x)
        end
        gc.reedo_action_sprite.update
      else
        gc.reedo_action_sprite.angle = 0
        gc.reedo_action_sprite.zoom_x = 1.0
        gc.reedo_action_sprite.zoom_y = 1.0
        gc.reedo_action_sprite.x = gc.reedo_shadow_sprite.x
      end
     
      if sprite.battler.dead?
        if gc.reedo_is_dead == false
          gc.moveto(gc.x + REEDO_SBS::ACTOR_DEATH_OFFSET_X, gc.y + REEDO_SBS::ACTOR_DEATH_OFFSET_Y)
          gc.reedo_shadow_sprite.visible = false
          gc.opacity = REEDO_SBS::ACTOR_DEATH_OPACITY
          sc.angle = REEDO_SBS::ACTOR_DEATH_ANGLE
          sc.tone.set(REEDO_SBS::ACTOR_DEATH_TONE)
          gc.reedo_is_dead = true
        end
      else
        if gc.reedo_is_dead == true
          gc.moveto(gc.x - REEDO_SBS::ACTOR_DEATH_OFFSET_X, gc.y - REEDO_SBS::ACTOR_DEATH_OFFSET_Y)
          gc.reedo_shadow_sprite.visible = true
          gc.opacity = 255
          sc.angle = 0
          sc.tone.set(0,0,0)
          gc.reedo_is_dead = false
        end
        if sprite.battler.reedo_damage_time > 0
          sc.tone.set(255,0,0) if sc.tone.red == 0
          sprite.battler.reedo_damage_time -= 1
        else
          sc.tone.set(0,0,0) if sc.tone.red == 255
        end
      end
      sc.update
      gc.update
      sprite.update
    end
  end
 
  def reedo_game_char(index)
    @reedo_game_chars[index]
  end
 
  def reedo_sprite_char(index)
    @reedo_sprite_chars[index]
  end
 
  def reedo_actor_sprites
    @actor_sprites
  end
end

class Scene_Battle
  attr_accessor :reedo_victory_dance
  attr_accessor :reedo_run_away
  attr_reader :subject
   
  alias reedo_sbs_sb_start start
  def start
    @reedo_victory_dance = false
    @reedo_run_away = false
    if !$BTEST
      @reedo_map_x = $game_map.display_x
      @reedo_map_y = $game_map.display_y
      $game_map.set_display_pos(0, 0)
    else
      $game_map = Game_Map.new
      $game_map.setup(1)
    end
    reedo_sbs_sb_start
  end
 
  alias reedo_sbs_sb_terminate terminate
  def terminate
    if !$BTEST
      $game_map.set_display_pos(@reedo_map_x, @reedo_map_y)
    end
    reedo_sbs_sb_terminate
  end
 
  alias reedo_sbs_sb_execute_action execute_action
  def execute_action
    if @subject.is_a?(Game_Actor)
      @subject.reedo_is_acting = true
      @spriteset.update_actors
      wait(15)
      if !@subject.current_action.reedo_guard?
        reedo_move_inout(-REEDO_SBS::ACTOR_STEP_DISTANCE)
        gc = @subject.reedo_sbs_gc
        iconidx = -1
        if @subject.current_action.item.is_a?(RPG::Skill)
          if @subject.current_action.item.id == REEDO_SBS::ATTACK_SKILL_ID
            iconidx = @subject.weapons[0].icon_index if @subject.weapons[0]
            iconidx = REEDO_SBS::UNARMED_ICON if iconidx < 0
            if iconidx == REEDO_SBS::UNARMED_ICON
              gc.reedo_action_style = REEDO_SBS::UNARMED_STYLE
            elsif REEDO_SBS::NO_MOVE_WEAPON_TYPES.include?(@subject.weapons[0].wtype_id)
              gc.reedo_action_style = 3 #none
            elsif REEDO_SBS::PUNCH_WEAPON_TYPES.include?(@subject.weapons[0].wtype_id)
              gc.reedo_action_style = 2 #punch
            elsif REEDO_SBS::PULSE_WEAPON_TYPES.include?(@subject.weapons[0].wtype_id)
              gc.reedo_action_style = 1 #pulse
            else
              gc.reedo_action_style = 0 #swing
            end
          else
            iconidx = @subject.current_action.item.icon_index
            gc.reedo_action_style = 1 #pulse
          end
        elsif @subject.current_action.item.is_a?(RPG::Item)
          iconidx = @subject.current_action.item.icon_index
          gc.reedo_action_style = 1
        end
        gc.reedo_draw_icon(iconidx)
      else
        reedo_move_inout(REEDO_SBS::ACTOR_STEP_DISTANCE / 2)
      end
    end
    reedo_sbs_sb_execute_action
    if @subject.is_a?(Game_Actor)
      if !@subject.current_action.reedo_guard?
        gc = @subject.reedo_sbs_gc
        gc.reedo_draw_icon(-1)
        reedo_move_inout(REEDO_SBS::ACTOR_STEP_DISTANCE)
      else
        reedo_move_inout(-(REEDO_SBS::ACTOR_STEP_DISTANCE / 2))
      end
      @subject.reedo_is_acting = false
    end
  end
 
  alias reedo_sbs_sb_show_animation show_animation
  def show_animation(targets, animation_id)
    oktargets = []
    targets.each do |sprite|
      if sprite.is_a?(Game_Actor)
        if animation_id == -1
          sprite.reedo_sbs_gc.animation_id = REEDO_SBS::ENEMY_DEFAULT_ATTACK
        else
          sprite.reedo_sbs_gc.animation_id = animation_id
        end
      else
        oktargets.push(sprite)
      end
    end
     reedo_sbs_sb_show_animation(oktargets, animation_id)
  end
 
  def reedo_move_inout(dist)
    i = 0
    while i < REEDO_SBS::ACTOR_STEPS_IN_OUT
      gc = @subject.reedo_sbs_gc
      gc.moveto(gc.x + dist, gc.y)
      gc.reedo_shadow_sprite.x = (gc.x * 32)
      update_for_wait
      i += 1
    end  
  end
 
  def reedo_turn_and_run
    @reedo_run_away = true
    @spriteset.update_actors
    wait(15)
    @spriteset.reedo_actor_sprites.each_with_index do |sprite, i|
      gc = @spriteset.reedo_game_char(i)
      gc.set_direction(6)
      gc.moveto(gc.x + 0.5, gc.y)
      gc.reedo_shadow_sprite.x = (gc.x * 32)
    end
  end
 
  def reedo_cancel_run
    @reedo_run_away = false
    @spriteset.reedo_actor_sprites.each_with_index do |sprite, i|
      gc = @spriteset.reedo_game_char(i)
      gc.set_direction(4)
      gc.moveto(gc.x - 0.5, gc.y)
      gc.reedo_shadow_sprite.x = (gc.x * 32)
    end
    return false
  end
end

I'll inspect yanfly visual battlers, but yes it may be the simple one you want.
Yanfly visual battlers has the step forward motion but no weapons.

I've also see an example of Tankentai battle system that would work. Other examples have the battlers moving to the enemy, but it looks like you can configure it to just move slightly forward.
Thank you! I'll check it out as soon as I can.
 
Joined
Jan 25, 2022
Messages
76
Reaction score
65
First Language
English
Primarily Uses
RMVXA
Page 6 has a link to another site with the script.
Apparently the site is down again. Happens every few days.
So here is the script. It almost does what you want. The difference is that is shows the weapon like an animation frames - back and forth.
Ruby:
###############################################################################
##  RSSBSACE - Reedo's Simple Side Battle System (for VX ACE)
##  Version 1.7b
##  September 30, 2013
##  By Reedo
###############################################################################
##  REFERENCES
##
##  None.  This is an original script by Reedo.
###############################################################################
##  FEATURES
##
##  + Draw the party on the right side of the screen, facing left, using the actor graphic specified in the database and in a formation fitting the Ace battle background layout.
##  + Place a shadow on the ground beneath living actors.
##  + Show the actor's stepping animation on their turn and when acting if able to take actions.
##  + Make the actor step toward the enemy when taking an action other than guarding.
##  + Show animations for all actor actions as defined in the database for the particular action being performed.
##  + Show animations for all enemy actions as defined in the database, or a default animation if none is defined (e.g. normal attack)
##  + Flash the actor red when they successfully receive a hostile action.
##  + Show dead actors as faded, whitened, and rotated to lay on their back.
##  + Make living actors perform a "victory dance" when the battle ends (they jump and spin).
##  + Optionally "mirror" enemy images to make them face to the right.
##    = Version 1.2 =
##  + Actors step back when guarding.
##  + Actors start facing backward and jump when surprised.
##  + Actors start facing down and flashing white on preemptive strike.
##   = Version 1.4 =
##  + Actors turn and move half a step to the right when attempting to flee.
##    = Version 1.6 =
##  + Show weapon or skill icon as moving (swinging, punching or pulsing) graphic during actions.
##    (by popular demand!)
##  + Now compatible with "battle test" from within the database.
##    = Version 1.7 =
##  + Additional options for weapon icon movement by weapon type.
##  + Corrected animations to only play on RSSBS visual battlers.
##  + Corrected bug on escape (caught by Macatlas - thanks!).
##  + Corrected bug on no weapon equipped (caught by comprisedpuma).
##
###############################################################################
##  COMPATIBILITY
##
##  Should be compatible with most other scripts.
##
##  OVERWRITES (1)
##    Spriteset_Battle.update_actors
##
##  STATE CHANGES (1)
##    Map scroll position (display_x, display_y) is stored and set to 0,0 when
##    battle begins, and then is restored when battle ends.
###############################################################################
##  REQUIREMENTS
##
##  None for installation and operation.
##
##  However, enemy troops will need to be repositioned manually in the database
##  editor. This script may work best with all custom enemy images designed for
##  side-battle view.
###############################################################################
##  INSTALLATION
##
##  Plug-and-play.
##
##  Insert below Materials, above other add-on scripts.
###############################################################################
##  RIGHTS & RESTRICTIONS
##
##  As with most Reedo scripts, this script is free to re-use, as-is,
##  in personal, educational, and commercial RPGVX Ace development projects,
##  providing that:  this script is credited in writing displayed readily
##  to the user of the final compiled code assembly.
##
##  Reedo retains all rights of intellect and ownership.
##  You forego all rights of warranty by utilizing this script.
###############################################################################

###############################################################################
##  USER OPTIONS
###############################################################################
module REEDO_SBS
  ACTOR_START_TOP = 6.2     # Top position (in tiles) for first actor in party
  ACTOR_START_LEFT = 12.5   # Left position (in tiles) for first actor in party
  ACTOR_STAGGER = false      # Enables staggered layout. Set false and chance start left to 12 for angled line.
  ACTOR_STAGGER_HORZ = 1.0  # The amount to recess each actor to the right (in tiles)
  ACTOR_STAGGER_VERT = 0.5  # The vertical spacing between characters (in tiles)
  ACTOR_STEPS_IN_OUT = 10   # The number of steps to take when moving to attack
  ACTOR_STEP_DISTANCE = 0.1 # The distance to move with each step (in tiles)
 
  ACTOR_DEATH_OPACITY = 125   # Transparency of dead actors
  ACTOR_DEATH_TONE = Tone.new(128, 128, 128, 0)  # Overlay color of dead actors
  ACTOR_DEATH_ANGLE = 270     # Rotation angle of dead actor sprite
  ACTOR_DEATH_OFFSET_X = -0.6 # Offset in tiles for dead actors
  ACTOR_DEATH_OFFSET_Y = -0.2 # Offset in tiles for dead actors
 
  VICTORY_DANCE_ENABLED = true      # Actors spin and jump on victory if alive and movable
  VICTORY_DANCE_JUMP_HEIGHT = 1.3   # The number of tiles an actor moves upward
  VICTORY_DANCE_JUMP_HOVER = 4      # The number of frames to wait in the air
  VICTORY_DANCE_JUMP_WAIT = 70      # The number of frames before jumping again
 
  ACTOR_SHADOW_IMAGE = "Shadow"       # The name of the system image to use
  ACTOR_SHADOW_CUSTOM_PICTURE = nil   # The name of a resource picture to use instead; nil to use system image
 
  PREEMPTIVE_TIME = 120   # The number of frames to flash white on preemptive strike
  SURPRISE_TIME = 90      # The number of frames to jump facing backward on surprise
  DAMAGE_RED_TIME = 15    # Number of frames actor turns red when damaged
 
  ATTACK_SKILL_ID = 1     # The Id in the database for the skill used as the default attack
  ENEMY_DEFAULT_ATTACK = 7    # AnimationId for enemy actions with no animation
  ACTION_SPRITE_INCREMENT = 5 # The amount of movement for swinging or pulsing action icons
 
  UNARMED_ICON = 175    # The icon to use if the actor has no weapon equipped.
  UNARMED_STYLE = 2     # The style to use when there is no weapon equipped.
  PUNCH_SPEED = 0.4
  PUNCH_DISTANCE = 32
  PULSE_WEAPON_TYPES = []         # Weapons with these weapon type ids will pulse like items or skills
  NO_MOVE_WEAPON_TYPES = []       # Weapons with these weapon type ids will show without moving
  PUNCH_WEAPON_TYPES = [2, 6, 10] # Weapons with these weapon type ids will move toward the enemy and back
                                  # All other weapon type ids will swing
 
  # Specify the ID of enemies who should have their image flipped in battle
  FLIP_ENEMY = [
                2, 3, 4, 5, 8, 10, 12, 13, 14, 16, 17,
                18, 19, 21, 22, 23, 25, 28, 29,
              
               ]
 
  FORCE_AUTOTILE_BACKGROUND = true # attempt to use tile-based background on all maps

end
###############################################################################
##  MAIN SCRIPT
###############################################################################
##  EDITS BEYOND THIS POINT ARE AT YOUR OWN RISK!!!
###############################################################################
module BattleManager
  class << self
    alias reedo_sbs_bm_process_victory process_victory
    alias reedo_sbs_bm_process_escape process_escape
    alias reedo_sbs_bm_gain_exp gain_exp
  end
 
  def self.gain_exp
    if $imported && $imported["YEA-VictoryAftermath"]
      tmp_gc = []
      $game_party.all_members.each do |actor|
        tmp_gc.push(actor.reedo_sbs_gc)
        actor.reedo_sbs_gc = nil if actor.reedo_sbs_gc
      end
      reedo_sbs_bm_gain_exp
      $game_party.all_members.each_with_index do |actor, i|
        actor.reedo_sbs_gc = tmp_gc[i]
      end
    else
      reedo_sbs_bm_gain_exp
    end
  end
 
  def self.process_victory
    SceneManager.scene.reedo_victory_dance = true if REEDO_SBS::VICTORY_DANCE_ENABLED
    reedo_sbs_bm_process_victory
  end
 
  def self.process_escape
    SceneManager.scene.reedo_turn_and_run
    SceneManager.scene.reedo_cancel_run if !reedo_sbs_bm_process_escape
  end
 
  def self.reedo_preemptive?
    @preemptive
  end
 
  def self.reedo_surprise?
    @surprise
  end
 
  def self.reedo_get_actor_index
    return @actor_index
  end
end

class Game_Action
  def reedo_guard?
    return item == $data_skills[subject.guard_skill_id]
  end
end

class Game_Actor
  attr_accessor :reedo_sbs_gc
  attr_accessor :reedo_damage_time
  attr_accessor :reedo_is_acting
 
  alias reedo_sbs_ga_initialize initialize
  def initialize(actor_id)
    reedo_sbs_ga_initialize(actor_id)
    @reedo_damage_time = 0
    @reedo_is_acting = false
  end
 
  alias reedo_sbs_ga_perform_damage_effect perform_damage_effect
  def perform_damage_effect
    @reedo_damage_time = REEDO_SBS::DAMAGE_RED_TIME
    reedo_sbs_ga_perform_damage_effect
  end
end

class Game_Character
  attr_accessor :opacity
  attr_accessor :priority_type
  attr_accessor :reedo_start_top
  attr_accessor :reedo_jump_delta
  attr_accessor :reedo_shadow_sprite
  attr_accessor :reedo_is_dead
  attr_accessor :reedo_action_sprite
  attr_accessor :reedo_action_sprite_increment
  attr_accessor :reedo_action_style
 
  def reedo_step_on
    cmd = RPG::MoveCommand.new(Game_Character::ROUTE_STEP_ANIME_ON)
    process_move_command(cmd)
  end
 
  def reedo_step_off
    cmd = RPG::MoveCommand.new(Game_Character::ROUTE_STEP_ANIME_OFF)
    process_move_command(cmd)
  end
 
  def reedo_create_action_sprite(view)
    @reedo_action_style = 1
    @reedo_action_sprite_increment = REEDO_SBS::ACTION_SPRITE_INCREMENT
    @reedo_action_sprite = Sprite_Base.new(view)
    @reedo_action_sprite.bitmap = Bitmap.new(24, 24)
    @reedo_action_sprite.src_rect = Rect.new(0, 0, 24, 24)
    @reedo_action_sprite.ox = 24
    @reedo_action_sprite.oy = 24
    @reedo_action_sprite.x = (self.x * 32) - 28
    @reedo_action_sprite.y = (self.y * 32) + 18
    @reedo_action_sprite.z = (self.priority_type * 100) + 1
    @reedo_action_sprite.visible = false
  end
 
  def reedo_create_shadow_sprite(view)
    @reedo_shadow_sprite = Sprite_Base.new(view)
    bmp = Cache.picture(REEDO_SBS::ACTOR_SHADOW_CUSTOM_PICTURE) if REEDO_SBS::ACTOR_SHADOW_CUSTOM_PICTURE != nil
    bmp = Cache.system(REEDO_SBS::ACTOR_SHADOW_IMAGE) if bmp == nil
    @reedo_shadow_sprite.bitmap = bmp
    @reedo_shadow_sprite.src_rect = Rect.new(0, 0, bmp.width, bmp.height)
    @reedo_shadow_sprite.x = (self.x * 32)
    @reedo_shadow_sprite.y = (self.y * 32)
    @reedo_shadow_sprite.z = (self.priority_type * 100) - 1
  end
 
  alias reedo_sbs_gc_update update
  def update
    reedo_sbs_gc_update
    @shadow_sprite.update if @shadow_sprite != nil
  end
 
  def reedo_draw_icon(icon_index)
    @reedo_action_sprite.bitmap.clear
    @reedo_action_sprite.visible = (icon_index > 0)
    return if icon_index < 0
    bitmap = Cache.system("Iconset")
    rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
    @reedo_action_sprite.bitmap.blt(0, 0, bitmap, rect, 255)
  end
end

class Spriteset_Battle
  alias reedo_sbs_ssb_initialize initialize
  def initialize
    @reedo_dance_wait = 0
    reedo_sbs_ssb_initialize
  end
 
  alias reedo_sbs_ssb_dispose dispose
  def dispose
    for actor in $game_party.battle_members
      actor.reedo_sbs_gc.reedo_action_sprite.dispose
      actor.reedo_sbs_gc.reedo_shadow_sprite.dispose
      actor.reedo_sbs_gc = nil
    end
    @reedo_sprite_chars.each {|sprite| sprite.dispose }
    reedo_sbs_ssb_dispose
  end
 
  alias reedo_sbs_ssb_create_actors create_actors
  def create_actors
    dispose_actors if @actor_sprites != nil
    reedo_sbs_ssb_create_actors

    @reedo_game_chars = []
    @reedo_sprite_chars = []
    @actor_sprites = []
    @reedo_surprise_time = 0
    @reedo_preemptive_time = 0
  
    i = 1
    for actor in $game_party.battle_members
      gc = Game_Character.new
      gc.set_graphic(actor.character_name, actor.character_index)
      if BattleManager.reedo_surprise?
        gc.set_direction(6)
        @reedo_surprise_time = REEDO_SBS::SURPRISE_TIME
      elsif BattleManager.reedo_preemptive?
        @reedo_preemptive_time = REEDO_SBS::PREEMPTIVE_TIME
        @reedo_preemptive_tone = 0
        @reedo_preemptive_delta = 10
        gc.set_direction(2)
      else
        gc.set_direction(4)
      end
      gc.priority_type = i
      bc = Sprite_Character.new(@viewport1, gc)
      sb = Sprite_Battler.new(@viewport1, actor)
      top = REEDO_SBS::ACTOR_START_TOP + (i * REEDO_SBS::ACTOR_STAGGER_VERT)
      left = REEDO_SBS::ACTOR_START_LEFT
      if REEDO_SBS::ACTOR_STAGGER
        left += REEDO_SBS::ACTOR_STAGGER_HORZ if i % 2 == 0
      else
        left += REEDO_SBS::ACTOR_STAGGER_HORZ * i
      end
      gc.reedo_is_dead = false
      gc.reedo_start_top = top
      gc.reedo_jump_delta = -0.1
      gc.moveto(left, top)
      gc.reedo_create_shadow_sprite(@viewport1)
      gc.reedo_create_action_sprite(@viewport1)
      bc.update
      @actor_sprites.push(sb) 
      @reedo_sprite_chars.push(bc)
      @reedo_game_chars.push(gc)
      actor.reedo_sbs_gc = gc
      i += 1
    end
  end
 
  alias reedo_sbs_ssb_create_enemies create_enemies
  def create_enemies
    reedo_sbs_ssb_create_enemies
    for sprite in @enemy_sprites
      sprite.mirror = true if REEDO_SBS::FLIP_ENEMY.include?(sprite.battler.enemy_id)
    end
  end
 
  alias reedo_sbs_ssb_create_blurry_background_bitmap create_blurry_background_bitmap
  def create_blurry_background_bitmap
    if REEDO_SBS::FORCE_AUTOTILE_BACKGROUND && !$BTEST
      tryName1 = battleback1_name
      return reedo_sbs_ssb_create_blurry_background_bitmap if tryName1 == nil
      wall = Cache.battleback1(tryName1)
      tryName2 = battleback2_name
      bitmap = Bitmap.new(640, 480)
      bitmap.blt(0, 0, wall, wall.rect)
      if tryName2 != nil
        floor = Cache.battleback2(tryName2)
        bitmap.blt(0, 320, floor, floor.rect)
      end
      bitmap
    else
      reedo_sbs_ssb_create_blurry_background_bitmap
    end
  end
 
  def reedo_update_victory_dance
    if @reedo_dance_wait == 0
      @actor_sprites.each_with_index do |sprite, i|
        if sprite.battler.alive? && sprite.battler.movable?
          gc = @reedo_game_chars[i]
          gc.moveto(gc.x, gc.y + gc.reedo_jump_delta)
          if gc.y < gc.reedo_start_top - REEDO_SBS::VICTORY_DANCE_JUMP_HEIGHT
            gc.reedo_jump_delta = 0.1
            @reedo_dance_wait = REEDO_SBS::VICTORY_DANCE_JUMP_HOVER
          end
          if gc.y > gc.reedo_start_top
            gc.reedo_jump_delta = -0.1
            gc.set_direction(4)
            @reedo_dance_wait = REEDO_SBS::VICTORY_DANCE_JUMP_WAIT
          end
          if ((gc.y - REEDO_SBS::VICTORY_DANCE_JUMP_HEIGHT) * 10).to_int % (REEDO_SBS::VICTORY_DANCE_JUMP_HEIGHT / 4 * 10).to_int == 0
            if @reedo_dance_wait == 0
              case gc.direction
                when 4; gc.set_direction(2)
                when 2; gc.set_direction(6)
                when 6; gc.set_direction(8)
                when 8; gc.set_direction(4)
              end
            end
          end
        end
      end
    else
      @reedo_dance_wait -= 1
    end
  end
 
  def reedo_update_surprise
    @actor_sprites.each_with_index do |sprite, i|
      if sprite.battler.alive? && sprite.battler.movable?
        gc = @reedo_game_chars[i]
        if @reedo_surprise_time > 1
          gc.moveto(gc.x, gc.y + gc.reedo_jump_delta)
          if gc.y < gc.reedo_start_top - REEDO_SBS::VICTORY_DANCE_JUMP_HEIGHT
            gc.reedo_jump_delta = 0.1
          end
          if gc.y > gc.reedo_start_top
            gc.reedo_jump_delta = -0.1
          end
        else
          gc.moveto(gc.x, gc.reedo_start_top)
          gc.set_direction(4)
        end
      end
    end
    @reedo_surprise_time -= 1
  end
 
  def reedo_update_preemptive
    @actor_sprites.each_with_index do |sprite, i|
      if sprite.battler.alive? && sprite.battler.movable?
        sc = @reedo_sprite_chars[i]
        if @reedo_preemptive_time > 1
          sc.tone.set(@reedo_preemptive_tone,@reedo_preemptive_tone,@reedo_preemptive_tone)
          @reedo_preemptive_tone += @reedo_preemptive_delta
          @reedo_preemptive_delta *= -1 if @reedo_preemptive_tone >= 255
          @reedo_preemptive_delta *= -1 if @reedo_preemptive_tone <= 0
        else
          sc.tone.set(0,0,0)
          @reedo_game_chars[i].set_direction(4)
        end
      end
    end
    @reedo_preemptive_time -= 1
  end
 
  def update_actors
    dance = false
    run = false
    if SceneManager.scene.is_a?(Scene_Battle)
      run = SceneManager.scene.reedo_run_away
      dance = SceneManager.scene.reedo_victory_dance
      reedo_update_victory_dance if dance
    end
    reedo_update_surprise if @reedo_surprise_time > 0
    reedo_update_preemptive if @reedo_preemptive_time > 0

    @actor_sprites.each_with_index do |sprite, i|
      gc = @reedo_game_chars[i]
      sc = @reedo_sprite_chars[i]
      if sprite.battler.movable?  && (BattleManager.reedo_get_actor_index == i || sprite.battler.reedo_is_acting || dance || run)
        gc.reedo_step_on
      else
        gc.reedo_step_off
      end
    
      if gc.reedo_action_sprite.visible then
        if gc.reedo_action_style == 0 # swing
          gc.reedo_action_sprite.angle += gc.reedo_action_sprite_increment
          gc.reedo_action_sprite_increment *= -1 if (gc.reedo_action_sprite.angle > 90) || (gc.reedo_action_sprite.angle < 0)
        elsif gc.reedo_action_style == 1 # pulse
          gc.reedo_action_sprite.zoom_x += (gc.reedo_action_sprite_increment * 0.01)
          gc.reedo_action_sprite.zoom_y += (gc.reedo_action_sprite_increment * 0.01)
          gc.reedo_action_sprite_increment *= -1 if (gc.reedo_action_sprite.zoom_x > 2.0) || (gc.reedo_action_sprite.zoom_x < 1.0)
        elsif gc.reedo_action_style == 2 # punch
          gc.reedo_action_sprite.x += (gc.reedo_action_sprite_increment * REEDO_SBS::PUNCH_SPEED)
          gc.reedo_action_sprite_increment *= -1 if (gc.reedo_action_sprite.x < gc.reedo_shadow_sprite.x - REEDO_SBS::PUNCH_DISTANCE) || (gc.reedo_action_sprite.x > gc.reedo_shadow_sprite.x)
        end
        gc.reedo_action_sprite.update
      else
        gc.reedo_action_sprite.angle = 0
        gc.reedo_action_sprite.zoom_x = 1.0
        gc.reedo_action_sprite.zoom_y = 1.0
        gc.reedo_action_sprite.x = gc.reedo_shadow_sprite.x
      end
    
      if sprite.battler.dead?
        if gc.reedo_is_dead == false
          gc.moveto(gc.x + REEDO_SBS::ACTOR_DEATH_OFFSET_X, gc.y + REEDO_SBS::ACTOR_DEATH_OFFSET_Y)
          gc.reedo_shadow_sprite.visible = false
          gc.opacity = REEDO_SBS::ACTOR_DEATH_OPACITY
          sc.angle = REEDO_SBS::ACTOR_DEATH_ANGLE
          sc.tone.set(REEDO_SBS::ACTOR_DEATH_TONE)
          gc.reedo_is_dead = true
        end
      else
        if gc.reedo_is_dead == true
          gc.moveto(gc.x - REEDO_SBS::ACTOR_DEATH_OFFSET_X, gc.y - REEDO_SBS::ACTOR_DEATH_OFFSET_Y)
          gc.reedo_shadow_sprite.visible = true
          gc.opacity = 255
          sc.angle = 0
          sc.tone.set(0,0,0)
          gc.reedo_is_dead = false
        end
        if sprite.battler.reedo_damage_time > 0
          sc.tone.set(255,0,0) if sc.tone.red == 0
          sprite.battler.reedo_damage_time -= 1
        else
          sc.tone.set(0,0,0) if sc.tone.red == 255
        end
      end
      sc.update
      gc.update
      sprite.update
    end
  end
 
  def reedo_game_char(index)
    @reedo_game_chars[index]
  end
 
  def reedo_sprite_char(index)
    @reedo_sprite_chars[index]
  end
 
  def reedo_actor_sprites
    @actor_sprites
  end
end

class Scene_Battle
  attr_accessor :reedo_victory_dance
  attr_accessor :reedo_run_away
  attr_reader :subject
  
  alias reedo_sbs_sb_start start
  def start
    @reedo_victory_dance = false
    @reedo_run_away = false
    if !$BTEST
      @reedo_map_x = $game_map.display_x
      @reedo_map_y = $game_map.display_y
      $game_map.set_display_pos(0, 0)
    else
      $game_map = Game_Map.new
      $game_map.setup(1)
    end
    reedo_sbs_sb_start
  end
 
  alias reedo_sbs_sb_terminate terminate
  def terminate
    if !$BTEST
      $game_map.set_display_pos(@reedo_map_x, @reedo_map_y)
    end
    reedo_sbs_sb_terminate
  end
 
  alias reedo_sbs_sb_execute_action execute_action
  def execute_action
    if @subject.is_a?(Game_Actor)
      @subject.reedo_is_acting = true
      @spriteset.update_actors
      wait(15)
      if !@subject.current_action.reedo_guard?
        reedo_move_inout(-REEDO_SBS::ACTOR_STEP_DISTANCE)
        gc = @subject.reedo_sbs_gc
        iconidx = -1
        if @subject.current_action.item.is_a?(RPG::Skill)
          if @subject.current_action.item.id == REEDO_SBS::ATTACK_SKILL_ID
            iconidx = @subject.weapons[0].icon_index if @subject.weapons[0]
            iconidx = REEDO_SBS::UNARMED_ICON if iconidx < 0
            if iconidx == REEDO_SBS::UNARMED_ICON
              gc.reedo_action_style = REEDO_SBS::UNARMED_STYLE
            elsif REEDO_SBS::NO_MOVE_WEAPON_TYPES.include?(@subject.weapons[0].wtype_id)
              gc.reedo_action_style = 3 #none
            elsif REEDO_SBS::PUNCH_WEAPON_TYPES.include?(@subject.weapons[0].wtype_id)
              gc.reedo_action_style = 2 #punch
            elsif REEDO_SBS::PULSE_WEAPON_TYPES.include?(@subject.weapons[0].wtype_id)
              gc.reedo_action_style = 1 #pulse
            else
              gc.reedo_action_style = 0 #swing
            end
          else
            iconidx = @subject.current_action.item.icon_index
            gc.reedo_action_style = 1 #pulse
          end
        elsif @subject.current_action.item.is_a?(RPG::Item)
          iconidx = @subject.current_action.item.icon_index
          gc.reedo_action_style = 1
        end
        gc.reedo_draw_icon(iconidx)
      else
        reedo_move_inout(REEDO_SBS::ACTOR_STEP_DISTANCE / 2)
      end
    end
    reedo_sbs_sb_execute_action
    if @subject.is_a?(Game_Actor)
      if !@subject.current_action.reedo_guard?
        gc = @subject.reedo_sbs_gc
        gc.reedo_draw_icon(-1)
        reedo_move_inout(REEDO_SBS::ACTOR_STEP_DISTANCE)
      else
        reedo_move_inout(-(REEDO_SBS::ACTOR_STEP_DISTANCE / 2))
      end
      @subject.reedo_is_acting = false
    end
  end
 
  alias reedo_sbs_sb_show_animation show_animation
  def show_animation(targets, animation_id)
    oktargets = []
    targets.each do |sprite|
      if sprite.is_a?(Game_Actor)
        if animation_id == -1
          sprite.reedo_sbs_gc.animation_id = REEDO_SBS::ENEMY_DEFAULT_ATTACK
        else
          sprite.reedo_sbs_gc.animation_id = animation_id
        end
      else
        oktargets.push(sprite)
      end
    end
     reedo_sbs_sb_show_animation(oktargets, animation_id)
  end
 
  def reedo_move_inout(dist)
    i = 0
    while i < REEDO_SBS::ACTOR_STEPS_IN_OUT
      gc = @subject.reedo_sbs_gc
      gc.moveto(gc.x + dist, gc.y)
      gc.reedo_shadow_sprite.x = (gc.x * 32)
      update_for_wait
      i += 1
    end 
  end
 
  def reedo_turn_and_run
    @reedo_run_away = true
    @spriteset.update_actors
    wait(15)
    @spriteset.reedo_actor_sprites.each_with_index do |sprite, i|
      gc = @spriteset.reedo_game_char(i)
      gc.set_direction(6)
      gc.moveto(gc.x + 0.5, gc.y)
      gc.reedo_shadow_sprite.x = (gc.x * 32)
    end
  end
 
  def reedo_cancel_run
    @reedo_run_away = false
    @spriteset.reedo_actor_sprites.each_with_index do |sprite, i|
      gc = @spriteset.reedo_game_char(i)
      gc.set_direction(4)
      gc.moveto(gc.x - 0.5, gc.y)
      gc.reedo_shadow_sprite.x = (gc.x * 32)
    end
    return false
  end
end

I'll inspect yanfly visual battlers, but yes it may be the simple one you want.
Yanfly visual battlers has the step forward motion but no weapons.

I've also see an example of Tankentai battle system that would work. Other examples have the battlers moving to the enemy, but it looks like you can configure it to just move slightly forward.
Apologies for disappearing for a few weeks, I got sick and then hit a roadblock in designing my game, so I took a break to clear my head and focus on other work.

So, I tried Reedo's script, and to be honest it didn't really suit my needs. I'd like to be able to change the sprite for the actor, and Reedo doesn't allow me to do that. So far, I'm leaning toward Galv's or Yanfly's (honestly I just wish they were combined lol). Either one will need some editing, which of course is a big thing to ask for, so feel free to decline.

If you're up for it, then I think it is possible that I can animate a step-forward animation that would be part of the attack animation sprite already used in Galv's script, which would exclude the need to add that, and limit the amount of editing with that one. Though, I'd still need a way to change the attack sprite to correspond to the weapon's colors and type. Ideally, I would like this to also be sprite-based unlike Reedo's, which used the database icon. I use a generic icon for equipment in the menu, so I'd need some way to do it separately.

On the other hand, Yanfly's script already has the stepping-forward animation. But if we go with that one, I figure it'd require more extensive changes than Galv's would.
 

EntangledPear

Previously No Patience (now patient enough)
Veteran
Joined
Sep 12, 2018
Messages
140
Reaction score
66
First Language
Slovak
Primarily Uses
RMVXA
Have you considered Yami's Battle Symphony script? It has an add-on that lets you use character sprites as enemy battlers and should have the weapon animations and step forward and so on. I'm not sure about compatibilities with other scripts, though. (But it seems to me that Yami and Yanfly cooperated on some stuff, so it might be OK.)

If you want to give it a try, both the main script and the add-ons are here.
 
Joined
Jan 25, 2022
Messages
76
Reaction score
65
First Language
English
Primarily Uses
RMVXA
Have you considered Yami's Battle Symphony script? It has an add-on that lets you use character sprites as enemy battlers and should have the weapon animations and step forward and so on. I'm not sure about compatibilities with other scripts, though. (But it seems to me that Yami and Yanfly cooperated on some stuff, so it might be OK.)

If you want to give it a try, both the main script and the add-ons are here.
Unfortunately, Yami's script is incompatible with some other ones I'm using.
 
Joined
Jan 25, 2022
Messages
76
Reaction score
65
First Language
English
Primarily Uses
RMVXA
I also mentioned Tankentai battle system. Is that incompatible with your scripts?
And what script are incompatible? Maybe it's a script order issue?
It was conflict with Fomar's ATB script, but it turned out to be a load order issue. However, it still has about a 2-second "hang" whenever an action is executed. Though that's minor, and presumably something that can be fixed later down the line.

I looked at Tankentai battle system, but to be honest, I lean more toward Yami's. I'll hold onto it though, in case.

Edit: specifically, the Fomar ATB Script is modified. Here it is.
Ruby:
=begin
YanFly Compatible Customisable ATB/Stamina Based Battle System Script
by Fomar0153
Edited by Deathsia
Further Edits by AnarchCassius
Version 1.5
----------------------
Notes
----------------------
Requires Yanfly Engine Ace - Ace Battle Engine
Customises the battle system to be similar to
ATB or Stamina based battle systems.
----------------------
Instructions
----------------------
Edit variables in CBS to suit your needs.
The guard status should be set to 2~2 turns.
----------------------
Change Log
----------------------
1.0 -> 1.1 Added CTB related options
           Added the ability to pass a turn
           Added options for turn functionality to be based on time
           or number of actions
           Added the ability to change the bar colours based on states
1.1 -> 1.2 Fixed a bug when escaping using CTB mode
1.2 -> 1.4 Players should no longer have any trouble escaping, even with one character dead in battle while using ATB mode
           Yanfly's skill restriction script should work properly now when used with this script
           Various other bug fixes

If any further incompatibilities are found, please report them to Fomar0153, I(Deathsia) simply pointed out bugs he fixed and with my limited scripting knowledge provided a bug fix to allow compatibility with Yanfly's skill restriction script
----------------------
Known bugs
----------------------
None
=end

$imported = {} if $imported.nil?
$imported["Fomar0153-CBS"] = true

module CBS

  MAX_STAMINA = 1000
  RESET_STAMINA = true
 
  # If ATB is set to false then the bars won't appear and
  # the pauses where the bars would be filling up are removed
  # effectively turning this into a CTB system
  ATB = false
  SAMINA_GAUGE_NAME = ""
  ENABLE_PASSING = true
  PASSING_COST = 1000

  # If TURN_LENGTH is set to 0 then a turn length will be
  # decided on number of actions
  # TURN_LENGTH is number of seconds per turn
  TURN_LENGTH = 0
 
  ESCAPE_COST = 1000
  # If reset stamina is set to true then all characters
  # will start with a random amount of stamina capped at
  # the percentage you set.
  # If reset stamina is set to false then this just
  # affects enemies.
  STAMINA_START_PERCENT = 10

  # Default skill cost
  # If you want to customise skill costs do it like this
  # SKILL_COST[skill_id] = cost
  SKILL_COST = []
  SKILL_COST[0] = 1000
  # Attack
  SKILL_COST[1] = 1000
  # Guard
  SKILL_COST[2] = 1000
 
 
  SKILL_COST[34] = 1000
 
  ITEM_COST = 1000

  # If you prefer to have states handle agility buffs then set STATES_HANDLE_AGI to true
  STATES_HANDLE_AGI = false
  # In the following section mult means the amount you multiply stamina gains by
  # if STATES_HANDLE_AGI is set to true then it is only used to determine bar color
  # with debuffs taking precedence over buffs
  STAMINA_STATES = []
  # Default colour
  STAMINA_STATES[0] = [1,14,32]
  # in the form
  # STAMINA_STATES[STATE_ID] = [MULT,FILL_COLOUR,EMPTY_COLOR]
  # e.g. Haste
  STAMINA_STATES[28] = [2,4,32]
  # e.g. Slow 
  STAMINA_STATES[29] = [0.5,8,32]

  #--------------------------------------------------------------------------
  # ● New Method stamina_gain
  #--------------------------------------------------------------------------
  def self.stamina_gain(battler)
    return ((20) * self.stamina_mult(battler)).to_i
    #return ((2 + [0, battler.agi / 10].max) * self.stamina_mult(battler)).to_i
  end
  #--------------------------------------------------------------------------
  # ● New Method stamina_gain
  #--------------------------------------------------------------------------
  def self.stamina_mult(battler)
    return 1 if STATES_HANDLE_AGI
    mult = STAMINA_STATES[0][0]
    for state in battler.states
      unless STAMINA_STATES[state.id].nil?
        mult *= STAMINA_STATES[state.id][0]
      end
    end
    return mult
  end
  #--------------------------------------------------------------------------
  # ● New Method stamina_gain
  #--------------------------------------------------------------------------
  def self.stamina_colors(battler)
    colors = STAMINA_STATES[0]
    for state in battler.states
      unless STAMINA_STATES[state.id].nil?
        if STAMINA_STATES[state.id][0] < colors[0] or colors[0] == 1
          colors = STAMINA_STATES[state.id]
        end
      end
    end
    return colors
  end
  #--------------------------------------------------------------------------
  # ● New Method stamina_start
  #--------------------------------------------------------------------------
  def self.stamina_start(battler)
    battler.stamina = rand(MAX_STAMINA * STAMINA_START_PERCENT / 100)
  end
end

class Game_BattlerBase
  #--------------------------------------------------------------------------
  # ● New attr_accessor
  #--------------------------------------------------------------------------
  attr_accessor :stamina
 
  #--------------------------------------------------------------------------
  # ● Aliases initialize
  #--------------------------------------------------------------------------
  alias yf_fomar_cbs_initialize initialize
  def initialize
    yf_fomar_cbs_initialize
    @stamina = 0
  end
  #--------------------------------------------------------------------------
  # ● New Method stamina_rate
  #--------------------------------------------------------------------------
  def stamina_rate
    @stamina.to_f / CBS::MAX_STAMINA
  end
  #--------------------------------------------------------------------------
  # ● New Method stamina_rate
  #--------------------------------------------------------------------------
  def stamina_gain
    #Removed the bit about imovable actors not incrementing stamina
    #it was causing a major Paralysis bug (it never went away)
    @stamina = [CBS::MAX_STAMINA, @stamina + CBS.stamina_gain(self)].min
  end
  #--------------------------------------------------------------------------
  # ● New Method stamina_color
  #--------------------------------------------------------------------------
  def stamina_color
    for state in @states
      unless CBS::STAMINA_STATES[state].nil?
        return STAMINA_STATES[state]
      end
    end
    return STAMINA_STATES[0]
  end
end

class Scene_Battle < Scene_Base
 
  attr_accessor :last_battler
  #--------------------------------------------------------------------------
  # ● Rewrote update
  #--------------------------------------------------------------------------
  def update
    super
    if (CBS::ENABLE_PASSING and @actor_command_window.active) and Input.press?(:A)
      command_pass
    end
    if BattleManager.in_turn? and !inputting?
      while @subject.nil? and !CBS::ATB
        process_stamina
      end
      if CBS::ATB
        process_stamina
      end
      process_event
      process_action
    end
    BattleManager.judge_win_loss
  end
  #--------------------------------------------------------------------------
  # ● Rewrote Method update_info_viewport
  #--------------------------------------------------------------------------
  def update_info_viewport
    move_info_viewport(0)   if @party_command_window.active
    move_info_viewport(128) if @actor_command_window.active
    move_info_viewport(128)  if BattleManager.in_turn? and !inputting?
  end
  #--------------------------------------------------------------------------
  # ● New Method inputting?
  #--------------------------------------------------------------------------
  def inputting?
    return @actor_command_window.active || @skill_window.active ||
      @item_window.active || @actor_window.active || @enemy_window.active
  end
  #--------------------------------------------------------------------------
  # ● New Method process_stamina
  #--------------------------------------------------------------------------
  def process_stamina
    @actor_command_window.close
    return if @subject
    BattleManager.advance_turn
    all_battle_members.each do |battler|
      battler.stamina_gain
    end
    @status_window.refresh_stamina
    if @status_window.close?
      @status_window.open
     end
    if BattleManager.escaping?
      $game_party.alive_members.each do |battler|
        if battler.stamina < CBS::MAX_STAMINA
          $game_troop.members.each do |enemy|
            if enemy.stamina == CBS::MAX_STAMINA
              #Casey: update time during Flee
              #enemy.run_lunatic_states(:begin)
              #enemy.update_cooldowns #added a line here
              enemy.on_turn_end
              BattleManager.add_action
              enemy.make_actions
              @subject = enemy
            end
          end
          return
        end
      end
      unless BattleManager.process_escape
        $game_party.alive_members.each do |actor|
          actor.stamina -= CBS::ESCAPE_COST
          #Casey: update time during Flee
          #actor.run_lunatic_states(:begin)
          #actor.update_cooldowns #added a line here
          actor.on_turn_end
          BattleManager.add_action
        end
        BattleManager.set_escaping(false)
      end
    end
    all_battle_members.each do |battler|
      if battler.stamina == CBS::MAX_STAMINA
        ### Casey: Lunatic states and paralysis fix
        @subject = battler
        if @last_battler.nil?
          @last_battler = 0
        end
        ### Casey: Moved paralysis handling to here from Stamina gain
        if not battler.movable? #and not battler.hidden?
          battler.stamina = 0
          #battler.run_lunatic_states(:begin)
          #@subject.update_cooldowns #added a line here
          ### Casey: And more lines
          battler.on_turn_end
          BattleManager.add_action
          return
        end
        if not @last_battler == battler
          #battler.run_lunatic_states(:begin)
          @last_battler = battler
          #@subject.update_cooldowns #added a line here
          ### Casey: And more lines
          battler.on_turn_end
          BattleManager.add_action
        end
        battler.make_actions
        if @subject.inputable? and battler.is_a?(Game_Actor) and not battler.hidden?
          @actor_command_window.setup(@subject)
          @status_window.index = @subject.index
          BattleManager.set_actor(battler)
        end
        return
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● Rewrote start_party_command_selection Yanfly version
  #--------------------------------------------------------------------------
  def start_party_command_selection
    unless scene_changing?
      refresh_status
      @status_window.unselect
      @status_window.open
      if BattleManager.input_start
        @actor_command_window.close
        @party_command_window.setup
      else
        @party_command_window.deactivate
        turn_start
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● Rewrote start_actor_command_selection
  #--------------------------------------------------------------------------
  def start_actor_command_selection
    @party_command_window.close
    BattleManager.set_escaping(false)
    turn_start
  end
  #--------------------------------------------------------------------------
  # ● Rewrote prior_command Yanfly version
  #--------------------------------------------------------------------------
  def prior_command
    redraw_current_status
    start_party_command_selection
  end
  #--------------------------------------------------------------------------
  # ● Rewrote process_action
  #--------------------------------------------------------------------------
  def process_action
    return if scene_changing?
    if !@subject || !@subject.current_action
      @subject = BattleManager.next_subject
    end
    if Input.trigger?(:B) and (@subject == nil)
      start_party_command_selection
    end
    return unless @subject
    if @subject.current_action
      @subject.current_action.prepare
      if @subject.current_action.valid?
        @status_window.open
        execute_action
      end
      @subject.remove_current_action
      refresh_status
      @log_window.display_auto_affected_status(@subject)
      @log_window.wait_and_clear
    end
    process_action_end unless @subject.current_action
  end
  #--------------------------------------------------------------------------
  # ● Aliases use_item
  #--------------------------------------------------------------------------
  alias cbs_use_item use_item
  def use_item
    cbs_use_item
    @subject.stamina_loss
  end
  #--------------------------------------------------------------------------
  # ● Rewrote turn_end
  #--------------------------------------------------------------------------
  def turn_end
    all_battle_members.each do |battler|
      #battler.on_turn_end
      refresh_status
      @log_window.display_auto_affected_status(battler)
      @log_window.wait_and_clear
    end
    #BattleManager.turn_end
    #process_event
    #start_party_command_selection
  end
  #--------------------------------------------------------------------------
  # ● Rewrote command_fight
  #--------------------------------------------------------------------------
  def command_fight
    BattleManager.next_command
    start_actor_command_selection
  end
  #--------------------------------------------------------------------------
  # ● Rewrote command_escape
  #--------------------------------------------------------------------------
  def command_escape
    @party_command_window.close
    BattleManager.set_escaping(true)
    turn_start
  end
  #--------------------------------------------------------------------------
  # ● New method command_pass
  #--------------------------------------------------------------------------
  def command_pass
    BattleManager.actor.stamina -= CBS::PASSING_COST
    BattleManager.clear_actor
    @subject = nil
    turn_start
    @actor_command_window.active = false
    @actor_command_window.close
  end
  #--------------------------------------------------------------------------
  # ● Destroyed next_command
  #--------------------------------------------------------------------------
  def next_command
    @status_window.show
    @actor_command_window.show
    @status_aid_window.hide
  end
end




module BattleManager
  #--------------------------------------------------------------------------
  # ● New attr_accessor
  #--------------------------------------------------------------------------
  attr_accessor :premptive
  attr_accessor :surprise
 
  #--------------------------------------------------------------------------
  # ● Rewrote setup
  #--------------------------------------------------------------------------
  def self.setup(troop_id, can_escape = true, can_lose = false)
    init_members
    $game_troop.setup(troop_id)
    @can_escape = can_escape
    @can_lose = can_lose
     make_escape_ratio
    @escaping = false
    @turn_counter = 0
    @actions_per_turn = $game_party.members.size + $game_troop.members.size
    ($game_party.members + $game_troop.members).each do |battler|
      if battler.is_a?(Game_Enemy) or CBS::RESET_STAMINA
        CBS.stamina_start(battler)
      end
      if !battler.is_a?(Game_Enemy) and @surprise
        battler.stamina += 1000
      end
      if battler.is_a?(Game_Enemy) and @premptive
        battler.stamina += 1000
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● New Method set_escaping
  #--------------------------------------------------------------------------
  def self.set_escaping(escaping)
    @escaping = escaping
  end
  #--------------------------------------------------------------------------
  # ● New Method escaping?
  #--------------------------------------------------------------------------
  def self.escaping?
    return @escaping
  end
  #--------------------------------------------------------------------------
  # ● Rewrote turn_start Yanfly version
  #--------------------------------------------------------------------------
  def self.turn_start
    @phase = :turn
    clear_actor
    $game_troop.increase_turn if $game_troop.turn_count == 0
    @performed_battlers = []
  end
  #--------------------------------------------------------------------------
  # ● New Method set_actor
  #--------------------------------------------------------------------------
  def self.set_actor(actor)
    @actor_index = actor.index
  end
  #--------------------------------------------------------------------------
  # ● New Increase action counter
  #--------------------------------------------------------------------------
  def self.add_action
    return if @actions_per_turn.nil?
    @turn_counter += 1
    if @turn_counter == @actions_per_turn and CBS::TURN_LENGTH == 0
      $game_troop.increase_turn
      SceneManager.scene.turn_end
      @turn_counter = 0
    end
  end
  #--------------------------------------------------------------------------
  # ● New Method advance_turn
  #--------------------------------------------------------------------------
  def self.advance_turn
    return if CBS::TURN_LENGTH == 0
    @turn_counter += 1
    if @turn_counter == 60 * CBS::TURN_LENGTH
      $game_troop.increase_turn
      SceneManager.scene.turn_end
      @turn_counter = 0
    end
  end
end

class Game_Battler < Game_BattlerBase
  #--------------------------------------------------------------------------
  # ● Rewrote on_turn_end
  #--------------------------------------------------------------------------
  def on_turn_end
    @result.clear
    regenerate_all
    update_state_turns
    update_buff_turns
    remove_states_auto(2)
  end
  #--------------------------------------------------------------------------
  # ● New Method on_turn_end
  #--------------------------------------------------------------------------
  def stamina_loss
    return if dead?
    return if hidden?
    if self.actor?
      @stamina -= input.stamina_cost
    else
      @stamina -= @actions[0].stamina_cost
    end
    #BattleManager.add_action
  end
end

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # ● Rewrote input
  #--------------------------------------------------------------------------
  def input
    if @actions[@action_input_index] == nil
      @actions[@action_input_index] = Game_Action.new(self)
    end
    return @actions[@action_input_index]
  end
end

class Game_Action
  #--------------------------------------------------------------------------
  # ● New Method stamina_cost
  #--------------------------------------------------------------------------
  def stamina_cost
    if @item.is_skill?
      return CBS::SKILL_COST[item.id] if CBS::SKILL_COST[item.id]
      return CBS::SKILL_COST[0]
    end
    return CBS::ITEM_COST if @item.is_item?
    return CBS::MAX_STAMINA
  end
end

class Window_BattleStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # Aliases method: draw_item yanfly version
  #--------------------------------------------------------------------------
  alias prefomar_draw_item draw_item
  def draw_item(index)
    unless CBS::ATB
      prefomar_draw_item(index)
      return
    end
    return if index.nil?
    clear_item(index)
    actor = battle_members[index]
    rect = item_rect(index)
    return if actor.nil?
    draw_actor_face(actor, rect.x+2, rect.y+2, actor.alive?)
    draw_actor_name(actor, rect.x, rect.y, rect.width-8)
    draw_actor_action(actor, rect.x, rect.y)
    draw_actor_icons(actor, rect.x, line_height*1, rect.width)
    gx = YEA::BATTLE::BATTLESTATUS_HPGAUGE_Y_PLUS
    contents.font.size = YEA::BATTLE::BATTLESTATUS_TEXT_FONT_SIZE
    draw_actor_hp(actor, rect.x+2, line_height*2, rect.width-4)
    if draw_tp?(actor) && draw_mp?(actor)
      dw = rect.width/2-2
      dw += 1 if $imported["YEA-CoreEngine"] && YEA::CORE::GAUGE_OUTLINE
      draw_actor_tp(actor, rect.x+2, line_height*2+gx, dw)
      dw = rect.width - rect.width/2 - 2
      draw_actor_mp(actor, rect.x+rect.width/2, line_height*2+gx, dw)
    elsif draw_tp?(actor) && !draw_mp?(actor)
      draw_actor_tp(actor, rect.x+2, line_height*2+gx, rect.width-4)
    else
      draw_actor_mp(actor, rect.x+2, line_height*2+gx, rect.width-4)
    end
    draw_actor_stamina(actor, rect.x+2, line_height*3, rect.width-4)
  end
  #--------------------------------------------------------------------------
  # overwrite method: draw_item yanfly version
  #--------------------------------------------------------------------------
  def draw_item_stamina(index)
    return if index.nil?
    actor = battle_members[index]
    rect = item_rect(index)
    return if actor.nil?
    gx = YEA::BATTLE::BATTLESTATUS_HPGAUGE_Y_PLUS
    contents.font.size = YEA::BATTLE::BATTLESTATUS_TEXT_FONT_SIZE
    draw_actor_stamina(actor, rect.x+2, line_height*3, rect.width-4)
  end
  #--------------------------------------------------------------------------
  # new method: refresh_stamina
  #--------------------------------------------------------------------------
  def refresh_stamina
    return unless CBS::ATB
    item_max.times {|i| draw_item_stamina(i) }
  end
  #--------------------------------------------------------------------------
  # new method: draw_actor_stamina
  #--------------------------------------------------------------------------
  def draw_actor_stamina(actor, dx, dy, width = 124)
    draw_gauge(dx, dy, width, actor.stamina_rate, text_color(CBS.stamina_colors(actor)[2]),text_color(CBS.stamina_colors(actor)[1]))
    change_color(system_color)
    cy = (Font.default_size - contents.font.size) / 2 + 1
    draw_text(dx+2, dy+cy, 30, line_height, CBS::SAMINA_GAUGE_NAME)
  end
end
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
4,478
Reaction score
1,248
First Language
English
Primarily Uses
RMVXA
Ok so give me a demo to play with or your script order so that I can try to reproduce the issue (which will take longer and may not be the same as yours)
 
Joined
Jan 25, 2022
Messages
76
Reaction score
65
First Language
English
Primarily Uses
RMVXA
Ok so give me a demo to play with or your script order so that I can try to reproduce the issue (which will take longer and may not be the same as yours)

Here is the project. New game will start you off in a map with a battle event. Let me know if you have any issues with it.

I hope drive is fine:
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
4,478
Reaction score
1,248
First Language
English
Primarily Uses
RMVXA
Ok, I don't really have any experience with Yami engine but I think your solution may be as simple as one line change, maybe more but for physical I just made a change to line 198.
["MOVE USER", ["FORWARD", "WAIT"]],#["TARGET", "BODY", "WAIT"]],
Changed the TARGET part to the Move Forward part and it just moves forward a few steps.
Is this what you need?
Tankentai is similar from what I saw. Haven't looked further into the code so not sure how it processes the commands, but that may be all you needed to do was change what the command did.
 
Joined
Jan 25, 2022
Messages
76
Reaction score
65
First Language
English
Primarily Uses
RMVXA
Ok, I don't really have any experience with Yami engine but I think your solution may be as simple as one line change, maybe more but for physical I just made a change to line 198.
["MOVE USER", ["FORWARD", "WAIT"]],#["TARGET", "BODY", "WAIT"]],
Changed the TARGET part to the Move Forward part and it just moves forward a few steps.
Is this what you need?
Tankentai is similar from what I saw. Haven't looked further into the code so not sure how it processes the commands, but that may be all you needed to do was change what the command did.
Yeah, that works for the movement.
Is there any way to get rid of that little delay after actions are taken?
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
4,478
Reaction score
1,248
First Language
English
Primarily Uses
RMVXA
Is there any way to get rid of that little delay after actions are taken?
It looks like a delay in the popup getting disposed and letting the battle continue.
You are also using YEA Battle engine 1.22, I threw in 1.24 and it was a bit faster, but still a very small pause.
scratch that I disabled the popups and it still paused.
Something to do with the action ending
Got it. Runs fast now.
Comment out line 3372 in yami battle symphony
#~ @status_window.draw_item(@status_window.index)

I'll look to see what this is doing and see if it can be improved


I started testing more and found I did something to make it fast but now I can't find it. I deleted the folder and extracted your project again.
Now it still has a slight delay.
But I think it's because of the battle log.

*update
Fixed. It was the battlelog creation method in Yami battle Symphony
it has this by default
Ruby:
  def create_log_window
    @log_window = Window_BattleLog.new
  end
You commented it out and that made it use the default which is this
Ruby:
  def create_log_window
    @log_window = Window_BattleLog.new
    @log_window.method_wait = method(:wait)
    @log_window.method_wait_for_effect = method(:wait_for_effect)
  end
Thats why the pause was there.
If one of those lines were commented out then it works as it should.
But instead of commenting out a line in the default script, we will add a line to the Yami script

So uncomment out that method lines 3472-3474,
then add one line to make it this
Ruby:
  def create_log_window
    @log_window = Window_BattleLog.new
    @log_window.method_wait_for_effect = method(:wait_for_effect)
  end
 
Last edited:
Joined
Jan 25, 2022
Messages
76
Reaction score
65
First Language
English
Primarily Uses
RMVXA
It looks like a delay in the popup getting disposed and letting the battle continue.
You are also using YEA Battle engine 1.22, I threw in 1.24 and it was a bit faster, but still a very small pause.
scratch that I disabled the popups and it still paused.
Something to do with the action ending
Got it. Runs fast now.
Comment out line 3372 in yami battle symphony
#~ @status_window.draw_item(@status_window.index)

I'll look to see what this is doing and see if it can be improved


I started testing more and found I did something to make it fast but now I can't find it. I deleted the folder and extracted your project again.
Now it still has a slight delay.
But I think it's because of the battle log.

*update
Fixed. It was the battlelog creation method in Yami battle Symphony
it has this by default
Ruby:
  def create_log_window
    @log_window = Window_BattleLog.new
  end
You commented it out and that made it use the default which is this
Ruby:
  def create_log_window
    @log_window = Window_BattleLog.new
    @log_window.method_wait = method(:wait)
    @log_window.method_wait_for_effect = method(:wait_for_effect)
  end
Thats why the pause was there.
If one of those lines were commented out then it works as it should.
But instead of commenting out a line in the default script, we will add a line to the Yami script

So uncomment out that method lines 3472-3474,
then add one line to make it this
Ruby:
  def create_log_window
    @log_window = Window_BattleLog.new
    @log_window.method_wait_for_effect = method(:wait_for_effect)
  end
Peculiar, I honestly don't remember doing that lol. But I did what you said, and it works, so thank you.
 

BCj

Veteran
Veteran
Joined
Jun 19, 2014
Messages
1,931
Reaction score
1,190
First Language
Dutch
Primarily Uses
N/A
I also mentioned Tankentai battle system. Is that incompatible with your scripts?
And what script are incompatible? Maybe it's a script order issue?
Tankentai is really nice, but it has even more issues than yami's. I can't even get mine to work with luna engine for example.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
4,478
Reaction score
1,248
First Language
English
Primarily Uses
RMVXA
Tankentai is really nice, but it has even more issues than yami's. I can't even get mine to work with luna engine for example.
I won't say it because some people complain that I'm being a MOD. I can check out the issue. Did you have a demo for playing with? If not I'll try to recreate it.
What errors do you get. I got one when entering a battle. But that was using one of luna engine demos
I took the scripts from the luna engine base and put them into the tankentai demo and it worked. If you use yanfly battle engine then there are two attacks and popups per actor, but it looks like just the animation. Similar issue with my project that I fixed by commenting out part of yanfly battle engine.
 
Last edited:

Latest Threads

Latest Profile Posts

working on an A/V sync system for my game! was NOT expecting the first roadblock to be accessing a variable from a public class!! Computers are so finicky sometimes :kaosigh:
For the first real time since my game's inception I found myself actually having fun playing around with my party's skills while testing out some battles! So much so, that I actually forgot what I was doing for a minute and had to force myself to move on to the next thing! :guffaw:

That's got to be a good sign considering it only has place holder animations, enemy skills, troop comps, etc. right now. Feels good!
Bex
Finally upgraded to RMMZ.
ScreenShot_11_28_2022_7_52_34.png
FINALLY, I figured out how to get the "tail" to appear IN the window and not directly below it lol. now it looks like it's part of the window and not hanging from the bottom of it.
Twitch! Stream is about to go live with some Dark Souls 2! Feel free to drop by!

Forum statistics

Threads
126,925
Messages
1,182,399
Members
166,755
Latest member
Hahah520
Top