Inventory for Role Playing Game

I’m creating a Role Playing Game in VF and looking for a solution that tracks what in-game items the player has found and collected. Has anyone tackled this logic yet or does anyone have thoughts about authoring this. I’m wondering if I need to break into Code.


First, Voiceflow’s project variables are persistent. if the number of items is fixed, simply create a variable for each item.

1 Like

second, using project variables is simple, but you can’t manage how many items each user has, because there’s no management console-like thing for variables.

Then, you should get those out from Voiceflow and using external datasource such as google sheets, airtable, or firebase. using Integration bloock, you can retrieve/create/update/delete items via API.

here are some infos:



google sheets

1 Like

Great! Thank you for taking the time to give me advice on this. It’s much appreciated!

I went with Google Sheets, it was easy thanks to the docs.

I think I’ll keep the user’s current weapon in a VF variable and store the other collected items in Google Sheets. Then pass those items in and out of VF into variables when the user does something with them.

Each item should have it’s own corresponding variable in VF? IE wood_shield, silver_helmet. To manage the user finding the item in gameplay. Then write that item in a slot in Sheets for them to keep them. I will have to limit the number of slots in Sheets or it will get out of hand.

I’m thinking I have an IF that checks Sheets for each column labeled Slot 1, Slot 2, Slot 3, for a value of 0. If it finds one it writes the item name there. If it finds none it it speaks “You have no more room in your sack”.

Or do you think I can handle all the authoring of each item in Sheets? And pass that item name and attribute (damage strength) into a VF variable like discovered_item.

Then write that variable’s value back to Sheets into the user’s row.

So pass from one source Sheet of items into VF variable discovered_item. Then write discovered_item value back into another Sheet that holds User data?

I’m not sure about your use-case, but IMO, google sheets is easy but not flexible. maybe you want some more in future. In that point, airtable is more like relational database and firebase is NoSQL and more flexible.

Speaking about data, you will want to use code block and arrays or objects. This link might not be directly what you want to do, but useful maybe.

1 Like