RPG Maker MV

RPG Maker MV

Kawaii Kid Apr 1, 2021 @ 7:31am
Removing and replacing all items?
Is there a way to remove all items and equipment from the party, then later return all of said items? I found a post here from long ago that does it with equipment found here:

https://steamcommunity.com/app/363890/discussions/0/1730963192543176909/

But I'd like to do the same thing with the entire inventory and equipment.
< >
Showing 1-2 of 2 comments
Dusk_Army Apr 1, 2021 @ 12:43pm 
I don't have an actual answer for you except to say that it's probably possible by extrapolating from what's in that thread you linked. If you do a search for RPG Maker MV script calls, you should be able to find the method you'll need to use to do the same thing for items instead of equipment.


With a very small number of items (say, ten max) it would be possible (if tedious) to do this just by counting the number of each type of item the player has, storing each count in a variable, then removing the items (and adding them back later using the stored variables as a reference number). But of course, it's a huge time waster to hard-code that if you have a lot of different items.
Caethyril Apr 2, 2021 @ 9:02am 
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:
    var p = $gameParty; [p._items, p._armors, p._weapons]

  2. Clear - Script:
    $gameParty.initAllItems(); $gameMap.requestRefresh();

  3. Restore - Script:
    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.
< >
Showing 1-2 of 2 comments
Per page: 1530 50

Date Posted: Apr 1, 2021 @ 7:31am
Posts: 2