Setting up database for player items

Another day, another weird help request.

So, I need to set my database up for player items for my RPG. Currently, I have a User, who creates a player which is complete with stats etc. The player fights monsters, which are built from option sets. Here’s what I’d like to do, but for the life of me can’t figure out.

I’d like for a monster to contain a “item drop” value, which I will set to give out an item to the player once the monster is defeated. For example, the player kills a monster, and the monster drops “monster meat” which is added to the players inventory. I’m going to utilize these for quests and other uses, but I just figure out how to set up my database to allow for the player character to gain an item.

I figure the cleanest way to do this was to create an item data type which would link to my player, like this- (I wasn’t sure whether to make inventory a list or not, so I did both to test)

From there I would populate a list of items like this,


I made them both “number” because I wasn’t sure how else to do it, and I know the play will need to be able to hold multiple.

At this point I wanted a monster option set option to be able to hold an attribute called “Item Drop”, which would somehow allow me to specify what item is dropped upon their defeat. Something like this

Sadly, there is no way to connect the Monster option directly to the item data type or player inventory that I’ve found. I also can’t see to figure out how to correctly connect the player inventory and the item list that actually makes it act like the player is containing the items in question.

I could likely add the items directly into the player data type, but this seems really messy to me and is going to clutter up my database like crazy once I add a bunch of items. It also doesn’t solve my issue of needing to connect the item drop somehow to my monster option. I already am able to parse which monster I’m battling and defeating, I just don’t know how to add a value to the monster option that will allow me to add an item to my player on defeat.

Thanks for any help. Figuring this out should also lend me to solving my issues with skills. I essentially lack the knowledge to create a database of “thing” and connect it correctly to my player in a meaningful way. I can answer any questions you may have if I am unclear.

Alright, weird addendum, but I typed my question into chat.openai and it set me on a potentially correct path that I’ll work on.

" To create a player inventory in Bubble.io, you can follow these steps:

  1. Create a new data type for your inventory items: Go to the Data tab and click “New Data Type.” Give it a name (e.g. “Inventory Item”) and add fields for the item name, description, image, quantity, and any other relevant data.
  2. Add a field for inventory to your User data type: In the same Data tab, find the User data type and add a new field called “Inventory.” Make it a list of Inventory Items.
  3. Create a page to display the inventory: In the Pages tab, create a new page and add a repeating group. Set the data source for the group to be the current user’s Inventory."

This doesn’t totally solve my monster option set issue, but maybe setting this up will open that door for me.