cookie said:
But then they're just "null"-weapons, some with ammo information. Hasn't the weapon you start with ("No Weapon") the value 0?
Well, the slot 2 is a null weapon. The data on the other slots is complete. The game just stops checking for weapons as soon as a slot with "no weapon" is found.
EDIT:
Having checked, I can doubly confirm this is the case. If you get a new weapon the game overwrites the null slot and all the old weapons reappear.
Anyway, the general idea I had is:
Char 1 has one weapon, the sword, and is being switched out for player 2 (who, say, has two weapons, the bubbler and machine gun, which are recorded in the last two slots, 4 and 5 [it's possible that there's more memory in the profile.dat for weapons, but I don't know for certain]). The sword is swapped with whatever weapon is in position 5 in the weapons list. Then weapon 4 is swapped with weapon 2 (which should be empty ATM). This ends up with the following weapons slots:
Bubbler| Machine Gun| Null| Also Null| Blade
The blade isn't seen by the player because the game goes to slot three and says "Oh, I don't need to keep looking". Rotation between the bubbler and machine gun acts as normal, and the blade is never swapped in.
When we want to switch back between the characters, we do the same procedure, which ends us up with
Blade|Also Null|Null|Machine Gun| Bubbler.
The problem is I don't know how much control you have over the player's inventory from scripts.
EDIT2: A more elaborate method follows, which assumes you can duplicate the weapon shifting functions of the A and S keys.
Initial loadout (N is null) A|N|B|C|D
A is the currently equipped weapon
Give weapon 6 (which is a dummy non-functioning weapon)
A|6|B|C|D
A is still the current weapon
shift weapons two to the left
B is the current weapon, order is
B|C|D|6|A
Replace weapon 6 with weapon 0 (using <TAM0000:0000:0000) -
B|C|D|N|A
The main flaw is that you have to know how many weapons are equipped at each point.