Transfering Items Between Inventories

Rink27

Veteran
Veteran
Joined
Jul 18, 2014
Messages
222
Reaction score
13
First Language
English
Primarily Uses
RMMV
Alright, so I would like to implement a system where the player has to decide which items to carry into battle with. So, say the player has an inventory of 20 items... they'd have to select 4 items only to enter battle with.

I was looking at the Multiple Inventory plugins by Hime and thinking I'd have a secondary inventory for battle only. The player would send the 4 items to this inventory and switch to this for the battle only (and then merge them afterwards).

However, I'm not sure how to transfer items between inventories to pull this off. Anyone has an idea?

Link to Hime's Inventory Core: http://himeworks.com/2016/03/inventory-core/
Link to Hime's Multiple Inventories: http://himeworks.com/2015/11/multiple-inventories/
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.



Please give a link to the plugin's website, we can't help you without checking its details
 

Rink27

Veteran
Veteran
Joined
Jul 18, 2014
Messages
222
Reaction score
13
First Language
English
Primarily Uses
RMMV
I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.



Please give a link to the plugin's website, we can't help you without checking its details
When I asked for any ideas, I didn't mean specifically for Hime's scripts in case there was another method I could utilise alongside Hime's or something completely different that accomplishes both. However, I apologize for not explaining myself better and putting this in the right section. Also edited my previous comment to include the link.
 

Rink27

Veteran
Veteran
Joined
Jul 18, 2014
Messages
222
Reaction score
13
First Language
English
Primarily Uses
RMMV
So I was trying to find out about how "Select Item" can be utilized and came across this:
http://crackedrabbitgaming.com/guides/rpg-maker-mv-tutorials/ideas-for-the-select-item-command-rpg-maker-mv-tutorial/

Is this possible?
> Ask the player to select an item from their inventory. Store the ID # of this item into a variable.
> Repeat this for three other variables storing the ID # of an item.
> Match these ID #s in these 4 variables and add the relevant items into a new inventory.
> Switch to the new inventory for the battle.
> Merge inventories after battle.

I'm not sore how to obtain the ID #s and obtain items accordingly though.

EDIT: So with Select Item and this script code:
$gameParty.loseItem($dataItems[$gameVariables.value(28)], 1);

I can get the player to select an item to be lost. Can I use a similar script code to re-gain this item? I repeated the code with "add" instead of "lose" but got an error. Guess that's not the proper code.

EDIT 2: gain* instead of add in "$gameParty.gainItem" works! :D

Okay, so now I can do: 

> Ask the player to select an item from their inventory. Store the ID # of this item into a variable.
> Repeat this for three other variables storing the ID # of an item.

And working on atm:
> Match these ID #s in these 4 variables and add the relevant items into a new inventory.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,574
Latest member
nikisknight
Top