Adventure Game Studio

AGS Support => Modules, Plugins & Tools => Topic started by: AJA on Sun 13/12/2009 00:17:02

Title: TOOL: Dialog Designer - Version 1.3.0 (2017-05-24) - Direct Editor Export
Post by: AJA on Sun 13/12/2009 00:17:02
Hello, everyone!

I'd like to present to all of you a very special Christmassy utility that I mostly made in August, then forgot about it, and now finally finished for release. It's called...

Dialog Designer

Dialog Designer is a utility to help design and write dialog scripts. It contains many useful features that make the process easier and faster. Also, since it's a separate utility, it allows you to collaborate between other writers without needing to use AGS and still being able to preview the dialogs and see if they even work like they're supposed to.

(http://koti.mbnet.fi/dima/dialogdesigner/screen.png)




I can already write dialogs with AGS. Why should I use this?

Well, in addition to the points I made earlier, you've probably sometimes been frustrated when you've had to add new dialog options to your dialog, and you have to go through a big hassle if you want to place them somewhere else than the bottom of the list. Those days are over now! With Dialog Designer you can add options anywhere you want and you can organize them into a tree that clearly shows the structure of your dialog.

Even better, you can move and delete options, and Dialog Designer keeps track of all the references made to any options. Let's say you have two options and in the first one you turn on the second one (option-on 2). Now, if you move the second one above the first one, the reference is automatically changed (option-on 1). I bet you can already see the time saved flashing before your eyes. If, on the other hand, it's your life flashing, I really can't help you with that.

There's also a bunch of custom script commands that work as shortcuts to a bigger bunch of AGS script commands.


How exactly is this going to make collaboration on writing scripts easier?

By allowing you to preview the dialog directly in Dialog Designer! In order to support more complex stuff, you can also define variables and use them in your dialog with custom script commands. The dialogs are saved into basic XML files and can be shared easily.


XML files? How am I supposed to get them into AGS?

That's easy! To setup the included AGS Editor plugin, you need to do the following:

1. Copy AGS.Plugin.DialogDesigner.dll to your AGS directory.
2. Run AGS, open your project.
3. Double click Dialog Designer node in the project explorer tree.
4. Select Dialog Designer.exe.

Then you can start writing dialogs and exporting them directly to AGS:

5. Write your dialog.
6. File -> Export to AGS -> Settings -> Set the dialog name.
7. Make sure AGS is open and your project is loaded.
8. In Dialog Designer, select File -> Export to AGS -> AGS Plugin (or Ctrl+E)
9. Switch to AGS, there should be a pop-up saying the dialog was imported successfully. You should see the dialog in your tree view.
10. To edit a dialog that you've already imported, open the dialog in AGS and double click on Dialog Designer in the project explorer tree.

You can also export the dialog in two other ways, either only the script into a text file or the entire dialog directly into your AGS project. If you choose to export into a text file, you will have to manually create or modify the dialog options in AGS. This step can be eliminated by exporting directly into your AGS project file. You can choose to create a new dialog or replace an existing one if you're only doing an update.


I'm still not convinced.

Then I guess you can f*ck off. Seriously though, what more do you need? Oh, maybe the ability to convert normal dialog speech lines to some other format, like Character.Say calls, during export? That's very much possible with Dialog Designer.




Features
Okay, now that we're done with the marketing speech, let's recap the main features:

- Dialog options are organized in a treeview that clearly shows the structure of the dialog
- Syntax highlighted dialog script editor
- Dialog preview
- Basic AGS dialog script commands work in the preview: option-on, option-off, option-off-forever
- Additional script commands that make writing scripts even easier
- Automatic dialog option reference management
- Variables and showing dialog options automatically if a specified condition is true
- Exports AGS compatible dialog scripts. If conditions or other advanced functionality is used, the minimum required AGS version is 3.1.1.
- Dialog speech line conversion




Known issues

- File -> Export to AGS -> Project does NOT work with AGS 3.4 due to changes in the project file structure. Please use the editor plugin instead.





If you're ready to give it a go, make sure you have the required .NET Framework 2.0 (http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en) installed.

>> Download Dialog Designer << (http://www.serpentpictures.net/dialogdesigner/DialogDesigner_1.3.0.zip) New version 1.3.0!

Change log available here: http://www.serpentpictures.net/dialogdesigner/ (http://www.serpentpictures.net/dialogdesigner/)




Feel free to post if you have any problems, comments, suggestions or bug reports!
I wish you all a very productive Christmas or any other holiday that may or may not be happening in the near future!
Title: Re: TOOL: Dialog Designer
Post by: monkey0506 on Sun 13/12/2009 00:37:56
My only question would be, why a separate tool and not an editor plugin?
Title: Re: TOOL: Dialog Designer
Post by: AJA on Sun 13/12/2009 00:42:25
So you don't need AGS. Plus I don't think it's possible to do this without changes to the plugin api. At least I wasn't able to find a way to update the project tree, and the dialogs seemed to be cached somewhere rather than read from the project structure every time.
Title: Re: TOOL: Dialog Designer
Post by: hedgefield on Sun 13/12/2009 13:59:30
This is amazing, thanks so much!
Title: Re: TOOL: Dialog Designer
Post by: monkey0506 on Sun 13/12/2009 15:12:52
Quote from: AJA on Sun 13/12/2009 00:42:25So you don't need AGS.

I guess that's a fair reason to keep it available as standalone program. :P

Quote from: AJA on Sun 13/12/2009 00:42:25Plus I don't think it's possible to do this without changes to the plugin api. At least I wasn't able to find a way to update the project tree, and the dialogs seemed to be cached somewhere rather than read from the project structure every time.

I don't know what you mean by "update the project tree" exactly. You mean that once dialogs have been added/removed AGS doesn't reflect that? Coz I know you can create both parent and child nodes using the existing API functions. As for the dialogs being cached, I don't know about that, but I'm sure if you asked CJ he could probably implement a way to read them from the project instead of the cache.

In any case, nice tool. How does it work with, for example, the new ability to do normal scripting in dialogs? Does it allow that? Obviously I wouldn't expect it to try and compile it or anything, but just curious whether it detects it as AGS script or gets confused what you're doing.

Also regarding the conditions, how does that work? Does it allow the condition to be based on AGS script such as player.HasInventory(iKey) or does it create variables for its own conditions? Again I wouldn't expect it to verify the authenticity of AGS script, just wondering on that....
Title: Re: TOOL: Dialog Designer
Post by: AJA on Sun 13/12/2009 17:05:23
Quote from: monkey_05_06 on Sun 13/12/2009 15:12:52
I don't know what you mean by "update the project tree" exactly. You mean that once dialogs have been added/removed AGS doesn't reflect that?

Yes, that's the problem.

QuoteAs for the dialogs being cached, I don't know about that, but I'm sure if you asked CJ he could probably implement a way to read them from the project instead of the cache.

Well, maybe he'll read this thread. :P I don't really want to bother him with this. Not yet anyway.


QuoteIn any case, nice tool. How does it work with, for example, the new ability to do normal scripting in dialogs? Does it allow that? Obviously I wouldn't expect it to try and compile it or anything, but just curious whether it detects it as AGS script or gets confused what you're doing.

Normal scripting is highlighted in the script editor in italics and won't be run during preview. So no problem using normal scripting.


QuoteAlso regarding the conditions, how does that work? Does it allow the condition to be based on AGS script such as player.HasInventory(iKey) or does it create variables for its own conditions? Again I wouldn't expect it to verify the authenticity of AGS script, just wondering on that....

If you want to use them in the preview, you can create a variable named "player.HasInventory(iKey)" and assign a value to it in the variables window. For now variables can only be integers, at least for the preview to work. Then you can modify its value with custom script commands and use it in dialogs. If you don't create the variable, then... the preview will apparently crash. Heh. I'll get that fixed. Anyway, those custom script commands will be converted to AGS if-statements (etc.) when you export the script.

For example, you have dialog option A and it has a child option B. B is set to be shown if a condition is true: "player.HasInventory(iKey)". This won't actually work in the preview, since it's a boolean value and not an integer, but it should be converted just fine during export. When that dialog is exported the condition is converted to these lines of script for dialog option A:

 if (player.HasInventory(iKey)) {
option-on 2
 }



I hope this clarifies some things. I'll get those "undefined variables" bugs fixed asap.
Title: Re: TOOL: Dialog Designer
Post by: monkey0506 on Sun 13/12/2009 18:04:41
Cool, though I'm still a bit confused regarding the conditions. You say the variables can only be integers, how do the conditions work? I would assume you would have implementations of the standard conditional operators (==, !=, >, >=, <, and <=) but then all of those evaluate as boolean and you said that "player.HasInventory(iKey)" wouldn't work in the preview "since it's a boolean and not an integer". How then are the conditions evaluated?

I actually would expect "player.HasInventory" to be ignored for the preview (unless as you say a variable as such was defined and given a value) and just treated as false (or 0 to be an integer). I'm not expecting your tool to implement full AGS scripting of course. :P So if it helps, I would expect it to just be ignored by the preview, but still implemented in AGS.
Title: Re: TOOL: Dialog Designer
Post by: AJA on Sun 13/12/2009 19:02:28
Okay, the undefined variables bug should now be fixed. I've uploaded a new version, see first post.


Quote from: monkey_05_06 on Sun 13/12/2009 18:04:41
Cool, though I'm still a bit confused regarding the conditions. You say the variables can only be integers, how do the conditions work? I would assume you would have implementations of the standard conditional operators (==, !=, >, >=, <, and <=) but then all of those evaluate as boolean and you said that "player.HasInventory(iKey)" wouldn't work in the preview "since it's a boolean and not an integer". How then are the conditions evaluated?

Sorry, I should have been a bit more specific: the current condition parser doesn't recognize boolean literals, only integers. Every variable name is replaced with its value, resulting in something like: "1 == 0 || 2 < 3", which the parser can handle. "0 || 2 < 3" or "false || 2 < 3" doesn't work. Of course an easy way to include boolean literal support is to actually replace those variables with "1==1" for true and "1==0" for false. This might be implemented in a later version.

QuoteI actually would expect "player.HasInventory" to be ignored for the preview (unless as you say a variable as such was defined and given a value) and just treated as false (or 0 to be an integer). I'm not expecting your tool to implement full AGS scripting of course. :P So if it helps, I would expect it to just be ignored by the preview, but still implemented in AGS.

If the preview is allowed to ignore it, you can just write it as normal AGS script (obviously, this doesn't work with "show on condition" but the whole point of that is to affect the preview):

 if ( player.HasInventory(iKey) )
   doSomethingNasty();

instead of the custom command for defined variables:

#if ( player.InventoryQuantity[iKey.ID] > 0 ) { blah; }

Plus this one works only with dialog script commands. It's there for the ability to control the flow of the dialog based on variables and nothing else.

-edit-
On second thought, I'll probably make it so that if any invalid conditions or undefined variables are found during preview, errors will be shown for the user only after the preview has ended. I think that's the easiest way to let you ignore them and still give the necessary feedback in case they were actual mistakes.
Title: Re: TOOL: Dialog Designer - Version 1.0.1 (2009-12-13)
Post by: hedgefield on Fri 18/12/2009 23:16:04
Hey AJA, I've been using your DiDes for a bit now, and I quite like it indeed! Just a few qualms I've found while using it:

- Clicking directly on the dialog option in the tree does not let me edit it, only double-clicking in the text field does? And that only works if the text field is empty?

- There's nowhere to set if a dialog option should be spoken or not. I use that distinction quite a lot for my dialogs.

- A minor thing, but, I use the hack of adding a blank dialog option at the end to force dialogs to always show the option selection GUI always, even if there is only one option. But in AGS this option would not be visible if you leave it blank, but here it is (and selectable).
Title: Re: TOOL: Dialog Designer - Version 1.0.1 (2009-12-13)
Post by: AJA on Sat 19/12/2009 07:01:42
Thanks, I'm glad you find it useful! :)

Quote
- Clicking directly on the dialog option in the tree does not let me edit it, only double-clicking in the text field does? And that only works if the text field is empty?

Huh? Works fine for me. When a dialog option is selected in the tree and you click on it and wait a bit it goes into edit mode. F2 does the same.


Quote
- There's nowhere to set if a dialog option should be spoken or not. I use that distinction quite a lot for my dialogs.

I never use that feature so that's why I didn't include it. But yeah, I can add it if you need it. I figured it would be used mostly out of laziness to type the line twice, so that's why you can right click on the script and automatically copy the first line of dialog to the option text to keep it easily up to date. I don't think that's even mentioned in the help file... lousy documentation, I admit.


Quote
- A minor thing, but, I use the hack of adding a blank dialog option at the end to force dialogs to always show the option selection GUI always, even if there is only one option. But in AGS this option would not be visible if you leave it blank, but here it is (and selectable).

Oh, I wasn't aware of this hack. I'll change this behavior to match AGS in the next version. Also, I think I probably should have a "game.show_single_dialog_option" checkbox somewhere.


I'm not promising anything but I'll probably have enough free time early next week to get a new version released.
Title: Re: TOOL: Dialog Designer - Version 1.0.1 (2009-12-13)
Post by: hedgefield on Sat 19/12/2009 14:07:37
Oh cool, thanks for the info :)

I was gonna try out your suggestions, but I can't seem to be able to open the editor anymore. It throws some System.AccessViolationException error about trying to read or write protected memory?
Title: Re: TOOL: Dialog Designer - Version 1.0.1 (2009-12-13)
Post by: AJA on Sat 19/12/2009 15:15:52
Yay, that's the same error my friend got on Windows 7. I guess I'll have to investigate this further.
Title: Re: TOOL: Dialog Designer - Version 1.0.1 (2009-12-13)
Post by: hedgefield on Sat 19/12/2009 15:57:40
Allright, I'll PM you the error report. I'm on Vista btw.
Title: Re: TOOL: Dialog Designer - Version 1.0.1 (2009-12-13)
Post by: AJA on Mon 21/12/2009 13:05:47
Thanks for the report! As I'd thought, it's apparently a problem with WinAPI calls, so I guess I'm going to have to do some extra work to eliminate the need for those.
Title: Re: TOOL: Dialog Designer - Version 1.0.2 (2010-01-06)
Post by: AJA on Wed 06/01/2010 15:34:34
Okay, I've uploaded a new version that might fix the crash (check the first post). I haven't been able to test it myself since it's always worked for me. Try it out and see if it works now.
Title: Re: TOOL: Dialog Designer - Version 1.0.1 (2009-12-13)
Post by: hedgefield on Thu 07/01/2010 19:03:40
Cheers, works fine now!

And yeah so does:
QuoteWhen a dialog option is selected in the tree and you click on it and wait a bit it goes into edit mode. F2 does the same.
Title: Re: TOOL: Dialog Designer - Version 1.1 (2010-01-09)
Post by: AJA on Sat 09/01/2010 15:33:11
Yay, I'm glad it works!

New version is up with some of the suggestions implemented: "say" checkbox if you want the option title spoken automatically, condition/variable errors during preview are now only warnings, boolean variables are now supported. Also, script editor undo/redo functionality has been added, it may or may not work as expected. :P I've encountered some very minor glitches only.

Thanks for all your enthusiasm, largopredator! Especially since you're currently the only user I'm aware of. Actually, I'm secretly happy this hasn't got any more attention than it has, since that usually means less bug reports and less work for me. :) On the other hand, it's a bit puzzling since the internal dialog editor drives me nuts. Anyway, the point of this rant is, if you haven't tried it yet, give it a go and see for yourself how much easier it'll make your life*.

*) Doesn't make your actual life easier, just the dialog writing aspect of it.
Title: Re: TOOL: Dialog Designer - Version 1.1 (2010-01-09)
Post by: Ketskari on Sat 09/01/2010 16:26:36
largopredator isn't the only one; I love the Dialog Designer. :) And I definitely appreciate the undo/redo function. Thanks for the great tool!
Title: Re: TOOL: Dialog Designer - Version 1.1 (2010-01-09)
Post by: Kweepa on Sat 09/01/2010 19:41:57
Yes, thanks, this is very cool.
I haven't used it in earnest yet but when I need to write some dialogs I'll be booting this up!
Title: Re: TOOL: Dialog Designer - Version 1.1 (2010-01-09)
Post by: AJA on Sun 10/01/2010 13:41:38
I'm happy to hear you like it! :)
Title: Re: TOOL: Dialog Designer - Version 1.1 (2010-01-09)
Post by: zabnat on Tue 12/01/2010 18:03:22
Quote from: AJA on Sun 13/12/2009 00:17:02
Oh, maybe the ability to convert normal dialog speech lines to some other format, like Character.Say calls, during export? That's very much possible with Dialog Designer.
Oh why oh why didn't I find this thread earlier. I just converted all the lines from dialog editor to Character.Say calls in dialog_request.
And on this topic. What about the ability to still use dialog designer after they are converted this way?
Title: Re: TOOL: Dialog Designer - Version 1.1 (2010-01-09)
Post by: AJA on Tue 12/01/2010 19:20:29
You mean you want to use Character.Say calls in a dialog and have those lines appear in the preview? In that case, I suppose Display calls should be supported as well. I'll think about it.
Title: Re: TOOL: Dialog Designer - Version 1.1 (2010-01-09)
Post by: zabnat on Wed 13/01/2010 14:58:45
What about custom calls. I have a custom speaking function (that's why I had to convert dialogs to function calls).
Title: Re: TOOL: Dialog Designer - Version 1.1 (2010-01-09)
Post by: AJA on Wed 13/01/2010 15:24:26
That's kind of why there's the ability to convert the lines for export. For example, if you want different lines to be spoken with a different speaking animation you could do this:

1. Create your speech function: Character.SayStyle( string text, SpeechStyle style )

2. Include the style in your dialog lines, for example:
ego-eSpeechHappy: I'm happy!
ego-eSpeechSad: Well, not that happy.


3. Write the line conversion regular expressions: (these might be buggy)
Search pattern:
(?<name>[^:-]+)-(?<style>[^:]*):\s*(?<line>.+)

Replacement pattern:
 c${name}.SayStyle("${line}", ${style});


Now, the lines will be converted automatically to:


 cEgo.SayStyle("I'm happy!", eSpeechHappy);
 cEgo.SayStyle("Well, not that happy.", eSpeechSad);



I don't think it's really worth the extra work to have the ability to define your own custom speaking functions just to support them in the preview, which is exactly why I added the conversion feature. Actually, I don't think it's documented in the help file but the conversion only works if the line format is: "[text]:[more text]".
Title: Re: TOOL: Dialog Designer - Version 1.1 (2010-01-09)
Post by: Tanique on Fri 15/01/2010 03:36:38
Just wanted to say THANK YOU!  This is a great little piece of software and makes dialog writing so much easier.  Keep up the good work!
Title: Re: TOOL: Dialog Designer - Version 1.1 (2010-01-09)
Post by: AJA on Mon 18/01/2010 19:56:27
Thanks, I'm glad to hear that!
Title: Re: TOOL: Dialog Designer - Version 1.1.1 (2010-02-11)
Post by: AJA on Wed 10/02/2010 22:44:05
Ah, there's nothing like a cup of bugs in the evening.

I've uploaded a new version that fixes a couple of bugs I noticed a few hours ago. Download v1.1.1! (http://serpentpictures.net/dialogdesigner/DialogDesigner_1.1.1.zip)

Changes:
- Fixed crash with empty fields in the variable window.
- Fixed dialog option drag & drop: when dropping below the current place on the same level, the option was moved one place too far.
Title: Re: TOOL: Dialog Designer - Version 1.1.3 (2010-06-12)
Post by: AJA on Fri 11/06/2010 17:18:55
It's been almost exactly four months since the last update, and after a long hiatus I started working on a game project and discovered a bug, which is now fixed. I've been waiting for an excuse to bump this thread. :)

