WEBVTT

00:06.890 --> 00:07.820
Welcome.

00:07.820 --> 00:12.600
Now we're just about done with this section, but that doesn't mean we're done with gameplay effects.

00:12.620 --> 00:17.870
There's still a lot to learn and we're going to learn more about them as we incorporate them with the

00:17.870 --> 00:19.480
other elements of gas.

00:19.490 --> 00:26.630
But one last thing I'd like to touch on before we move on from this section is the fact that we've been

00:26.630 --> 00:28.770
using these scalable floats.

00:28.790 --> 00:31.060
Let's go back to one of our gameplay effects.

00:31.070 --> 00:39.410
I'm going to go into our potion folder, into Potion Heal and scroll down to our modifiers where we

00:39.410 --> 00:46.610
have one that changes health by adding and our magnitude calculation type is scalable float.

00:46.640 --> 00:52.670
Now so far we've just hard coded a single value in here, and that may seem that that's all that scalable

00:52.670 --> 00:53.990
float is good for.

00:53.990 --> 00:57.770
But we have this curve table dropdown now.

00:57.770 --> 00:58.370
Yes.

00:58.370 --> 01:02.180
When we click it and expand it, it's empty.

01:02.180 --> 01:07.800
But that's just because we have to make our own curve tables to use here.

01:07.920 --> 01:11.100
And that's what this video is all about.

01:11.100 --> 01:15.660
We're going to make a curve table for our potion heal.

01:15.690 --> 01:20.670
You see, gameplay effects have the concept of level.

01:20.670 --> 01:27.600
Lots of gas elements have the concept of level abilities have levels, gameplay effects have levels.

01:27.600 --> 01:36.690
So the curve table gives us the option to scale our magnitude by some value based on the effects level.

01:36.690 --> 01:38.820
So let's make our curve table.

01:38.820 --> 01:40.830
We're going to go into the potion folder.

01:40.830 --> 01:48.600
We'll just make it right here and we can go to miscellaneous and there it is, Curve Table.

01:48.630 --> 01:54.330
We're going to choose curve table and we can use linear, constant cubic.

01:54.330 --> 02:01.410
And this is just the mathematical function that our curve is going to take on.

02:01.410 --> 02:03.210
For now, let's try linear.

02:03.210 --> 02:10.920
I'm going to create the curve table and I'm going to call this C t for curve table potion, Heal and

02:10.920 --> 02:13.950
Open Up Potion Heal Now.

02:13.950 --> 02:16.740
A curve table is quite simple.

02:16.740 --> 02:19.530
It's sort of like an Excel spreadsheet.

02:19.530 --> 02:23.610
In fact, right up here, there's two different options.

02:23.610 --> 02:32.280
We have the graph view and if we click on that, we can see what the curve looks like as a graph, but

02:32.280 --> 02:33.690
there's nothing there yet.

02:33.720 --> 02:35.220
We still have to make the curve.

02:35.250 --> 02:39.270
But going back to this view, it's more like a spreadsheet.

02:39.300 --> 02:47.730
Now if we click on this triangle here, we see that there's a column and the column has the value one

02:47.730 --> 02:51.360
and it also has a float associated with it.

02:51.390 --> 02:59.730
Now let's just say that when our potion Heal Effect is level one, we want to heal by, say, five.

02:59.760 --> 03:02.490
Okay, let's add another row.

03:02.490 --> 03:07.650
And for two, let's say make this 7.5.

03:07.650 --> 03:09.180
We'll add another one for three.

03:09.180 --> 03:13.170
We'll make it ten for level four.

03:13.170 --> 03:17.070
We'll make it 15 for level five, we'll make it 20.

03:17.280 --> 03:20.010
Level six will make it 30.

03:20.730 --> 03:23.790
Level seven will make it 45.

03:24.090 --> 03:27.450
Eight will make it 60.

03:28.400 --> 03:32.720
Level nine will make it 85.

03:32.750 --> 03:34.460
Ten will make it 100.

03:35.770 --> 03:40.540
Okay, So we basically have this really simple spreadsheet, right?

03:40.570 --> 03:44.590
Well, let's go back into Graph view and select the curve.

03:44.620 --> 03:46.540
Now look at what we've made.

03:46.570 --> 03:52.310
Our curve looks like this, and it's kind of almost an exponential increase.

03:52.330 --> 03:56.470
It's linear, but we chose the values.

03:56.470 --> 03:59.050
So in between, each value is linear.

