Is there a way to remove all party members with a script call?

There are parts of my game where there’s a possibility that one of many different characters can get added to your party (one at a time), and there’s only going to be more characters added as the game gets developed. It would be a real pain to manually account for every instance of removing a party member, since only one can be on your party at a time.

Basically what I’m asking is, is there a way to set party members to None, without having to manually specify every member? I mean removing them from the party, not making them invisible.

Try this in a Script event command, I think it should clear everyone out:

$gameParty.allMembers().forEach(actor => $gameParty.removeActor(actor.actorId()));

If your main character should stay in the party, you could skip their actor ID. This one keeps actor 1 and removes everyone else:

$gameParty.allMembers().forEach(actor => {
    if (actor.actorId() !== 1) $gameParty.removeActor(actor.actorId());
});

Yep that works great! What about, is there a way to change the opacity or blend mode of the party member(s) on the player’s team, regardless of who they are, without having to manually account for all options?

Followers copy the player’s opacity and blend mode every frame. If the whole party should change together, setting it on the player with Set Movement Route changes everyone at once, whoever’s in the party.

If only the party members should change and the player stays normal, a small plugin has to stop that copying first. Save this as a .js file in js/plugins and turn it on in the Plugin Manager:

/*:
 * @target MZ
 * @plugindesc Followers use their own opacity and blend mode while a switch is ON.
 */
(() => {
    const FOLLOWER_SWITCH = 0; // your switch ID
    const OPACITY_VAR = 0;     // your variable ID, 0 to 255
    const BLEND_VAR = 0;       // your variable ID, 0 normal, 1 additive, 2 multiply, 3 screen

    const _update = Game_Follower.prototype.update;
    Game_Follower.prototype.update = function() {
        _update.call(this);
        if ($gameSwitches.value(FOLLOWER_SWITCH)) {
            this.setOpacity($gameVariables.value(OPACITY_VAR));
            this.setBlendMode($gameVariables.value(BLEND_VAR));
        }
    };
})();

Put your switch and variable numbers in place of the three 0s. While the switch is ON, every party member on the map uses those two variables. Turning it OFF makes them match the player again.

It’s exactly what I wanted, thank you!