Separate parties with same inventory?

Unsure if this can be done without writing my own plugin or not, but I'd like to ask anyways. I'd like to borrow the party system used in FF6 for a dungeon, where the player creates three parties that have different characters but share an inventory, and are swapped between as the dungeon progresses. All plugins I can find accomplish this, but with separate inventories for each party, which isn't feasible for gameplay with my current project. I'd like to:

1) allow the player to arrange three parties at once in an event, from the pool of characters unlocked so far;
2) allow switching between the parties smoothly (doesn't have to be available to the player, just doable in an event); and
3) keep the base inventory shared between all three, so everyone can access the item pool gathered throughout the game so far.

I already use switches to keep track of the party, so those can be utilised easily. I'm okay with adding new plugins, I'd just like assistance in getting this working. Thanks in advance.
I don't know of any plugin that has different parties but shared inventory.

that said, why don't you simply trick the player?
have only one party, but remove and add actors depending on which party the player is supposed to use.
You dont need a plugin for that. It would have been a problem if you did want them all have their own inventory.

You can easily remove all actors of one party, and add the actors of the other party, and you instantly switched parties with keeping the inventory.

All you need to do is to make a scene where the player chooses the actors for each party. Use a variable for each slot in each party (so 3 parties with 4 members, would need 12 variables).

For this example, lets call them:
Member 1-1
Member 1-2
Member 1-3
Member 1-4
Member 2-1
Member 2-2
Member 2-3
Member 2-4
Member 3-1
Member 3-2
Member 3-3
Member 3-4

In variable Member 1-1, you put the ID of the first actor chosen for party 1. In 1-2 goes the ID for rhe second actor in party one. Etc etc.

Now set up a common event to remove all actors for the party and add the actors stored in the variables that start with Member 1-

Then make 2 more, one for Member 2- and one for Member 3-

Now, each of those common events, switches switches between one and the other party.

You can bind that common event to a skill or an item, to switch parties, or you can trigger them during cut scenes, if you (as dev) want to have control over the switches.

1 important note: In the common event where the members are added, do NOT check "initialize". This will set the actor back at lvl 1 with basic equipment. Any improvement and any gear they wear would be lost. You don't want that, so make sure that box is unchecked.
I don't know too much about MV but is there possibly a Storage Box style plugin that you could call via a common event? Something like that might not be perfect (it'd probably add an extra step or two for the player to place the items in the box as one party and then take them out again as the other) but! might help remedy narrative issues regarding "how are these guys able to share the same inventory?" - give each party a magic bag that links to the other. Even without a plugin I think this could be evented?
Isn't it a short script call to save/load your whole inventory. If you've found a party swap plugin with separate inventories, you could just switch the inventory like that. Save/load it every time you swap parties.
Why is it needed to save/load the inventory, if they want the parties to share the inventory? You don't have to touch the inventory at all, only the actors, right?

Maybe I am missing something, but I don't see why storing the inventory.
@JohnDoeNews The OP said that they found party plugins, but they had separate inventories? But wants a shared inventory. So just throw all your stuff from one party to the next when switching (and also clear the previous)? Or am I missing something?
Oh so that is for when used with the plugin? Got it. That wasn't clear to me.

Yeah there would be a script call for that. I'd have to look it up, though. I've seen is pass by on steam a couple of times. So if you (or OP) want that code, i'm sure you can find it on the steam forum for MV. I'm pretty sure Caethyril has shared a script call for that at least once, so that might make it easier to find.

Spoiler: Codes
I quote @caethyril on steam:

By default the inventory is organised into three lists:
  • $gameParty._items
  • $gameParty._armors
  • $gameParty._weapons
I haven't tested, but I think you could use a single variable for all three, e.g.
  1. Memorise - Control Variables > Script:
    Code:
    var p = $gameParty; [p._items, p._armors, p._weapons]
    ;
  2. Clear - Script:
    Code:
    $gameParty.initAllItems();
    $gameMap.requestRefresh();
  3. Restore - Script:
    Code:
    var v = $gameVariables.value(123);
    $gameParty._items = v[0];
    $gameParty._armors = v[1];
    $gameParty._weapons = v[2];
    $gameMap.requestRefresh();

Replace 123 with the ID of the variable you used in step 1.

But honestly, if there is a direct approach, and a plugin that needs a work-around, then I would personally go for the direct approach. It is a little more work to setup, though.

(Edit: Haha. I told you how to find it, then I went ahead and looked for it myself, but I forgot to remove the part where I told you how to find it... Oops. I know I could still just remove it, but I think just mentioning it is funnier. 😛 )
There is a topic here to an excell with a lot of script calls (just search script call list). That's where I always check stuff.

That inventory management isn't a very long script:

Spoiler
STORE:
$gameVariables.setValue(1, { Armors: Object.assign({}, $gameParty._armors), Items: Object.assign({}, $gameParty._items), Weapons: Object.assign({}, $gameParty._weapons) });

CLEAR:
$gameParty.initAllItems();

RESTORE:
var data = $gameVariables.value(1); for (var k in data) { var items = window['$data' + k]; for (var n in data[k]) { $gameParty.gainItem(items[n], data[k][n]); }; };

But yeah, you can do it in a lot of ways. Just threw this idea out here.
I believe you that your code works as well, but the other one seems easier to understand for a noob like me. Yours seem more advanced class. 😛
The OP wants to swap party members. As others have said, this is perfectly possible with no plugins at all. If plain eventing seems like too much bother, the MV/MZ Script Call List has this:
  • Memorise Party Members

    // Store current party member IDs in variable 1 $gameVariables.setValue(1, $gameParty.members().map(function(actor) { return actor.actorId(); }) );
  • Clear Party

    $gameParty.members().forEach(function(actor) { $gameParty.removeActor(actor.actorId()); });
  • Restore Party Members

    // Restore saved party members from variable 1 $gameVariables.value(1).forEach(function(actorId) { $gameParty.addActor(actorId); });
@JohnDoeNews - I think the code you quoted will work OK if you call initAllItems after memorising. If you don't, then your "stored" inventory will likely track the current inventory, because objects are passed by reference (pointer/address), not by value. That's why the Script Call List example @rpgLord69 quoted uses Object.assign to create shallow copies instead. (That said, I should've included $gameMap.requestRefresh() in the Script Call List examples; I'll make a note to add that.)
The OP wants to swap party members.
Yeah that is what I thought.

Original thread: https://forums.rpgmakerweb.com/threads/separate-parties-with-same-inventory.159564/