PPD Builder Help - Interactions


Builder Guide
1 - Basics
2 - Chapter Editor
3 - Actor Editor
4 - Interactions
5 - Flags and Conditionals
6 - Graphics


Let's learn a bit about building and editing the most important part of a Project PD game: the Interactions.


Part 4 - Interactions

In Project PD,  Interactions are the primary way that the player can interact with the game and give their input on how the story is going to develop.  An Interaction is essentially a conversation, but since Interactions can also represent the interchange between the player an non-characters (like inanimate objects, creatures, or even the game itself), it's better to think of them in a more general sense.

For example, if your game has a situation where you want the player to pull a lever to open a door, you could create an Actor to represent the lever, and then an Interaction to contain the process of actually pulling the lever.

Interactions can simply be a way to display dialog, but they also allow for the player to make choices.  In an Interaction, the player can be presented with several options as to what they will say or do.  Depending on their choice, you, as the builder, can potentially change the path of your game.  This lets players play the game, which, generally, is what we're going for in the end.

4a - Creating Interactions
If you've read the previous part of this guide (Part 3 - Actor Editor) you already know one way to create an Interaction an automatically assign it to an Actor's action.


Here you can see the Actor editor.  We already have an Actor action open for editing, and in it we can select the Interaction we want to start when the player clicks this action.  The "+" button will create a new Interaction an automatically assign it to this action.  As you can see, we've created a new Interaction (with the default Tag of "new_interaction"), which will now start from the action we're editing.

There's also a shortcut for editing Interactions in the Actor action editor.


Just click the "E" (edit) button to edit the Interaction you've selected in the drop-down list.

We'll get to the Interaction editor in a moment.  First, let's talk about the second way you can create Interactions.

Although an Interaction is often started via an Actor action, and (in game terms) Actors are intrinsically tied to an Area, Interactions are not tied to Actors or their Actors, or Areas, or even Chapters.  In Project PD, an Interaction is a fully self-contained element.  What that means is that you can tie the same Interaction to as many Actors as you want and/or use the same Interaction across multiple Areas or Chapters.

We'll get into why that might be useful later.  For now, let's take a look at another top-level Builder window: the Interaction list.  This list can be opened with the button labeled "Interactions" on the workspace topbar.


When you click this button, the Interactions list pops up.



This list will show every Interaction in your game.  My list contains only one Interaction, which I created in the previous section of the guide.  If you skipped straight here without going through the Actor editor, your list will be empty.  Don't worry, you can easily add more Interactions without using the Actor editor.

The Interaction list behaves exactly like the other list-based editors in the Project PD Builder.  To add another element to the list, which in this case will be another Interaction, just click the "+" button at the top of the list.


Now we've got two Interactions, both with the default Tag ("new_interaction").  Let's get down the business and start editing the first one.  Click the "E" (edit) button to open up the Interaction editor for that Interaction.

4b - The Interaction Editor
The Interaction Editor is a powerful tool, and to make the most out of your game it pays to take some time to familiarize yourself with all the options available to you.  We'll be covering the basics here, but if you spend a few minutes playing around with it yourself, you'll probably find a trick or two that this guide doesn't cover.


This is what the Interaction editor looks like when you open up a new Interaction.  Pretty simple, right?

The first thing you'll want to do is change the Interaction's Tag.  If you read part 2 of this guide (Part 2 - Chapter Editor), or, more specifically, the section on Area Descriptions, you'll already be familiar with Tags.  In short, a Tag is a name you assign to an element in the Builder to help yourself remember which element it is in a list.  Tags are displayed only in the Builder, and will never be seen by the player.  That means you can use whatever naming scheme you want for them.  The default Tags all use a lowercase letter and underscore scheme, but feel free to use whatever makes sense to you.

Let's change this Interaction's Tag to something a little more descriptive.  The Tag editor works the same as any other name editor in the Builder.  Just click the Tag in the top left, just under the title bar.


Since this Interaction is going to be fired by the "Talk to Hatman" action I created in the previous section, I'm going to tag this Interaction "hatman_speak."  I'm going to be assuming we're creating an Interaction for that action, but the concepts I go over will apply to any Interaction you want to create.

Let's finish up our Tag by clicking "Set."  You'll notice the Tag in the upper left will update, along with the title bar.


So now we have an empty Interaction with a more descriptive Tag.  Let's get into the meat of the Interaction editing process, and add a new Interaction Node.  Click the "+Root" button on the top right of the Interaction editor to add a new root node.


This initializes a new Interaction Node at the start of your Interaction.  Before we dive into editing our new node, let's take a minute and go over the structure of an Interaction in Project PD.

An Interaction works a lot like a conversation between the player an the Actor to whom their speaking. The Actor starts by saying something, then the player gets a choice between several responses.  After they pick one, the Actor will respond again, and the text of their response will depend on which response the player selected.

