WEBVTT

00:07.130 --> 00:08.270
Welcome back.

00:08.270 --> 00:15.560
So we know that there are these things called gameplay tags and that they're supposedly really useful,

00:15.560 --> 00:17.120
but how do we make them?

00:17.120 --> 00:20.300
How do we create gameplay tags?

00:20.630 --> 00:23.360
Well, gameplay tags are project wide.

00:23.360 --> 00:30.560
As I mentioned, they're registered with the gameplay tag manager and to create them, we have several

00:30.560 --> 00:36.050
options and we're going to go over how to create them in the editor in this video.

00:36.050 --> 00:38.510
And to do that we go to project settings.

00:38.510 --> 00:47.780
So edit and project settings under project there's a gameplay tags section and we have the option to

00:47.780 --> 00:52.310
make gameplay tags or add them to our project here.

00:52.400 --> 01:00.740
Now, by default there's already a gameplay queue gameplay tag that's reserved for gameplay queues.

01:00.740 --> 01:08.130
We also see tests with generic tag here, but aside from those we have no gameplay tags.

01:08.490 --> 01:14.750
Now, as you can see, we have add new gameplay tag and add new tag source.

01:14.760 --> 01:23.220
If we expand add new tag source, you'll see that we can specify a dot Ini which seems to suggest that

01:23.250 --> 01:30.870
gameplay tags are associated with AI and AIS and Ini is a config file.

01:30.870 --> 01:34.530
And here's a config path.

01:34.530 --> 01:40.770
So as you can see there's config slash tags specified as a config path.

01:40.770 --> 01:43.110
So that's one way to add them.

01:43.110 --> 01:50.040
Another is to simply expand add new gameplay tag and this is how we can add them here in the editor.

01:50.800 --> 01:58.300
So we can add a gameplay tag by specifying the name and we can optionally add a comment for the tag.

01:58.450 --> 02:04.210
And you'll see that under source there's default gameplay tags dot I and I.

02:04.330 --> 02:10.780
And because we haven't used this add new tag source, well that's the only option we have.

02:10.810 --> 02:12.730
That's the default option.

02:13.030 --> 02:15.190
Now we'd like to add a tag.

02:15.190 --> 02:22.690
And tags are used to represent any number of things, including our attributes.

02:23.600 --> 02:28.700
So I'd like to create a gameplay tag for our health attribute.

02:28.730 --> 02:38.570
Now I've made the decision to call my health attribute a vital attribute that's kind of a project convention

02:38.570 --> 02:47.780
that I'm creating, and I'd like to keep every single tag that I make under a hierarchical, organized

02:47.780 --> 02:48.760
structure.

02:48.800 --> 02:55.640
So if I'm going to make a tag to represent my health attribute, I'm going to organize it in a hierarchy

02:55.640 --> 03:01.820
such as attributes, dot vital dot health.

03:01.970 --> 03:09.020
And that way I can have other gameplay tags for other attributes that I may wish to categorize differently,

03:09.020 --> 03:12.500
which is what I will be doing throughout this project.

03:12.740 --> 03:19.890
Vital attributes will be things like health and mana, which are kind of tied to the life of the character.

03:19.910 --> 03:21.800
If you want to think of it that way.

03:21.800 --> 03:28.650
But later we're going to have other types of attributes such as primary attributes, things that an

03:28.680 --> 03:32.880
RPG game would use, like strength, intelligence, things like that.

03:32.910 --> 03:37.500
Those will get a different subcategory in the hierarchy.

03:38.040 --> 03:43.770
So for now, I'm going to make a new attribute called health, and it's going to be attributes dot vital

03:44.010 --> 03:44.720
health.

03:44.730 --> 03:54.180
And if we want, we can put a comment here and say amount of damage a player can take before death.

03:54.810 --> 03:59.040
And I hit enter and now the text boxes are blank.

03:59.040 --> 04:06.810
But down here we see an attributes with a dropdown and I can expand it and there's vital there's a dropdown

04:06.810 --> 04:08.160
here and there's health.