03:59.080 --> 03:59.650
Right.

03:59.650 --> 04:05.170
So this gives us a curve that we can use for our potion heal.

04:05.170 --> 04:13.120
And if we go back to Potion, Heal and go to the scalable float magnitude, we can use the curve table,

04:13.120 --> 04:16.950
we can open the dropdown and there's a potion heal now.

04:16.960 --> 04:23.710
Now here for scalable float magnitude, we can select a curve because a curve table can have multiple

04:23.710 --> 04:24.250
curves.

04:24.280 --> 04:28.810
As you can see, we can add a new curve by hitting the plus curve icon there.

04:28.810 --> 04:32.230
But so far this just has one curve.

04:32.260 --> 04:37.730
We can rename the curve, for example, we can call this healing curve.

04:37.820 --> 04:39.050
Let's save that.

04:39.050 --> 04:43.880
And back here in the gameplay effect, when we go to select the Curve, there's our healing curve.

04:43.880 --> 04:46.460
We're going to select our healing curve.

04:46.490 --> 04:54.110
Now we can preview the value that we would get right here based on the level and we can go all the way

04:54.110 --> 04:58.750
up to level ten because that's how far our curve goes for healing curve.

04:58.760 --> 05:00.440
So at ten.

05:00.470 --> 05:08.150
The reason we're getting 2500 and if we go back down to one, we're getting 125 is because this value

05:08.150 --> 05:14.240
that we put right here is scaled by the value on the curve for that level.

05:14.240 --> 05:23.360
So at level one, our curve has the value five, So it's taking 25 at level one and multiplying by that

05:23.360 --> 05:30.980
curve value five So if we want these literal values here, then we'd have to stick a one right here.

05:31.310 --> 05:33.650
And then at level one, we have five.

05:33.680 --> 05:35.780
At level two, we get 7.5.

05:35.810 --> 05:39.310
Basically those numbers that we put into our curve.

05:39.320 --> 05:43.100
So that's what this little preview slider is good for.

05:43.100 --> 05:51.800
So we know that our potion is applying our instant gameplay effect at level one, right?

05:51.800 --> 05:59.480
So we can press play and we should be able to pick up a health potion and we'll see an increase of five

05:59.510 --> 06:00.260
for our health.

06:00.260 --> 06:04.990
So our health is at 50 picking it up now it's at 55, right?

06:05.000 --> 06:12.050
Pretty simple, but what if we'd like our health potions to have their own sort of concept of a level?

06:12.050 --> 06:20.030
What if we want our effect actor to have a level itself and then it'll apply all of its gameplay effects

06:20.030 --> 06:21.260
at that level?

06:21.290 --> 06:25.250
Now you could have multiple levels one for each duration type.

06:25.250 --> 06:27.200
There's no end to the complexity.

06:27.230 --> 06:33.740
You can make these things, but I'm going to just say that our Effect actor has its own level.

06:33.770 --> 06:39.830
We'll call it an actor level, and that's a variable that I'd like to add to the effect actor in C plus

06:39.830 --> 06:40.460
plus.

06:40.460 --> 06:45.320
So I'm going to save all close out of the editor and go back to my effect.

06:45.320 --> 06:49.850
Actor I'm going to open up the actor folder and Ora effect.

06:49.850 --> 06:52.850
Actor And I'm going to add a new variable.

06:53.030 --> 06:59.300
Now these are all protected and I think the actor level can also be protected.

06:59.300 --> 07:01.280
So I'm going to stick it down here at the bottom.

07:01.280 --> 07:03.020
It's going to be a float.

07:03.110 --> 07:05.630
So I'm going to call this float actor level.

07:07.380 --> 07:09.060
And I'd like it to be added anywhere.

07:09.060 --> 07:12.560
Blueprint Read only category Applied Effects.

07:12.570 --> 07:15.120
So we're sharing that new property.

07:15.510 --> 07:23.400
Okay, now I'll give it a default value of one point F, so if we want we can have non discrete values

07:23.400 --> 07:27.420
like 1.5 for example, and that makes it more versatile.

07:27.690 --> 07:35.640
Now our actor level should be used when applying a gameplay effect, so control o or alt o will open

07:35.640 --> 07:36.360
our effect.

07:36.360 --> 07:45.900
Actor wkRP and we can go to apply effect to Target where we're applying our effect and we're applying

07:45.900 --> 07:48.570
the gameplay effect spec, right?

07:48.570 --> 07:54.060
And when we called make outgoing spec, we passed in a level here, right?

