Yanfly's Party system, caterpillar not working

https://yanflychannel.wordpress.com/rmvxa/core-scripts/party-system/

I use this script, however for whatever reason the caterpillar effect will not work for anything over the default 4 players. But, battle system works fine, I can have 6 people onscreen for that.

Was wondering if anyone could help me with this, this is how it is setup now. (Note: I make sure the switch is on so it changes to 6 members)

Spoiler: My code
#==============================================================================
#
# ▼ Yanfly Engine Ace - Party System v1.08
# -- Last Updated: 2012.01.23
# -- Level: Normal
# -- Requires: n/a
#
#==============================================================================

$imported = {} if $imported.nil?
$imported["YEA-PartySystem"] = true

#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.01.23 - Bug fixed: Party members are now rearranged when newly added.
# 2012.01.14 - New Feature: Maximum Battle Members Variable added.
# 2012.01.07 - Bug fixed: Error with removing members.
# 2012.01.05 - Bug fixed: Escape skill/item effects no longer counts as death.
# 2011.12.26 - Compatibility Update: New Game+
# 2011.12.17 - Updated Spriteset_Battle to have updated sprite counts.
# 2011.12.13 - Updated to provide better visual display when more than 5 pieces
# of equipment are equipped on an actor at a time.
# 2011.12.05 - Added functionality to display faces in the Party Select Window.
# - Fixed bug that doesn't refresh the caterpillar when new members
# join the party.
# 2011.12.04 - Started Script and Finished.
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# RPG Maker VX Ace comes with a very nice party system. However, changing the
# maximum number of members isn't possible without the aid of a script. This
# script enables you the ability to change the maximum number of party members,
# change EXP rates, and/or open up a separate party menu (if desired). In
# addition to that, you can lock the position of actors within a party and
# require other actors to be in the active party before continuing.
#
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
# -----------------------------------------------------------------------------
# Script Calls - These commands are used with script calls.
# -----------------------------------------------------------------------------
# *IMPORTANT* These script calls require the new party menu to be enabled to
# use them. Otherwise, nothing will happen.
#
# lock_actor(x)
# unlock_actor(x)
# This will lock actor x in its current position in the party if the actor is
# in the current party. The actor is unable to switch position and must remain
# in that position until the lock is removed. Use the unlock script call to
# remove the locked status. This script requires the actor to have joined and
# in the current party before the script call will work.
#
# require_actor(x)
# unrequire_actor(x)
# This will cause the party to require actor x in order to continue. If the
# actor isn't in the current party but is in the reserve party, the party menu
# will open up and prompt the player to add the required actor into the party
# before being able to continue. This script call will not function unless the
# specific actor has joined the party, whether it is in the current or reserve.
#
# call_party_menu
# This will open up the party menu. This script call requires for the party
# menu to be enabled to use.
#
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
#==============================================================================

module YEA
module PARTY

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - General Party Settings -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# In this section, you can adjust the general party settings for your game
# such as the maximum amount of members and whatnot, the EXP rate for
# party members in the reserve, etc.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
MAX_BATTLE_MEMBERS = 4 # Maximum party members. Default: 4
SPLIT_EXP = false # Splits EXP with more members in the party.
RESERVE_EXP_RATE = 0.50 # Reserve EXP Rate. Default: 1.00

# If you wish to be able to change the maximum number of battle members
# during the middle of your game, set this constant to a variable ID. If
# that variable ID is a number greater than 0, that variable will determine
# the current maximum number of battle members. Be cautious about using
# this during battle.
MAX_MEMBERS_VARIABLE = 26

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Party Menu Settings -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# This section contains various menu settings for those who wish to use a
# menu separate for the party system. Here, adjust the menu command order,
# icons used, and other settings.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ENABLE_MENU = true # Enables party menu. Default: false
COMMANDS =[ # The order at which the menu items are shown.
# [:command, "Display"],
[ :change, "Change",],
[ :remove, "Remove",],
[ :revert, "Revert",],
[ :finish, "Finish",],
] # Do not remove this.
COMMAND_ALIGN = 1 # 0:Left Align, 1:Center Align, 2:Right Align