Here's the new version: Download v1.1.2! (http://www.serpentpictures.net/dialogdesigner/DialogDesigner_1.1.2.zip)

Changes:
- Fixed crash when the same variable was used multiple times in a condition.

-Edit-

Another one! Download v1.1.3! (http://www.serpentpictures.net/dialogdesigner/DialogDesigner_1.1.3.zip)

Changes:
- Fixed isOff being exported to "equals eOptionOff" instead of "not eOptionOn".
Title: Re: TOOL: Dialog Designer - Version 1.1.3 (2010-06-12)
Post by: RedTalon on Mon 14/06/2010 16:53:40
Thanks AJA, this is a great program.
Title: Re: TOOL: Dialog Designer - Version 1.1.3 (2010-06-12)
Post by: AJA on Sat 31/07/2010 20:45:06
Happy to hear that, RedTalon!

Bug report: It's possible to move a dialog option above or below the "Start" node, which results in an error. Avoid doing that. I'll get it fixed when I can... unless I forget.
Title: Re: TOOL: Dialog Designer - Version 1.1.4 (2010-09-07)
Post by: AJA on Tue 07/09/2010 12:45:26
Apparently I forgot. But it's fixed now!

Download v1.1.4! (http://www.serpentpictures.net/dialogdesigner/DialogDesigner_1.1.4.zip)
Title: Re: TOOL: Dialog Designer - Version 1.1.4 (2010-09-07)
Post by: Wersus on Sat 22/01/2011 15:23:41
Are you still working on this? I'm using a custom say function, so this seems like something that I should be using, but I do have a few suggestions:

- Add settings so that the defaul option-off after every line can be turned off (I want to turn off options quite rarely, so it kinda sucks)
- Add an option to include the dialog option texts on to the script side. For example I want the character to say the options, but as I'm using a custom Say() function, I have to copy-paste these by hand.

Otherwise seems like a really neat program, so thanks :)
Title: Re: TOOL: Dialog Designer - Version 1.1.4 (2010-09-07)
Post by: AJA on Sat 22/01/2011 15:55:06
Thanks!

I haven't worked on this for a while since it already did all I needed it to do and was stable enough. And also because not many people seemed to be very interested in it.

Quote from: Wersus on Sat 22/01/2011 15:23:41
- Add settings so that the defaul option-off after every line can be turned off (I want to turn off options quite rarely, so it kinda sucks)

Sure.

Quote
- Add an option to include the dialog option texts on to the script side. For example I want the character to say the options, but as I'm using a custom Say() function, I have to copy-paste these by hand.

This functionality actually exists already but it's quite limited. You can set the option text to be the first line of dialogue (in format character: woot!) by right clicking the script and selecting "Replace title with first line". I'll change it so that the first line can be either anything-here: line or whatever..."line"...and no more quotes after this. Then it should work in most cases.

I have some free time right now, so I'll see if I can fix these pronto.
Title: Re: TOOL: Dialog Designer - Version 1.1.4 (2010-09-07)
Post by: AJA on Sat 22/01/2011 17:09:41
Done. Automatic option-off can be turned off in the export settings window. Give it a go and do tell if something's not working as it's supposed to.

Download v1.2! (http://serpentpictures.net/dialogdesigner/DialogDesigner_1.2.zip)
Title: Re: TOOL: Dialog Designer - Version 1.1.4 (2010-09-07)
Post by: Wersus on Sat 22/01/2011 17:46:00
Quote from: AJA on Sat 22/01/2011 17:09:41Give it a go...

Yeah, seems to be working nicely. Thanks  :)
Title: Re: TOOL: Dialog Designer - Version 1.2 (2011-01-22)
Post by: TheMagician on Sun 25/03/2012 22:56:37
A year has passed since the last post in this topic so I'm not sure if AJA is still around and able to update this.

First of all I have to say that I really like the program. It has lots of useful functions and will definitely make dialog scripting much easier.
However, whenever I export a dialog to AGS the program tells me that it has not been tested with this version of AGS (3.2.1).
The imported dialogs work as I would expect. Still, is there any risk of breaking my game using the dialog editor?

Secondly, is there a way to import a dialog while AGS is running? As far as I can tell you always have to close AGS, then import the dialog, then open AGS again to see the dialog. Are there any other dialog editors that have been fully integrated into AGS' user interface?

Thanks a lot for your work AJA.  :)
Title: Re: TOOL: Dialog Designer - Version 1.2 (2011-01-22)
Post by: AJA on Mon 26/03/2012 22:29:26
Wow. Someone's using this. Thanks, I'm glad you find it useful! :D

