public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers

[SOLVED] Fix for Dynamic Party Positions Script

BMM Archive · July 15, 2026

Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

Original Source

  • Original title: [SOLVED] Fix for Dynamic Party Positions Script
  • Original author: Opozorilo
  • Original date: September 29, 2023
  • Source thread: https://forums.rpgmakerweb.com/threads/solved-fix-for-dynamic-party-positions-script.161570/
  • Source forum path: Game Development Engines > Legacy Engine Support > RPG Maker VX Support

Summary

EDIT: This post has been solved. I'll leave the final, fixed version of the script here if anyone wants to access it. I was provided with 2 solutions, and both work, so I'll also leave the 2nd solution in there, but commented (not active in the script). Spoiler: Script Final Fix - Kylock's Dynamic Party Positions Ruby:

Archived First Post

EDIT:
This post has been solved. I'll leave the final, fixed version of the script here if anyone wants to access it. I was provided with 2 solutions, and both work, so I'll also leave the 2nd solution in there, but commented (not active in the script).
Ruby:
#=============================================================================
# Kylock's Dynamic Party Positions for RPG Tankentai Sideview Battle System
# By Kylock
#=============================================================================
# This add-on by Kylock will dynamically change the positioning of
# party members in battle depending on the amount of party members that
# are fighting.  This script has no effect on anything else besides how
# actor sprites are positioned.
#
# To customize coordinates, read the comments in the middle of this script.
#
# The ACTOR_POSITION array and MAX_MEMBERS value in the SBS Configurations
# script are overwritten by this script.
#
# Positions will not be dynamic when used in Battle Test.
#
# *Installation:
#   This script add-on should be placed below the Sideview scripts in the
# script editor.  KGC_LargeParty should be placed BELOW this add-on if you are
# using that script.
#
# *Script comments added by Mr. Bubble.
#=============================================================================

module N01
  MAX_BATTLE_MEMBERS = 4    # Max battle members in a party.  This value is
                            # overwritten by KGC_LargeParty.
end

class Game_Party < Game_Unit
  #--------------------------------------------------------------------------
  # * Constants
  #--------------------------------------------------------------------------
  MAX_MEMBERS = N01::MAX_BATTLE_MEMBERS       # Maximum number of party members
  def add_actor(actor_id)
    if @actors.size < MAX_MEMBERS and not @actors.include?(actor_id)
      @actors.push(actor_id)
      $game_player.refresh
      update_formation
    end
  end
  def setup_starting_members
    @actors = []
    for i in $data_system.party_members
      @actors.push(i)
    end
    update_formation
  end
  def remove_actor(actor_id)
    @actors.delete(actor_id)
    $game_player.refresh
    update_formation
  end
  def update_formation
    case @actors.size
  # This section is where you define your member coordinates.
  # The coordinate set that is used depends on the amount of actors battling.
  # Settings for up to 5 members are already pre-defined, but more can be added.
  # These coordinates are not used in Battle Test. See bottom of script for info.
    when 1: $ACTOR_POSITION = [[415,185],[0,0],[0,0],[0,0]]
    when 2: $ACTOR_POSITION = [[395,155],[435,215],[0,0],[0,0]]
    when 3: $ACTOR_POSITION = [[385,140],[415,185],[445,230],[0,0]]
    when 4: $ACTOR_POSITION = [[385,140],[405,170],[425,200],[445,230]]
    end
  end
end

module N01

 #--------------------------------------------------------------------------
 # ● Settings
 #--------------------------------------------------------------------------
  # Actor starting posistions
  #                   X   Y     X   Y     X   Y     X   Y
  #$ACTOR_POSITION = [[440,200],[480,160],[455,200],[505,220],[480,260]]
  # Maximum party members that can fight at the same time.
  # Remember to add to the ACTOR_POSITION array to accomodate.
  MAX_MEMBER = N01::MAX_BATTLE_MEMBERS
end

class Game_Actor < Game_Battler
  def base_position    # Actor positions for Battle Test only.
    $ACTOR_POSITION = [[430,140],[480,160],[455,200],[505,220],[480,260]] if $BTEST
    $game_party.update_formation
    base = $ACTOR_POSITION[self.index]
    @base_position_x = base[0]
    @base_position_y = base[1]
    # バックアタック時はX軸を逆に
    @base_position_x = Graphics.width - base[0] if $back_attack && N01::BACK_ATTACK
  end
end

#Alternative
=begin
class Scene_File
 
  alias_method(:write_save_data_ILC_beforeActorPosition, :write_save_data)
  def write_save_data(file)
    write_save_data_ILC_beforeActorPosition(file)
    Marshal.dump($ACTOR_POSITION, file)
  end
 
  alias_method(:read_save_data_ILC_beforeActorPosition, :read_save_data)
  def read_save_data(file)
    read_save_data_ILC_beforeActorPosition(file)
    $ACTOR_POSITION = Marshal.load(file)
  end
end
=end



ORIGINAL POST:

Hello all!

