Recalling party member command

in certain situations I need to remove my entire party and replace it with a “dud” (invisible party member). Is there any script or command that will remember all party members, remove them and with another command bring them back into the party? I have it with conditional branches and switches but thinking if there was an easy way?
FINAL EDIT!

Ruby:
# * Keep Track of Old Heroes ACE * #
#   Scripter : Kyonides Arkanthes
#   2024-10-22

# * Script Calls * #

# - Remove All Heroes:
# $game_system.old_party_ids = $game_party.member_ids
# $game_party.clear_members

# - Restore Heroes:
# $game_party.restore_member_ids($game_system.old_party_ids)
# $game_system.clear_old_party_ids

class Game_System
  alias :kyon_save_old_party_gm_sys_init :initialize
  def initialize
    kyon_save_old_party_gm_sys_init
    clear_old_party_ids
  end

  def clear_old_party_ids
    @old_party_ids = []
  end
  attr_accessor :old_party_ids
end

class Game_Party
  def member_ids
    @actors
  end

  def restore_member_ids(actor_ids)
    @actors = actor_ids
  end

  def clear_members
    @actors = []
  end
end
alternatively Tsukihime's party manager script for managing multiple parties might be a better solution:
just have a second empty party in addition to your regular party and switch to it when needed.
FINAL EDIT!

Ruby:
# * Keep Track of Old Heroes ACE * #
#   Scripter : Kyonides Arkanthes
#   2024-10-22

# * Script Calls * #

# - Remove All Heroes:
# $game_system.old_party_ids = $game_party.member_ids
# $game_party.clear_members

# - Restore Heroes:
# $game_party.restore_member_ids($game_system.old_party_ids)
# $game_system.clear_old_party_ids

class Game_System
  alias :kyon_save_old_party_gm_sys_init :initialize
  def initialize
    kyon_save_old_party_gm_sys_init
    clear_old_party_ids
  end

  def clear_old_party_ids
    @old_party_ids = []
  end
  attr_accessor :old_party_ids
end

class Game_Party
  def member_ids
    @actors
  end

  def restore_member_ids(actor_ids)
    @actors = actor_ids
  end

  def clear_members
    @actors = []
  end
end
Can you explain how to use the script, I see the command but is it just using the command or do I need to specify what members are apart of the party?
O_O The mechsnism is pretty straight forward, you just store all of them in a separate custom variable. The current party will be empty, add a new guy via an event command. The old guys will remain "hidden" until you call them back.
O_O The mechsnism is pretty straight forward, you just store all of them in a separate custom variable. The current party will be empty, add a new guy via an event command. The old guys will remain "hidden" until you call them back.
I wanted to make sure there was nothing else I was missing as that’s what it appeared at first

Original thread: https://forums.rpgmakerweb.com/threads/recalling-party-member-command.172759/