Jibble

Author Topic: TOOL: Dialog Designer - Version 1.3.0 (2017-05-24) - Direct Editor Export  (Read 28346 times)

SpeechCenter

  • Posts: 147
Re: TOOL: Dialog Designer - Version 1.2 (2011-01-22)
« Reply #40 on: 07 Apr 2012, 16:44 »
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.

AJA

  • Posts: 817
    • AJA worked on a game that was nominated for an AGS Award!
Re: TOOL: Dialog Designer - Version 1.2 (2011-01-22)
« Reply #41 on: 07 Apr 2012, 19:09 »
Yeah, sounds like a Dialog Designer plugin is not going to happen until the API supports this properly.

But thanks for the info! :)

Monsieur OUXX

  • Posts: 3,553
  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
Re: TOOL: Dialog Designer - Version 1.2 (2011-01-22)
« Reply #42 on: 23 Apr 2013, 10:27 »
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.
« Last Edit: 23 Apr 2013, 10:44 by Monsieur OUXX »
 

Monsieur OUXX

  • Posts: 3,553
  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
Re: TOOL: Dialog Designer - Version 1.2 (2011-01-22)
« Reply #43 on: 23 Apr 2013, 14:10 »
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?
« Last Edit: 23 Apr 2013, 16:02 by Monsieur OUXX »
 

AJA

  • Posts: 817
    • AJA worked on a game that was nominated for an AGS Award!
Re: TOOL: Dialog Designer - Version 1.2 (2011-01-22)
« Reply #44 on: 23 Apr 2013, 17:48 »
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:

Monsieur OUXX

  • Posts: 3,553
  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
Re: TOOL: Dialog Designer - Version 1.2 (2011-01-22)
« Reply #45 on: 23 Apr 2013, 20:05 »
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.
 

declerfayt

  • Posts: 33
Re: TOOL: Dialog Designer - Version 1.2 (2011-01-22)
« Reply #46 on: 30 Dec 2014, 21:47 »
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!
Lancelot's Hangover : A whole life to find the Holy Grail. One alcohol night to lose it.

Play free beta // Video trailer // Website

AJA

  • Posts: 817
    • AJA worked on a game that was nominated for an AGS Award!
Re: TOOL: Dialog Designer - Version 1.2.1 (2015-01-03)
« Reply #47 on: 03 Jan 2015, 22:30 »
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

Changes since v1.2
  • Added drag & drop support for opening dialog files.
  • Fixed random crash on startup on Windows 8 (64-bit only?) platform.
  • Fixed ArgumentOutOfRangeException crash when loading MRU list on startup. (Pirate pm'd me about this issue way back in 2013.)
  • FIX REMOVED: The original v1.2 had the following fix which I haven't reimplemented since I have no idea what the problem originally was: Fixed errors in custom dialog line conversion (in both the settings window and the actual conversion).
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. :)

CaptainD

  • Posts: 4,743
    • I can help with play testing
    • I can help with story design
    • I can help with voice acting
    • CaptainD worked on a game that won an AGS Award!
    •  
    • CaptainD worked on a game that was nominated for an AGS Award!
Re: TOOL: Dialog Designer - Version 1.2.1 (2015-01-03)
« Reply #48 on: 03 Jan 2015, 22:46 »
Awesome AJA, thanks!

Calin Leafshade

  • Posts: 3,514
  • Long live King Cat!
    • I can help with making music
    • I can help with voice acting
    • Calin Leafshade worked on a game that won an AGS Award!
    •  
    • Calin Leafshade worked on a game that was nominated for an AGS Award!
Re: TOOL: Dialog Designer - Version 1.2.1 (2015-01-03)
« Reply #49 on: 03 Jan 2015, 23:18 »
Is the source on github or anything? Maybe some of us could contribute.

AJA

  • Posts: 817
    • AJA worked on a game that was nominated for an AGS Award!
Re: TOOL: Dialog Designer - Version 1.2.1 (2015-01-03)
« Reply #50 on: 04 Jan 2015, 01:49 »
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.)

monkey0506

  • Posts: 7,031
  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
