There have been a few posts about this (I recall making this code modification before
😛) but it's faster to just copy it than look for the last place I posted it.
Code:
Game_Follower.prototype.actor = function() {
return $gameParty.members()[this._memberIndex];
};
Game_Followers.prototype.setup = function() {
this._data = [];
for (let i = 1; i < Math.min($gameParty.members().length, X); i++) {
this._data.push(new Game_Follower(i));
}
};
Change the X to be the
total number of sprites you want visible (player plus followers).
There are actually two issues with that (on MZ atleast). At the time the
Game_Followers.prototype.setup method gets executed,
$gameParty doesn't contain any members, so
$gameParty.members().length will be 0, and this code won't ever show any followers.
The other issue is that you don't actually need to do the
Math.min thing (supposing that the $
gameParty.members().length worked). The
Game_Followers.prototype.setup method only gets called once (when you start the game), so if you were to run it based on the number of members currently in the party, then new party members that you gain after starting the game wouldn't show up as followers (until after the player saved and restarted the game). The method is supposed to create the maximum number of followers you will ever have (and the ones that aren't in your party yet will simply be invisible).
So something like this would work:
JavaScript:
Game_Follower.prototype.actor = function() {
return $gameParty.members()[this._memberIndex];
};
Game_Followers.prototype.setup = function() {
this._data = [];
for (let i = 1; i < X; i++) {
this._data.push(new Game_Follower(i));
}
};