Jump to content

Help conceptualizing


Brian W

Recommended Posts

I play a home made table top RPG with a few friends. The game is still in child hood stages of development but I am trying to get a few more things stable with our online resources.

The project I would like to tackle at the moment is stores.

I have items, weapons, armor, ect.  to put into the store, but I'm not sure what the best way is to tack the stuff into the store as inventory

Stores will have anywhere from a few items to hundreds of items. I will be creating store fronts that have individual stock, so I need it to be pretty simple to add and remove inventory.

I don't need this done for me, just would like some help with the structure.

Any input appreciated, thanks.

Link to comment
Share on other sites

Here's a standard database style structure

 

Table "items"

Column 1: Integer identifier "item_id"

Column 2: Text item name "item_name"

Column 3: Enum item type "item_type"

Column 4: Integer item value "item_value" (or could be floating point)

 

You might want to add additional item attributes to that table like damage, charges, wearable locations, and so on.

 

Table "stores"

Column 1: Integer identifier "store_id"

Column 2: Text store name "store_name"

 

And additional store attributes in that table, but NOT the items ..

 

Table "store_inventory"

Column 1: Integer identifier "store_id"

Column 2: Integer identifier "item_id"

Column 3: Integer item count "inventory_count"

 

This table has one row for each item that a store has in stock.

 

Does that makes sense?  An item's identifying characteristics go in the "items" table.  A store's identifying characteristics go in the "stores" table.  Then a third table links stores and items to provide inventory information.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.