# These settings here are used for the upper right window: the Party Select
# window where the player selects a member to swap out or remove.
PARTY_FONT_SIZE = 20 # Font size used for party member names.
LOCK_FIRST_ACTOR = false # Lock the first actor by default?
LOCKED_ICON = 125 # Icon used for locked members.
REQUIRED_ICON = 126 # Icon used for required members.
EMPTY_TEXT = "-Empty-" # Text used when a member isn't present.
DISPLAY_FACE = false # Display faces instead of sprites?

# These settings here are used for the lower left window: the Party List
# window where the player selects a member to replace.
REMOVE_ICON = 185 # Icon used for removing members.
REMOVE_TEXT = "-Remove-" # Text used for remove member command.
ACTOR_Y_BUFFER = 12 # Amount the actor graphic be adjusted by.

# These settings here are used for the lower right window: the Party Status
# window where info about a selected actor is shown.
NO_DATA = "- No Data -" # Text used for when no actor is shown.
IN_PARTY_COLOUR = 6 # Text colour used for in party members.
STAT_FONT_SIZE = 20 # Font size used for stats.
EQUIP_TEXT = "Equipment" # Text used to display equipment.

end # PARTY
end # YEA

#==============================================================================
# ▼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================

# >>>>> I didn't edit anything past this point <<<<<<<
'Scripts' is where people post scripts that they have written and want to share with the community.
Moved to: RGSSx Script Support

To have more people show up in the caterpillar, go to the default script Game_Party. Go to line 73 and change the number there to the number you want to show on the map.
Googled it. What other scripts do you have in there. Many battle scripts allow you to specify positions.
To have more people show up in the caterpillar, go to the default script Game_Party. Go to line 73 and change the number there to the number you want to show on the map.

Yeah, this is the problem. I have 6 on there but only 4 show up.

Googled it. What other scripts do you have in there. Many battle scripts allow you to specify positions.

In my game? I have Yanfly's battle engine, Yanfly's core engine, Yanfly's Party Command engine, Yanfly's Shop, Hime's choice engines, Yanfly's Message engine, and a few small scripts to change cover, audio-fade in, cutscene skip, fullscreen, anti-lag, and a movie player.
You should take a look at these settings in Yanfly's Party Manager script:

MAX_BATTLE_MEMBERS
MAX_MEMBERS_VARIABLE


You even edited those, yet you don't know what they do? 😳
You set the latter one to 26, which means that Variable 26 will control the maximum amount of battle members your party has during the game.
But because you most probably left Variable 26 on 0, it loads the default maximum battle member amount, which you have set to 4.
In my game? I have Yanfly's battle engine, Yanfly's core engine, Yanfly's Party Command engine, Yanfly's Shop, Hime's choice engines, Yanfly's Message engine, and a few small scripts to change cover, audio-fade in, cutscene skip, fullscreen, anti-lag, and a movie player.

I don't see in there the script that shows the players. Does the party script really have the players show up in sideview? or are you using default?
Yanfly's visual battlers will show them on screen in side view. As for default view - just like sixth said change the number in the yanfly party manager script from 4 to 6. If you use the variable then make sure it is set to 6 before doing any battles. But it's easier to just set the number in the script.
You should take a look at these settings in Yanfly's Party Manager script:

MAX_BATTLE_MEMBERS
MAX_MEMBERS_VARIABLE


You even edited those, yet you don't know what they do? 😳
You set the latter one to 26, which means that Variable 26 will control the maximum amount of battle members your party has during the game.
But because you most probably left Variable 26 on 0, it loads the default maximum battle member amount, which you have set to 4.

I have an event that does do that. However, I even tested without the script by just switching MAX_BATTLE_MEMBERS to 6 and they still don't show up caterpillar. They do show up in battle though.

I don't see in there the script that shows the players. Does the party script really have the players show up in sideview? or are you using default?
Yanfly's visual battlers will show them on screen in side view. As for default view - just like sixth said change the number in the yanfly party manager script from 4 to 6. If you use the variable then make sure it is set to 6 before doing any battles. But it's easier to just set the number in the script.

They show up default view which is all I want, but the caterpillar (following the lead party member during the world/overview maps) does not work past the default of 4.