QuoteStill, is there any risk of breaking my game using the dialog editor?
QuoteSecondly, is there a way to import a dialog while AGS is running?

I haven't come across any problems so far but it's a possibility. I don't think there's any problem using it with AGS 3.2.1. The export to AGS function just modifies the Game.agf xml file and adds/replaces dialogs. And if I remember correctly, it makes a backup so if anything goes wrong, no permanent harm is done. That's also why you can't currently export while AGS is running.

QuoteAre there any other dialog editors that have been fully integrated into AGS' user interface?

As I've mentioned earlier in this thread, part of the reason why there's no editor plugin version of this is that AGS editor plugins can't modify dialog scripts. At least I found no way of doing that. Now that the editor is open source, it would be possible to change this but I guess the powers that be must first organize the open source AGS project somehow. :P So yeah, I don't think there are any dialog editor plugins out there yet.

If you find any problems or have ideas for improvement, I'd be happy to see what I can do when I have some time to spare. Though I am a bit afraid of seeing how big of a mess the source code is. :)
Title: Re: TOOL: Dialog Designer - Version 1.2 (2011-01-22)
Post by: TheMagician on Wed 28/03/2012 01:33:04
Thanks a lot for your reply and for the information. Nice to see that you're still around  :)

Right now, I'm perfectly happy with how the dialog editor works. So far there have been no errors in the imported dialogs so perhaps you can get around and just release a version which doesn't give the warning on export for AGS 3.2.1 but then again that's not really worth the trouble.
Title: Re: TOOL: Dialog Designer - Version 1.2 (2011-01-22)
Post by: SpeechCenter on Sat 07/04/2012 16:01:14
Quote from: AJA on Mon 26/03/2012 22:29:26
QuoteAre there any other dialog editors that have been fully integrated into AGS' user interface?

