Change party order without removing and readding?

I have formation disabled in my game because the team order is pertinent to the story. However, sometimes I need to change the order for a period of time or simply for a cutscene. Thing is, I do not see a way to do this with regular event commands.


The main character is usually the leader but sometimes I need his wife to lead temporarily, or even his Moltres.


Is there a way to do with with either an event command or a script call?
Script call
Code:
$game_party.swap_order(index1, index2)
The index starts from 0
Is this actor ID or current character order in party?
Is this actor ID or current character order in party?
I think "swap" means that index1 is swapped with index2.
it's character order in the party
Is this actor ID or current character order in party?
You already got a solution for changing party members based on their indexes aka positions. If you need a method for changing actors based on ActorID's, just let us or just me know.
I was just making sure it was index.
This is the code that would allow you to swap a member with a brand new actor.

POST EDITED

Ruby:
# * Swap Party Members VX & ACE * #

class Game_Party
  def swap_member_with_actor(index, actor_id)
    @actors[index] = actor_id
    $game_player.refresh
  end

  def swap_actor_with_actor(actor_id1, actor_id2)
    pos = @actors.index(actor_id1)
    @actors[pos] = actor_id2
    $game_player.refresh
  end
end

The script CALLS would be:

Ruby:
$game_party.swap_member_with_actor(MemberIndex, ActorID)
$game_party.swap_actor_with_actor(ActorID1, ActorID2)
Script call
Code:
$game_party.swap_order(index1, index2)
The index starts from 0

Your script code is invalid. Your code crashes my game no matter what index I use

Capture.JPG

This crashes every time an event is run with a the swap script call that you provided.

Are you sure your code is not for MV or MZ? This is ACE.
Your script code is invalid. Your code crashes my game no matter what index I use

View attachment 262119

This crashes every time an event is run with a the swap script call that you provided.

Are you sure your code is not for MV or MZ? This is ACE.
You're probably doing a very simple mistake. You're understanding of scripts and code is probably why.

$game_party.swap_order(index1, index2)
means
$game_party.swap_order(0, 1)
Thank You. I'm a douche for not figuring that out on my own lmao

Original thread: https://forums.rpgmakerweb.com/threads/change-party-order-without-removing-and-readding.157556/