Yanfly Party System

I am trying to use Yanfly's Party System in RPGMV. I plan to enable the Party menu once the fifth member of my game's party is acquired, since I want both the minimum AND maximum party at that point to be four members. Always four in your battle formation, no more, no less, four, period.

I can find no way to set a "Minimum" party size in this plugin, only a Maximum. Now, the easiest way I can think to handle this is to remove the option to "Remove" members. Which I can do from the Plugin Menu as far as the main commands of the system say.

But down in the list of party members, there is a "Remove" option on the bottom and the top. If I remove "Remove" from the Paty Menu's options, that line still exists in the party list below that, just with no text and whatever icon it's set to show where the sprite would be. If I leave the icon blank, the option is STILL there it's just invisible but can still be selected.

PartyProblem1.png
PartyProblem2.png
PartyProblem3.png


Is there any way to completely and utterly delete this option altogether in any form so I can use this plugin while maintaining a mandatory minimum party of four members without the player being able to make it less?

I found a way somebody fixed this in VX Ace, but it doesn't work with the MV plugin. Whenever I make ANY changes to the MV plugin, the entire thing doesn't function and it just uses the default "Formation" functionality in the Main Menu as though the plugin doesn't even exist. So I'm at a loss.
I am trying to use Yanfly's Party System in RPGMV. I plan to enable the Party menu once the fifth member of my game's party is acquired, since I want both the minimum AND maximum party at that point to be four members. Always four in your battle formation, no more, no less, four, period.

I can find no way to set a "Minimum" party size in this plugin, only a Maximum. Now, the easiest way I can think to handle this is to remove the option to "Remove" members. Which I can do from the Plugin Menu as far as the main commands of the system say.

But down in the list of party members, there is a "Remove" option on the bottom and the top. If I remove "Remove" from the Paty Menu's options, that line still exists in the party list below that, just with no text and whatever icon it's set to show where the sprite would be. If I leave the icon blank, the option is STILL there it's just invisible but can still be selected.

PartyProblem1.png
PartyProblem2.png
PartyProblem3.png


Is there any way to completely and utterly delete this option altogether in any form so I can use this plugin while maintaining a mandatory minimum party of four members without the player being able to make it less?

I found a way somebody fixed this in VX Ace, but it doesn't work with the MV plugin. Whenever I make ANY changes to the MV plugin, the entire thing doesn't function and it just uses the default "Formation" functionality in the Main Menu as though the plugin doesn't even exist. So I'm at a loss.

Digging through the script, I see where it adds the remove command to the party list window, line 1115 specifically, so commenting that line out should stop it from drawing the remove command entirely from the list, and therefore disallow the player to hit that button.

Code:
Window_PartyList.prototype.drawItem = function(index) {
    var actor = $gameActors.actor(this._data[index]);
    if (actor) {
      var bitmap = ImageManager.loadCharacter(actor.characterName());
      if (bitmap.width <= 0) {
        return setTimeout(this.drawItem.bind(this, index), 5);
      }
    }
    this.clearItem(index);
    var rect = this.itemRect(index);
    if (this._data[index] === 0) {
      //this.drawRemove(rect);
      return;
    }
    this.drawActor(actor, rect);
};
Put that code into a .js file and import it into your plugin manager below the party system and see what happens. I haven't tested it myself, and a quick look only shows me the command being added once, but it clearly shows up twice on the list. Give it a shot and let me know.
Digging through the script, I see where it adds the remove command to the party list window, line 1115 specifically, so commenting that line out should stop it from drawing the remove command entirely from the list, and therefore disallow the player to hit that button.

Code:
Window_PartyList.prototype.drawItem = function(index) {
    var actor = $gameActors.actor(this._data[index]);
    if (actor) {
      var bitmap = ImageManager.loadCharacter(actor.characterName());
      if (bitmap.width <= 0) {
        return setTimeout(this.drawItem.bind(this, index), 5);
      }
    }
    this.clearItem(index);
    var rect = this.itemRect(index);
    if (this._data[index] === 0) {
      //this.drawRemove(rect);
      return;
    }
    this.drawActor(actor, rect);
};
Put that code into a .js file and import it into your plugin manager below the party system and see what happens. I haven't tested it myself, and a quick look only shows me the command being added once, but it clearly shows up twice on the list. Give it a shot and let me know.
So, the only effect it seems to have is to replicate the effect of leaving the "Remove" text and icon parameters blank in the original plugin's settings. But the line and functionality are still there. So it makes it look like my third screenshot even with the original plugin's default settings.

And yeah, I noticed the same where it only seems to call it once but it appears at the top and bottom of the list. It seems that this part you've isolated only calls for the icon and text to be drawn, but the actual function of that list entry is housed somewhere else.
So, the only effect it seems to have is to replicate the effect of leaving the "Remove" text and icon parameters blank in the original plugin's settings. But the line and functionality are still there. So it makes it look like my third screenshot even with the original plugin's default settings.

And yeah, I noticed the same where it only seems to call it once but it appears at the top and bottom of the list. It seems that this part you've isolated only calls for the icon and text to be drawn, but the actual function of that list entry is housed somewhere else.

Alright, this block should do it.

Code:
Window_PartyList.prototype.makeItemList = function() {
//    this._data = [0];
    this.createActorOrder();
//    this._data.push(0);
};

Looks like this is the spot where it adds the command to the list, at the beginning and then again at the end. Lets see how that works.
Alright, this block should do it.

Code:
Window_PartyList.prototype.makeItemList = function() {
//    this._data = [0];
    this.createActorOrder();
//    this._data.push(0);
};

Looks like this is the spot where it adds the command to the list, at the beginning and then again at the end. Lets see how that works.

Whether I have that under the code you provided in your earlier response or if I have that all by itself in the JS file, this is the result:
PartyProblem4.png

So that index variable has to be established and has to be 0. I was playing with it yesterday and changed that to 1, and it duplicated entries for my first Actor in the top and bottom where the "Remove" lines are.

But the confusing part is that, intuitively, you would figure that any variable starts at 0 so this list is saying "okay, since there is no Actor 0, make that entry the Remove function if that entry is 0." But then it also appears at the end of the list as well.

The way this plugin is set up is freakin' bonkers. lol
Maybe this (haven't tested):
Code:
Window_PartyList.prototype.makeItemList = function() {
    this._data = [];
    this.createActorOrder();
};
Maybe this (haven't tested):
Code:
Window_PartyList.prototype.makeItemList = function() {
    this._data = [];
    this.createActorOrder();
};
That totally did it! Thank you so much!

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-party-system.112464/