Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Changing max item slots

A topic by PaulVial created 80 days ago Views: 43 Replies: 4
Viewing posts 1 to 4

Hello, the documentation mentions : 

Max Item Slots

You can decide how many single slots the party can have. By default, it is set to 10. But it can be changed using script calls.

But it doesn't mention the script itself. What is it ?

Developer

Hi there!

Because it is a plugin parameter configuration:


As so, you need to put a script call, if you want, on that plugin parameter. Example in case you want to use a variable ID 10 to hold the max item slot:

  • return $gameVariables.value(10)

Or just a number:

  • return 15

The important thing is for it to start with "return ", no qoutes. And be whathever you put there, must result in being a number.

Oh yes I understand now. Thanks for the explanation !

Also the plugin have trouble with mixing stackable and non stackable items (even with a full inventory the player can still pick a stackable item up). It causes the full inventory Switch and Common Event to bug. I'm currently writing a script to count the number of occupied "slots" to prevent this.

One last note : the Full Inventory Switch resets to false when opening the inventory, is this normal?

Hello again,

Here's a quick script that turns the Switch 33 if the inventory is full. It can manage an inventory mixing both stackable and non stackable items. 

var itemNb = 0;
for (var i = 0; i < $gameParty.items().length ; i++) {
if ($gameParty.items()[i]["defaultCategory"] == "item") {
if ($gameParty.items()[i]["note"] == "<Stackable>") {
itemNb++;
}
else {
itemNb += $gameParty.numItems($dataItems[$gameParty.items()[i]["id"]]);
}
}
// Variable 45 => Max Inventory Slots
if (itemNb >= $gameVariables.value(45)) {
$gameSwitches.setValue(33, true);
} 
else {
$gameSwitches.setValue(33, false);
}

Don't know if this helps but I'm heavily relying on it.

Developer

Thanks! I will see if I can replicate this issue and fix this. But where are you putting this script?