As I've mentioned earlier in this thread, part of the reason why there's no editor plugin version of this is that AGS editor plugins can't modify dialog scripts. At least I found no way of doing that. Now that the editor is open source, it would be possible to change this but I guess the powers that be must first organize the open source AGS project somehow. :P So yeah, I don't think there are any dialog editor plugins out there yet.
You probably tried to change Dialog.Text which is read only.
Dialog.script is editable and changes the dialog (just tried it).
Title: Re: TOOL: Dialog Designer - Version 1.2 (2011-01-22)
Post by: AJA on Sat 07/04/2012 16:11:56
Another problem was (I was trying to make an importer plugin) that I couldn't add dialogs and update the project tree. The new dialogs weren't even saved with the game. Do you know if this also was because of my stupidity?
Title: Re: TOOL: Dialog Designer - Version 1.2 (2011-01-22)
Post by: SpeechCenter on Sat 07/04/2012 16:44:06
I haven't seen any evidence of your stupidity, only the contrary.

Adding a dialog to the internal list should work, I think you need to take care of the ID and name, but it's not difficult. So it should at the very least save your data.

The tree is trickier, I believe each component updates this manually, so I don't think there is an official way to do this. You can try to force a refresh, maybe by creating an event that this component would respond to or hack the tree and add a node, but you'll need to do this exactly the same way the dialog component does and update your plugin if they change it. So for this part it's far from perfect.