So when MAX_BATTLE_MEMBERS = 6, then it will show up 6 battlers in battle (default view). Great!
BUT, not 6 followers or caterpillar.
Now it makes more sense. I was thinking you were referring to the battle screen. Yes the script does say it will change the caterpillar size.
Can you tell us what order you have the scripts in? Maybe a screen shot?

*EDIT - I just tested with my game and it works fine. 6 players were walking in formation.
even though I can only have 4 in battle due to other scripts.
I have an event that does do that. However, I even tested without the script by just switching MAX_BATTLE_MEMBERS to 6 and they still don't show up caterpillar. They do show up in battle though.
What do you mean by that? How can you set that to 6 in the script without the script?

They show up for me just fine.
Note that if you change it during the game, you must move at least one tile to show/hide the added/removed party members.
If you want the change to happen immediately after you change the battle members variable, you can use this script call right after the variable change:
Code:
$game_player.refresh

And if they still don't show up, you most probably have a script incompatibility.
What do you mean by that? How can you set that to 6 in the script without the script?

They show up for me just fine.
Note that if you change it during the game, you must move at least one tile to show/hide the added/removed party members.
If you want the change to happen immediately after you change the battle members variable, you can use this script call right after the variable change:
Code:
$game_player.refresh

And if they still don't show up, you most probably have a script incompatibility.

Whoop I meant I can do it without the event that changes max_members. You know by just changing it to 6 in the script and testing it.

Ok, I guess it is a script incompatibility. Hmmm.
Ok it does work actually if the default MAX_BATTLE_MEMBERS = 6 from the beginning. (The caterpillar)

But, if I change the variable in the middle of the game, it will not work however they will all be there in battle, just won't show up in caterpillar for some reason.

Can you guys see if it works for you if you change the MAX_BATTLE_MEMBERS within game?
Yes I have max_battle_members = 6 and I can change by using the variable from 1 to 6. If I set the variable to 7 the 7th doesn't show up. I confirmed this in my formation screen, but I can't check the battle without making a new demo.
Ahh, yes, the classic follower issue...
I encountered this when I made an old script of mine.
Turns out, the size of the visual followers never changes by default, it just hides the unoccupied slots if there is any.
Because of this, it got no problem when you decrease the amount of battle members from the initial amount, but if you want to set it to anything higher, it will only show the followers up to the starting battle members amount.

You can use this snippet to overcome this issue:
Spoiler
Code:
class Game_Followers
 
  attr_accessor :need_refresh
 
  def refresh_followers
    ndata = []
    ndata.push(Game_Follower.new(1, $game_player))
    ndata[0].moveto(@data[0].x,@data[0].y)
    ndata[0].set_direction(@data[0].direction)
    ndata[0].refresh
    ndata[0].update
    (2...$game_party.max_battle_members).each do |index|
      fl = Game_Follower.new(index, ndata[-1])
      ii = index - 1
      xx = @data[ii] && @data[ii].actor ? @data[ii].x : @data[-1].x
      yy = @data[ii] && @data[ii].actor ? @data[ii].y : @data[-1].y
      dir = @data[ii] && @data[ii].actor ? @data[ii].direction : @data[-1].direction
      fl.moveto(xx, yy)
      fl.set_direction(dir)
      fl.refresh
      fl.update
      ndata.push(fl)
    end
    @data = ndata
  end
    
end

class Spriteset_Map
 
  alias add_frefr7632 update
  def update
    add_frefr7632
    refr_follows if $game_player.followers.need_refresh
  end
 
  def refr_follows
    @character_sprites.each_with_index do |char,i|
      if char.character.is_a?(Game_Follower) || char.character.is_a?(Game_Player)
        @character_sprites[i].dispose
        @character_sprites[i] = nil
      end
    end
    @character_sprites.compact!
    $game_player.followers.refresh_followers
    $game_player.followers.reverse_each do |follower|
      @character_sprites.push(Sprite_Character.new(@viewport1, follower))
    end
    @character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
    $game_player.followers.need_refresh = false
  end
 
end
And when you change the size of the battle members during the game, use this script call right below the variable change:
Code:
$game_player.followers.need_refresh = true
This should fix your issue.
@Sixth

Yep, that fixed it. Thanks for the help.

Original thread: https://forums.rpgmakerweb.com/threads/yanflys-party-system-caterpillar-not-working.78170/