07:54.060 --> 08:01.580
And level is a float perfect instead of just hard coding one we're now going to pass in the actor level.

08:01.590 --> 08:08.230
Now we can go into the blueprint and change the level and make our potion or whatever type of effect.

08:08.230 --> 08:11.530
Actor more or less powerful based on the level.

08:11.560 --> 08:12.510
Perfect.

08:12.520 --> 08:19.390
Let's hit debug and we'll change the levels of some of our potions and see how they work.

08:19.720 --> 08:21.640
Okay, I'm going to click open.

08:21.670 --> 08:29.140
That's just going to bring up my potion Heal curve table and I'm actually going to open my BP health

08:29.140 --> 08:29.920
potion.

08:29.920 --> 08:35.170
Let's get that open and let's see if we can find that actor level.

08:35.650 --> 08:36.430
Here it is.

08:36.460 --> 08:37.750
And it's set to one.

08:37.900 --> 08:38.590
You know what?

08:38.590 --> 08:39.460
That's fine.

08:39.460 --> 08:45.730
I'd like to drag in a couple of these next to each other, each at different levels.

08:45.730 --> 08:47.350
So the default value is one.

08:47.350 --> 08:48.910
So that's going to be at one.

08:48.910 --> 08:52.450
I'm going to copy one and this one I'm going to set its actor level.

08:52.570 --> 08:54.300
Let's set that to two.

08:54.460 --> 08:56.110
Let's copy another one.

08:56.110 --> 08:59.140
We'll set this 1 to 3 and why not?

08:59.140 --> 09:05.560
This fourth one can be 4.75 because these don't have to be integers.

09:05.710 --> 09:07.420
So let's test this out.

09:07.420 --> 09:08.650
I'm going to press play.

09:08.680 --> 09:11.200
I'm going to show debug ability system.

09:11.200 --> 09:14.590
I'm at 50 Health, I'm going to pick one up and I get five more.

09:14.590 --> 09:17.410
So I'm at 55 picking up another one.

09:17.440 --> 09:18.250
Oh, look at that.

09:18.250 --> 09:19.780
I'm at 6250.

09:19.780 --> 09:23.500
I got 7.5 added picking up another one.

09:23.500 --> 09:25.540
I'm at 7250.

09:25.570 --> 09:27.400
Looks like I got ten added.

09:27.430 --> 09:31.930
Now this one I'm going to pick up and I'm at 91.25.

09:31.960 --> 09:42.520
So because this one has a level of, what was it, 4.75, then if we take a look at our curve for healing

09:42.520 --> 09:49.960
curve and find 4.75, it's somewhere right here between these two vertical lines.

09:49.960 --> 09:55.930
Then we're here, which is about 18.5 or so on the curve.

09:55.930 --> 10:00.490
So it's going to get this interpolated value between these two points.

10:00.490 --> 10:07.270
That's how we can have values in between the discrete numbers, which is pretty cool if you ask me.

10:07.840 --> 10:09.190
Now, here's the cool thing.

10:09.190 --> 10:13.780
We know that our potion Heal Curve table can have multiple curves, right?

10:13.810 --> 10:18.640
Well, why can't we just use one curve table for all of our potions?

10:18.760 --> 10:21.100
So that's kind of what I'd like to do.

10:21.100 --> 10:29.080
And that means I'd like to rename my potion Heal Curve table to just KT potion, and then we can use

10:29.080 --> 10:31.660
it for any potion effects we want.

10:31.660 --> 10:35.110
And I'd like to have a curve in here for mana.

10:35.140 --> 10:40.210
I'd like to have a mana curve and that's going to be your quest.

10:40.510 --> 10:42.730
I'd like you to make the mana curve.

10:42.760 --> 10:50.890
Go ahead and add it to our KT potion curve table and you're going to choose values for the levels one

10:50.890 --> 10:51.640
through ten.

10:51.670 --> 10:58.210
You can go higher if you like, but make at least that much of the curve and use it in our gameplay

10:58.210 --> 10:59.710
effect potion mana.

10:59.710 --> 11:06.640
And after that, drag some in the level, change the actor level for those potions and play test, pause

11:06.640 --> 11:09.250
the video and make your mana curve now.

11:12.490 --> 11:12.910
Okay.

11:12.910 --> 11:16.400
So all we need to do is add a new curve to our curve table.

11:16.420 --> 11:23.590
So I'm going to click plus curve and this new curve we can rename and I'm going to call this man a curve.