Another possible problem may be if the dialog is being edited by the user, you can either tell the user to make sure dialogs are not opened or maybe the same refresh method for the tree can cover this one.
Title: Re: TOOL: Dialog Designer - Version 1.2 (2011-01-22)
Post by: AJA on Sat 07/04/2012 19:09:15
Yeah, sounds like a Dialog Designer plugin is not going to happen until the API supports this properly.

But thanks for the info! :)
Title: Re: TOOL: Dialog Designer - Version 1.2 (2011-01-22)
Post by: Monsieur OUXX on Tue 23/04/2013 10:27:25
Hey I'm reviving this topic, because firstly this is a great tool that ought to be known by every AGS user.
And also because I have a question :
At the moment, the tool silently adds an "option-off" after each branch of dialog, to disable them as they're used.
Is there a way to disable that? At the moment this is a blocking issue for using the tool.
EDIT: I didn't notice that the settings were hidden under the "export" submenu. SOLVED.
Title: Re: TOOL: Dialog Designer - Version 1.2 (2011-01-22)
Post by: Monsieur OUXX on Tue 23/04/2013 14:10:19
There's something I don't understand in the tool.

If I understand properly, in AGS, the way to make branched dialogs would be as follows:
- you create a "parent" dialog
- you create a "child" dialog
- Then when the wanted dialog option is chosen in the parent dialog, a call to "goto-dialog" calls the child dialog.
- When the child dialog is finished, you can call "goto-previous" to go back to the parent dialog.

That means, in regular AGS, you need two different dialogs (the parent and the child).

However in Dialog Editor there is this system of children nodes. Therefore I assumed that the children dialogs would be "embedded" in the parent dialog, and that the "goto-dialog" and "goto-previous" calls would be automated.

But it's not the case: When the player clicks on the dialog option that triggers the child dialog/node, then the child dialog options appear, but the parent's dialog options don't disappear: They are also still displayed in the available options. I see all the options from both the parent node and the child node.
What am I doing wrong?
Title: Re: TOOL: Dialog Designer - Version 1.2 (2011-01-22)
Post by: AJA on Tue 23/04/2013 17:48:29
Yes, that's how it currently works. The usefulness of child options comes from having them automatically appear when the parent option has been selected. In order to turn them into child dialogs the system would have to generate some kind of logic for remembering which parent level options were visible when the user moved into the child dialog. Or create multiple dialogs altogether and use AGS's built-in system like you described.

There is a way, sort of, to do what you want. If you put in the parent level option the command #siblings-off, it will show its child options but hide the rest. If there was a #parent-siblings-on command you could use that to return back to the parent level options provided that you hide already selected options with #off-forever. However, there's no such command currently.

Also, I may have lost the source code to this a couple of weeks ago when my hd crashed. :undecided:
Title: Re: TOOL: Dialog Designer - Version 1.2 (2011-01-22)
Post by: Monsieur OUXX on Tue 23/04/2013 20:05:41
Quote from: AJA on Tue 23/04/2013 17:48:29
I may have lost the source code to this a couple of weeks ago when my hd crashed. :undecided:

That's tragic  :( I was already dreaming of adding some labels for the dialog options, and managing the goto-previous automatically  :~(

Thanks for the help, though! The tool is really really useful for swapping the order of the dialog options. That aspect of regular AGS is archaic.
Title: Re: TOOL: Dialog Designer - Version 1.2 (2011-01-22)
Post by: declerfayt on Tue 30/12/2014 21:47:56
Wow! It's a very cool and handy tool! Thanks a lot AJA :)

That would be awesome to include it into AGS editor. The ability to move dialogs options at will within AGS itself would be a great feature!
Title: Re: TOOL: Dialog Designer - Version 1.2.1 (2015-01-03)
Post by: AJA on Sat 03/01/2015 22:30:48
Good news, everybody! ...Erm, anybody?

