Removing/adding party members (nearly all) with script?

Hi, what i am trying to do is to remove a Party Member, though not a specific actor, instead the "formation-position" onward.


For example:

Spoiler
i have following Actors in group (left) and change the formation (right)


Alex                              Marco


Nadia                            Nadia
Marco                           Alex



and if i am happy with it, want to continue on.
then have a script execute to remove the party member 2 and 3 resulting in the following party members (left unchanged, and on the right changed)



Alex                              Marco



Edited out:

Spoiler
As an example for the code i thought about:
 



for (var i = 2; i < members.length; i++) {
$gameParty.removeMember(i);
}




can i do that without having to write a plugin or anything?


(note that i don't want to remove by actor-id, rather by the position in the party)


Thanks in advance :3



Edit:


So far i have found out i can use an event to store the Actor id inside of a variable.


What i am trying right now would be (first) to add party members, if they do NOT have a specific name:

Spoiler
for (var i = 1; i < $gameActors.length; i++){
if ($dataActors.name !== '10002016') {
$gameParty.addActor(i);
}
};




but for some reason i cannot get it to work =/


as far as i have come with removal of them (though not tried as of yet):
 

Spoiler
*Event Save ActorID of PartyMember1 to Variable 2 and PartyMember 2 to Variable 3*



for (var i = 1; i < $gameActors.length; i++){
if (i !== $gameVariables.value(2)){
if (i !== $gameVariables.value(3)){
$gameParty.removeActor(i);
}
}
};



I appreciate any help :3
Thanks in advance!



Got it to work myself :3


for anyone wondering how:


Adding:


for (var i = 1; i < 12; i++){
if ($dataActors.name !== "NotToAdd") {
$gameParty.addActor(i);
}
};


Removing:


Saved Group Members Actor ID 1-4 in variables 2-5, then:

Code:
var p1 = $gameVariables.value(2);
var p2 = $gameVariables.value(3);
var p3 = $gameVariables.value(4);
var p4 = $gameVariables.value(5);
var Pmax = 12;
for ( var i = 1; i < Pmax; i++ ) {
   if ( i !== p1 && i !== p2 && i !== p3 && i !== p4 ) {
      $gameParty.removeActor(i);
   };
};

Original thread: https://forums.rpgmakerweb.com/threads/removing-adding-party-members-nearly-all-with-script.56635/