ITEM STORAGE SYSTEM

Posts

Pages: first 12 next last
Hey guys, I need help trying to event a item storage system, I have no idea how to do it, I have a fairly weak knowledge of what a pointer is but I don't know how to implement it and I'm requesting any ideas on how to do this?

My idea on how to do this is this:
In the game there will be various space for items to be stored, like for E.g. In the boot of a vehicle, cabinets, cupboards, crates, caches, chests and so on... each will have their own storage capacity. E.g. a chest will have 10 storage slots for 10 items to be stored. Allowing the player to withdraw and deposit items.
Adon237
if i had an allowance, i would give it to rmn
1743
What are you using?
You can't do conditional statements on pointers to items in RM2K/3, so if you're using either of those, you're out of luck.

...well, it'd be possible, but it would involve a lot of tedious copy/paste.
author=psy_wombats
You can't do conditional statements on pointers to items in RM2K/3, so if you're using either of those, you're out of luck.

...well, it'd be possible, but it would involve a lot of tedious copy/paste.

I actaully am using RM2K3 and someone has done it before, I just didn't understand how they did it...
Adon237
if i had an allowance, i would give it to rmn
1743
Well the they probably did the tedious copy and paste.
I am not sure, this sounds complicated. I am a fail!
THIS CALLS FOR AN EXPERT!
you will need:
- a variable for each type of item than can be stored (one set of these for each storage container!)
- an event calculating the total of items in a storage container from its corresponding set of variables (but don't always have it running, because you want to be able to change it)
- show choice / enter number commands to choose withdraw / deposit items (i'd recommend handling it like pokémon does)
- change equipped items / variable operations commands to actually handle the swapping of items between your party and the storage container

go go go go
one burning question remains: what would be the practical application of storing items everywhere? in pokémon you only had enough room in your inventory for so many, so you could dump your useless items when they're not required, but rpg maker games don't present this problem because you have an unlimited inventory.
Adon237
if i had an allowance, i would give it to rmn
1743
author=geodude
go go go go

GO EXPERT! Yay!
lol
author=geodude
one burning question remains: what would be the practical application of storing items everywhere? in pokémon you only had enough room in your inventory for so many, so you could dump your useless items when they're not required, but rpg maker games don't present this problem because you have an unlimited inventory.

I'll be using a CMS in my zombie game so I don't want the player to be able to carry over 64+ items as I want the player to think carefully what to bring with them when going to venture into the zombie wasteland.
well in that case it's a good idea in terms of strategy and it's suitable for the survival ambiance - having to think about what items you can afford to take with you is good, since it could be a life-or-death situation

i forgot to mention, if ever you need to refer to a specific item for withdraw / deposit, you can mentally assign each of them a number (or use their ID numbers in the item database, i guess) and set variables to constantly store these specific values throughout the game. this gets round the issue of being unable to point to the ID of specific items in variable operations / conditional branches
How would I go about checking what item is stored in what slot?

I understand to keep track of how many items are stored you need variables for every item and if you store an apple, you remove one apple from the inventory and +1 to the apple item variable.

But say for E.g. The ammo cache has 10 storage slots.
1. Would I make 10 variables each representing a slot in the ammo cache?
2. If I deposited a first aid kit in the first slot, would I assign the first slot to the item ID of the first aid kit?
If the item ID for the first aid kit = 0001, do I set SlotOne = 0001?

oh, if you're doing it with slots that can store a single item, you create a variable for each slot and in each store the ID number of the item stored there, or 0 if it's empty (luckily, an item's ID number can't be 0).

so you will need:
- for each storage container, a variable corresponding to each item slot
- a single variable for each item, storing its database ID number
author=geodude
i forgot to mention, if ever you need to refer to a specific item for withdraw / deposit, you can mentally assign each of them a number (or use their ID numbers in the item database, i guess) and set variables to constantly store these specific values throughout the game. this gets round the issue of being unable to point to the ID of specific items in variable operations / conditional branches
These is what I was referring to as the copy/paste tedium. Have fun making a conditional for every single item in the game, not to mention changing these huge events whenever you add anything.

author=supremewarrior
How would I go about checking what item is stored in what slot?

I understand to keep track of how many items are stored you need variables for every item and if you store an apple, you remove one apple from the inventory and +1 to the apple item variable.
You'd have two variables for each slot, one for ID, one for quantity.

EDIT: oh, uh, if you're only doing one item per slot that kind, it's just the item ID vars
ahh, yes. if you need to be able to store more than one of an item in each slot, you will need a second variable for each slot (but not for the number in your possession, since you can refer to that directly)

together we are stronger
In game, my inventory system will work like this:

Each slot in my inventory system will hold ONE item only, so one apple and the next slot can hold another apple.

It would look like this in my inventory:
-> Apple
-> Apple

Since I'm not using the traditional RPG inventory system where each slot can hold an item but more than one quantity of that item.

How would I go about doing this?
Adon237
if i had an allowance, i would give it to rmn
1743
Make a two(or more) different items called Apple, that do the same thing.
in that case you'd do it the way i said; treat your inventory as an extra storage container that travels around with you.

in you example, where apple's ID = 1, you'd have:
- slot 1's variable = 1
- slot 2's variable = 1
- slot 3's variable = 0
etc.

so when you come to show your inventory / a storage container, you'd use a conditional branch to refer to slot 1's variable and show the correct item accordingly. for using an item, you'd use a conditional branch to refer to the slot's variable and change it to 0 (empty), or if it's already 0 show an error message / use an error sound effect
Great, thank you guys. I'll be posting here if I have any other problems!
Adon237
if i had an allowance, i would give it to rmn
1743
Yay! Score for Psy_wombats, geodude and me! lol
To make things easier, you can use RMEventFactory: http://www.mediafire.com/?bhika196vsvqru3 (my homepage is currently down, so here you have a Mediafire link).

With RMEventFactory you can easily create a common event like this:

<> Condition Branch if Variable == 1
....<> Change Variable == Amount of item #1
: End
<> Condition Branch if Variable == 2
....<> Change Variable == Amount of item #2
: End
<> Condition Branch if Variable == 3
....<> Change Variable == Amount of item #3
: End
...............and so on

...which you can use to get the number of items possessed of a specific kind.

If you wouldn't use RM2k3, but RM2k, things would be even easier, because you could use the Item&EventPointerPatch then.
Pages: first 12 next last