March 2, 2015

Tutorial: Making a Telepath Tactics Campaign, Part 7

<< Continued from Part 6

A. Triggering dialogue with OnTurn

We now have a basic understanding of how to create a new campaign, create new characters, put them in a roster, build battles, link those battles together into a sequence, and then add extra variety to our battles using certain tags and conditions. But there’s something pretty important that we haven’t covered yet: dialogue!

From a narrative perspective, dialogue lets us develop the campaign’s characters and advance the plot. From a gameplay perspective, dialogue is how we notify the player of what’s to come and script specialized events.

Tutorial 7A - Edit DialogTo begin a conversation in the game, we have to trigger it. Open up the Telepath Tactics map editor; click the Edit Dialogue button all the way on the right. This will open the dialogue tree editor. You should see a dark gray square with some text indicating that there are no dialogue branches yet. Do as the text commands and right-click.

As soon as you right-click, you should see two things happen at once: first, a light gray box that says [ OnTurn , 0 ] should appear in the editor; this represents a new dialogue branch. Second, a small window should have popped up; this window will let us edit the properties of the new dialogue branch we just created. We’ll be working in the editing window now.

Tutorial 7A - Edit Dialog 2The first thing to note in the editing window is the presence of two fields next to the word “TRIGGER”. This is where we tell the game how to make this conversation to begin. Because our conversation’s trigger is OnTurn 0, it will automatically begin at the start of turn 0, right before the player’s first turn begins.

If we wanted to have this conversation begin at the start of army 1’s first turn, we would change this to OnTurn 1; to have it begin at the start of the player’s second turn, OnTurn 2; and so on. (Note that this would change if we added armies to the battle; if there are three armies on the map, OnTurn 2 would refer to the third player’s first turn instead.) For now, we are going to leave this as OnTurn 0.

Tutorial 7A - Edit Dialog 3Now it’s time to fill in the actual dialogue! In the Speaker Name field, type in the name of the character who will speak. For my part, I am choosing to have Ann Veal deliver the opening branch, so I’ll put her name in the Speaker Name field.

Next, where the window says “Add dialogue here”, type out the dialogue that the character will say. I have decided to have her say: Oh no, Tobias–Generic Blandits! Not only are they mean-looking, they have axes!

From here, we can close the edit window and our changes will be registered in the editor.

B. Writing linear dialogue

So this gives us a one-line conversation on turn 0, which is fine, but what if we want Tobias to respond? This is easy–we just add another branch to the conversation, then direct branch 0 to it.

Although Telepath Tactics uses a dialogue tree structure, it isn’t necessary to have our conversations actually branch outward–conversations can proceed linearly from branch 0 to branch 1 to branch 2, etc. until they end! This is the easiest way to structure dialogue, and it’s what we’re going to do here.

Tutorial 7B - Linear DialogRight-click the dark background in the dialogue tree editor to create a new branch. Every dialogue branch in a scene that shares the same trigger will be treated as part of the same conversation; so in this case, every other branch we create with an OnTurn 0 trigger will continue our existing conversation. Notice that branch 1 automatically showed up beneath branch 0; that’s how you know the game saw it as the next branch in our OnTurn 0 conversation! (If the existing conversation had used a different trigger, we would have needed to change the trigger info in our second branch to match it.)

In the edit window, change the speaker name and dialogue to say whatever you like, then close the window.

It might look like we now have a linear two-branch conversation, but if we save our map and run the battle, the conversation will end right after branch 0, before we get to branch 1. The reason? We haven’t told the game what sort of reply logic to use!

Tutorial 7B - Linear Dialog 2In a linear conversation, replies tell the game what to do when the player clicks on the dialogue window. Right now, branch 0’s reply is set to EndConv, short for “End Conversation.” That’s why the conversation is ending prematurely. Let’s change that.

Left-click branch 0; the edit window should come up. Where it says EndConv under Replies, type NextBranch. Now close the window.

Save the map in the map editor and open it in Telepath Tactics. The conversation should begin at the start of the battle, and it should now proceed through both branches before ending.

C. Writing non-linear dialogue

Now suppose we want to have a conversation where the enemy taunts the player at the start of the enemy’s turn, and the player has a choice of responses. This calls for non-linear dialogue!

Non-linear dialogue makes use of multiple replies, and can use additional reply types (not just EndConv and NextBranch).

To create non-linear dialogue, we start out just like we did with our linear conversation: we right-click the dark background inside the editor to start a new branch, change the trigger’s parameters to reflect what we want (in this case, OnTurn 1), then write in the speaker name and the dialogue we want the conversation to begin with. (Personally, I’m going to have a Generic Blandit say: Har, har! Surrender, you dogs!)

Tutorial 7C - Nonlinear DialogNext, still working in the edit window, click the little “plus” button below Replies to add a second reply. Now replace the ellipses (…) in each reply with the text you want each reply to have. After that, change each reply type to NewBranch.

NewBranch is just like NextBranch, except that we can specify the number of the branch we want the reply to take us to! We’ll set our first reply to NewBranch 1, and our second Reply to NewBranch 2. Close the edit window.

Tutorial 7C - Nonlinear Dialog 2Now we just have to create two more dialogue branches in the OnTurn 1 conversation–one for each reply!

Rather than right-clicking the dark background and having to manually edit the trigger again, instead just right-click branch 0 and select Duplicate. This gets us a branch 1 with everything the same as it was in branch 0. An edit window for branch 1 should have popped up as well.

Tutorial 7C - Nonlinear Dialog 3In the edit window, change the speaker name, then change the dialogue text to match the text in reply 1. Next, delete the second reply by clicking the “minus” button. For the remaining reply, change its type to EndConv. With that complete, close the window.

Now we’ll do the same thing to create branch 2 that we did for branch 1: right-click branch 1 and select Duplicate. Now change the dialogue text and close the edit window.

Tutorial 7C - Nonlinear Dialog 4And that’s that! We should now have a (very short) non-linear conversation consisting of an initial branch that splits into two other branches based upon the player’s choice of replies.

If that seemed like it was a lot to take in at once, well, it probably was. Feel free to practice making conversations using these techniques for a little while until you’ve got the techniques down pat. When we return, things are going to get real; Part 8 is where we are going to start talking about adding script actions to dialogue.


Continued in Part 8 >>