11:24.130 --> 11:29.170
Okay, so we just need to decide what values we should have, at what levels.

11:29.290 --> 11:36.640
I like to go to the spreadsheet view here, and as you can see now, we have an additional row here

11:36.640 --> 11:41.620
for man a curve, and it's using the same columns, so something to be aware of.

11:41.650 --> 11:46.570
Now at level one, I'd like to get, say, 2.5 mana.

11:46.870 --> 11:52.630
At level two, we'll make it five at level three, let's make it 8.5.

11:52.720 --> 11:54.640
These are just arbitrary.

11:54.670 --> 12:00.870
At level four, 12.75 at level five we'll make it 18.

12:00.880 --> 12:07.450
Six will make it 26 at level seven will make it 38.

12:07.900 --> 12:11.330
Level eight will make it 65.

12:11.360 --> 12:16.700
Nine can be 85 and ten can be 120.

12:16.910 --> 12:18.680
That escalated quickly.

12:18.710 --> 12:25.730
Let's go back to Graph View and take a look at the mana curve and we can scroll out and we can also

12:25.730 --> 12:29.970
right click and move around and scroll to zoom in.

12:29.990 --> 12:35.000
Now looking at them from this point of view is nice because we can see sort of irregularities.

12:35.000 --> 12:38.360
If we wanted a more smooth curve, we can adjust.

12:38.360 --> 12:44.160
I can move this point down by clicking and dragging on it until it's looking a little bit more smooth.

12:44.180 --> 12:46.010
We can only drag it up or down.

12:46.010 --> 12:52.280
We can't go left and right, and that can make our curve look a little bit more like something like

12:52.280 --> 12:59.000
a mathematical equation if we want and we can select between the two curves and change them if we want

12:59.000 --> 12:59.870
to do that.

13:00.080 --> 13:05.990
So that's just kind of a nice thing we can do and we can always go back to the spreadsheet view and

13:05.990 --> 13:07.760
see what those values look like.

13:08.030 --> 13:09.980
Okay, so we have Man a curve.

13:09.980 --> 13:17.900
I'm going to go into my gameplay effect potion mana, scroll down to the modifier and for my scalable

13:17.900 --> 13:25.130
float I'm going to change it from 30 to 1 and then use a curve table KT potion and select the curve

13:25.130 --> 13:25.520
from it.

13:25.520 --> 13:32.000
We're going to use mana curve and we can use the slider to see what it looks like at various levels.

13:32.120 --> 13:33.110
Great.

13:33.110 --> 13:39.370
So now that we've taken care of that, we can test our mana potion at various levels.

13:39.380 --> 13:40.850
I'm going to take this one.

13:40.850 --> 13:48.620
I know it's level one, but I'm going to copy it and change its actor level to two, not 23, but two.

13:48.620 --> 13:50.300
I'm going to copy it again.

13:50.510 --> 13:53.510
Put this one at say four and copy it again.

13:53.510 --> 13:59.150
And this one can be 6.78 and we can play test.

13:59.180 --> 14:10.700
So showing the debug my mana is at ten now it's at 12.5, 17.5, 30.25 and 50.

14:11.060 --> 14:15.110
And that's because it probably went above 50.

14:15.110 --> 14:22.010
But then thanks to pre attribute change and the attribute set we have been clamping, So if it goes

14:22.010 --> 14:25.370
above that maximum, it gets clamped.

14:25.730 --> 14:27.890
So we're good and safe there.

14:27.890 --> 14:30.920
We don't have to worry about going above.

14:31.310 --> 14:33.350
All right, excellent.

14:33.350 --> 14:39.860
So now we know about curve tables and how they can store multiple curves and we can use the curve tables

14:39.860 --> 14:42.650
in gameplay effects for our scalable floats.

14:42.650 --> 14:46.730
And now the word scalable makes more sense, doesn't it?

14:46.730 --> 14:47.960
Scalable float.

14:47.960 --> 14:53.270
It's scaled by the curve table based on the gameplay effects level.

14:53.450 --> 14:59.840
So scalable float is a lot better than just hard coding a constant value, isn't it?

14:59.870 --> 15:06.980
It's actually quite nice because we can make our gameplay effects data driven and thanks to these handy

15:06.980 --> 15:14.870
curve tables we can see the trends for those data driven values which is actually quite awesome.

15:15.020 --> 15:19.490
Okay, excellent job in this section and I'll see you in the next one.