04:08.580 --> 04:15.120
So now we've created this hierarchy and we have one gameplay tag called Health.

04:15.120 --> 04:16.820
Now take a look at this.

04:16.830 --> 04:19.500
We see add sub tag, right?

04:19.500 --> 04:28.500
We can add a sub tag by clicking on plus and that automatically populates name with attributes dot vital

04:28.500 --> 04:33.510
dot health dot and it's expecting me to name that sub tag.

04:33.510 --> 04:34.860
I'm not going to use that.

04:34.860 --> 04:42.450
I'm going to delete that, but we can add another sub tag to Vital by clicking add sub tag and we can

04:42.450 --> 04:45.360
create a tag for the mana for example.

04:45.360 --> 04:48.000
So I'm going to type mana enter.

04:48.000 --> 04:51.060
And now expanding the dropdowns here is health and mana.

04:51.060 --> 04:54.960
So this is a shorthand for typing out all those things.

04:55.320 --> 05:02.010
It kind of helps by filling in part of it for us so we can have health mana, we can do the max version.

05:02.010 --> 05:08.400
So next to Vital, I can click add sub tag and add a max health tag.

05:08.400 --> 05:10.920
I can do the same thing for Max Mana.

05:10.920 --> 05:15.090
So let's click the plus and add Max Mana.

05:15.090 --> 05:20.310
And this is how we add gameplay tags from here in the editor using this menu.

05:20.550 --> 05:27.630
Now we know that tags are defined in an I and I somewhere, so why don't we take a look at that?

05:27.630 --> 05:35.220
Because what this menu is doing is just making it easy for us to make the tags, but they really exist

05:35.220 --> 05:37.260
in a config file.

05:37.290 --> 05:45.480
Let's take a look at our config folder and here's that default gameplay tags ini.

05:45.990 --> 05:48.390
Now I'm going to go ahead and open it.

05:48.420 --> 05:51.960
I'll just open it with notepad.

05:52.320 --> 05:53.460
Here it is.

05:53.460 --> 05:55.890
And here in default tags dot ini.

05:55.920 --> 05:57.630
Take a look at this.

05:57.660 --> 06:02.430
We have health and we have mana max health and max mana.

06:02.430 --> 06:03.150
And check it out.

06:03.150 --> 06:09.090
This is how you really add tags as you add them to this dot ini.

06:09.120 --> 06:13.620
Now of course you can have other Ini files as well as we've seen.

06:13.620 --> 06:19.020
We can add a tag source, but this is where our tags can go.

06:19.020 --> 06:24.300
Now you don't have to add a new tag source for each subcategory of tags or anything.

06:24.300 --> 06:25.650
You can keep them all in the same.

06:25.860 --> 06:26.220
Ini.

06:26.250 --> 06:27.870
That's totally fine.

06:27.990 --> 06:35.490
It's only if you're really concerned about organizing into sub config files that you want to do this

06:35.490 --> 06:39.840
kind of thing, but you can also come in here and edit this directly.

06:39.840 --> 06:50.640
For example Mana, we can say a resource used to cast spells and Ctrl s to save and close that out and

06:50.640 --> 06:57.420
we can come back into our project settings and hover over Mana and we're not going to see anything,

06:57.420 --> 07:03.510
but we can close out of the editor and we can launch the editor again.

07:04.390 --> 07:12.040
And back in the project settings into gameplay tags, we can hover over mana and now we see in the pop

07:12.040 --> 07:13.750
up that little comment there.

07:13.750 --> 07:21.370
So the comment is not really functional, but it serves as a way to kind of see what an attribute is

07:21.370 --> 07:22.390
supposed to do.

07:22.600 --> 07:29.800
So that's how we add attributes from within the editor and it's a perfectly fine way to do it.

07:29.830 --> 07:33.430
They now exist in the Ini file, which is great.

07:33.790 --> 07:35.440
Now it's not the only way.

07:35.440 --> 07:38.710
And in the next video, we're going to learn another way.

07:38.740 --> 07:42.100
So great job and I'll see you in the next video.
