Dialogue Editor in Windows

The place to discuss all things Lugaru.
User avatar
matt42
Posts: 121
Joined: Mon Jan 05, 2009 1:18 pm
Location: Bulgaria,Burgas
Contact:

Re: Dialogue Editor in Windows

Post by matt42 » Wed Mar 11, 2009 12:46 pm

Great job Smok but how i can make some dialogue npc friendly and how to show where is the npc?

User avatar
Smok
Posts: 17
Joined: Sun Jan 04, 2009 1:17 pm

Dedit Tutorial

Post by Smok » Wed Mar 11, 2009 5:57 pm

Okay, since many people don't really know how to use this tool I've prepared simple tutorial with step-by-step instructions. I apologize for my poor english - unused tool quickly rusts. I hope that you will find some useful information here.

Step 1:
Set the scene.
scene.jpg
Create a map with a character(s), before saving - place yourself on the first dialogue point of vision. Alt+Tab outside the Lugaru.

Step 2.
Load the file.
general.jpg
Okay, we have a map with a character. Let's open Dedit and Load the map. After we do that - look at the hostility checkbox. It's important to pick right dialogue type. You'll not be able to talk to hostile character unless you start dialogue immediately when map loads.

Step 3.

Add the dialogue
dialogues.jpg
Click on the left + button (1), select <empty> position on dialogue list, and then add a dialogue line with right + button (2). Each dialogue contains one or more dialogue lines, and it's triggered depending on dialogue type.

Step 4.
Set up the dialogue line
filled.jpg
Fill the dialogue type field (1), according to the wolfire wiki http://wiki.wolfire.com/index.php/Dialogues, set up the other fields (section 2), just like you would edit them in classic dialogue file (use wiki as guide). When it's ready - click "get from player" (3). Dedit will copy saved player coordinates and camera rotation, which is buggy, but we'll get to that later. Go to Cam Y field (4), and add 2 to it's value. Mapeditor saves the position of player's foot, so you'll probably want to look from higher place. Save the map, and Alt+Tab to Lugaru.

Step 5.
Test.
wrong.jpg
Load the map from console. You can easily see that something is wrong. Camera rotation Y is bugged, mapeditor dosn't save it right, so we have to set it up ourselves.

Step 6.
Rotation
rotation.jpg
I've tried some numbers, they are in 360 degrees format, so finding right angle isn't really a big deal. First thing you might wanna do is set rotation to 0,0 because adding/substracting will be easier. If it dosn't work for you - don't worry, and try diffrent X axis (90, 180, 270), you'll see characters eventually.

Step 7.
Finish.
good.jpg
In my case - this was good guess, and 0,0 was fine to display this dialogue. You might wanna play with the camera, since you can set it everywhere (far, close, from beyond or above). Rotate X is turning to left/right, while Rotate Y changes the angle up or down.

Good luck!

User avatar
matt42
Posts: 121
Joined: Mon Jan 05, 2009 1:18 pm
Location: Bulgaria,Burgas
Contact:

Re: Dialogue Editor in Windows

Post by matt42 » Thu Mar 12, 2009 5:05 am

Realy thanks you're great.

User avatar
Johannes
Posts: 1374
Joined: Thu Dec 18, 2008 1:26 am
Contact:

Re: Dialogue Editor in Windows

Post by Johannes » Sat Apr 04, 2009 7:13 pm

Smok, I'm using the editor right now, and it's been great so far.
I know you might be gone from the forums but incase you come back,
I have a few suggestions for features you could add =)

1. A checkbox in the Dialogue editor for converting /n to linebreaks and vice versa. If checked it would display /n as a linebreak and not give you the error message that says to use /n instead. it would of-course behind-the scenes still save /n, it just displays it as a line break. If you uncheck it it would immediately display all new lines as /n and you'd once again get the error message.

2. A camera slider value. This is a bit more difficult to implement since there is no official 'camera center', but basically it would use the camera's Horizontal and vertical rotation to calculate a vector and then allow you to slide the camera along that vector by typing in a distance value, essentially moving the camera in the direction it is facing. It would then calculate the appropriate X, Y and Z values and add those to the existing X/Y/Z values.
I think the best way to do this is a field called 'move camera' and a button next to it that says 'apply'. When you press that button it would apply the movement, negative moving back, positive moving forward. It would then add the appropriate X, Y and Z distance, and set the field to 0 again. to undo you would simply type in the negative of what you did before.
This would require a bit of trigonometry to do, but shouldn't be hard. I could write you the equations if you need them.

3. text export. Lotus showed me that you can set the camera angles in game, but this will overwrite the text. A good way to get around this if you write text first would be to save it like the files in /Data/Dialogues/ the files look like this:
example wrote: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
It would be great if you could save the file like this. Not only would it be useful for quickly importing the text, but when editing the actual scene you can have it display this file. it would be fantastic if dedit could quickly generate a file formated like this, even if just in a field that the user would select and copy, or past into to load.

4. Since rotation is defined as 360 for a complete rotation, the editor could change all values above 360 or bellow -360 to fit in that range. basically devide the number by 360 and take the remainder. for example 4234 would become 274 (4234=274 + 11*360)

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: Dialogue Editor in Windows

Post by rudel_ic » Fri Apr 23, 2010 2:26 am

I've compiled Wine on Mac OS X 10.6.3 and ran Dedit.exe with it. Works just fine:

Image

Again, great stuff, Smok!

Edit: Compiled via MacPorts, btw: http://www.macports.org/

User avatar
Johannes
Posts: 1374
Joined: Thu Dec 18, 2008 1:26 am
Contact:

Re: Dialogue Editor in Windows

Post by Johannes » Fri Apr 23, 2010 6:26 pm

Yeah, I've managed that over crossover too =)

ReluctatNinja
Posts: 5
Joined: Thu Jun 21, 2012 6:05 am

Re: Dialogue Editor in Windows

Post by ReluctatNinja » Fri Jun 22, 2012 9:00 am

How do you make there be multiple people talking?

User avatar
Count Roland
Posts: 2936
Joined: Tue Sep 25, 2007 11:15 pm
Location: Galapagos Islands, rodeoin some turtles.
Contact:

Re: Dialogue Editor in Windows

Post by Count Roland » Sat Jun 23, 2012 3:44 am

change the name and camera position/angle?

Post Reply