I hope you're doing fine today. I wanted to see if anyone could take a quick look at Kylock's Dynamic Party Positions Script for Tankentai Sideview Battle System (VX).

This script allows us to customize the positioning of party members in battle according to how many party members we currently have, which helps use the space on the screen in a way that looks better.

Script WITHOUT.jpg
Script WITH.jpg

Problem:
The script works perfectly while playing. However, once you save, exit the game (closing completely the game window), then reopen and load up your saved game, the following error screen pops up as soon as you enter another battle:

ERROR.jpg

That would be the only problem. Otherwise, the script works perfectly all the time. If anyone could dedicate a few mins to see what could be causing the error, I'd deeply appreciate it.

Ruby:
#=============================================================================
# Kylock's Dynamic Party Positions for RPG Tankentai Sideview Battle System
# By Kylock
#=============================================================================
# This add-on by Kylock will dynamically change the positioning of
# party members in battle depending on the amount of party members that
# are fighting.  This script has no effect on anything else besides how
# actor sprites are positioned.
#
# To customize coordinates, read the comments in the middle of this script.
#
# The ACTOR_POSITION array and MAX_MEMBERS value in the SBS Configurations
# script are overwritten by this script.
#
# Positions will not be dynamic when used in Battle Test.
#
# *Installation:
#   This script add-on should be placed below the Sideview scripts in the
# script editor.  KGC_LargeParty should be placed BELOW this add-on if you are
# using that script.
#
# *Script comments added by Mr. Bubble.
#=============================================================================

module N01
  MAX_BATTLE_MEMBERS = 4    # Max battle members in a party.  This value is
                            # overwritten by KGC_LargeParty.
end

class Game_Party < Game_Unit
  #--------------------------------------------------------------------------
  # * Constants
  #--------------------------------------------------------------------------
  MAX_MEMBERS = N01::MAX_BATTLE_MEMBERS       # Maximum number of party members
  def add_actor(actor_id)
    if @actors.size < MAX_MEMBERS and not @actors.include?(actor_id)
      @actors.push(actor_id)
      $game_player.refresh
      update_formation
    end
  end
  def setup_starting_members
    @actors = []
    for i in $data_system.party_members
      @actors.push(i)
    end
    update_formation
  end
  def remove_actor(actor_id)
    @actors.delete(actor_id)
    $game_player.refresh
    update_formation
  end
  def update_formation
    case @actors.size
  # This section is where you define your member coordinates.
  # The coordinate set that is used depends on the amount of actors battling.
  # Settings for up to 5 members are already pre-defined, but more can be added.
  # These coordinates are not used in Battle Test. See bottom of script for info.
    when 1: $ACTOR_POSITION = [[415,185],[0,0],[0,0],[0,0]]
    when 2: $ACTOR_POSITION = [[395,155],[435,215],[0,0],[0,0]]
    when 3: $ACTOR_POSITION = [[385,140],[415,185],[445,230],[0,0]]
    when 4: $ACTOR_POSITION = [[385,140],[405,170],[425,200],[445,230]]
    end
  end
end

module N01
 #--------------------------------------------------------------------------
 # ● Settings
 #--------------------------------------------------------------------------
  # Actor starting posistions
  #                   X   Y     X   Y     X   Y     X   Y
  #$ACTOR_POSITION = [[440,200],[480,160],[455,200],[505,220],[480,260]]
  # Maximum party members that can fight at the same time.
  # Remember to add to the ACTOR_POSITION array to accomodate.
  MAX_MEMBER = N01::MAX_BATTLE_MEMBERS
end

class Game_Actor < Game_Battler
  def base_position    # Actor positions for Battle Test only.
    $ACTOR_POSITION = [[430,140],[480,160],[455,200],[505,220],[480,260]] if $BTEST
    base = $ACTOR_POSITION[self.index]
    @base_position_x = base[0]
    @base_position_y = base[1]
    # バックアタック時はX軸を逆に
    @base_position_x = Graphics.width - base[0] if $back_attack && N01::BACK_ATTACK
  end
end
Ruby:
class Game_Actor < Game_Battler
  def base_position    # Actor positions for Battle Test only.
    $ACTOR_POSITION = [[430,140],[480,160],[455,200],[505,220],[480,260]] if $BTEST
    base = $ACTOR_POSITION[self.index] #>>>>>>>>>THIS SEEMS TO BE THE PROBLEM
    @base_position_x = base[0]
    @base_position_y = base[1]
    # バックアタック時はX軸を逆に
    @base_position_x = Graphics.width - base[0] if $back_attack && N01::BACK_ATTACK
  end
end

This is a clean project with Tankentai SBS + Kylock's Dynamic Party Positions for testing.

Thanks for reading, and thanks in advance for any help!

Downloads / Referenced Files

Log in to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download

Referenced Images / Attachments

www.mediafire.com
www.mediafire.com
Creator Claims / Removal

If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.

#039#alternative#rpg-maker-archive#vx-support

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar