require 2nd slot

Can I make the 2nd slot of the party required as soon as I get someone for that slot? There is a part in the game when I get a 2nd party member, and I want to make it so you can't empty it. I am using Yanfly's Party System.
You can make an ongoing Common event that detects whether you need a certain amount of party members.

It will consist of setting a Variable that counts the number of party members you have. (Go to Control Variables, select your Variable, and set the Operand to "Game Data" -> "Other" -> "Party Members") Then create a Conditional Branch, having the "If" calling your Variable and setting it to the amount you need (In this case, 2 or more), and setting what happens when its requirements is/isn't met.
You can make an ongoing Common event that detects whether you need a certain amount of party members.

It will consist of setting a Variable that counts the number of party members you have. (Go to Control Variables, select your Variable, and set the Operand to "Game Data" -> "Other" -> "Party Members") Then create a Conditional Branch, having the "If" calling your Variable and setting it to the amount you need (In this case, 2 or more), and setting what happens when its requirements is/isn't met.

What I mean, is, like, the strict second member. Like, I get what you are trying to say, but in YEP_PartySystem, you have the option to leave a slot empty in your party. I don't want the player to do that, as it'll mess up so many things.
I've seen you're tampering with code in the other post. I don't know about that plugin, but try something like....
var removeActor = Game_Party.prototype.removeActor;
Game_Party.prototype.removeActor(actorId)
{
if (this.members().length > 2)
removeActor.call(this,actorId);
};
I've seen you're tampering with code in the other post. I don't know about that plugin, but try something like....
var removeActor = Game_Party.prototype.removeActor;
Game_Party.prototype.removeActor(actorId)
{
if (this.members().length > 2)
removeActor.call(this,actorId);
};

What does this do? It seems to me like it would remove an actor. I just want to be able to force the player to keep a member in slot 2.

Edit: I want the player be able to have more than 2 party members, but when they get that second party member, it can't be removed, but can be replaced. I am still using Yanfly's Party System.
That script overwrites the default function to remove actors, it makes it check there's at least 2 people in party, before removing one, otherwise, it does nothing.
(To be used in a plugin, it won't work properly on script call)
That script overwrites the default function to remove actors, it makes it check there's at least 2 people in party, before removing one, otherwise, it does nothing.
(To be used in a plugin, it won't work properly on script call)

It sounds like it only allows one person in a party, am I right?

I've moved this thread to Plugin Support. Thank you.

It sounds like it only allows one person in a party, am I right?

No. The example will simply not allow to remove a party member if there's two or less people in party, using conventional ways (editor change party or the script call to remove members). I'm too busy to check how does yanfly do it, but it likely works.
No. The example will simply not allow to remove a party member if there's two or less people in party, using conventional ways (editor change party or the script call to remove members). I'm too busy to check how does yanfly do it, but it likely works.
Alright, so where do I put it, as a parallel on every map or something?
Alright, so where do I put it, as a parallel on every map or something?
(To be used in a plugin, it won't work properly on script call)

Original thread: https://forums.rpgmakerweb.com/threads/require-2nd-slot.115749/