- Joined
- Feb 25, 2015
- Messages
- 29
- Reaction score
- 5
- First Language
- Spanish
- Primarily Uses
- RMVX
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.
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:
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.

SBS 3.4e + Kylock's Dynamic Party Positions
MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.
www.mediafire.com
Thanks for reading, and thanks in advance for any help!
Last edited: