- Joined
- Jul 18, 2014
- Messages
- 222
- Reaction score
- 13
- First Language
- English
- Primarily Uses
- RMMV
This is the script I'm referring to:
yanfly.moe/2015/10/16/yep-11-item-core/
I simply would like to know if there is a script call to obtain the amount of remaining space for the item inventory.
Example:
I set the item limit to 5. I have a Potion, Feather and Rock. The remaining space should be 2.
I want a script call that can evaluate that value to be 2.
I am aware I can total my inventory space and deduct from the limit myself:
◆Control Variables:#0029 Inventory Count = var totalInven = 0; for (i=1; i<135;i++) {totalInven += $gameParty.numItems($dataItems);}
But my items actually stack (or are obtained in stacks). So the above example can be: a Potion (x5), a Feather (x3) and a Rock (x10) [All independent items].
I think the loop counting method I have above would count that up to 18 total items (instead of 3) ~ whereas Yanfly's counts it up as a total of 3. So I am hoping there may be a way to deduct that 3 from the limit of 5 and get 2 (under Yanfly's coding).
yanfly.moe/2015/10/16/yep-11-item-core/
I simply would like to know if there is a script call to obtain the amount of remaining space for the item inventory.
Example:
I set the item limit to 5. I have a Potion, Feather and Rock. The remaining space should be 2.
I want a script call that can evaluate that value to be 2.
I am aware I can total my inventory space and deduct from the limit myself:
◆Control Variables:#0029 Inventory Count = var totalInven = 0; for (i=1; i<135;i++) {totalInven += $gameParty.numItems($dataItems);}
But my items actually stack (or are obtained in stacks). So the above example can be: a Potion (x5), a Feather (x3) and a Rock (x10) [All independent items].
I think the loop counting method I have above would count that up to 18 total items (instead of 3) ~ whereas Yanfly's counts it up as a total of 3. So I am hoping there may be a way to deduct that 3 from the limit of 5 and get 2 (under Yanfly's coding).
Last edited by a moderator:
