Dialogues
Beware. Dialogue editing may be incorrectly documented in the DebugReadme and some older threads in the forum. NOTE: Dialogue editing does not work in Windows wersion. Use hex editing instead.
You should first be familiar with the map editor: see Map_Editing.
Contents
The Dialogue File
You can write your dialogue following the patterns of the dialogue files found in "Dialogues", inside the "Data" folder located within your Lugaru folder. There are plenty of examples.
Try opening "Example.txt", for instance. You'll get:
Dialogue boxes: 7 Box 1: Location: 1 Color: 0.0 0.0 0.0 Name: Turner Text: Hi, Skipper! Sound: 7 Box 2: Location: 2 Color: 0.0 0.0 0.2 Name: Skipper Text: Hey, Turner! Sound: 7 Box 3: Location: 2 Color: 0.0 0.0 0.2 Name: Skipper Text: What's all this talk about hiring guards? Sound: 1 Box 4: Location: 2 Color: 0.0 0.0 0.2 Name: Skipper Text: There's never been any trouble here while I've been in\charge! Sound: 4 Box 5: Location: 1 Color: 0.0 0.0 0.0 Name: Turner Text: The raiders are getting more confident... you never\know. Sound: 1 Box 6: Location: 2 Color: 0.0 0.0 0.2 Name: Skipper Text: I've seen you when you get mad; I think you could\take care of yourself. Sound: 6 Box 7: Location: 1 Color: 0.0 0.0 0.0 Name: Turner Text: It's not me that I'm worried about. Sound: 4
Just write your own dialogue using the precise same format. Here is a description of the different attributes:
- Dialogue boxes: n- number of panes in your dialogue.
- Box n:- pane number n.
- Location: n"- 1 = on top of screen, 2 = on bottom.
- Color: r g b- each number r, g, b corresponds to the amount of red, green, and blue. It should be a number between 0.0 and 1.0, written in the format of 0.2, for example.
- Name: Whatever- Name of the speaker.
- Text: Whatever- The text itself. Must never be longer than 128 characters, and should include a "\" (backslash) every 50 or so characters to create a line break.
- Sound: n- Quote David: "I think 1-2 are chitter sounds, 3-4 are pain, 5-8 are attack, or something along those lines".
Here's a kind of guide:
-0 Silence -1 chitchat, mountingdescending -2 Very similar to above -3 Scroosh, plain and short -4 Screech! pain! -5 truhu, short chatter -6 Creetsh, attack! -7 aha, short banter -8 Scroosh, short, affirmative tone -9 Wolf growl -D Wolf casual bark -F Wolf bark -10 Wolf chitchat bark
BUG!: 'Text' fields that are either 10 or 13 characters long make the map crash. For example:
Text: You knew him?
won't work because 'You knew him?' is 13 characters. To solve the problem, add a '#' at the end of the string, like this:
Text: You knew him?#
The '#' won't appear in the actual dialogue.
Then, save your dialogue as, say, "YourDialogue.txt" in the aforementioned Dialogues folder.
Adding a New Dialogue
Activating the Dialogue in the Map
Open the map you want to put the dialogue in, position yourself and all other characters that partake in the dialogue at the right position. They will be teleported there every time the dialogue is activated, and won't budge until the dialogue is over. Beware sands and snow maps where the ground level can change: this can mess up your camera angles. Look in the troubleshooting section for workarounds.
Once everybody is at the right place, enter the console and type:
dialogue n yourdialogue
where "yourdialogue" is whatever name you gave to your dialogue file, minus the ".txt", and n is the dialogue type. Quoting David:
The type value is what specifies how the dialogue functions. For example, if dialoguetype is 1, you activate the dialogue by approaching player 1 and pressing attack (if hostile is 0)
- If it is 11, you just move near player 1 and the dialogue plays automatically (and then functions the same as 1).
- 21 is the same as 11, except after the dialogue, hostile is set to 1
- 31 is the same as 11, except after the dialogue, you win
- 41 is the same as 11, except it can occur during combat
- 51 is the same as 21, except every character is alerted to your presence.
A couple small tricks:
- Dialogues that are triggered only once can be cumulated on the same character, in such a way that the dialogue is different when you go see him again (ie you can put two dialogues of type 11, or one of type 11 then one of type 21).
- 41 is always triggered from the start of the level; at the end of the dialogue the camera travels from the position you were when you saved the level to the position you've been teleported to for the dialogue. Use this to your advantage.
Once you have typed in the above command, you enter dialogue-editing commands to set the camera views:
Dialogue-editing Mode
Quoting David:
"This is much like the mode when you watch a dialogue scene, except you can control the camera. You can use the numpad to set which direction characters' heads are facing (i.e. numpad zero sets Turner's head to point in the same direction the camera is facing, numpad one does this for player one, and so on). Then you press the number key (not on the numeric keypad) that corresponds to who is the speaker, and go to the next dialogue box. For example, pressing '0' assigns Turner to be the speaker, and then goes on to the next dialogue box."
Small technical detail: every character whose head you set to a fixed direction at some point will be considered as being part of the dialogue, and will be teleported to its current position at the beginning of the dialogue.
Bug: sometimes Lugaru may crash once you've just finished editing the dialogue. However you can still call the console and save the level. Then, quit and restart Lugaru, and your dialogue works fine.
Modifying Existing Dialogues
Deleting a Dialogue
The command "ddialogue" deletes the last dialogue you created, in stack order.
Updating an Existing Dialogue
If you want to change camera angles, you have to delete the dialogue and restart the whole process. Except than:
Small trick: the "immobile" command prevents a character from being teleported at the beginning of a dialogue, so you can slightly move him with respect to the camera angle.
You may want to change the content of the dialogue because you updated the corresponding dialogue file (the one in the "Dialogues" folder), without having to set all camera angles again. Use the command:
fixdialogue n yourdialogue
where once again "yourdialogue" is whatever name you gave to your dialogue file, minus the ".txt", and n is the dialogue number.