Is there a way to do that with a script line or snippet? Thanks in advance for your help.
MV Disable/Enable Item Option in battles?
Javascript/Plugin SupportThere are a lot. What are you using? MV or MZ?
MV.
Also, is there a script line to remove all items from the inventory?
Also, is there a script line to remove all items from the inventory?
you can empty it easely, but it's better to save it in a variable like this:
$gameVariables.setValue(ID, $gameParty._items); // ID is number of variable
$gameParty._items = {};
// to restore the items
$gameParty._items = $gameVariables.value(ID);
but whatever you want to do, use it wisely (without a variable, its impossible
to revert it)
$gameVariables.setValue(ID, $gameParty._items); // ID is number of variable
$gameParty._items = {};
// to restore the items
$gameParty._items = $gameVariables.value(ID);
but whatever you want to do, use it wisely (without a variable, its impossible
to revert it)
This worked, thank you.
Not sure if I'm understanding the requirements fully, but if you just need to hide the item command for a specific battle, can't you just do a "plug-in on the spot" at turn 0 of the troop event?
JavaScript:
(function() {
'use strict';
Window_ActorCommand.prototype.addItemCommand = function() {
false;
};
})();
there are plugins to disable the item command, but on switching else where,
you can empty the inventory for another party and save those inside a different
variable, a nice way to control parties inventory if you dont mess up.
you function might disable the itemCommand entirely for the rest of the game,
so there is no way turning it back on unless used again.
I use a single actor which can disable with switch, other with scriptcall (main menu)
for all members.
but it was empty the inventory or disable, and empty is has also the same effect
for not using any items, but still access to key item probably?
you can empty the inventory for another party and save those inside a different
variable, a nice way to control parties inventory if you dont mess up.
you function might disable the itemCommand entirely for the rest of the game,
so there is no way turning it back on unless used again.
I use a single actor which can disable with switch, other with scriptcall (main menu)
for all members.
but it was empty the inventory or disable, and empty is has also the same effect
for not using any items, but still access to key item probably?
Original thread: https://forums.rpgmakerweb.com/threads/disable-enable-item-option-in-battles.161305/