In a Project PD Interaction, each of these lines (both the player's and the Actor's) is represented by an Interaction Node.  Our root node that we just created will represent what the Actor says when the Interaction first begins.

4c - Editing Interaction Nodes
With that in mind, let's open up the node editor.  Just like any other list, click the "E" button on a node to open that node's editor.


An Interaction Node has quite a few options, but don't get intimidated.  For most nodes you're only going to be editing a couple of them.

First of all, on the top left, is the Actor/Player toggle button.  Currently it's in the Actor state, which means this node is going to be spoken by an Actor (or, in simpler terms, the game is going to say it to the player).  If you click it, you'll toggle this node to Player mode.


Only two things change visually: the button now says "Player," and the node is now orange.  From the Builder's perspective, there isn't really much difference between a player-spoken node and an Actor-spoken one.  They both have all the same elements.  The only difference is how the Project PD Player will display them.

We'll get into player nodes in a minute.  For now, let's toggle our node back to Actor mode, and continue on to the text elements.

The first text element is the speaker name, which is at the top, just to the right of the Actor/Player toggle button.  For our brand-new node, it reads "Speaker."  Let's change it to the name of the Actor we want to say this node.


Since my Interaction is going to be with the character Hatman, that's my speaker name.

You'll notice there's a Conditional editor at the top right.  We're going to skip over Conditionals for now, but you can read about them in the next section: Part 5 - Flags and Conditionals.

We've got our speaker's name set, but what is he actually going to say?  As you can probably guess, the big text box in the middle of the editor is the speaker's line.  There's plenty of space for longer lines, but it's generally a good idea to keep your speaker lines concise to keep the Interaction moving along.  If you absolutely need to do a monologue, there are a few techniques that we'll get into later that may help to keep things flowing.

Since this node will start our conversation, I'm going to start with a greeting.


That seems nice and polite.

For a lot of the nodes you'll be doing, that's all that you'll need to edit.  There is one last thing I'd like to briefly cover, though: the graphics editor.

You may notice if you hover your mouse over the picture on the left of the editor, it changes.


If you click "Change," the editor will switch states and allow you to edit this node's graphics.


This is the editor that allows you to change what images will display when either the player or an Actor speaks this line.  We aren't going to go in depth into graphics yet (we're saving that for Part 6 - Graphics), but for now it's helpful to know that the capability is there.

That's really all there is to this greeting node, so let's click "Set" in the bottom right to save our changes.  Make sure to click "Set" in the graphics editor first, though.


Now you'll see an updated Interaction Node display in the main editor.


You can see several things here.  The thumbnail for the graphics set (which is just the default "?" for now), the speaker's name ("Hatman"), the graphics set's state ("default"), and the speaker's line.  Since this is an Actor node, it's a nice blue color.  If it was a player-spoken node, it would be orange, just like the editor changes to when you toggle between modes.

4d - Creating a Conversation
Now let's learn how to make a real conversation by adding some player responses.  To add a child node to our node, click the "+" button on the node display.


This will create a new Interaction Node under the first one.


Right off the bat you'll probably notice two things: first, the new node is orange.  This means it's a player-spoken node.  New nodes that are children of Actor-spoken nodes are automatically created as player-spoken nodes.  This is a convenience thing, but we can easily change the new node to Actor-spoken if we need to, just by clicking the toggle.

The second thing you may have noticed is that this node is pushed over to the right a little bit, so it looks like it's sitting underneath the root node.  This signifies that our new node is a child of the first one.  To get to a child node, the player has to get through all of its parents first.  Since we have an Actor node with a player node as its child, when this game is run, the Project PD Player will interpret this Interaction as the Actor saying his line, then the player is given a single option as to what they want to say back (since we only have one player response so far).

Let's edit our player response a little to give it some content.


After you're done, click "Set" to save the new node.


This is starting to look a bit more like a conversation, but it's still pretty boring.  Now that the player has responded to Hatman's greeting with another question, we need to add another response for Hatman.  Let's click the "+" button on the orange player-spoken node to add a child to it.


As expected, our new node is blue, which signifies it's Actor-spoken.  It also already has "Hatman" as the speaker name, which saves us the step of writing that again.  In fact, all that we need to do is fill in what we want Hatman to say, and we're done with that node.


Now we're making progress!  For our next node, let's do something a little different.  In our first player response we didn't give our player any choice in what he or she wanted to say.  We just assumed the player was doing fine, and they wanted to be nice to Hatman.

This time, let's give the player some options.  I'm going to let them say three things: I want my player to be able to be nice to Hatman, say something mean, or just leave him alone and go do something else.

To get three player-spoken nodes, let's click the "+" button on our newest node three times.


Our new nodes are already player-spoken (orange) and they already have "You" filled in for the speaker name.  You might notice that I've expanded my Interaction editor window a little vertically to give myself more space.  Remember you can always make your windows bigger or smaller by dragging the black triangle in the bottom right-hand corner of most windows.  Since Interactions can get large and complex, it can be helpful to make your Interaction editor windows a lot bigger so you can see the overall structure of your Interactions.

