Difference between revisions of "Dialogue"

From Wolfire Games Wiki
Jump to: navigation, search
m (Camera work and character positions: Formatting/small mod)
(Quality pass)
Line 1: Line 1:
**Please note that this page is under construction**
+
Dialogues are used to create scenes with different camera angles, text and poses. They are commonly used to give context and progress the story in a level.
 +
 
 +
This is a step by step tutorial on how to create and trigger a basic dialogue. For more technical documentation of how dialogues work, such as all the commands you can use and how they work, read the [[Dialogue Editor]] article.
  
 
==Creating and editing a dialogue==
 
==Creating and editing a dialogue==
  
To begin, open up a level in the editor, or create a new one. Spawn some characters, and make sure they're all on the same team so they don't attack each other.
+
To begin, open up a level in the editor, or create a new one. Make sure you have spawned some characters you want to have in the dialogue.
  
 
Then click Top Bar -> Dialogue -> New Dialogue. Your cursor should now have a plus. Click somewhere in the level to spawn the dialogue hotspot.
 
Then click Top Bar -> Dialogue -> New Dialogue. Your cursor should now have a plus. Click somewhere in the level to spawn the dialogue hotspot.
Line 11: Line 13:
 
==Naming the dialogue==
 
==Naming the dialogue==
  
Make sure you change the name from #name "Unnamed" to something more specific to that conversation. Like #name "Chat With Villagers" or something. Remember this name, cause you're going to use it later.
+
Make sure you change the name from #name "Unnamed" to something more specific to that conversation. Like #name "Chat With Villagers" or something. You're going to the name later when triggering the dialogue.
  
 
==Adding participants to the dialogue==
 
==Adding participants to the dialogue==
  
Next, change the #participants 1 value from 1, to the number of characters in the conversation. Make sure you include the player, even if they aren't going to talk. Otherwise the character can run around during the dialogue, and it can get confusing.
+
Next, change the #participants 1 value from 1, to the number of characters in the conversation. Make sure you include the player's character, even if they aren't going to talk. Otherwise the player character can run around during the dialogue.
  
After that, double click on the small numbered box above the dialogue hotspot. Then hold Alt while you click on a character's spawn box. This makes a line between the two, and binds that character to that dialogue. You have to do this for all characters who will talk, and the player.
+
After that, double click on one of the small numbered boxes above the dialogue hotspot. Then hold Alt while you click on a character's spawn box. This makes a line between the two, and binds that character to that participant slot in the dialogue. You have to do this for all characters who will talk, and the player.
  
 
==Adding lines to the dialogue==
 
==Adding lines to the dialogue==
Line 29: Line 31:
 
==Triggering the dialogue==
 
==Triggering the dialogue==
  
To start the dialogue, the character needs to walk to somewhere in the level. To make that work, you need a Start Dialogue hotspot. There are other ways to trigger a dialogue using the new checkpoints system, but that's far more advanced, so let's just start with this.
+
Now we need to decide when the dialogue should start, let's use a trigger volume, meaning the dialogue will trigger when the player enters a specified area. To make that work, you need a Start Dialogue hotspot. There are other ways to trigger a dialogue using the new checkpoints system, but that's far more advanced, so let's just start with this.
  
 
Click Top Bar -> Load -> and type Start Dialogue. Click that item, and click in the level to spawn it.
 
Click Top Bar -> Load -> and type Start Dialogue. Click that item, and click in the level to spawn it.
Line 49: Line 51:
 
==Camera work and character positions==
 
==Camera work and character positions==
  
While editing the dialogue, there's a camera object that you can move around in the scene. You might not see that camera at first, since it spawns on top of the dialogue hotspot, and might be embedded in the ground. The camera can be spawned from the Load->Utility menu, as well. Don't be afraid to move any of those boxes around. It doesn't matter where you place the dialogue hotspot, so feel free to move it up and out of the way, so you can edit the per-line objects.
+
While editing the dialogue, there's a camera object that you can move around in the scene. You might not see that camera at first, since it spawns on top of the dialogue hotspot, and might be embedded in the ground. The camera can be spawned from the Load->Utility menu, as well. Don't be afraid to move any of those boxes around. It doesn't matter where you place the dialogue hotspot, so feel free to move it up and out of the way, so you can edit the per-line objects.
  
 
To set up the camera for a given line of dialogue, click on the corresponding say line, then select the camera and position it where you want it. There is a preview window that lets you line up your shot perfectly. You can move and resize that window.
 
To set up the camera for a given line of dialogue, click on the corresponding say line, then select the camera and position it where you want it. There is a preview window that lets you line up your shot perfectly. You can move and resize that window.
  
 
===Adding Animations===
 
===Adding Animations===
You can also move characters to different positions for each line, make them look around, etc, via boxes that can somehow be manipulated.
 
  
The camera and character positions can be changed for each line of dialogue, so make sure you set everything up perfectly for each line. Just click on each different line in the editor window, and then move the animation and camera boxes around for that line of the dialogue as desired.
+
The camera and character positions can be changed for each line of dialogue. Just click on the line you want to make changes to in the editor window, and then move the character and camera boxes around as desired. The character boxes can be found inside each character's spawn box by default. Note that the dialogue editor will update to add your changes, so removing the lines from the editor will revert the edits.
  
 
==Making it good==
 
==Making it good==
Line 62: Line 63:
 
Don't be afraid to mess around with the objects in the Dialogue Editor, or even to change, copy, paste the code around. Also make sure to open the existing game's levels in the editor to check out what other hidden features show up in dialogues.
 
Don't be afraid to mess around with the objects in the Dialogue Editor, or even to change, copy, paste the code around. Also make sure to open the existing game's levels in the editor to check out what other hidden features show up in dialogues.
  
