Transcripts
1. Introduction: Have you always wanted
to make a game? Maybe you've always
been into reading. Have you played
some visual novels that have grabbed
your attention? Well, come on in and
join this course and find out how you can go ahead and make
yourself a visual novel and maybe yours will
be the next big thing. Look at all these
great ones out there.
2. Download Godot: Alright, if you do not have
the Gato Godot Engine, however you want
to pronounce, it. Doesn't bother me, but
if you do not have it, you can head on over to their website, Godot
engine.com or.org. I always end up typing
the wrong one up there. And I head on over to
the download section. And just give that a
minute to load up. And you see you can get the
standard version or a motto. Motto has she C-sharp sport? As it shows that since
we'll be using JavaScript, you only need to grab
the standard version. All your platforms
is there at the top. Basic requirements. And there you go.
If you know how to use Sqoop, you can use Sqoop. Go ahead and pick up dissension. You could also pick
the engine up over on its dot io and on
the Steam platform. So there's a wide variety for you to go ahead
and pick this up. Really, it's up to
you personally, I use steam, but in the end
it doesn't really matter. All right, so it's
as easy as that. Go ahead and pick that up and I'll see you
in the next row. What will get the
project started?
3. Placeholder Character: Alright, so starting
off before we can actually start
creating ourselves a visual novel and learning how we can go ahead and create
those are create that setup. We're going to need
characters of some sort. So for this, I'm just
going to show you how to, how we can make a
simple silhouette of a character here using
just some basic shapes. It'll be very easy for
you to follow along with. You can use any art program
that you would like. If you really wanted to, you could use something. You could use Microsoft Paint
and then use a website to remove the background if
you really wanted to. But there's tons of free
alternatives out there. What I'm using here
is Affinity Designer. And I just have everything black yours so we can see what
it's like for a silhouette. If you really don't want to
make a character yourself, then as long as I remember
I attach this video will be this little placeholder
character that you can use. Alright, so let's go
ahead and jump in. I'm just going to go
ahead and hide that. What I'm gonna do is I'm
going to use a rounded, a rounded rectangle here
are rounded square. So I'm just going to go
to maybe about there, get an idea of how wide
I want the torso to be, the chest, the body. And I'm just going to pull it down until it goes off-screen. Alright. We're also
going to need a neck. So I'm just going to
use different colors to separate these here. And the neck is
also going to be a, another rounded rectangle here. Again, fairly thick up to you. How long, short, thick, thin that you want to make
your neck, your character. The head. Now, if you don't know how
to create or structure a, a face, you know, maybe you haven't
taken art lessons. Generally what you do is we generally start with
something like a circle. And then in the end, our Middlemarch here, we
would have the eyeline here. Maybe somewhere
around here will be the nose or the sorry, the end of the
nose, the nose tip. And somewhere in that area here is where you
have your jaw line. Now, if you're
familiar with a lot of visual novels to have
more of this anime style. It's going to come
from almost like a triangle point and
it's going to come out to the chin from that point
and up on the other side. Now how long this chin is obviously going to be vary from character
to character. So all we're gonna
do is I'm going to use this triangle and I'm going to use when to use green. Sorry, I'm going to use green so that you can
see this clearly. So again, using my line
that's gonna be about there. We're gonna go there
roughly in length. I'm just going to create it.
Flipped my triangle around. And we're saying if
this is the eyes, then roughly around here
is gonna be the nose tip. So I'm just going to lower
it a little lower than that. If I zoom in here, this will make it easier for me. I'm going to make
sure I'm touching the edges of my circle. And if I place this behind, I can get an idea of where I want the bottom
of my chin to be. So you can see, you can have quite a variety in characters overall look
as far as his head goes. Which will again come down to your own personal
preferences here. I think I'm just going
to go with here. My hand looks
something like that. Alright, so I'm gonna go ahead and grab both these,
bring them over. Obviously that's too
small for that neck. So I'm going to make it larger. I'm just holding
shift in this program to keep its size or
keep his proportions. You should have
something similar like that in the program. Choose to use what
it is exactly. I'm not sure, of course. Somewhere around, there
should be fine for this head. Alright. Now when we're looking
at the rest of the body, What's the next main thing
that we're going to see in a shop or in a bust. We're going to
have the shoulders and we're going to have
the arms come down. So let's see, I'm gonna go
with more of our pinks here. Let's go ahead and
create the shoulders. We look at the human body and we're thinking of the body
as just basic shapes. Our shoulders are gonna
be another circle. And then our arms are
like long cylinders. Or in this case we're going to use a rounded rectangle there. So let's go ahead and
create our shoulder. And I just realized it's
the same color as our neck. Let's go with more
of a yellow here. Alright, so we're going
with that on our size. How you place it
somewhere around there. We can always adjust that later. And for my arm, I'm gonna go with Let's see, Let's go with that
selected the arm. Let's go with this solid purple. I'll grab my rounded
rectangle here again. I'm just going to bring it
down, take it off screen. A bit of a rotation so we can separate it and distinguish
it from the body. Maybe thin it out a bit. For our basic
shape. I'm going to copy my shoulder and arm because there's no need
for us to do it again. So I'll copy and paste. And then just flip it, bring it over and we have
something like that. Now of course, if you wanted, you could always organize
these little more, like placing it behind the body. You can come in, maybe
make your weeks. Maybe you want to
shrink that neck a bit. I think for this character, we're going for a male, maybe something more like that. But this is the
point where you can obviously go around and
mess around with all of it. If I stick everything
in a group, we can change the color
of everything so you can see once you make it black, we're kinda getting the
silhouette of a character. Now of course our
character is bald. So if you want to put
in some shapes in there to try and get some kind of hairstyle in the
silhouette. Certainly can. But that's all I'm gonna do. And this will give us a basic silhouette or a placeholder image that we
can do for our character. That we have ourselves
a placeholder. And again, if you don't
want to go through this, you're not liking how this
is turning out or whatever. As long as I remember,
this placeholder will be attached and the assets. Alright, so go ahead
and save that. And we can start jumping into, into the project and
learning how we can use or how we can
create a visual novel. What plugins and add-ons we're going to go ahead and
use to help us to make things smoother and a lot easier for us to put
everything together.
4. Project Setup: Alright, so we have ourselves
a new project here, started and open up. If you don't know how
to create one again, just go ahead and
launch the engine. I hit the New Project
button, give it a name. In our case, is just a
visual novel course. You can give it
whatever name you would like and open that up. Inside of this project, I have created two folders, one for characters,
one for scripts. Inside of characters, I have put our placeholder
image in there. Alright, now, I was specifically asked are requested for doing this course and not only that, but specifically using
the Plugin dialogic. Now it'd be this one
right here by Emilio. Now, this plugin I know
is being developed for, are being translated
over to 4.0 as well. So if you are using
for 0.0 in the future, this should still
work just fine. This should all translate over. So let's go ahead and hit
the download button here. And with all this stuff, we don't need the read me, we don't need a license. And let's go ahead
and hit Install. All we want is to
add ons folder. And okay, let it re-import
everything, right, so now that our plugin has
been added into our project, we actually need to activate it. So let's go up here to
project, Project Settings. Go to the plugins section. And you notice here at
the top where we have the asset lib script 2D and 3D. You'll notice up
there we're gonna get another section called dialogic. As soon as we hit the
Enable checkbox here. There we go. And now
we're able to start using dialogic to
create our scenes. That we want
everything to happen. So I'm gonna go ahead and
just create a new scene here. This is just gonna be
a basic control node. And I'm gonna go ahead
and save it and call this my scene manager. Go ahead and give that a save. Probably should have saved
this inside of its own, its own folder or scenes. So I think we'd go ahead
and do that new folder. Scenes, even though we
probably only need the one, I still going to keep
things a little organized. So I'm going to right-click
my scene manager. And where is that it's moved to? I'm just gonna stick it
inside my scenes folder. There we go. Alright, so that's all we're going
to need with that. We can add a script to it. This will be going inside
of the scripts folder. You create. Awesome. So we have a script ready for whatever
we need to happen. And we have dialogic
installed and ready to go. Our project is all that up and ready to start
creating visual novels. That was quick, it
was easy to do. Let's jump in and
take a look at how we can create a
character or a novel.
5. Creating Characters: Alright, so let's take a look at creating a character
or a novel though. To do this, we're
going to head over to the dialogic tab here at
the top that was added from the plugin or the add-on that we got
from the asset limb. So in here, we've got timelines, characters, definitions,
themes, settings. We have a whole bunch
of things here. But what I want you to
do is I want you to not get overwhelmed with everything that's
here on the side. The word about everything, the only thing we
want to look at is the Characters folder here. So we're just going
to have that selected and you'll see it looks
like nothing happened. But what we're gonna do
is we're going to go up here to the top-left, right above our
folder list here. I'm going to hit the
add character button. Right now you can give this
character whenever you want. I just clicked into
this tab here. And we see we've got
character and we have an ID and that's going
to create a JSON file. And that is going to be our
character that gets created. Alright? Now, we can use the colored box here to select any
color that we want. So if you have a
specific color that's associated to that character, maybe you wanna go ahead
and change that for now, I'm just going to
leave that white. We can go to the display name. So this the name that
will show up in game. If you want names to appear. If you don't want
names to appear, now obviously you don't
need to put a display name, but I'm gonna go ahead
and set one here. Let's call this. Let's see. Let's go with Brad. Simple, easy name. And if you want to
give nicknames, you can certainly do
that here as well. You want to give the
character description. This is my description of
a character named Brad. He is a cool guy. You can put whatever
you want in there. And when we get to Themes
and we talked about those, you'll be able to
select themes here if you really want something
specific for that character. Alright, so here's where we
have all of our portraits. So what all we need to do
is we can import a folder. So if we have a specific
folder of our character, we can use that and import all of our different
folder characters in there are all the
different images for that specific character. Or if you only have one or two, like we have here for
our placeholder text inside a character folder. I'm just going to
hit new portrait. Go inside of our characters
folder and select it. Alright, so you see
we've got quite a large, quite enlarged preview here. I'm showing you an actual siphon go to full view and
we can see it there. And if you need to
adjust the scale of it, you can either go back
into art program, re-export it, or you need, you can adjust the scale that it's gonna be
displayed out right here. Now keep in mind,
if you do it here, gonna be for all your
portraits on this character. Alright, so now we have Brad. He's got a nice little preview. And you see if we can come
in here, we can add more. So we've got default, and then we can change
the names of them so we can have a happy, idle, angry, yelling or
whatever you want to have. Because normally
in a visual novel you're going to have
at the very least, different facial
expressions, right? So if you want to go in there, That's how you can
add them one by one. Or again, you can
hit import folder and you can just select
the folder here. So if I just got this back,
just select characters. Now in this case, you'd
go inside of characters and select maybe the Brad, older age hit Select Folder and it'll bring all of those n. Alright, so that's
all we need to do. And we have now
created a character. Now remember, you
can come up here and you could change
this if you would like. So let's say Brad, Jason. If you wanted to do that.
More than welcome to you. It's not going to hurt anything. If we just save our
project real quick. We look inside of dialogic here, you see we have all these
folders with nothing in them. If we were to right-click
on the Characters folder inside of dialogic
opening a file manager. You'll see that your character adjacent file is right here. I don't think that's going
to override it all know. But there you go,
you have yourself, a character that's
loaded in there. Perfectly fine. And we're ready to move
on to the next step. What's, I guess we'll
take a look at, I don't know, maybe themes
or definitions next. Alright, take care. We're
seeing the next one.
6. Creating Themes: All right, everyone, let's
go ahead and take a look at, let's take a look at themes
today or in this video. So a theme is basically our dialog box that's
gonna be in use. So I'm just going to tell us, are basically show how our texts going to
look on the screen. Are we going to have names? Are we're not going
to have names. What colors texts gonna be, is this specific texts going to be a different
color than this text? We're gonna be looking
at all of that thing. And all we're gonna do
is we're going to suck the themes folder here. We open that up. We have
the default theme here. Now, if you wanted, you could go right up top here. Let's locate where it is. Which one of these? There we go. There's
the Add theme button and you can create
a brand new one. But what I'm gonna do
is I'm just going to change the default one here because it's the
exact same thing. You see. I'll hit Add theme. And you see we have
a brand new one here that's based off of the default. So if you hit that button, it'll be exactly the same. I'm just going to right-click
and remove that theme. Since again, I'm just going
to change the default. So with this theme,
I'm going to change the text color to, let's see. Maybe we go Something that's
the text color itself. My mistake. I was looking
for another section. Let's see. Name,
label. There we go. So if you don't want names, can go ahead and hit
the hide name label. And you could just
get the texts there, which you may want to have
a separate theme here for. Sorry for maybe just having
a section of narration. So maybe you have
a narration theme and then you have
a dialogue theme. So maybe you do both
wastes like that. Now, keep in mind if
you wanted to use dialogic here for another game. Again, that's not
a visual novel. You can certainly do that. All we would have to do here is you just have to worry about your texts and calling our are calling the dialogue that we're setting up to
appear on the screen. So if you want to use it
without visual novels, more than able to do that. Alright, so I'm going to keep
the name up there because I think it's fine for
having characters there. We have the background
color here. So if you wanted to change
the background color, say we select that, go up to more of a
red. There you go. We've got a red
behind the character, behind the character's name. And of course we don't want that. You can just
turn that off. That's gonna be more
of a personal choice, not really preferred one way
or another, I would say. The same thing. You can
put a texture behind it. You can modulate the
texture picture, put your box padding,
change the placement. So if you want it in the
middle of the screen, I know some games
that I've done that. I haven't seen any that do it on the right and the left
is just a classic. So you got some
preferences in there. And while we've gotten
to is the name label, we can go to the
tab to the left of that and we have the
actual dialog box. And the same thing happens here. We can come in here, change our colors and everything
just like we could before, just like we did with our name. Now you see in this case, dialog box is actually
using a texture here. And if you wanted, you
could do modulation, but it seems pretty dark, so modulate probably isn't going to do a whole lot in here. And you have all of your
other options here, such as your scale, the fade-in time, portrait m times the size of your
box replacements. So maybe you want
your box to be in the center of the
screen. The center, e.g. instead of being in the bottom, set up all your margins there however you want it to look. Alright, let's see. We have our font here.
So if you want to set a specific font for your game, that's under our first half
here of dialogue text. Our third option here
is choice buttons. And you've got your
normal hover focus pressed and disabled. So if you want to have
different choices in your game, this is where you can
modify those texts, colors, and the background
and all of that stuff. Perfectly fine. And
fully up to you, you see you can have a vertical or horizontal button layout. Now, the glossary. The glossary here
is when you have words that maybe your
user may not understand. So you want, maybe
you want to put a definition in there for them. Or perhaps maybe you have
certain keywords that are gonna be important
for the user to remember. So you can go ahead
and put in there a specific words that
are going to have these different definitions that the player can quickly look at and understand or remember what that word is or why
it's important and whatever. Now by default the
word color is white. So if you want to have
it as white, you can. I prefer to have something
a little off about it. That way the player
can notice it. And they might put their mouse over two or something to give an idea or to try and figure out why is
this a different color. They see things happen and that gives them something to
associate that color with. Whatever they don't
know something. They'll know that this
is a glossary term. And then our audio here. Now, audio is gonna
be completely different based on whether you want to have different
noises for certain situations, or if you want to
have voice lines. If you want to have
voice lines in there, you just go up to here
two audio files. Okay? This here and you
hear audio here. If you want to have
the setup here. They have the texts noise happening as the
characters pop up, you can go ahead and hit that. I use audio files. As you heard there for a moment. It's kinda loud. Maybe it's not loud on your end, but it's a little loud
in my headphones. But you can modify the volume, the pitch, and all that. And again, you've got
sound effects score if you're doing waiting, passing, choice, and
all of that stuff. All righty. Let's go ahead and just
make sure that we've covered the base of
everything there. Everything looks
fine here. Alright. There's all your different
options that you can go ahead and tweak and
look around at. But there's how you can
create your different themes. Again, maybe have one for, maybe you can have
different things for different locations, different things for
your characters. And remember if you created
a theme, a brand new theme, you can go back up to
your new character and you can give them a specific theme specifically
for that character. Alright, so that'll
do it for our themes. Next, we'll go ahead
and take a look at the definitions folder here.
7. Glossary Definitions: Alright, let's go ahead and
jump into our definitions and start taking a look at
our terms or our glossary. So we added a different
color for that. But we need to be
able to identify it. So let's go ahead and
add the glossary, the name of this entry. Let's say, let's call it pizza. Write the title definition. And as you see here, a pop-up will display this
information when a player hovers the
word in a dialogue. So in coming here we say, pizza is a lovely meal. Typically made up of at least
DO tomato sauce and cheese. You are able to, Let's see, No. Most People will add
additional toppings. Alright, so we can go
something like that. And just like that, we've
added, we've added a term. So we can come in here,
we can take a look. I can add another
glossary entry, right? And we can come in here
and we say, pasta. Pasta, bind. Pasta is a great dish or a great set dishes that
he came from Italy. Here we go. Just like that. We
now have 22 orders. Here are two definitions. So creating a definition is as easy as that. Pretty quick. We'll probably come back to definitions as you're writing your story or as
you're writing things. So as you go through and you go, Oh, I think the
player might need, that player might need
to come back to that. Let me go and make
a definition of that to help the
player understand. So this is one of those
things where you'll probably come back to the definition section multiple times as you go
through your game. That's really all there is for definitions,
creating glossary terms. Other than the
customization there that we had in themes in the last video.
That's all we got. This, the short one. But see you guys
in the next one. And we'll jump into, I guess, creating timelines. Since that's what
all we really have. Next up to start getting
our game up and running.
8. Creating Timelines: So let's jump in
and start looking at the basics of creating a brand new timeline for the dialogue in
our visual novel. So I'm gonna go ahead and select the timeline folder here. And I'm gonna go ahead and
click on new timeline. I believe is this button
here yes, at timeline. And we can call this tutorial. So what I'm gonna do is we're going to want, is
we're going to watch. We're going to
want our character maybe to show up, right? So what we're gonna do
is we're going to select character from our
main event here. And our character is going to, you can have them join, leave, or you can
update the character. Update them. As you see, we have different
animations here. There you get set
in how many times you want them to repeat. Wait for your animations. You've got all that
information there. You can have your character
leave the screen. Again. You have different automations
for how they can leave. But what we want is we want our character to
join the screen. We're going to select Brad or whatever you named
your character. You have five
positions here across the screen so we can go
ahead and just select one. I'm just going to leave
that on default for now. And what I'm gonna do is I'm
going to hit Play timeline. As you see went through
and nothing happens. So I'm gonna hit wait
for animation that we, we wait for the
animation to play. And we can see Brad was
over there on the far left. If we select the
third option here, brands can be in
the dead center. So this is going to be where
they are on the screen. I'm just going to stick
with the far left. We saw there. Brad is a gigantic. So what I'm gonna
do is I'm gonna go back to my character. I'm going to modify his scale, maybe down to 25%. Come back to my timeline. Timeline hit play. That's a little small CC. Now at this point,
you're just tweaking the values to something that
fits, right for your game. That did not save. There we go. There we go. Pops up, we hit Play timeline. That previous not
going to show up. Alright. That's a little
disappointing there. But we'll see that
in just a moment. When I show you how to call this timeline tax
should be used. So what I'm going to use, I'm going to set some text here. We're going to say
Brad is our character. I say, hello. Welcome to this amazing
visual novel game. And we'll give it a little
bit of excitement in there. Alright, so in order to
get you guys to see this, I'm just going to jump
ahead slightly here. And we're gonna go into our script and we're
gonna get this running. So all we're gonna do is
we're going to create a new variable wherever you
want to call your dialogue. So we're just going
to create a variable called new dialogue. And we're going to call
the class dialogic. We're going to call it
the start function. And as a string, this is gonna be the
name of your timeline. So you see mine here
is called tutorial. So in the script, I'm just going to
call this tutorial. I believe I used a
capital T in there. I'm not mistaken. I did. And then we're just
going to add it as a child to our scene. Now when we run
this, there we go. We have Brad shows up, we have our dialog box. And all we have to
do is hit Space-bar or left-click and advance. Since this is the end of the dialogue tree,
nothing else happens. We're basically just going to go into directly into
the game closing. Or we would if it was
just the timeline, since we're actually calling
this from the script, everything's gone,
the timelines over. So we have nothing
else going on here. Which isn't fantastic. But at least you guys can
now see when I do that, since the play timeline here wasn't getting
captured, but now it is. Okay. All right, so there
we go. We have characters, we have text. And if I go ahead and
create a new line here, it's holding Shift and
Enter or you can just hit Enter doesn't really
matter in this case. As you see, you can create
multiple lines of text here, but do be aware. We're not going to get
multiple lines that way. Alright. Each line here is just going to be function as a new page. That's good to know. But if we were to come in
and have it this way, e.g. this is more of the
way I was thinking of how you see it's going to transfer
over onto the next line. What you need to be aware of is you can have
a massive overflow. So you need to definitely test and pay attention to your logic or pay
attention what's going on. Because typically
in a visual novel, you're not going to
walk this scrolling. And even though we can scroll, as you see at the
top and bottom, we have this very odd overflow, which in my opinion does not look very good
in the slightest. So I would definitely keep
an eye on that and cut off your texts at the
appropriate time to set it onto a new line. That'll be something
to keep in mind. It's going to go ahead
and pull those out. And that is our
basics of creating different or creating our text here and getting dialogue in. So if you want to,
you can come in here, you can create a new character. And we'll say the second Brad comes in on the right-hand side. And maybe they come in
from say, bouncing in. Alright, so we can go like that. And if we try this now,
we have our texts, we have Brad would go to
the next. We'll check. Wait for animation. There we go. Now while you wait
for the animation to play before it ends. And that is not
ending or starting. Alright, let's add a
piece of text in there. Hello, I am Brad to see if that'll get us
to hey there and hold. That faded out because we
have a new character here. Now that we have a setup as
two different characters. There we go. So the issue was we were using the same character on both
of them. There we go. So if we have two
different characters, you see one darkens in the
background so we don't know. So we know that
they're not talking. One who is talking is lit up. You can see we can have multiple characters all
popping up here on the screen. And again, the position
you are able to set is as simple as that to
do dialogue for these. Now if you're having a
one-on-one conversation, maybe you want your
character to pop up right in the middle. Perfectly possible. Just 100% dependent on
what it is you want to do. If you want to set a background. We come down here to let's see where's our
section. There it is. So we can call the
change background here. And maybe we can set the
icon for the background. I'm not sure how
that's going to look with it being the icon. Let's go ahead and take a look. And also while we're at it, you can select different
sections here. And if you want to
rearrange things, you can just grab
it and drag it up. So I'm going to bring
it all the way up to the tops and the background. That's the first thing that
gets set. And there you go. We don't have a background
for our visual novel. So if you want to
set a background, easiest that, and with that, we have the basics here of
creating a visual novel. We have our
characters appearing. We have characters
disappearing if you'd like. We've just got to come
back down here. Character. We say leave. Which
one are we using? Second, Who? Brad dot Jason. Second, wait for animation. And we'll have them bounce out. So we can have our character
leave here at the end. Now that's extremely quick. So we can adjust the length. And there it goes, Brad. Goodbye. So there you go. We got changing backgrounds, characters, joining
in, characters, talking, having
multiple characters, and having our characters
leave the scene. As well as we went
over how to create or start our timeline inside of our project
whenever we need it. Alright, so that'll
do it for this one. Next, we still have plenty more things that we can go
over with the timeline, play more features that we
can add in and go over. So let's go ahead and add that in or go over
that next time.
9. VoiceLines: Alright, so to do some
voice acting for our game, if we wanted to
have voice lines. You're going to
need something to capture your audio
with a free program. And popular one
is Audacity here. You can go ahead
and find it online. Very easy to find and
fairly easy to use. There's tons of
tutorials out there. So if you want to
learn how to do all different kinds of effects, you can certainly find pretty much anything you
need out there for it. To go ahead. I'm gonna go ahead
and just do a simple line for our hello line here that
we have at the beginning. The, if we remember the hello, Welcome to this amazing
visual novel game. So I'm just gonna do that one
line there as an example. So let's go ahead and jump in. Hello, Welcome to this amazing
the visual novel game. So I'm gonna go ahead
and stop it there. I'm going to just click
and drag the section. I don't want hit Delete. I'll cut it off on the N2. And you can always come in here. You can analyze
effect, generate, all these kind of things
that you can use. So let's see, let's see if I remember how to
do this, right. I'm looking for let's
say Noise Reduction, get noise profile reduction now. And we'll say Reduce. I honestly don't know
if I did that right. It could have been
way off on that. It's been a long time since
I've actually used this. But once you've got that set, you just come on in
file and export it out. Now we can use, I believe this plugin
accepts OGG and mp3. I'm not sure if there's any
other types that it supports, but I'm gonna go ahead
and I'll use an OGG file. And just go ahead and save
it into your project. And since I don't
have a folder here, I'll go ahead and
just create one here. Or voice lines can also
just call it audio. And we'll call this
grad boreal one. And we'll hit Save. You'll
have a metadata pop up here. You don't need to
fill any of that out if you really want to. Again, I'm just going
to hit okay on that. So once you've gone ahead
and exploited your project, we can go ahead and jump
back into the engine here and just let that
audio import itself. There it is, voiced lines, brad. So what we need to do
as well is just come on into our settings section here. We need to turn on enable
audio for text events. And if you want your audio
to go out to a certain bus, then you can go ahead
and select it here. E.g. I. Only have master here. But if you're going to
have voice lines and audio and sound effects
and all that in your game. You can just come down here
to the Audio tab at bus. We'll call this Voices. Of course voices are going out, will go out to your master because that's your master file. Everything goes out
to the master volume. And now we can go ahead
and select a Voices here. So now we can do voice
lines and have it go to the audio bust
specifically for voices. And now we can go ahead and create if we want it
to, sound management. And we can allow the user to change how loud they
are game is gonna be. I just reset this default. Yes, there we go.
So now that we have that and we come back
into our timeline, you may notice something here. Inside of our text. We have audio
pickers here and we have lied one wouldn't
come in here. We can now go into voice lines and we can select our file. And now when we go
ahead and play this, we should now have a voice line here at the beginning
of our game. Hello, Welcome to this amazing
the visual novel game. There we go. And of course we don't have any
audio for the next sections, but there we go. That's all we need to do.
And now we have a voice acting put into our game.
10. Questions and Choices: Alright everyone
here, we're gonna go ahead and talk about giving our player some choices, which obviously means
asking them questions. Now, I say this
because questions and choices go hand in hand. You can put choices in the game, but you're going to
usually have a question that is associated to that. And when you have a
question by default, they give you two choices. You can add additional
choices into that option. So let's go ahead
and take a look. So after Brad leaves here, let's go ahead and add a
question block in here. As you can see, this drops
down and you can put a character here if you'd like a character
and ask questions. Or you can go ahead and add whatever you want
for your questionnaire. And of course,
since this is text, you can add a voice lined
in there if you so choose. So let's go ahead
and we can add, Would you like to keep learning? And of course by default, you got ecosystem here. So you can say yes
or you can say no. Now, depending on which one
you want here, of course, you would ideally
want us to branch off or have some kind of effect on the game
or in some way. Alright? If you're
doing a romance novel, maybe this changes
a point system that affects who you are
able to proceed. A romance with? I don't know. But let's go ahead. We can go ahead and we can just grab a choice and we just
drag it on in there. So if we want to have
more than two choices, we can just bring
them on in and add as many choices as we want. Now, you'll notice that there
is a condition branch here. And if we were to enable that, once we get to values
and going over that, you'll see this is where you
can use this to check if this is equal to different
from greater than etc. all the way through our
standard procedures. And basically check if the
value in value operator, whatever you have here. And if this is true, then this choice would show up. Now that might have sounded
a little confusing. But when we go over values, we'll come back and go over this specific subject
with choices here again. Alright, So I'm just
gonna go ahead and delete those two empty choices because we just can
have yes and no. And they're going to
show off regardless. If you go ahead and
select when you see that they highlight over it. And what we're gonna do
here is we can then add in, say, a piece of text. And that is going to be
related to that brand. So we can say, that's
wonderful news. Glad you want to keep learning. And we can just add that there. And then if we say no, we can have different texts. Oh, I am so sorry to hear that. Frowny face. There we go. Now if we were to preview this and go through our timeline, we have our voice sign, we
have Brad, Brad disappears. And then we'll
have our question. Would you like to keep learning? Yes and no. So if we say no, we'll get oh, I'm so
sorry to hear that. So we can have whatever
happens from there, go off into that branch. And likewise, if we
were to say Yes, we would go off into
that branch where we would then have the
wonderful news. You go. So really that's all, that's all there really is
when it comes to choices. You pick a choice and then whatever you want to happen
related to that choice, you just stick inside
of that branch. So again, you can
just bring it in. You can stick it
inside of your branch. Easiest way of course is
to select it and just go. But it's as simple as that. If you have your branches and things that go off on it, again, when we get to values, you can have your values being set here like
I was talking, maybe have some kind of
romance point system. And based off what
you said, yeah, maybe you can add or subtract or whatever from
those points or something. But alright, with that, that will do it
for this section. That was very quick and
simple for us to go over. Next up we can go into, we can take a look
at the if condition or actually before we jump
into that to clear that up. Let's jump into the values next.
11. Values and Custom Names: All right, everyone, let's go
ahead and jump into it and start taking a look
at the values. Now if you've got over GD script or other languages in the past, maybe you'll be familiar
with the term variable, but that's essentially
what a value is. And we can set it to a
variety of different things. It's not quite as diverse
as a variable, e.g. we don't have arrays or
dictionaries or any of that. But typically we got, this were strings and numbers. Mostly, I have not
tried with Booleans. If you want to give that a try, go crazy, Go for it. But here we go, we can go
into variables right now. So we're just going
to go up here in the top-left section here. And we're going to create a
new value here, add value. And we're going to use this to get it to be our
name or you know what? Let's call our
value player name. So maybe our player doesn't
have a name yet. Okay? So you can put something here, my default, and then
she might change later. But we can also allow the
player to do this themselves. And this will be a bit
of cooperation between the standard GD script that
we've got going on here and going into our novel. So before we can print it out, Let's go ahead and add in
another book's not a character. I wanted to add
in another value. And we can use
this for say, age. And maybe our player
character is 29. Alright. So now that, that is available, what we
can do is we can go into our our timeline here. And right here it
says Hello, I'm Brad, to say Hello, I'm Brad as well. And I AM. And then to insert our value, we have a pair of
square brackets. And in-between those we type in the value name
so we can type in age and we'll add years old. Now when we go into it, we should see the value replaced
this piece in our text. So let's go ahead.
And there we go. Hello, I'm Brad as well. I'm 29 years old. So we see that fills in beautifully and that
fills in perfectly. Now, what if we want
our character to have a custom name that is
selected by the player. So what we can do is
we can come on in. We can put in a line edit for our player to
input a piece of text. We can go ahead and
let's see signals. So say text entered. We just connected
to our control. That's fine. And
you can see here, this is what we're
gonna be doing. Here we go. So we're gonna be calling
dialogic dot set variable. And we named hours, player name. And instead of the texts
Sally, that we have here, we're just going to pass in the new texts that gets passed
in from our line at it. Now we're saying texts entered, so that's when we're going
to hit the Enter key after type in our name. You can obviously set this to be a button if you would like. Now, obviously we
can't start this yet because our player
doesn't have a name. So I'm just going to
set this to pass. I'm going to create a function. Start novel. Here we go. So when we enter our text, we're going to set the
player name value. So we do set variable, the name of the value and
what we want to set it to. Then after that,
we're gonna go ahead and call start novel. Now, this works.
We'll set our name. The problem with this now is we need to get rid of that line at
it off of our screen. So after setting that, we're going to grab
our line at it for it. So we can get it off the
screen and out of the way. If you don't wanna do that, you can obviously just hide it. Now that we have that
we need to actually set this name to be used. So let's go to our
second Brad here. And just like before,
we're going to have our square brackets
for our display name. And we're just going to
put in the value name, which is player name. Alright, now if we go back up to our timeline and take a look, We should we add brad and
we did not have red there. That's right, because we
did not set our name yet. Alright, so we can put
it in our name here. We'll say, let's go with. Let's go with Spock. So unfortunately I
hit the wrong Brad, I wanted the second
brand that came in, but we've got the first
one and you can see the name works perfectly fine. We typed in Spock and now that is our character's name here. If you wanted, you could
allow people to go in and change the name of all the characters in your
novel if you wanted to. You could set up
like a name editor, as well as having yourself a set of default hands
because you know, not everyone's going to want to change all the names there. Or you could just
go a little more traditional and ask the
player, but their name is. Or of course, finally, you could just not have a
name option and only go ahead and use the values
for things like age. If you wanted to do that or tracking points
or whatever it is you want to do for your
game or your game. And I wanted to go ahead and I said I would tux back up
on these choices here. So we see how we have
the word know here. Well, let's go into
the condition. Now that we have options here, we can go ahead and
check age, e.g. so when we say if
that is equal to 30, then you have the
option of saying no. So if you were to have
this like a tutorial, then you would have an
option like this to be asked if the player wants
to skip it, something. But normally of course,
if you're going to ask the player if
they want to skip it, you're going to have
an if condition. Put it in there. But let's
go ahead for this example. So to player or the choice, no, it's only going to show
up if age is equal to 30. So we know it's not going to. It's called the spark
again. There we go. Named Brad, 29 years old, age is working there, 29. Would you like to keep learning?
Our only option is yes, because age is 29 as
we saw from Brad. What if we were to come
in and change, it? Would go age. If we
were to make this 30 and come back to our game. Here we go. Brag my, my sorry. Hello. I'm Brad as well. I am 30 years old since 30 matches the condition
that we placed, we now have that
option that shows up because that
condition is true. We go. So there's what you
can do with values. I've shown you how you
can do player names, how you can set custom names if you wanted
to go through and set up and named Editor for each of your players
are each year characters. We've set up age.
I've shown you how to use that in side of your conditionals for
things like choices. I think that about
covers it for values. All right, we'll see you in the next one where we'll go ahead and jump into
the if condition.
12. if statements: Alright, so let's
go ahead and jump into the if condition branch. So we had options here checking for the condition if
our choices pop up, if they want to
continue the tutorial. But what if they've already
played the game before? They've acknowledged
these kind of things and maybe have
some kind of new game plus option in there to keep track of everything
on one side a file. Well, let's go ahead
and add a new value. Let's say completed tutorial. And we'll go ahead
and set that to true. Or rather let's go ahead and set that to false to start with. And we have the tutorial. Would you like to keep learning? We'll go ahead and stick that
inside of an if condition. Let's go ahead and see if
we can grab all of this. You can just move this inside of the eye and it looks like we have to bring everything in one-by-one. Little tedious, I must say, but that's what you should be planning
things out a little more will come in
now, bring this in. At least it's not too terrible since we don't have a
whole lot of things here. And bring our end branch. There we go. Alright, so
now we have an F check. Now we can check if completed
tutorial is equal to true, then we won't even
get this question. Right. It'll be skipped
because the player obviously knows how to
complete it already. But if it's not,
we're going to go into our tutorials here. After our branch here, we'll
go ahead and we can set a value and we'll set
completed tutorial to be true. Because if it's true,
it's going to skip it. And if it's false, we're
going to go through it. Once we go through it, we can mark it as true. So that's how you
would go through that. Now you'd have to of course
track that later on. But we can go through. We see since it is
false by default, it's gets marked as true. Unfortunately, we
don't really see that happen at any point. But you can believe
me, it's happening. So if we come in
here, we set this to Or how did we set that up? Oh, I'm sorry. I said if we set it up to true,
it's going to happen. We want to set it to false. If completed tutorial
is equal to false, then we will go through our little branch here
I questioned branch. That is a mistake there. I had it on true
instead of false. There we go, since
it is on false, do you see what you
like to keep learning? And we can say yes or no,
it doesn't really matter. And then it will be set to
true at the end of our branch. And if you have that set
to true at the beginning, mistake, might just grab this. And to simulate this, say, what did we name it? Completed tutorial. Pleaded. Tutorial. So we'll take that
and we'll set it to true to simulate if we
came through this later on. If we came back to
this a second time, the game it has now set
to true as it's through. Our question is not
going to be asked of us after Brad leaves. That'll be it for the scene.
So again, there you go. There's how you can
set your values. We're going over that as a, as a small bit of review there. And there's how you
can go ahead and use values again for
your if statements, which typically is how
it's going to be set. And you can use that to
determine if you want to, whatever to happen in this case, a question, but in your case, it might be a tutorial explaining some
mechanics of your game, then make your novel unique. And I just want to make
note here that if you're, if you're gonna do this
for somebody's name, you should also call this
should be string by default. I'm going to do that just so we can get the autofill here. But you should come in here
and you should actually set this as the title case. Let's see, is it
title, title in here? Which is going through node. It's not title, it is capitalized
in this language, okay? Its title in Python. There we go. You don't have to put
this string here. I just did that side
hit the drop-down menu. And there we go. So now if a player
types in a name, the first letter is
going to be capital. Now we think should be
a little more proper. So now if I go ahead and write, Spock was all lowercase.
And we go in. We can see that the name had a capital S to a census
showed that way. Everything fits in properly
since it is a name. But that'll do it for doing the if statements,
the if jacks here. So that'll cover pretty much
all of our logic there. We have. At this point, we know how to display text. We have character, sorry. We know how to display text. We have characters entering
and leaving the scene. We have characters
talking to us. We know how to create
different definitions for the glossary, for
that to show up. And we know how to
create different themes. And we can assign those
themes to our players, are specific
characters and want to have something unique to them. We know how to use
values to keep track of different things as
well as use them for things like player names. If we wanted to have something like that as well as insert them into a conversation to
use them for f checks. Use them as a
condition for whether or not certain answers pop up. In questions. We
have covered a lot, a lot of stuff here. And the majority of things
that you're going to need for probably most
visual novels here. We do have to still have to go over saving and loading though, because what good is a long
immersive visual novel if you have to restart
it every time. So stay tuned for that. We got saving and loading. I don't think you really
need changed name, you know what themes are. So shank, That's just
going to affect your text. You can add background music. Of course, that's
just going to be inserting an audio
file just like we do a voice lines audio event
again, similar thing. Insert a piece of audio. And that'll basically
do it for now. So in the next one, we'll go ahead and tackle
a little bit that's left for us here before we start jumping into creating a
menu and wrapping it up.
13. Saving and Loading: Alright, let's go ahead and take a look at how we can save and load our visual novel here. Because like I said at
the end of the last one, What good is having
new long immersive, really good novel can't
save where you are. It's like reading a book
and then not having a bookmark. Doesn't make sense. You don't want to start
over every single time. So let's take a look at that. How can we say, well, all we have to do to
save is simply access the Save event there on
the right-hand side here. And we can just bring
this in somewhere. Now, let's set the bottom, which I'll use to
show you an example of what this new game
kind of situation is. But again, we can go in
and grab it, bring it up. And let's say we
bring it in here. After our second
Brad has joined. But before he has talked, let's go ahead and
set it there and we're going to use
a custom slot. I'm just going to
call this slot one. And that is where all of
these staves are gonna go. Alright? So if we
go ahead and play, it will have our safe happen. But to make sure
that's happening, Let's go into our
script, let's go into our ready function here. And let's go ahead and
call dialogic dot, get slot names that will
return a list to us. So let's store that list into
a variable called slots. And we can print those
slots afterwards. Alright, so when we start
the game the first time, when notice in our output we have an empty list. Looks good. We have no saves in here. We can go ahead and put it
into name and remember, our same is going to be right after the second Brad joints. So let's go ahead and
have our voice line. Broadest joint should we
should have already had our saved there as soon as he
joined before that text box. So let's go ahead and close
this and open this back up. We can see inside of our
output console down there, we have swapped
one listed there. Great. So we have a
save and it works. But how can we actually
load this information? Well, to do this, what we're gonna do is
to make this a little more modifiable or be able
to use this function. Start novel more than once. We're gonna go ahead and take our tutorial seen here and we're going
to pull that out. We're going to pass
this in as an argument. After we've entered text. For our function, we're going to add in a default argument,
default parameter. And this is going to be,
we'll call it time timeline. That's what they called it.
And we'll set this equal to by default and empty string. So if nothing gets passed in, we have an empty string and
there's a reason for that, that we'll get to
in just a moment. When we started, we're
starting a timeline. So we'll start whatever
we pass in there. Now, what they also give you is you can actually add
a second argument to this. And we're going
to have a pop up. No. So the second argument here is basically a backup seen. So this is how you would have a, a new game plus kind of
thing because you would have a save at the end
of the game, right? And then when you go to load it, if the timelines over, if there's nothing
there, no more data, then it falls back onto
the second argument. And our second
argument here is gonna be our Tutorial seen. Of course, she only seen that we have the only
time line rather. So that's all fine, but how do we actually
load the same? Well, we don't need our
slot information there. If you want, you can
just comment that out. What we need to do
is the first thing we need to do is
we need to load. So normally you would put
this in a Load button. And all we're gonna
do is call load. And we're going to
pass in the slot. Now obviously this is gonna
be slot one because that's what we named that save that slot right down
there at the bottom. You can obviously use set up a whole save and
load menu with this. So you can have all
these different slots. And as soon as you click one, that's the information
that gets loaded. Make sense. But if you don't want to have
multiple slots like that, you'd obviously just have
one hardcoded it like this, and this would go into
your Continue button. Right after we load
our scene, or sorry, after we loaded the
data from that save, all we're gonna do is we're
going to call start novel. And we don't have
to put anything in as an argument because the
default that we have here, this empty string actually tells it to start
from the last point. Inside of this. Timeline that we loaded. So it's gonna go to
that last point. So if we load this up,
we should be right, where are saving
this right here. And we should have
Brad sing Hello, I'm Brad as well. I am 30 years old. As soon as we load our
game. There we go. We have some simple saving and loading into our game here. Now, let's go ahead and have this at the end of
our branch as well. So we can see how that works. So if we have slot
one here as well, Let's go on to
override that slot. Of course. If we take a look, this is
gonna be after or completed. Tutorial has been set to
true. So it's gonna be false. We're going to come
into our question. We're going to answer it. It's gonna be set to true. Then our game is going to save. Now the next time we load up, we're going to load up
that same slot again. Since our default position
here is at the end, is no more game, it's going to fall back to the
beginning of our game, our first timeline
that we put in here. And once we do that and
come back there again, since our complete tutorial
is going to be true, we're not even going
to get this question. So if you remember back
where I talked about doing maybe a new
game plus type deal, or have an option
where someone can skip a tutorial after you've
already played before. You can go ahead and have
something like that in there. So let's go ahead
and open it up. So we get through. We loaded
in our correct location. Keep learning doesn't
matter what the type here. And as soon as we hit our action button to go
onto the next portion, we're going to say
have a save and are. Value is gonna be set to true. Okay, now that it's
been set to true, and we've had a
save if we load up. We don't have anything here. Let's go ahead and
starting our new game. Wiggly. You see, we started
I gained from the beginning. And just as we continue here, we're not going to have that
question pop up anymore. Because remember, our
completed tutorial value is now set to true. So now that it's
been set to true, now we go ahead and load in. And there you go. If we did not have
any questionnaire, we skipped that whole
chunk, that whole F check. And the question, I went right
to the end where we have the next save. So there we go. There are some simple saving and loading that we now have
introduced into our project. Now you can always set
that saved to work with a button. If you wanted. If you wanted to
save that manually. Let's take a look. I believe it'll just be save
and then just the slot name. Alright, so we can
go ahead and do that and want to double-check that. We can go ahead and I can
go ahead and just set that. And then we'll go ahead
and check the slots. So we'll say var slots
equals dialogic, not yet. Slot names. And we can put these
slops back out. As you can see that we
have slot one in slot two. So if you wanted to have a Save button to save manually,
That's how you do it. You would just call
the save function and pass in the
slot name for it. Alright? But they have it, we have saving, we have loading. You can assign it to buttons. You can just call it inside
of your timeline there. As far as your shapes go, you can put your
load into just to continue button where you have a hard-coded thing if you
only want the one slot. Or you'll advance
and have a bunch of empty slots that the
player can save into. And depending on the
ones they click, that's the one that's going
to be saved and loaded in, are saved and loaded two. Right? There we go. Saving and loading is complete. We do have a signal
that we could emit. So maybe we'll go ahead and
we'll tackle that next time.
14. Dialogic Signals: Alright, let's go ahead and talk about how to use the signal. Now, this plugin has one signal, one signal that gets sent out and you have the
option of passing in a piece of data a parameter, if you will, into it. Now, the problem with this is
you cannot pass a value in, at least to my knowledge, at this point in time. And you have to connect the
signal manually through this. Alright, so let's go ahead and emit a signal
and is very simple. Now, right after, right
after Brad leaves here, we're gonna go ahead and
we're going to call signal. And you see where it's
going to send a signal called dialogic
underscore signal. And you could pass in any
piece of information here. So let's say like e.g. maybe this is who you're player is dating in a visual
novel. Let's call her. Let's call her, Let's see. Let's go with that's passed into piece of
data called Hanukkah. Let's go with that. Now. That's cool, that that
data is being sent out, but we need to
actually receive that. And to receive
that, we need the, need our dialogue to be created
and added to our scene. So we'll come down here
and we can call and get our new dialogue
and call connect. Now if you're in 4.0, obviously connecting a signal is going to be quite
different here. But for everyone in
current three point x, we can go ahead and the first argument we
pass in is the signal, which is Diao, dialogic
underscore signal. We pass in the object
that is going to receive the signal and have the function on which our self. And we can go ahead
and pass in the name of our function that we'll call and we can just call
signal received. Right now we need a function for that function signal received. And remember this takes an optional argument here because you don't
have to send one. So I'll just call this data and set this to null by default. So it has, by default, it's going to be nothing. And if something gets
passed in, cool. Now, depending on what
you're doing here, you may or may not want the
user to pass anything in. So if you never expected anything too bad
to be passed in, you can always just
leave this empty and have no arguments in
there, no parameters. What we're gonna do
is we're simply going to print the data that
comes back to us, which from our signal
should be Hanukkah. So let's go ahead
and start it up. Hello, I'm Brad as well.
It's there as well. I'm 30 years old. And as soon as Brad leaves here, which get the signal and
Hanukkah should print out inside of our output console.
So let's take a look. And there it is.
So just like that, we can use signals to
pass a piece of data. Some sort, if you need or
use a signal as some type of trigger that you want to
happen at a specific moment. And your novel. Alright, well, that about
does it for emitting signals. Change scene is you don't
really have any scenes, right? But this is where you would
do this if you wanna go with multiple scenes
rather than having one scene manager
like we have here.
15. Call Node: Alright, let's go ahead
and take a look at how we can call a node. And what this means is
we're gonna get a note from a tree and we're going to call a method on it
called a function. Now, I'm gonna do this at the beginning when we
change background. So I'm going to use this example to actually delete
our line at it. We don't have to do it
inside of our code. It'll happen here
at the beginning. So what we're gonna do
is we're first going to put a script on the side, on our line at it. Put it in the right location. There we go. And load that. And as you see here, I've just created
a function called delete and I've given
it an argument of data, then I'm going to print out just because they can take arguments. So I'm going to show you that how that is working as well. But ultimately what
we're gonna do is we're just going to call
Q free on itself. And then inside of
our scene manager, we no longer need
this line here. When we've entered text. Since this is now going
to be handled inside of our timeline when
we start the game. Alright, so here we're going. We are going, where
is our background? Think I accidentally
ended up deleting that? Yes, I did. Well, hello, Welcome
to the visual novel. I know that's not
going to match up with the dialogue anymore. That's unfortunate.
Let's just go ahead and put our background
back in there, which had the icon. Alright, so all we're
gonna do now is we're just going to use called node. And this going to take
a few options here. Method, remember is delete, that's the name of the
function and the target node that is going to be
going down our tree here. So at the beginning we're
going to have control. Now if you name
these differently, obviously you're
going to have to put the correct names in here. But going down,
we're going control. And then the line
edit like that. So we can access this
line at it node. And on the scripts we're going to call the
delete function. And I mentioned how we can
have arguments in here. We can have as many
arguments as we want. Of course I already
have it set to one. So let's go ahead and pass in. This is my elite argument. Alright, so if we go
ahead and write it now, we can put our name in. Now as soon as I hit the
action key or the Enter key, or in my case, for this to do text entered.
We take a look. We're going to set the player's name to what
we have typed in there. We're going to start
the beginning of our timeline, seen our timeline. And our timeline is going
to set the background. It's going to go to
our line at it called the delete method and
pass in this argument. If we take a look, Here's our delete function and
we have an argument here. We're going to print that
argument that gets passed in. And then we're going to free ourselves to remove the line
at it out of our scene. And then the rest will
continue as normal. So let's go ahead
and take a look. I got close on that. The character is or the
portrait to move there. I'd have to fix that again. But that's not due to that. That's just because I apparently
accidentally deleted it. Were Michigan joint event. That's why. But there we go. As you see, we called it
down here in our output. We can see the
argument we passed in. And if you want to
see it delete itself. Up here, you can endure. On the left-hand side you
have remote and local in, just go ahead and hit remote
and you can see the tree as it's running if you
don't have that. And fair option here. No. Okay. So it should just
be there by default then. Alright. So if you want, you can
go ahead and watch that. And when we type this in, you're going to
notice the line at it over there disappear, which indicates that it is Q free to self and
deleted from the scene. And there you go. So there's the call node. Here's how we can use the
call node event here.
16. Menu Creation and Continue Slots: Alright, let's go ahead
and take a look at how we can take everything
that we've learned now, since we now know how
to use the plugin. And let's take a look at how
we can go ahead and create our simple main menu
and have a ourself, our own loading menu or
loading system set up there, as well as how to
give the players option to create new game, continue, quit, and
choosing the player name. So we're going to have
everything set up. And after this,
the only thing you would need to do is
customize how you want your main menu to look and
actually create the novel, of course. So let's go ahead. I'm going to create a
new scene for this. And keep a hold of that old one. Just going to make
this user interface. No reason, no real
reason why we kept. And I'm going to
call this my menu. Alright? Now, inside of this, I'm going to have
a texture, right? Because every main menu needs some kind of
background. Right? Now, the one I'm
using here is from a visual novel called
catalase showed you. It is completely free. It's very long, many
branching paths. And it is an excellent, excellent story with a very good lesson, I
guess you could say. Now can we shrink this down? No, we cannot share
and expand on. And we'll just lower that
just so that it fits here. There we go. Alright, so we
have ourselves a screen. I'll go ahead and relabel
this as background. We then need a set of buttons. Now, I'm going to keep
mine very organized. So I'm going to use
a VBox container. Extend the size of
that. I'm going to place it right down here. So call this my
button container. And inside of here, we're going to have
three buttons. We're going to have
new game button, continue button,
and a Quit button. So we can go ahead and add
our text in their new game. Continue. There's a U
in there, and quit. Now obviously, if
you want to have these spaced out a bit, you certainly can do that right here inside of
our VBox container, we go to Theme override
constants, separation. And then you can go ahead
and go ahead and set this to whatever number you would like in-between
of your buttons. I think I'm just
gonna go with ten. That seems perfectly
fine for me. And I'm just going to
shrink that down there. Now obviously, if you have
the more buttons and add to, to want to put it in here, the longer you're going to
have to make this list. Alright? So we can go ahead there to do. All right, so let's start
with our Quit button. That'll be the easiest one. I'll go ahead and add a
script to my Quit button. Make sure this is set inside
of the scripts folder. And create a mosque
going to need to connect the signal pressed. Now connect that to our
Quit button, this wall. We don't need any of this info. All we're gonna
do is we're going to quit the game with this. So get tree dot. Quit. And we can go ahead
and save our scene. We'll go into scenes. Menu is fine. Now when we run this, we have a nice little menu here and when we hit
quit, the game closest. All right, So far, so good. Now, what if we want to
continue or a new game? Well, new game is gonna be fairly easy because
we've done this inside of our scene manager
here for the most part. So we're going to need
our start novel here. I'm just going to
copy that over. And I'll put that into
my new game script. This under Scripts. I'm gonna go ahead and posted my start novel function in there. We're going to go ahead
and go like that. I'm going to set,
create a variable here for starter scene. And I'm just going
to set that equal to the current time being
our tutorial seen. And what I'm doing with
this is I'm setting, this is gonna be our
brand new game, right? So our starting scene, I've, regardless of
whatever happens. So we should just
be able to call start novel and pass
in our tutorial. Alright, so we'll go ahead
and call that there. And we want on pressed. We want our signal. What our new game gets pressed. We're just going to call Start novel and we're going
to pass in our startup scene. Alright, so now
when we run this, if we had quit, the game closes and
if we hit new game. Now we know in our game starts, we'll jump right into
our visual novel. Boom, there we go. Fantastic. So at this point we should have a save. What do we have here? Yes. We don't have that signal
in there. That's fine. That's because we're
using the menu and not using the
C Manager anymore. Alright, but with that, we have our saving here. If you remember, come on
down, we have a Save here. So we do have a save
and we have slot one, which means we can jump into our Continue button in getting that sub to work
with different save slots. And we can also get our
new game button here. Go for suffer, continue. We're gonna go ahead and we're going to set a new
script on there. Again, we can take
our Start novel. You can always put
start novel in its own, in a global if you wanted to. Or I guess not really
a global sense. So we will need, we do have the signal here. But I'm just going
to comment that out. But here we go. We have a
dialogue, we have that. Alright, so let's
say we have this. We'll copy over our startup
scene just in case. In back that out. Here we go. Connect are pressed
signal or continue. And when we continue, all we have to do is
cause start novel. Remember our default is going
to be this empty string, which will be passed in as our, There we go as continuing
from the last say point. But what Ross going to
need to do is rush going to need to load in
our information. So take a look at
our scene manager. Remember we need to call load. There we go, so we can
call it load and our slot one before starting the novel. Now, if you want to
have this setup, so we have multiple
slots in here. When I use a continuous then
all we would need to do is instead of loading when our project starts or when the Continue
button is hit rather, you can go ahead and just
go into dialogic die. Yet slot names, assign
this to a variable. And then for every
slot that's in there, you can go ahead and list
these out in a separate menu. And then every
slot that's there, every slot that's there, you
can go ahead and save it. Every slot that's
there, you can provide a button for the
user to click on. And every everything that
the user can click on R, depending on which slot
the user clicks on. You sat, you can set a value for the actual novel to know what or where it's
going to save you. All right, So I've gone in
and I've added a new value of current slot and just set
that for my save slots here. So now you can come in and
you can set current slot. To whatever you would like. Of course, by default, we can have slot one. And then if you want to
have multiple slots, you can just set the
value of current slot to whatever slide you would
like and save it that way. E.g. here we can go
ahead and slot one and we can take a look at
his work now I think my saves were just
a little buggy. So what I'm gonna do here is I'm just going to create a ready function here
and just reset my saves. Rosette saves. And if we run that
kind of access, right, definition curse on
saving, but it didn't exist. Not the one we want
to go erase like. So. Then we go and I'll just
do this for slot 12.3. So I can clear out
all of my saves. Let's now continue. Do nothing. Interesting how it's
able to outright, it's not actually
loading anything. If actually going jump
into our starter, seem like it should, okay. That we might have a little
bug there, but we're good. Alright, so we can
see here that we have no slots available. So that's fine. If you
wanted to keep this in here, you can, but I'm just gonna
go ahead and get rid of it. And we can go ahead and define. In this case, we're
loading Slot once are you, are you need now is a way to determine our way
to set what slot. It is a 21, a load, which is going to be heavily
dependent on your game. So we'll say, let's
go ahead and set up our continue as if we
have multiple saves. All right, so let's
just go here. And for this, we're
gonna go ahead and create a, another control here. Just hold our information
and we'll call this the what do we call it say the load menu. And then inside of here we
will have a VBox container that will hold slot container. Never go. And we can do
something like the following. Grab everything and let's
set this to the center. The center up there.
That's not what we want. So let's go ahead and set this
or load menu to hold rack. That way our site container can actually be in the center. Alright, so now that
is perfectly set. What we need are the abilities
to create some slots. Now, depending on how you
want to go about this, you could do this in
a few different ways. What I'm gonna do is I'm
gonna go ahead and create some buttons here to three. Okay? So I'm just going to go
like that. Just for now. I'm going to call them
like so slot one button to button, three, button. There's no k in the word what? And slot for. But alright, I'm gonna go ahead
and add some text here to slot three. Slot for. I'm going to add
some more spacing. And my theme override. That way we can't
get any confusion. And I'm only going to allow
for slots for my game. Alright, so we're
gonna go like that. I doubt by default, what I'm gonna do is I'm
going to hide the menu. And inside of my
continued script. I'm going to create
some new functions. I'm going to create
one for show. Load menu or go save slots. And in here we're
going to pass down a, a parameter and
argument of slots, which must be an array. And when our continued
button gets pressed, what we're gonna
do is we're gonna get all of our safe slots. Logic, dot, get slot
names. All right. So we're gonna go
ahead and grab those. And we're going to pass those
into our show save slots. Now what we can do in
here is we're going to do where are we at? We need to go we need to
go up to our parents. So we got to go up two. So I'm going to set
menu is set to parents. Parents to make it
a little easier. Now what do menu dot node, load menu. I said Men, menu. Here we go. We're gonna
get our load menu. We're going to set it
to visible to true. And now for our slots here
that we need to check our swatch container, I'm
going to come down here. I'm going to create another
variable for slots. Container equal to load
menu slash slash container. And we're going to do
a for loop for slot, in slots, container, dot, get children. Alright, so we're
gonna come down here. So what we're doing
is we're calling get children on the slot
container that we have here. We're gonna get all of
these items one by one. We're gonna go through all four of these swap
buttons we have here. And all of these are gonna be represented by the word slot. So if we do slot dot name, it's going to give
us the name of this, which is gonna be slot
one or slot two buttons, slot three buttons,
slot for button. So what we wanna
do is we want to check if slot, I'm sorry. If yeah, if we wanted to do this, to want to do a double loop. Let's just get rid of the
word button off of here. Now instead of just
getting rid of the button, I could have just used the tech. I'm just going to get
rid of the word button. So I'm gonna say four. First slot and slots container. If slot dot name and we're
looking for and our slots, then slot visible equals true. Else slot visible equals false. Alright, so if we were
to run that and hit Continue, nothing popped up. Why did nothing pop up? That that that should
have had an effect there? And while we're at it, let's go ahead and add a
color correct in there. So we can add a darker value. And here, it's kinda darken it off from everything else
for a nice separation. So if we were to run this, that is visible. Just great. But when we're in here, this does not seem to be work. He's going worked out. Okay. So there we go. So for whatever reason that
didn't appear to be working, but it seems to be
working right now. So you see our screen
darkens as if we're going to show a load menu. But we have nothing here. We have no slots to show. Which is fine. Although as you see, we did have one issue. And that is when this is up,
when we have no buttons, we have No, No
Exit button there. So let's go ahead and
add one more button. We'll call this the back button. Sap the word back. And we can go ahead
and just set, I'll set this whole
thing to the bottom. Right. Here we go. And
I'm just going to pull that out of
the corner a bit. So when the Back
button gets pressed, we'll go ahead and
give it a script. When it gets pressed,
all it's gonna do is remove connect. All it needs to do is
hide the load menu again, to get parents, we should be able to just
call the height function. Alternatively, you could
just call it visible dot. There we go. So we can see that works
but visible equals false. We see, there we go. That's working just fine. Now how do we know if our
loop here is working? Well for that, we have to
actually save our game. So just as an example, I'm going to go into our
tutorial thing here. I'm going to manually
set this to slot one. Must remember that
is what a capital S. So I'm going to
set that to slot one. Play this timeline real quick. Alright, so we've had
the bad Brad join. So we should have had
a safe point there. So if we were to test
out our continued button and this NOT function, and we're getting no safe slots. Am I erasing it still? Did I forget to remove that? I am there's there's my issue. I'm Stella still erasing. I didn't delete
that out of there. Actually, what I want to
do is I'm just going to comment that out in case I need to clear out my savings again. We're there we go. So that was just user error. So if we were to try it now, new game, we get in,
we get our Save. All right, that should work. So now we jump into our Continue and we see we now have slot one. Now we have to do is
hook up slot one to actually load slot one. And we would be good to go. And for this, we
can actually use a single script on all of these if we code it correctly. So scripts, and we'll just
call this our slots, fine. Alright. So what we're gonna do here is
we're going to have var slots equals self dot name. So now this should be equal
to swap one slot two, slot three slot for et cetera. Let's take a look at
our Continue button. Since we're doing this here now, we no longer need start novel
and set up our Continue. We can remove that, put that inside
of our slot here. We don't have a
starter seen there, which should never be an issue because we should
only have safe slots that are visible are
that are in use. We have to get parents there. We're going to need
we're going to use three just so we can
put it all the way up. Alright, and what did
we miss it now started, we need to connect ourselves. So let's create a
ready function. We need to connect
our own signal again, if you're doing this in 4.0, the connection is gonna
be slightly different. So let's go ahead and
we'll do self dot connect. Looking for pressed against self load slot, real, so on. We can create our
function load slot. And all we're gonna do here
is we're going to call start novel and pass in. We don't have to
pass in anything, but we do need to load, logic, load and we
can pass in slot. All right, so now
that should work. When we hit our,
our loading button. Let's go ahead and find
out continue slot one. Alright, so that
is gone that far. This hopefully load
that up proper. Know that is restarting. Okay, So using slot dot name
is not going to work there. So I'll go ahead
and use slot there. And what we're gonna do is, since that's
not going to work, we'll go ahead and
use export. This. Now if you're in a 4.0, you're going to have to use the at symbol here at
the beginning for export. But we'll go
ahead and do that. And then inside
of the inspector, we can see we have slot
here and we can slot one. Oh, where did my variable go? Classified as a string. There we go. Slot one. And now we
can copy this script onto all of our others
on a slot 23.4. And just correct. All of these. You got a four and
you go to three. Now that I think about it,
we could have also oh, no, we couldn't we
couldn't use the texts because we do have a
space in there. Okay. So now our continued should
work with multiple slots.
17. Remember To Set Slots: Something that I wanted
to throw in there that I completely forgot to mention
as she didn't want to remember to set the variable. If you're doing
custom swatch here. If you remember here we had
current slot was the name. And it will just come
back to our scripts. So we want to set
the current slot to whatever slot is. So just make sure that
you're doing that, that way. You can make sure that you're saving in the right
slot when you are, after you continue the game. Just wanted to throw that
in there because that's gonna be a very important thing when you continue your game. Otherwise, your
game might not save or might save over
the wrong slot.
18. New Game: Alright, now what
about our new game? Well, for new game, we're going to give
the player the ability to set their player name
if they would like, before starting, as well as
selecting their safe slot. Alright, so we'll go ahead and create a, another section here. Let's say new. I'm sorry. We're gonna get a
want to get a V box. No. No, no. We'll just go with the we'll go with the
standard control here. We'll call this
the new game menu. Inside of here. Let's also do a,
another color wreck. Wreck. And what I'm
gonna do is I'm gonna go to the color wreck that
we already created. I'm going to select this
screwdriver and wrench here. I'm going to hit
Copy Properties. I'm gonna go to buy
new color wreck. Hit that again and
paste properties. That way we can keep things consistent with our
darkness and everything. Now, what do we need it in here? We're going to
need a line at it. For our name. We can go ahead and center this. We're gonna need a label of some sort so that our user knows what they're
supposed to be doing. Player name. Again, we'll set this to the center and then we
can just lift it up. Now you can always tweak
this thing yet theme overrides and play with
the colors, outlines. I like colors, constant fonts. You got all that stuff that
you can mess with here. If you'd like, as well as just completely creating
a whole new font, if that is what you choose, will go ahead and we could
do player named there. Actually to save on
that alternative, we can just go to
line next line at it as a placeholder tax rate. Yes. There we go. So we
can just go like that. And that'll play or no, to put a player name. Now, some people may not
hit Enter by instinct. I may just have a normal button. Go ahead and send her that. Some people may not hit Enter and be looking for an
Okay button and be lost. Some people may not. So we're gonna give them, give them that option. Alright, so we have that
set where a player name, we need to have that pop
up when we hit new game. And then from there, we're going to need
to also select a slot for our new game. So we'll go to, let's see, what do we have for buttons
here for signals crashed but not buttoned down, toggled. Let's see. We could
do slough that way. We have many different ways that we can go about doing this. Let's go with let's go with or buttons. Do we want to toggle them? No, no, no. Let's go with an
option menu, option button. Alright, so we'll come here. I do want to set the
layout to there. Now we have the
anchor in the middle and we can set a safe slot. Where do we do not have
anything there, okay. This is our say, slot oxygen. And if you want to
add items by default, you can come up here and go to add and you can stick
them in this way, which is perfectly fine. Selected or select slot is what we'll do
for the first one. And it'll be disabled so the user cannot
actually pick that one. And we can go ahead
and add more items. So let's say slot one. I keep hitting the wrong
button or not the wrong. Well, but I keep hitting
okay down there. Who do slot two? Slot 3.4. All right, so we have
four options here, and let's set this to pop
up with our new game. But we can go ahead and
check that real quick. So we see there's all of our
slots so we can pick from. So now we need to make sure
that our OK button isn't working by default until a
safe slot has been selected. And new game. Here we go. So again, we won't be
using star novel here. Now we'll be moving this to a new selection or a new spot. But for now, when our new
game button gets pressed, what we're gonna do
instead is we're going to go up to our chain
of get parents. Again, a better way
or a easier way, preferred way, whatever
you wanna call it, would be to send a signal. Since you're going up the tree. Usually you want to send a
signal if you're going up. But in this case, since there's zero chance
of us having issues, like we would in
a standard game. It's, it's fine for us
to use Git parent here. We have no future problems
that we can run into. So let's go ahead and get
parent duck, get parents. Let's see, that'll put us at
the top of the menu there. Perfect dot, get node. And then we want to get our
new game menu right there. Visible equals true. Alright, so if we turn
that off by default, and now we come in, we hit
new game. There we go. We're ready to start.
Our button. Here. Are OK button. I'm gonna go ahead and set
disabled on in the inspector. And now this is where we
need to set ourselves up. Since we're doing
multiple things here, we need the Okay button
when you do slots, I'm gonna go ahead and I'm going to put our script
on our new game menu. Now, where you put all of
these is completely up to you. If you really want
to, you could stick all of these into one script. I wouldn't recommend it, but you certainly could. Alright, so we have that, set that and don't eat that, and we won't need these. Alright, so we're going to
need some signals here. We're going to need a we're not going to
use text centered. I think we're just going
to use the Okay button. And let's save slot
item selected. And we're attach that
to our new game menu. So when we select a new
item and are safe slot. And when we hit the Okay button, those are the two signals
that we're going to need suppressed for our OK button. Alright, now, if we go back
to our new game button, this is where we have
our start novel, where we can now take that out and add that to
our new game button. Alright, so when our
button gets pressed, obviously we're going
to start the novel from our starter seen
to start a new game. And when a save slot has been selected for
my drop-down menu, much like we do in
our Continue button. We need to actually
set the safe slot. Where did we set that? Those are those visible.
We had it right here. So we need to actually
set this variable. Of our current slot. Now the question
is we don't know what slot is at the moment. So we're gonna have to create
a variable called slot. And if you're
wondering how I'm just quickly commenting
and uncommenting. It is the shortcut of Control
K and might be command, might be Command K on Mac. I don't know. It's been a
while since I've used it on a Mac. But there we go. We have that, we
have our variable, but now we need to set this
variable to it and do that. We're going to do we'll set that equal to
Our save button. Save slot option. Item. Checks, pass in the index. Now I need to double-check
my items here. And I have spaces in there. I'm gonna go ahead
and just delete those spaces. There we go. And now we should work perfectly fine with
an option selected. And then we can
get our OK button. And we can set disabled
equal to false. So now that we have are
safe slot selected. So let's say we
shouldn't make sure if slot and we need
to check our line at it and line at it dot txt not equal
to an empty string. There we go. So this is basically going to
check to make sure that we have selected
a safe slot here. And we have typed something
into our line at it. Alright, so now if we just select a slot and
nothing happens, you have to put a slot and
type something in there. And we can see that
is triggering. Now, we don't want
that to happen only when we select a slot
because as you saw there, I had to change slots
and then come back because I picked my
player name second. So let's go ahead and set
that to text changed. Send that signal to
our new game menu. And what we're basically going
to do there is we're going to this same if statement here. So whenever our exchange, right, it does not
know what slot is. We'll just come up and
will create slot up top there and set it
down there. Simple. Now it shouldn't matter
what order we do that end. We could do the slot burst
and then type, and it's fine. Or we can type and
then select a slot. And it's fine. Awesome. So let me just hide that
and make sure it's working. We'll go in, select New Game. Let's say the sow
save slot three. Okay, We'll go through, we should have had a
save at that point. So we'll go back, started
up again, may continue. And now we have a safe slot
through here available. And we hit that. No
timeline specified. And yet slot one works. So why are we having an
issue in slot three? Because we have a space there, we should not have a space. Alright, so that's
user error there. I need to remove those spaces
out of that slot variable. And now if we go to Load
slot three, There we go. So now we can create a new game. We can continue games. We have multiple save
slots setup, we can exit. We have essentially
everything we need now, all we have to do is
create characters, create backgrounds,
create a whole story, and a whole world for our
user or player to enjoy. I hope this course has been
helpful and educational to you to towards getting
yourself a visual novel. I'll set up, started
and ready to go.