Re: TOOL: Dialog Designer - Version 1.2.1 (2015-01-03)
« Reply #51 on: 05 Jan 2015, 05:11 »
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...

Since July 2013 there has been the IRePopulatableComponent interface 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 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: C#
  1. public class DialogDesignerComponent : IEditorComponent
  2. {
  3.     private const string DialogsComponentID = "Dialogs"; // AGS.Editor.ComponentIDs.Dialogs
  4.     private IAGSEditor _editor;
  5.     private IRePopulatableComponent _dialogs;
  6.  
  7.     public DialogDesignerComponent(IAGSEditor editor)
  8.     {
  9.         _editor = editor;
  10.         // ...
  11.     }
  12.  
  13.     internal IRePopulatableComponent DialogsComponent
  14.     {
  15.         get
  16.         {
  17.             if (_dialogs == null)
  18.             {
  19.                 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
  20.                 {
  21.                     // NOTE: using
  22.                     //     foreach (IRePopulatableComponent component in _editor.Components)
  23.                     // will compile, but will throw an InvalidCastException, you have to do it this way instead
  24.                     if (component.ComponentID != DialogsComponentID) continue; // make sure we have a matching component ID
  25.                     _dialogs = (component as IRePopulatableComponent);
  26.                     if (_dialogs != null) break; // and a matching interface, then we're done
  27.                 }
  28.             }
  29.             return _dialogs;
  30.         }
  31.     }
  32.  
  33.     internal void RefreshProjectTree()
  34.     {
  35.         DialogsComponent.RePopulateTreeView();
  36.     }
  37.  
  38.     internal void RefreshProjectTree(string selectedNode)
  39.     {
  40.         DialogsComponent.RePopulateTreeView(selectedNode);
  41.     }
  42. }

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).



Not sure if I messed with all the correct switches to make it public: https://bitbucket.org/AJA/dialogdesigner

Yes, I can see it. ;)

...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.
« Last Edit: 05 Jan 2015, 05:14 by monkey_05_06 »

AJA

  • Posts: 817
    • AJA worked on a game that was nominated for an AGS Award!
Re: TOOL: Dialog Designer - Version 1.2.1 (2015-01-03)
« Reply #52 on: 05 Jan 2015, 13:51 »
Quote
Since July 2013 there has been the IRePopulatableComponent interface 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]


Quote
You 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.
« Last Edit: 05 Jan 2015, 16:42 by AJA »

AJA

  • Posts: 817
    • AJA worked on a game that was nominated for an AGS Award!
Re: TOOL: Dialog Designer - Version 1.2.1 (2015-01-03)
« Reply #53 on: 06 Jan 2015, 13:56 »
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.
« Last Edit: 06 Jan 2015, 14:00 by AJA »

monkey0506

  • Posts: 7,031
  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
Re: TOOL: Dialog Designer - Version 1.2.1 (2015-01-03)
« Reply #54 on: 09 Jan 2015, 02:01 »
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.

I submitted a fix to the plugin API 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).

AJA

  • Posts: 817
    • AJA worked on a game that was nominated for an AGS Award!
Re: TOOL: Dialog Designer - Version 1.2.1 (2015-01-03)
« Reply #55 on: 09 Jan 2015, 05:55 »
Awesome, thanks!

daniel

  • Posts: 49
Re: TOOL: Dialog Designer - Version 1.2.1 (2015-01-03)
« Reply #56 on: 24 May 2017, 08:04 »
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.

AJA

  • Posts: 817
    • AJA worked on a game that was nominated for an AGS Award!
Re: TOOL: Dialog Designer - Version 1.3.0 (2017-05-24)
« Reply #57 on: 24 May 2017, 17:05 »
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!

Changes:
* Added an AGS Editor plugin that simplifies editing and exporting changes to your project.

daniel

  • Posts: 49
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:)
« Last Edit: 25 May 2017, 15:29 by daniel »

Cassiebsg

  • Cavefish
  • Posts: 5,013
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on a game that was nominated for an AGS Award!
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.  ???
There are those who believe that life here began out there...