Difference between revisions of "Dialogue Editor"
m (Added to category: Modding, Overgrowth) |
(→Camera Position: Included information about a minor bug.) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 68: | Line 68: | ||
However, in some cases it can be very useful to be able to copy a <code>set_cam</code> line from one place to another and things like that. | However, in some cases it can be very useful to be able to copy a <code>set_cam</code> line from one place to another and things like that. | ||
+ | |||
+ | Sometimes, adjusting things in a line of dialogue will extraneously add another <code>set_cam</code> line. You'll want to remove this in order to maintain a steady camera. | ||
=== Character Position === | === Character Position === | ||
Line 79: | Line 81: | ||
Copying and pasting <code>set_character_pos</code> lines can be useful to reuse positions in cutscenes without having to set them up again. | Copying and pasting <code>set_character_pos</code> lines can be useful to reuse positions in cutscenes without having to set them up again. | ||
+ | |||
+ | '''There's a minor bug that you need to watch out for: Sometimes, adjusting things in a new line of dialogue will extraneously add another <code>set_character_pos</code> line. You'll want to remove this duplicate line, as it will interrupt animation blending.''' | ||
=== Pose === | === Pose === | ||
Line 94: | Line 98: | ||
All animations can be found in the ''../Overgrowth/Data/Animations/'' folder. | All animations can be found in the ''../Overgrowth/Data/Animations/'' folder. | ||
+ | |||
+ | There are two bugs you should watch out for: | ||
+ | |||
+ | * '''There is a very, very troubling bug that you need to be wary of:''' If you click Load Pose, there's a small chance there will be two browser windows. If this happens, close both and try again. Otherwise, the dialogue editor will become non-functional. | ||
+ | * If the <code>set_animation</code> field points to an incorrect or incomplete path, the game will crash. If you need to type the animation path, you should copy and paste the path manually instead of typing. | ||
=== Eye, Head & Torso Movement === | === Eye, Head & Torso Movement === | ||
Line 110: | Line 119: | ||
Example: <code>send_level_message "set_camera_dof 0.3 5.0 10.0 0.3 20.0 10.0"</code> | Example: <code>send_level_message "set_camera_dof 0.3 5.0 10.0 0.3 20.0 10.0"</code> | ||
+ | |||
+ | '''NOTE:''' The player character needs to be connected to the dialogue for it to work. | ||
* cs = Close blur strength | * cs = Close blur strength |
Latest revision as of 21:12, 12 July 2022
TODO: Figure out how to best cover all the missing send_level_message and send_character_message commands.
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.
Contents
General Dialogue Functions
Set Dialogue Name
Command: #name "$"
Example: #name "chat_with_villager"
Sets the name of the current dialogue to whatever is written in $
. This can be used by some other hotspots to start the dialogue.
Set Number of Participants
Command: #participants $
Example: #participants 3
Sets the number of participants in the dialogue to the number written in $
.
Dialogue
Command: say # "n" "m"
Example: say 1 "Turner" "Hello, I am participant 1 in the dialogue and my name is Turner."
Makes participant #
say m
while the name tag shows n
.
Waiting
Command: [wait $]
Example: say 1 "Turner" "Hmm... [wait 0.5]I should eat some carrots!"
Put somewhere in the middle of a say command to pause the text printing for $
seconds.
Wait For Click
Command: [wait_for_click]
Example: say 1 "Turner" "But why!? [wait_for_click]Why did you burn all the lettuce!?"
Put somewhere in the middle of a say command to pause the text printing until the player left clicks.
Name Tag Color
Command: set_dialogue_color # r g b
Example: set_dialogue_color 2 0.8 0 0.8
When participant #
says something, their name tag will have the color specified by the float values in r, g, b
(red, green, blue).
Voice
Command: set_dialogue_voice # i
Example: set_dialogue_voice 2 8
Sets the voice of participant #
to i
.
In the menu bar of the dialogue editor, go to Edit → Preview Voice and click and drag through the slider to hear previews of all the different voices.
Camera Position
Command: set_cam tx ty tz rx ry rz
Example: set_cam 5.0 3.1 2.5 0.0 0.0 0.0
Sets the location of the camera for the next say
command to tx, ty, tz
(translation x, y, z), and sets the rotation to rx, ry, rz
(rotation x, y, z).
You don't need to set this manually in the script because this line will be generated automatically when you move the camera object that is located on the dialogue hotspot by default when editing a dialogue. Keep in mind that when you do this you need to first select the say
command in the script that you want to change the camera angle for, as the set_cam
line will be put before that line.
However, in some cases it can be very useful to be able to copy a set_cam
line from one place to another and things like that.
Sometimes, adjusting things in a line of dialogue will extraneously add another set_cam
line. You'll want to remove this in order to maintain a steady camera.
Character Position
Command: set_character_pos # x y z r
Example: set_character_pos 1 3.0 0.0 5.0 30
Sets the location of participant #
to x, y, z
, and rotates them around the vertical axis r
degrees.
Just like with camera positions you don't need to manually set character positions in the script since the appropriate line of code will be automatically generated when you move one of the character position boxes that can be found by default on each participant's spawn box. As with camera positions, you need to make sure to select the say
line that you want to edit before making any changes.
Copying and pasting set_character_pos
lines can be useful to reuse positions in cutscenes without having to set them up again.
There's a minor bug that you need to watch out for: Sometimes, adjusting things in a new line of dialogue will extraneously add another set_character_pos
line. You'll want to remove this duplicate line, as it will interrupt animation blending.
Pose
Command: send_character_message # "set_animation \"$\""
Example: send_character_message 1 "set_animation \"Data/Animations/r_dialogue_shade.anm\""
Makes participant #
play the animation at $
. Note that we're using \" to "escape" the "
characters.
You don't have to write this line manually because it can be generated for you if you do the following:
- Click on the
say
line in the dialogue that you want the animation to play for - Select the dialogue character position box in the 3D view for the character you want to play an animation
- In the dialogue editor's menu bar, press File → Load Pose and load the animation you want
All animations can be found in the ../Overgrowth/Data/Animations/ folder.
There are two bugs you should watch out for:
- There is a very, very troubling bug that you need to be wary of: If you click Load Pose, there's a small chance there will be two browser windows. If this happens, close both and try again. Otherwise, the dialogue editor will become non-functional.
- If the
set_animation
field points to an incorrect or incomplete path, the game will crash. If you need to type the animation path, you should copy and paste the path manually instead of typing.
Eye, Head & Torso Movement
Command: send_character_message # "$ x y z i"
Example: send_character_message 2 "set_head_target 5.0 3.2 1.1 0.8"
Makes participant #
turn their $
towards location x, y, z
, with the influence i
. If i
is 1
, it will face as much towards x, y, z
as possible, and if it's 0 the command has no effect.
$
Can be set to set_head_target
or set_torso_target
. set_eye_dir
used to work, but currently dosn't.
This command doesn't need to be written manually, because it will be automatically set for the currently selected say
line when you move one of the eye, head or torso targets. Scale the targets to change the influence.
Depth of Field
Command: send_level_message "set_camera_dof cs cd cg fs fd fg"
Example: send_level_message "set_camera_dof 0.3 5.0 10.0 0.3 20.0 10.0"
NOTE: The player character needs to be connected to the dialogue for it to work.
- cs = Close blur strength
- cd = Anything closer than this value will be blurred
- cg = How gradual the transition for close dof should be, 0 = infinite blur
- fs = Far blur strength
- fd = Anything further than this value will be blurred
- fg = How gradual the transition for far dof should be, 0 = infinite blur
The depth of field is split into two parts with three parts in each, the close blur and the far blur. First in each part is how strong the blur should be (xs
), then at what distance it should end/start (xd
), and then how long the transition from/to the blur should be (cg
).
Fade to Black
Command: fade_to_black $
Example: fade_to_black 1
$
can be set to 1 to make the view fade to black on the next say
command. If you set it to 0 afterwards, you get some visual bugs in the dialogue.