Now I'm going to fill out what I want my player responses to be.


With three responses, our players now have a lot of options for how they want to play the game.

We need to fill out the rest of this conversation, but before we go any farther, there's one small change I'm going to make to our Interaction with Hatman.

Our conversation follows the standard pattern of Actor line, player response, etc., but on the other hand, our first response to Hatman is kind of redundant.  Since the player is only given a single choice, it isn't really a choice at all, and we might as well just skip the step of making them click another button.

Instead, let's switch our first player response to a Actor-spoken line.


Now our node changes to blue.  Click "Set" to save the change.


This is what our Interaction looks like now.  Instead of making the player click a button and make a forced choice, we just display another line and use the player's speaker name ("You").  Then, after Hatman complains about his dog (when the player actually has a choice in what to say), we use our player-spoken lines.

You can also use this concept to split your Actor's monologues into smaller pieces for readability, or even have conversations with multiple Actors.  Since Interactions are not tied to specific Actors or constrained to be between a single Actor and the player, we can create much more dynamic and interesting conversations, just by changing the speaker names (and later, their graphics).

4e - Triggers
You've probably noticed that we've skipped over another part of the node editor.  At the bottom of each node editor is a section for Triggers.

In Project PD, a Trigger is a little hook that you can attach to an Interaction Node.  When this the player gets to this Interaction Node, the Project PD Player will fire the Trigger, which in turn will make something happen.

Triggers can make a variety of things happen.  Probably the most common use for a Trigger is to change a Flag.  Since we haven't quite got to Flags yet, we're going to skip over that until we get to the next section of this guide.  But Triggers don't just change Flags, they also can do a few other useful things.

To demonstrate, let's open up the editor for our very last node.


There's an editor piece at the bottom: the Trigger list.  This list behaves exactly like pretty much every other list in the Project PD Builder.  Let's go ahead and add a new Trigger by clicking the "+" button.


Now we've got an empty Trigger attached to this node.  When the player clicks this response, our empty Trigger is going to fire, doing...absolutely nothing.

To make our Trigger a little more interesting, let's open up it's editor.


To the left in the Trigger editor is the type drop-down list.  Let's see what kinds of Triggers we can add.


We've got "setFlag," "flagOperation," "areaTransition," "chapterTransition," and "nodeTransition" as options for what type of Trigger we want to create.  Since we're going to be skipping the Flag Triggers until the next Chapter, let's go over the transition Triggers.

These are all quite self-explanatory.  In game terms, when you want to go directly to another Area (say, for example, the player presses a button that teleports them somewhere else) or transition to another Chapter, you can add a Trigger transition and when the player selects this response, they will immediately be transfered to the target Area or Chapter.  If you add one of these transition Triggers to an Actor-spoken node, the player will get transfered after they read the Actor's line and click to continue.

For the sake of our example, let's add an Area transition Trigger to this node.  We want the player to go to another room when they say goodbye to Hatman.


We've selected "areaTransition" from our list of Trigger types.  Now we can select which area we want to transition to.  I'm going to pick "Main Room" (we created these rooms back in Chapter 2), so when the player says goodbye to Hatman, they'll head to the Main Room.



Remember to click "Set" on the Trigger editor before clicking "Set" on the Interaction Node, or your Trigger won't get saved!

Chapter transition Triggers work pretty much the same, so let's talk about the last type of transition Trigger: node transitions.

Node transition Triggers are pretty handy.  In general, a Project PD Interaction goes in only one direction: parent to child.  That means your Interactions will always start at the root and go to a terminating child.  Pretty boring, right?

Node transition Triggers allow you to mix that up a little.  With a node transition, after the player goes through a node, you can jump them to anywhere else in the same Interaction.  So, if you really want to, you can loop the player back to the beginning of an Interaction, or skip a bunch of nodes that they don't need to see.  You can even jump from one node tree to another (as long as their in the same Interaction).

To see how this works, let's add a fourth and final player response node to our conversation.


I've given the player another option: "Who are you again?"

Now, I want the player to jump all the way back to the beginning of the Interaction, where Hatman greets him or her.  Let's open up the editor for our new node and add a node transition Trigger.


There's a drop-down list of all the nodes in the Interaction on the right side of the editor.


The drop-down list has the speaker's name, as well as the beginning of their line.  I want the very first option, since it's the root node of the Interaction.


After clicking "Set," my Trigger is good to go.  The player will now get sent back to the beginning of the Interaction when they select this response.

There's a little bit more to the Interaction editor, but you're probably better off playing around with it and discovering everything you can do with it for yourself.  This guide should help you get off the ground, at least!

I think it's about time we learn how to get some real interactivity out of a Project PD game: Part 5 - Flags and Conditionals.

No comments:

Post a Comment