For dialogue work in general, there's also a bunch of tutorials on the internet and YouTube about cinema, camera work, and photography. All of these topics can give you useful information that will apply to making dialogues in games. I suggest you check out (google!) topics like -
+
For dialogue work in general, there's also a bunch of tutorials on the internet and YouTube about cinema, camera work, and photography. All of these topics can give you useful information that will apply to making dialogues in games. I suggest you check out (Internet search!) topics like -
  
 
     The rule of thirds
 
     The rule of thirds
Line 70: Line 71:
  
  
This list of techniques goes on forever, so I suggest getting lost on google for a while, watching videos, etc.
+
This list of techniques goes on forever, so I suggest getting lost on searching the Internet for a while, watching videos, etc.
  
 
A popular YouTube channel on this topic is "each frame a painting". Check that out too.
 
A popular YouTube channel on this topic is "each frame a painting". Check that out too.

Revision as of 10:34, 26 January 2018

Dialogues are used to create scenes with different camera angles, text and poses. They are commonly used to give context and progress the story in a level.

This is a step by step tutorial on how to create and trigger a basic dialogue. For more technical documentation of how dialogues work, such as all the commands you can use and how they work, read the Dialogue Editor article.

Creating and editing a dialogue

To begin, open up a level in the editor, or create a new one. Make sure you have spawned some characters you want to have in the dialogue.

Then click Top Bar -> Dialogue -> New Dialogue. Your cursor should now have a plus. Click somewhere in the level to spawn the dialogue hotspot.

Double click on the new dialogue hotspot to select it, and click Top Bar -> Dialogue -> Edit Selected. Now you're in the dialogue editor.

Naming the dialogue

Make sure you change the name from #name "Unnamed" to something more specific to that conversation. Like #name "Chat With Villagers" or something. You're going to the name later when triggering the dialogue.

Adding participants to the dialogue

Next, change the #participants 1 value from 1, to the number of characters in the conversation. Make sure you include the player's character, even if they aren't going to talk. Otherwise the player character can run around during the dialogue.

After that, double click on one of the small numbered boxes above the dialogue hotspot. Then hold Alt while you click on a character's spawn box. This makes a line between the two, and binds that character to that participant slot in the dialogue. You have to do this for all characters who will talk, and the player.

Adding lines to the dialogue

Now to customize the dialogue. Where it says say 1 "Name" "Type your dialogue here.", change the name and the text. Something like say 1 "Fritz" "Just going for a jaunt in the park". The number at the beginning refers to the participant number (the numbered box) that is linked to the character who is speaking.

You can add more say lines. Remember to set the right participant number and the right name for each. They can even change names in the middle of the conversation, for example if they've just been introduced to you. You could start by calling them "Green Rabbit", and later change them to "Jonathan".

You can preview what your dialogue does at any time by clicking Dialogue Editor -> Menu Bar -> Edit -> Preview.

Triggering the dialogue

Now we need to decide when the dialogue should start, let's use a trigger volume, meaning the dialogue will trigger when the player enters a specified area. To make that work, you need a Start Dialogue hotspot. There are other ways to trigger a dialogue using the new checkpoints system, but that's far more advanced, so let's just start with this.

Click Top Bar -> Load -> and type Start Dialogue. Click that item, and click in the level to spawn it.

Then double click on the new Start Dialogue hotspot to select it. Click Top Bar -> Windows -> Selected in order to open its properties.

From here, click the arrow to expand the start_dialogue.xml object, and click the arrow to expand Script Params.

On the line where it says Dialogue, double click in the box next to it, where it says Default text. Change the text here to the name you set for the dialogue (Chat With Villagers, in the example at the beginning of this tutorial, or whatever you chose to name it).

Now make sure to move this trigger and resize it to the shape you want. When the player walks inside this trigger, the dialogue will start. Note that it will only do this once, so you must hit the L key to reset the level if you want to trigger the dialogue again.

Other properties in the Script params:

If you want to have to click to activate the dialogue, instead of just having to walk inside the hotspot, then uncheck Automatic.

If you don't want to see the big green dialogue bubble while playing the game, uncheck Visible in game.

Camera work and character positions

While editing the dialogue, there's a camera object that you can move around in the scene. You might not see that camera at first, since it spawns on top of the dialogue hotspot, and might be embedded in the ground. The camera can be spawned from the Load->Utility menu, as well. Don't be afraid to move any of those boxes around. It doesn't matter where you place the dialogue hotspot, so feel free to move it up and out of the way, so you can edit the per-line objects.

To set up the camera for a given line of dialogue, click on the corresponding say line, then select the camera and position it where you want it. There is a preview window that lets you line up your shot perfectly. You can move and resize that window.

Adding Animations

The camera and character positions can be changed for each line of dialogue. Just click on the line you want to make changes to in the editor window, and then move the character and camera boxes around as desired. The character boxes can be found inside each character's spawn box by default. Note that the dialogue editor will update to add your changes, so removing the lines from the editor will revert the edits.

Making it good

Don't be afraid to mess around with the objects in the Dialogue Editor, or even to change, copy, paste the code around. Also make sure to open the existing game's levels in the editor to check out what other hidden features show up in dialogues.

For dialogue work in general, there's also a bunch of tutorials on the internet and YouTube about cinema, camera work, and photography. All of these topics can give you useful information that will apply to making dialogues in games. I suggest you check out (Internet search!) topics like -

   The rule of thirds
   180 degree rule
   30 degree rule
   Over the shoulder shot


This list of techniques goes on forever, so I suggest getting lost on searching the Internet for a while, watching videos, etc.

A popular YouTube channel on this topic is "each frame a painting". Check that out too.