Difference between revisions of "Dialogue Editor"

From Wolfire Games Wiki
Jump to: navigation, search
(Copied over contents from editor interface article)
 
(Started rewriting page from a tutorial to more straight up technical documentation, since the tutorial part is covered in the "Dialogue" article)
Line 1: Line 1:
'''TODO: Need to verify this is all accurate, up to date, and complete. Also needs to carefully describe what lines you need to have selected in the editor for it to work properly (animations, object and camera positioning, etc, are very sensitive to which line is selected)'''
+
This is the technical documentation for the dialogue editor. It's used to create scenes with different camera angles, text and poses. It is commonly used to give context and progress the story in a level.
  
The dialogue editor is used to create scenes with different camera angles, text and poses. It is commonly used to give context and progress the story in a level.
+
Before reading this article it's recommended that you read the [[Dialogue]] article to get a basic understanding of how dialogues work.
  
== Getting Started ==
+
== Dialogue ==
 +
Command: <code>say # "x" "m"</code>
  
=== Write the dialogue ===
+
== Camera Position ==
Create a text file in your mods Dialogues folder (../Overgrowth/Data/Dialogues) and write the dialogue in it like this.
+
Command: <code>set_cam tx ty tz rx ry rz</code>
  
#name "Mirage"
+
== Character Position ==
#participants 1
+
Command: <code>set_character_pos # x y z r</code>
say 1 "Thorn" "You there!"
 
say 1 "Thorn" "Do you have any..[wait 0.4] water?"
 
  
* The '''#name "Mirage"''' is the name of the scene. This is given to a dialogue hotspot on so it knows which dialogue to activate.
+
== Pose ==
* The '''#participants 1''' is how many characters there are in the scene. The numbered boxes above the dialogue object are connected to spawn points to decide which character is which in this scene.
+
Command: <code>send_character_message # "set_animation \"a\""</code>
* '''say''' at the beginning of a line is used to make someone say something.
 
* The '''1''' is the ID of the participant that should say the dialogue, this decides who moves their mouth when the dialogue appears.
 
* '''"Thorn"''' is which name should appear for the dialogue
 
* The text within the quotes at the end of the line is the dialogue itself.
 
* The '''[wait 0.4]''' will make the dialogue text pause for 0.4 seconds before continuing to display the next text.
 
  
Save and close the file.
+
== Eye, Head & Torso Movement ==
 +
Command: <code>send_character_message # "a"
  
=== Set up the scene ===
+
== Fading ==
Open up your level in the game, go to the '''Dialogue''' tab in the ribbon and click '''Load Dialogue'''. Select the dialogue file you created and click in your level to spawn it there.
 
  
There is a small box above the dialogue object that you just created. Select this object and alt-click on a character to tell the game that the participant with ID 1 is that character.
+
== Other Features ==
 
+
'''TODO: Add missing features'''
Select the box and press '''Edit Selected''', bringing up the text of the dialogue on the screen. Use the arrow up and down keys to select what line in the scene you want to edit. Now press '''Toggle Recording''', which creates a few more useful objects in our scene:
 
 
 
* Camera (with accompanying preview window)
 
* Torso control
 
* Head control
 
* Eye control
 
 
 
Move the camera to choose where the camera will be when the dialogue reaches the selected line, scale it to zoom in or out. Move the torso, head and eye controls to choose where the character's torso, head and eye should be pointing at that point. You need to scale up the torso and head controls for them to have any effect.
 
 
 
Press '''Load Pose''' and find the files with names that start with '''r_dialogue''', find one that you think might fit and load it to make the character take that pose when the scene loads.
 
 
 
Press '''Preview Dialogue''' to test the scene. When you're happy, click '''Toggle Recording''' again to turn it off and press '''Save Dialogue''' to save your changes to the scene.
 
 
 
=== Trigger the scene ===
 
Now we have the scene set up, but we don't have anything that triggers it yet. We can use a dialogue hotspot to make that happen. So go to the '''Home''' tab and press '''Load Item''', go to the '''Hotspots''' tab, click the '''Start Dialogue''' hotspot and click on the ground in your level. This should spawn a wireframe cube with a green sign icon in.
 
 
 
The dialogue will trigger when the player enters this hotspot, so place it where it will trigger when you want it to. Just make sure the player spawn is not inside of the hotspot, as that won't work when the level is restarted.
 
 
 
Press '''U''' with the hotspot selected and change the '''Dialogue''' property to be the same as the '''#name''' setting in the dialogue you want to trigger. If you've followed this example, that would be '''Mirage'''. If you don't want the dialogue to automatically trigger when you enter the hotspot, uncheck the "Automatic" checkbox.
 
 
 
Now save your level, start playing, enter the hotspot, and the dialogue should trigger!
 

Revision as of 11:02, 26 January 2018

This is the technical documentation for the dialogue editor. It's used to create scenes with different camera angles, text and poses. It is commonly used to give context and progress the story in a level.

Before reading this article it's recommended that you read the Dialogue article to get a basic understanding of how dialogues work.

Dialogue

Command: say # "x" "m"

Camera Position

Command: set_cam tx ty tz rx ry rz

Character Position

Command: set_character_pos # x y z r

Pose

Command: send_character_message # "set_animation \"a\""

Eye, Head & Torso Movement

Command: send_character_message # "a"

Fading

Other Features

TODO: Add missing features