Welcome back.
So we've seen that we can add new gameplay tags from project settings pretty easily.
And we also saw that these exist in our config folder in one of our Ini files and we could even make
new Ini files to be gameplay tag sources.
Now this isn't the only way to make gameplay tags.
There are a few others.
One of those others is by making a data table.
Let's see how that works.
I'm going to go into my blueprints folder and I'd like to make a new folder in blueprints for all things
ability system.
So I'm going to make an ability system folder.
And here in ability system, I'd like a new folder for gameplay tags.
So I'll make a gameplay tags folder and here is where I'd like to put any data tables that we'll use
to create gameplay tags.
So here's how it works.
We make a new data table, we right click go to miscellaneous and select data table.
Now, whenever you make a data table, you need to pick the row structure so the data table knows what
fields are in a given row.
Now the one we're interested for gameplay tags is this one gameplay tag table row select that click
okay and we have a data table.
I'm going to prefix it with d t for data table and this is going to be for my primary attributes.
So we have our vital attributes health and mana, but I'd like to make some gameplay tags for other
attributes that we haven't yet added to our attributes set.
But for the sake of an example, I'm going to make their gameplay tags now.
So I'm going to call this primary attributes and open it up now.
It's empty, but we can add a new row by clicking plus Add and now we have a new row and the gameplay
tag table row has a name and it has its own tag with a comment.
Remember, tags can have a comment associated with them.
And again, these comments are not functional.
They don't do anything, but they're kind of like code comments and C plus plus code comments don't
do anything either.
They just serve to tell you something.
So really, the only thing we have to do in this data table is change what this text box says for the
tag.
We don't have to change the name or anything like that.
All we do is put what we want the tag to be.
Now, this is error prone because you can make typos.
So we have to be careful when typing in here.
The tag I'd like to make is attributes dot primary dot strength.
And for the strength I'm going to add just a dev comment doesn't do anything I'm going to say increases
physical damage.
Now we haven't created any new gameplay tags yet.
We have to make the table first and then there's an additional step for this table to be converted into
gameplay tags.
For now, we're just going to make a couple more in the table before we actually make the tags.
So I'm going to click plus Add, and for the next one I'll call this one attributes dot primary dot
intelligence.
Being careful not to make typos and for intelligence I'm going to add a dev comment increases magical
damage.
Let's add another one.
And for this one, I'm going to call this attributes dot primary dot resilience.
And for the comment I'm going to say increases armour and armour penetration and we'll add one more.
This will be attributes dot primary, dot vigor and vigor.
The comment will say increases life or we'll say health and we'll save.
Okay, So so far all we've done is make a data table.
We haven't made any gameplay tags, but because this data table exists and it has the proper row structure.
Gameplay tag table row which we can always look at with the data table details row struct gameplay tag
table row.
It's right there under data table and you can always go to window and bring that up if it's not there.
Okay, so we have the proper data table with the row structure we need.
Now we go back to project settings and here under gameplay tags we have gameplay tag table list and
it's an array so we can click plus to add an element and look at that.
It's an array of data tables.
We can open the dropdown and it shows us the data tables that are appropriate for this particular array.
It has to have the gameplay tag table, row structure, and if we select it now, let's see what happens
if we expand attributes.
Look at that, we have primary and we can open that and we have intelligence, resilience, strength
and vigor.
It puts them in alphabetical order.
Look at that.
Okay, so that's how we can add gameplay tags with data tables.
Pretty sweet.
And this is one of my preferred ways to do it.
I really like doing it this way because we now have a data table that we can go in and change and it's
just really convenient to do it this way.
I personally like it, but that's just one option of many that we have in Unreal Engine.
Okay, so now we know a couple of ways to make gameplay tags, and now these exist in our project.
They're project wide.
So great job and I'll see you in the next video.