Gameplay Tags - Item Quantities

As part of a demo I have been working on for an RPG, I have made gameplay tags for particular items needed for one of five tasks in that demo. Though I’ve made a data table for each item, I am unsure as to how to set a quantity for each item. This is so the game will know how many of each listed item the player has, and it will also be used as a condition to determine if the task is done successfully.

Is it possible to add quantities to items listed as gameplay tags?

Hey @CurleeD85!

Kind of. You need to get their inventory as an array and then for each, if “has Tag” then add it to another array. If array LEN > your specified number, then you have a True or false bool! :slight_smile:
Hope that helps!

1 Like

I did consider using arrays, actually. I wasn’t sure if it was the correct approach. But okay, I’ll try that. Though how do I add an array attribute to a preexisting gameplay tag?

Id recommend a map variable, of item object references or names, to quantities

There will be a dialogue widget that will show text based on whether or not the player has the correct items and needed numbers. If I used a map variable, I wouldn’t be able to cast to it, since one can’t cast to any variables within a level BP.

Got it I was thinking like a map variable in an inventory system, maybe I’m not quite understanding what exactly you need

In simplest terms, how do I add an array to a preexisting Gameplay Tag for the player’s inventory to give each item on the list a quantity?

you could use a Struct with variables Tag/Quantity

Are you talking about a variable deriving from Gameplay Tag? Or integers associated with it, or…what?