I found the source code for Dialog Designer 1.1.3 completely by accident, so I decided to take some time to save this turd in some version control system and try to recreate the fixes and features implemented in versions 1.1.4 and 1.2. So, here we go, the first update in almost four years...

Download v1.2.1 (http://www.serpentpictures.net/dialogdesigner/DialogDesigner_1.2.1.zip)

Changes since v1.2
Also updated the website stub to include the complete changelog: http://www.serpentpictures.net/dialogdesigner/

This release also means that if you guys encounter any issues or have feature requests, just let me know and I'll see if I have some time to work on them at some point. :)
Title: Re: TOOL: Dialog Designer - Version 1.2.1 (2015-01-03)
Post by: CaptainD on Sat 03/01/2015 22:46:22
Awesome AJA, thanks!
Title: Re: TOOL: Dialog Designer - Version 1.2.1 (2015-01-03)
Post by: Calin Leafshade on Sat 03/01/2015 23:18:21
Is the source on github or anything? Maybe some of us could contribute.
Title: Re: TOOL: Dialog Designer - Version 1.2.1 (2015-01-03)
Post by: AJA on Sun 04/01/2015 01:49:00
Not sure if I messed with all the correct switches to make it public: https://bitbucket.org/AJA/dialogdesigner

If you feel brave, try out the 1.3-scripting branch that allows you to write simple Lua scripts to make converting dialog lines more flexible. (If you don't have or don't use git, go to https://bitbucket.org/AJA/dialogdesigner/downloads and download the zip; up-to-date binaries are included in the bin\Release directory.)
Title: Re: TOOL: Dialog Designer - Version 1.2.1 (2015-01-03)
Post by: monkey0506 on Mon 05/01/2015 05:11:48
Quote from: SpeechCenter on Sat 07/04/2012 16:44:06The tree is trickier, I believe each component updates this manually, so I don't think there is an official way to do this. You can try to force a refresh...

Since July 2013 there has been the IRePopulatableComponent interface (https://github.com/adventuregamestudio/ags/blob/master/Editor/AGS.Types/Interfaces/IRePopulatableComponent.cs) which is implemented by editor components which can have their child nodes repopulated (e.g., the DialogsComponent). They are not currently exposed, but the IDs for the built-in components (https://github.com/adventuregamestudio/ags/blob/master/Editor/AGS.Editor/Components/ComponentIDs.cs) are constant and should not ever change, so it's safe to use them directly in your plugin. Together with the IAGSEditor.Components property, you could do something like this:

Code (csharp) Select
public class DialogDesignerComponent : IEditorComponent
{
    private const string DialogsComponentID = "Dialogs"; // AGS.Editor.ComponentIDs.Dialogs
    private IAGSEditor _editor;
    private IRePopulatableComponent _dialogs;

    public DialogDesignerComponent(IAGSEditor editor)
    {
        _editor = editor;
        // ...
    }

    internal IRePopulatableComponent DialogsComponent
    {
        get
        {
            if (_dialogs == null)
            {
                foreach (IEditorComponent component in _editor.Components) // the editor stores these by the base interface, so the very first time we'll need to look up the component
                {
                    // NOTE: using
                    //     foreach (IRePopulatableComponent component in _editor.Components)
                    // will compile, but will throw an InvalidCastException, you have to do it this way instead
                    if (component.ComponentID != DialogsComponentID) continue; // make sure we have a matching component ID
                    _dialogs = (component as IRePopulatableComponent);
                    if (_dialogs != null) break; // and a matching interface, then we're done
                }
            }
            return _dialogs;
        }
    }

    internal void RefreshProjectTree()
    {
        DialogsComponent.RePopulateTreeView();
    }

    internal void RefreshProjectTree(string selectedNode)
    {
        DialogsComponent.RePopulateTreeView(selectedNode);
    }
}


This will force the Dialogs branch to update safely. Note that it will also collapse any folders, so you shouldn't call it unless you are actually adding/removing items. There might be some way to expand the folders from plugins, but I haven't looked into that (yet).




Quote from: AJA on Sun 04/01/2015 01:49:00Not sure if I messed with all the correct switches to make it public: https://bitbucket.org/AJA/dialogdesigner

Yes, I can see it. ;)

Quote from: AJA on Sun 04/01/2015 01:49:00...up-to-date binaries are included in the bin\Release directory.)

You shouldn't put the compiled binaries into the repository -- you should actually add the bin folder to your .gitignore file and upload the binaries separately. BitBucket actually has a "Downloads" page for each repo specifically for hosting these binaries. I had to learn all this the hard way, but if you put the binaries into source control then it keeps every build you commit, bloating the overall size of your repo when other people want to clone it. Instead, keep the source and compiled binaries separate so that cloning the repo is relatively small. Once cloned, anyone can revert their local copy and rebuild or choose to download your prebuilt binaries for older versions.
Title: Re: TOOL: Dialog Designer - Version 1.2.1 (2015-01-03)
Post by: AJA on Mon 05/01/2015 13:51:17
QuoteSince July 2013 there has been the IRePopulatableComponent interface (https://github.com/adventuregamestudio/ags/blob/master/Editor/AGS.Types/Interfaces/IRePopulatableComponent.cs) which is implemented by editor components which can have their child nodes repopulated (e.g., the DialogsComponent). [...]
Cool. Might have to take a look at some point to see how much work integrating it with AGS will be.

[edit]Well, seems to be working fine with AGS 3.3.3! Just needs some ui for defining the name of the dialog and it's pretty much ready for testing. Pretty good for three hours' work.[/edit]


QuoteYou shouldn't put the compiled binaries into the repository [...]
Yeah, you really shouldn't. Imagine the fun times I had committing ~1GB (uncompressed) binaries of Barely Floating a couple of years back. :)

Anyway, I put them there for convenience reasons since it was a private repo. But since it's not anymore, I figured out some way to automatically upload the binaries to bitbucket whenever I push my changes to the server. Seems to be working ok, unfortunately it doesn't overwrite the old files and I gave up trying to get my script for deleting the old ones working (stupid bitbucket doesn't have a rest api for downloads :(). Anyway, 1.3 branch no longer contains the binaries.
Title: Re: TOOL: Dialog Designer - Version 1.2.1 (2015-01-03)
Post by: AJA on Tue 06/01/2015 13:56:25
If anyone's feeling adventurous, here is some sort of a plugin implementation, ready for testing. Documentation hasn't been updated. Requires AGS 3.3.
https://bitbucket.org/AJA/dialogdesigner/downloads/release-1.3-plugin.zip

Backup, backup, backup to be sure you don't break your valuable game. :)

And here's how you use it, roughly:
1. Copy AGS.Plugin.DialogDesigner.dll to your AGS directory.
2. Run AGS, open your project.
3. Double click Dialog Designer node in the project explorer tree.
4. Select Dialog Designer.exe.
5. Write your dialog.
6. File -> Export to AGS -> Settings -> Set the dialog name. (In this version, all these settings are dialog file specific!)
7. Make sure AGS is open and your project is loaded.
8. In Dialog Designer, select File -> Export to AGS -> AGS Plugin (or Ctrl+E)
9. Switch to AGS, there should be a pop-up saying the dialog was imported successfully. You should see the dialog in your tree view, and hopefully it will work.
10. To edit a dialog that you've already imported, open the dialog in AGS and double click on Dialog Designer in the project explorer tree.

Known issues:
- If you re-export a dialog that is already open in AGS (but is not the current active editor pane), the ui is not updated. Instead you need to close and reopen the dialog pane. I didn't find a way to fix this with the current editor plugin API since it has no way of accessing all the open editor panes. The active editor pane (if it's the dialog you're re-exporting) should be correctly updated.
Title: Re: TOOL: Dialog Designer - Version 1.2.1 (2015-01-03)
Post by: monkey0506 on Fri 09/01/2015 02:01:30
Quote from: AJA on Tue 06/01/2015 13:56:25Known issues:
- If you re-export a dialog that is already open in AGS (but is not the current active editor pane), the ui is not updated. Instead you need to close and reopen the dialog pane. I didn't find a way to fix this with the current editor plugin API since it has no way of accessing all the open editor panes. The active editor pane (if it's the dialog you're re-exporting) should be correctly updated.

I submitted a fix to the plugin API (https://github.com/adventuregamestudio/ags/pull/225) for this. It was fixed after the AGS 3.4.0.3 alpha, but anything from AGS 3.4.0.4 (doesn't exist as of this writing, but that should be the next build number) or higher should allow you to access IGUIController.Panes, a read-only list of the currently open panes (as ContentDocuments).
Title: Re: TOOL: Dialog Designer - Version 1.2.1 (2015-01-03)
Post by: AJA on Fri 09/01/2015 05:55:06
Awesome, thanks!
Title: Re: TOOL: Dialog Designer - Version 1.2.1 (2015-01-03)
Post by: daniel on Wed 24/05/2017 08:04:18
hey there,

i realize this thread is very old...but i didn't find any newer threads about this tool and it seems very useful.
is this still being developed? or are there any alternatives?
the reason i'm asking is because i can't seem to import the dialogs created with this directly into my project file.

it says it exported successfully but the dialog doesn't appear in my project tree. did anybody get this to work with the latest AGS?

i realize i can import the dialog manually but it would be nice to be able to tweak the dialog inside this tool and then quickly update it in AGS.
Title: Re: TOOL: Dialog Designer - Version 1.3.0 (2017-05-24)
Post by: AJA on Wed 24/05/2017 17:05:03
Did you try the version with editor plugin support, a couple of posts above?

Anyway, I found a couple of crashes from the plugin export when I tried it now. Should be working now, and since no one has mentioned any issues with the earlier plugin version (or no one tried it), I'm bravely assuming this is good enough for a release. So, without further ado:

Download 1.3.0! (http://www.serpentpictures.net/dialogdesigner/DialogDesigner_1.3.0.zip)

Changes:
* Added an AGS Editor plugin that simplifies editing and exporting changes to your project.
Title: Re: TOOL: Dialog Designer - Version 1.3.0 (2017-05-24) - Direct Editor Export
Post by: daniel on Wed 24/05/2017 19:06:56
thanks aja i'll give it a shot:)

quick update:
works like a charm aja. such a great tool! :)
this is gonna save a lot of time! thank you very much!

p.s. what would be even more awesome is if you could make changes to the dialog in AGS and those changes would carry over to the dialog designer:)
Title: Re: TOOL: Dialog Designer - Version 1.3.0 (2017-05-24) - Direct Editor Export
Post by: Cassiebsg on Thu 25/05/2017 10:45:49
Geez... 2009? How did I not saw this? I've been wanting something like this since I made my first dialogues and realized I can't re-order them without major work...

Or better yet, how come this isn't distributed with official AGS release? Maybe as a "essential tools pack" or something.  ???
Title: Re: TOOL: Dialog Designer - Version 1.3.0 (2017-05-24) - Direct Editor Export
Post by: Snarky on Thu 25/05/2017 11:21:40
Agree, that would be great! But in that case I think it should be open-sourced.
Title: Re: TOOL: Dialog Designer - Version 1.3.0 (2017-05-24) - Direct Editor Export
Post by: LostTrainDude on Tue 30/05/2017 14:47:31
Not sure why I'm getting this error whenever I try to open the help file (both from the plugin and from the actual folder where the executable is)

(http://i.imgur.com/8GpisAz.png?1)
Title: Re: TOOL: Dialog Designer - Version 1.3.0 (2017-05-24) - Direct Editor Export
Post by: Crimson Wizard on Tue 30/05/2017 15:23:59
Quote from: LostTrainDude on Tue 30/05/2017 14:47:31
Not sure why I'm getting this error whenever I try to open the help file (both from the plugin and from the actual folder where the executable is)

Try doing following:
1) Find the help file where you installed the tool (should be called Something.chm).
2) Open file properties. Find "Unblock" command. Depending on version of Windows its location may be different, but I think it's usually on the first tab, near access settings.
Title: Re: TOOL: Dialog Designer - Version 1.3.0 (2017-05-24) - Direct Editor Export
Post by: LostTrainDude on Thu 01/06/2017 11:56:35
I may just be super-blind but I can't seem to find an "Unblock".

I checked the help file from a previous version of the plugin (which works, btw) and the only difference I could spot was in the Details\Attributes.
The previous one had "AI" and the new one had just "A".

A quick search for the ATTRIB command turned this up
Quote-I Not content indexed file attribute.

So I just unchecked that accordingly but still doesn't work.

All the other options and permissions are the same and I should have Administrator rights, anyway.
Title: Re: TOOL: Dialog Designer - Version 1.3.0 (2017-05-24) - Direct Editor Export
Post by: eri0o on Wed 19/07/2017 01:34:11
Hey, is there plans to open source this tool or integrate it into AGS itself? I really want to use it but I don't want to risk having no compatibility with future AGS releases.
Title: Re: TOOL: Dialog Designer - Version 1.3.0 (2017-05-24) - Direct Editor Export
Post by: AJA on Wed 19/07/2017 09:27:07
At least the source should be accessible here: https://bitbucket.org/AJA/dialogdesigner but no work has actually gone into cleaning it up for public consumption, so expect comments written in Finnish. :P

The editor plugin included in the 1.3 release is probably as close to AGS integration as I'll get. Unless someone else feels the need to do it.
Title: Re: TOOL: Dialog Designer - Version 1.3.0 (2017-05-24) - Direct Editor Export
Post by: horusr on Wed 19/07/2017 09:40:01
Should we enable the plugin(putting .dll file to ags directory) to export to project?
It doesn't seems to work on AGS 3.4
Title: Re: TOOL: Dialog Designer - Version 1.3.0 (2017-05-24) - Direct Editor Export
Post by: AJA on Wed 19/07/2017 09:55:43
Did you follow the instructions from the first post? Should work fine in 3.4.0 (I've tested it with 3.4.0.16), unless of course you've managed to discover a bug.

Quote1. Copy AGS.Plugin.DialogDesigner.dll to your AGS directory.
2. Run AGS, open your project.
3. Double click Dialog Designer node in the project explorer tree.
4. Select Dialog Designer.exe.

Then you can start writing dialogs and exporting them directly to AGS:

5. Write your dialog.
6. File -> Export to AGS -> Settings -> Set the dialog name.
7. Make sure AGS is open and your project is loaded.
8. In Dialog Designer, select File -> Export to AGS -> AGS Plugin (or Ctrl+E)
9. Switch to AGS, there should be a pop-up saying the dialog was imported successfully. You should see the dialog in your tree view.
10. To edit a dialog that you've already imported, open the dialog in AGS and double click on Dialog Designer in the project explorer tree.
Title: Re: TOOL: Dialog Designer - Version 1.3.0 (2017-05-24) - Direct Editor Export
Post by: horusr on Wed 19/07/2017 10:07:51
I didn't copy DLL file to AGS because just I have tool, my partner in making game doesn't have it(we had problem with note plugin before).
So I tried to export to project option instead of export to plugin but didn't work.
Title: Re: TOOL: Dialog Designer - Version 1.3.0 (2017-05-24) - Direct Editor Export
Post by: AJA on Wed 19/07/2017 10:31:58
Ah, true, looks like the project file structure has changed enough to break that. I'd recommend using the plugin for exporting, if it works for you, since the old method is more of a hack.
Title: Re: TOOL: Dialog Designer - Version 1.3.0 (2017-05-24) - Direct Editor Export
Post by: fernewelten on Wed 12/05/2021 18:04:43
Alas! DialogDesigner doesn't seem to integrate into AGS 3.5.0 Build 3.5.0.30.

What a pity!
Title: Re: TOOL: Dialog Designer - Version 1.3.0 (2017-05-24) - Direct Editor Export
Post by: Crimson Wizard on Wed 12/05/2021 18:15:45
There was some problem with SpeechCenter recently, which was resolved for SC. IIRC some rules for loading .NET assemblies have changed.
Title: Re: TOOL: Dialog Designer - Version 1.3.0 (2017-05-24) - Direct Editor Export
Post by: Potajito on Thu 13/05/2021 08:38:06
Quote from: fernewelten on Wed 12/05/2021 18:04:43
Alas! DialogDesigner doesn't seem to integrate into AGS 3.5.0 Build 3.5.0.30.

  • I followed instructions for a 3.4.1 installation and started that up: The project tree featured a "Dialog Designer" entry. I double-clicked it, and got a popup asking for the location of the Dialog Designer executable. So the installation seems to work in 3.4.1.
  • I repeated the instructions in a 3.5.0 installation and started that up: The "Dialog Designer" entry did not appear in the project tree.

What a pity!
That's weird... I'm using it with no problems on AGS 3.6. On a site note, it would be nice to see this integrated and maintained as part of AGS.
Title: Re: TOOL: Dialog Designer - Version 1.3.0 (2017-05-24) - Direct Editor Export
Post by: fernewelten on Thu 13/05/2021 12:28:24
Cosmic rays?

When I got to my computer this morning and opened my current project, suddenly the Dialog Editor appeared in the Project Explorer menu. I gave the dialog editor a quick test and it seems to work.

I don't remember doing anything different as compared to yesterday, but perhaps I did.  ???  Or else, perhaps Windows decided yesterday night to install some updates and do a reboot and that fixed the hiccup. ???

So whatever had been the problem, as of now I'm fine!  ;-D

I'll report if I find out what happened exactly.
Title: Re: TOOL: Dialog Designer - Version 1.3.0 (2017-05-24) - Direct Editor Export
Post by: Crimson Wizard on Mon 21/06/2021 14:33:29
I may have found a bug in this plugin.

fernewelten reported (https://github.com/adventuregamestudio/ags/issues/1327) a crash happening when editor is closed before opening any game. The crash occurs in the plugin's EditorShutdown method.


EditorShutdown method:
https://bitbucket.org/AJA/dialogdesigner/src/f14d442fc8901d89bd8e3ce06a1049eb30ac8bc1/AGS.Plugin.DialogDesigner/EditorComponent.cs#lines-230
calls _communicator.Stop:
https://bitbucket.org/AJA/dialogdesigner/src/f14d442fc8901d89bd8e3ce06a1049eb30ac8bc1/AGS.Plugin.DialogDesigner/DialogDesignerCommunication.cs#lines-34
In this method the thread is joined (`_listeningThread.Join();`)
But this thread object is created not in constructor, but in Start method above. And Start seem to be called in RefreshDataFromGame callback.
https://bitbucket.org/AJA/dialogdesigner/src/f14d442fc8901d89bd8e3ce06a1049eb30ac8bc1/AGS.Plugin.DialogDesigner/EditorComponent.cs#lines-198

Because RefreshDataFromGame is not called until game is loaded, the thread object was not created when Stop is called from the early Shutdown, and "Object reference not set to an instance of an object" may be thrown.