TOOL: Dialog editor v3.1e

Started by ca0mgr, Mon 29/03/2004 22:48:45

Previous topic - Next topic

ca0mgr

I'm a noob and like ags. But I find the dialogue interface a little confusing to use. So, if I have CJ's permission and the .dlg file format to export/import from, I'd like to write a utility to facilitate the dialogue's creation.

Thanks,
Matt

Ishmael

QuoteI find the dialogue interface a little confusing to use

I don't get this... how could you make the dialog writing easier with another program..?  ???
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

ca0mgr

...in the same way you can make walkable areas and such with another program. I could write a utility that allows you to visually link topics together easily, modify dialog, save, load and such.

Then you could load them into their respective slots by "replace from file...", although having a "load complete dialog" option which loads topics and their contents directly would help no end. Then you could write all the dialog topics with this third party tool and import them, much like a character or scene. Trouble is, there is only a "replace from file..." for single topics.

strazer

Sounds like a good idea actually.
If I'm not mistaken, Chris has something similar on his to-do list already. "Outsourcing" it, so to speak, would lighten his workload.
On the other hand, adding new features can be part of the fun in coding...

But yeah, a visual interface would be nice!

Ishmael

Oh, sorry I now see what you mean...

What I'v been importing/exporting dialogs, aren't all topics exported as that one file? Or has this been changed? Or has it been diffrent already?
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

ca0mgr

No, I'm sorry, you're corrent TK, it exports all topics. I missed that. Seems it'd be quite easy to import then entire thing, now if only I had the file format.

a-v-o

In theory DLLs can also be used to add functionality to the editor not only to games. This feature isn't used and there weren't any plans to use it, so that the interface is quite rudimentary. Maybe CJ can give more access to the game source in the editor, so that plugin-DLLs can add functionality to the editor.

This way script editors can be integrated as DLLs or dialog editors, sound and music managers, mask drawing tools and much more.

Just a thought.

Pumaman

Unfortunately there are a couple of reasons I don't want to give out the current .dlg format.

However, I'd be happy to change the export file format in the next version to something simpler, and document it.

The other option is as a-v-o says, if you're interested in writing an editor plugin to edit the dialogs, I'd be happy to expand the plugin API to allow you to do so.

Hollister Man

I think this would be quite useful.  RickJ and I discussed playing with the Scintilla engine to add functionality to the scripting engine, but I think this kind of "plugin" is already supported.  I can see a LOT of functionality coming from this.  

As it is, I can't imagine how CJ keeps up with everything

Allan
That's like looking through a microscope at a bacterial culture and seeing a THOUSAND DANCING HAMSTERS!

Your whole planet is gonna blow up!  Your whole DAMN planet...

ca0mgr

Further to this, I made this to help me with my game. It makes it easier for me to visualise the choices and their links.

http://3030deathwar.co.uk/editor.zip

Hope someone else finds it useful.

ThunderStorm

Wow, this is really useful - good work! If you don't mind, I'd really love to use this for my game project.

One question, though: would it be possible to add the ability of deleting dialogue choices? As far as I can see, there's currently no way of getting rid of them if you accidently clicked "new".

ca0mgr

Ok, there's a new version here:

www.3030deathwar.co.uk/editor1.4d.zip

that includes a delete function. It may or may not work very well.
Matt

strazer

Wow, excellent!

I haven't scripted any serious dialog for my game yet and looking at the sample of yours and re-reading the help file made me realize I misunderstood the way it's supposed to be done.
I would have made a topic for every list of choices, for every "column" so to speak (like in your editor) and jumped from topic to topic via goto-dialog and goto-previous.

Now considering ALL options for a whole dialog are supposed to be contained in one in one topic, this editor is even more helpful than I first thought!
It definitely has to be included in the resources section once the new website design is up.

Some C&C:

- The first thing I've tried is resizing the window. It should be possible, especially for larger topics.
- How about a proper toolbar? I'm used to loading and saving files with the simple push of a button.
- You can't cancel the test window with the little X.
- I suggest changing "Prev" to "Script" or similar. The difference between "Test" and "Prev" wasn't clear to me at first. Also, "Prev" could be mistaken for "Previous".
- Copy & Paste from the lower window would be nice. Also, it would give you an excuse to add an "Edit" menu. Seems so empty up there... :)
- Most importantly: A fancy icon!!1 ;)

It's really great. Thank you & keep it up!

Rui 'Trovatore' Pires

Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

ca0mgr

New version up. I skipper a version just like the good folk at nullsoft. version 3 includes:

* resizable window
* delete button
* toolbar
* closable test window with X
* change in button naming
* copy/paste/cut/single step undo with Ctrl+z
* no fancy icon.

hope someone finds it useful.

www.3030deathwar.co.uk/editor3.zip

Matt

strazer

Are you kidding? You bet this is helpful!

More C&C:

- How about grouping the different buttons in the toolbar with seperators?
new,open,save | cut,copy,paste | script,test ?
- In options it says "Test Dialogue" but the button tooltip reads "Preview"
- The icon for "View Script" seems to have a slightly different background color
- A right-click context menu for copy, paste etc.?
- Remember last window size/position (but please no registry entries)
- Display shortcut keys in menu?
- I think the "Test Dialogue" button should be a simple "play" button:

Sorry to keep nagging, the prog is awesome!

auhsor

Pretty cool program. I can see its potential. Iwill probably use it when I get around to making a game.

Some things:
*The top window is fairly long. It should start without you being able to scroll.
*Also, when you get right down the bottom adding new item (yeah i was only testing it) it doesnt let you scroll more.
*as strazer said, right clicking on dialogues
*and i had something else... oh well it'll come back.

Keep up the good work

Ben

I'll find this very useful- thanks :D

The only suggestion I have is to make the font in the Test Dialog screen bigger. That Sierra font is really hard to read on a high-resolution screen. Maybe you could have an option to select a font?

ca0mgr

#18
Thanks for all the replies. There's a new version up here: www.3030deathwar.co.uk/editor3.zip

new version:
* Added highlighting of option-on/option-off in script panel (options->highlight).
* allowed change of font for tester (options->select test font) (bold/underline/italic does not work)

* save/load last position/size.
* Added "involved characters". options->involved characters.
* This scans all dialogue and presents all the characters involved.
* Word wrapping enabled in the tester.

The file format won't change anymore. Has anyone done any example dialogue?

Matt

Pumaman

Excellent work :)

If you have no objections, I'd like to link it on the AGS Resources page.

ca0mgr

#20
no objections, thanks very much.

new version:
www.3030deathwar.co.uk/editor3.zip (3.0f)

************************
* Added a snazzy icon.
* Added instructions in the preview script file for integrating with AGS.
* Added commandline parameters.

Matt

auhsor

#21
Looking better. Another thing,  when you quit, it doesnt ask you if you want to save.

Duzz

This is incredibly useful, and is very easy to get into as well, I've made a couple of dialogs in half the time it'd normally have taken me.

A suggestion: With the option-off and option-on, it often takes me a few tries to get the right option number when I've got quite a few in the dialog.  Do you think it could be possible to have it so that after typing 'option-off ' you can click the option you'd like to turn off, and it will insert the number. (And the same thing for 'option-on')

Or if that's too hard to implement, you could display the number of the option next to the name in the chart to make it easier.

cheers,
Duzz

Powerhoof - My new indie games company! | Wintermute Studios - My older AGS games: The Historical League of Bouncy Boxing, Grr! Bearly Sane,  Duzz Quest...

ca0mgr

As per, it's at the same link:
www.3030deathwar.co.uk/editor3.zip

* Right click on choices (see readme)
* Wider choices include ID number
* Mouse over shows whole text
* Asks before quits
* ID number is always visible to the left of the choice text.

Matt

ca0mgr

#24
If anyone's interested I also wrote this to help remember numbers in AGS. I have trouble remembering certain numbers associated with inventory, topics, scenes, etc, so this helps me.

It's designed to sit on the right hand side when editing in AGS,

It also features a handy, but rudamentary room viewer so you can see mouse coordinates quickly without having to load a room up.

[edit: It's all in one package now, sorry for the increase in file size. you can get both programs from: www.3030deathwar.co.uk/editor3.zip ]

Matt

Scorpiorus

Really nice work with the dialog editor :)

Rui 'Trovatore' Pires

I told you I'dd add it to my site, right? I'd rather wait until you get a definite, final version. ;D So let us know when it's ready, or if that package is the last (until, of course, you get some new ideas ;) ) "installment".
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

ThunderStorm

Wohoo - my name's in the credits?!

One more thing: I might have skipped a version, since they are released that frequently, but last time I checked, right-clicking on an option inserts on "option-off" command into the script, which can easily mess things up if you click on it accidently. I'd prefer having a context menu that lets me choose between 'option-off' and 'option-on'.

This thing is getting better and better. Keep it up!

Hollister Man

Maybe I missed something. It can't import DLG files, and the native DG files can't be exporetd to AGS?  Is the only point to be organized?  Perhaps if nothing else, CJ could work out an import option for your file format?

Not that he doesn't have anything bettr to do, but I hate being organized if it doesn't save me time as well. :)
That's like looking through a microscope at a bacterial culture and seeing a THOUSAND DANCING HAMSTERS!

Your whole planet is gonna blow up!  Your whole DAMN planet...

Ben

I second a  way to import the dialogs. That would make the whole process even more streamlined and user-friendly. Can you use AGS's DLG format instead of your own?

Scorpiorus

#30
The latest beta includes a documented  exported dialog file format. :)

http://www.adventuregamestudio.co.uk/yabb/index.php?board=2;action=display;threadid=12051

[EDIT]
ops, the DOC dir does not come along with betas...

Hollister Man

I SWEAR I read that post five minutes ago, but I guess I missed that line. *sheepish grin*

I *will* prolly use this after all!  (Now if Rick will help with the custom scripting interface. :D)
That's like looking through a microscope at a bacterial culture and seeing a THOUSAND DANCING HAMSTERS!

Your whole planet is gonna blow up!  Your whole DAMN planet...

Pumaman

Heh oops, here's the file format doc snippet. It's enough info for you to read the dialog files with, but writing them back out currently requires them to be compiled to bytecode first - I'll see what I can do about that.

Code: ags

The AGS Editor Exported Dialog file format (.DLG) for v2.61 onwards is as follows:
offset  size    description
+00h  10 BYTEs  string "AGSDialg2\0" -- identifies this as a dialog file
+0Ah     DWORD  file version -- must be 2. If it's not 2, this file spec does not apply
+0Eh     DWORD  number of dialog script messages
+12h     DWORD  number of dialog topics
+16h   n BYTEs  for each dialog topic, this struct is written:
  struct DialogTopic {
    char          optionNames[30][150];
    DWORD         optionFlags[30];    // 1 = "Show",  4 = NOT "Say"
    DWORD         hasCompiledScript;
    WORD          entryPoints[30];
    WORD          startupEntryPoint;
    WORD          codeSize;
    DWORD         numOptions;
    DWORD         topicFlags;
  };
Then for each dialog topic,
  n BYTEs   If "hasCompiledScript" is non-zero then "codeSize" bytes
            of compiled bytecode follows
    DWORD   size of dialog script
  n BYTEs   dialog script source code
Then for each dialog script message (see offset 0Eh for count)
  n BYTEs   null-terminated string, with dialog script messages

DragonRose

Oooo... this looks really cool. My game's really dialog heavy, so I'm definetly grabbing this as soon as I get back to residence!
Sssshhhh!!! No sex please, we're British!!- Pumaman

ca0mgr

I've got the import working to some degree (it loads all the available choices in the first topic). Since the editor is currently stuck with one topic to play with, I'm thinking about adding multiple topics.

At the moment, to import dialogues created with the editor, I view the script file (F6) and follow the instructions there. But this becomes tiresome quickly if you have more than five choices to manually enter.

Perhaps a simple text format is needed for the import and export of dialogs fom AGS. This way people can write other editors, and dialogs can be copy and pasted on the forums. All that needs to be exported from any editor into AGS, I think, is the topics (number, script) and their choices (name & flags). The script can be compiled in AGS later, when imported.


redruM, the newest edition of the editor will always be at its current address: www.3030deathwar.co.uk/editor3.zip. Feel free to link to it there. One of these days I'll get around to doing up my website, but at the moment, I'm being extremely lazy.

ThunderStorm, if you right click on a choice, it turns itself off and its immediate children on. If you accidentally right click on a choice, you can always delete the script it just generated. But I'll look into a right click popup menu for options pertaining to choices.

Matt

Pumaman

Quote from: ca0mgr on Thu 15/04/2004 16:21:26
Perhaps a simple text format is needed for the import and export of dialogs fom AGS. This way people can write other editors, and dialogs can be copy and pasted on the forums. All that needs to be exported from any editor into AGS, I think, is the topics (number, script) and their choices (name & flags). The script can be compiled in AGS later, when imported.


Well, I'm planning on adding COM Automation support to the editor soon, so once that's done it should provide a much more friendly interface for utilities such as yours to modify the game structures.

ca0mgr

Ah, is there anywhere I can read up on COM Automation?

Pumaman

It's also known as ActiveX and OLE Automation, and is basically a common interface through which an application can expose functionality.

Whether it would be useful to you depends on what language your utility is written in?

ca0mgr

Sounds great. I look forward to using it. By the way, multi-topic version 3.1 is up at the usualy location: www.3030deathwar.co.uk/editor3.zip

Matt

ca0mgr

For anyone who is still interested, the editor is multi topic (or dialog) and allows you to use "goto-dialog x" in the script. This is visible in the tester/preview. There is also a built-in update mechanism.

You can see and download it here:
www.3030deathwar.co.uk/editor.htm

jannar85

Um, sorry if I seem dumb right now.. But how do I open the dialogues into this editor?
I don't really understand this program :P
Veteran, writer... with loads of unreleased games. Work in progress.

strazer

Hm, you've got a point.
Perhaps a more fitting name would be Dialog Creator since you create dialog scripts for AGS, not directly edit them.

jannar85

#42
Bug report:
Launch AGS, and we are asked to find its location, there's no turning back to the "editor", if we don't want to start ags. :P

Also, in the resource thingy.. It would be kind of nice to have more information about each of the stuff; so we don't need to go back to the Design Document to find it out. :)

** edit2 **
Also, it would be nice to have a picture of the characters or something as well, when we run the dialogue:)
Just another suggestion :)

** edit3 **
Something like this in the inventory;
Where to find it?
Where/How to use it?
Additional info

Then in the characters and so on, you can imagine what do add there :P

or something!


Thanks anyway.

** editx **
Also, in the Characters tab, would it be possible to add script names as well?
Like Peter = Ego, and so on?

also... something similar as this? ---> http://novelcode.com/
Just another... future suggested :P

Hoho :P

Also.. (sorry for the suggestions)
Why can't the dialogue "editor" save the resource thingy as well?
It's a bit irritating, since it's all within the same project :)

Aaand... in the characters tab, it would be nice to have each color pre-defined, and then the dialogue "editor" grabs whatever color used.

Aaaand.... (last thing) Make an option for the "editor", to display the topics as well, before continuing.
Like something like this, that doesn't require a response:

Let me guess...
new topic: You are my father...?!
new topic: You noticed me stealing yesterday?


and so on... let the dialogue run (inside the editor), with commands, like dialogue-off-forever 1, when that one has been run.

** edit xx**
Just realised that the "editor" doesn't work with commands like dialogue-off-forever 1 etc... :(
Veteran, writer... with loads of unreleased games. Work in progress.

jannar85

Veteran, writer... with loads of unreleased games. Work in progress.

ca0mgr

No, I'll just wait until COM support in AGS. I'll see what I can do then. Otherwise, this version is a great help in doing dialogue for my game, so I won't update it until then.

Thanks for the interest though.

Fjodor

Nothing new?   ;)

AGS supports COM now :)

ca0mgr

I've just about given up with VB. its syntax is horrible. Uch. help files... uch. File reading... ewwww. I've had a go, but given up. Could anyone else write an importer? I'd appreciate any help as, as you might have noticed, I'm crap with VB. Here is the *.dg file format as exported by my Dialogue Editor:

------------------------------------------------
file version (string)
number of topics (byte)
for i=1 to number_of_topics
     topic name (string) [only used with editor]
     'number_of_choices' this topic has (integer)

     for j=1 to 'number_of_choices'
          choice name (string)
          choice script (string)
          choice id (integer) [only used with editor]
          choice 'children' (integer) [only used with editor]
          choice visibility (byte)
     next

     // done seperately for linking purposes on load
     for j=1 to 'number_of_choices'
            for k=0 to 'children'
                   child id (integer) [only used with editor]
            next    
     next
next
------------------------------------------------

Dusk

Great work with the editor... thanks  :D
Trying it I've noticed a possible-bug.
Let's take as example the multi topic example.dg: if you add a phrase to say in the option 4, before the "goto-dialog 1", it won't be showed in the preview (or probably it is showed, but with no delay).  Nothing of really important, of course - in AGS the dialog will work perfectly - but it should be simple to fix, when you do the next release : )
Bye  ;)


Robert Eric

Are you using VB.Net?  The language is much better in VB.Net than the older Visual Basics.
Ã, Ã, 

MrColossal

Hope we aren't pestering you but i'd love to see this program up and running along side AGS

or integrated into ags
"This must be a good time to live in, since Eric bothers to stay here at all"-CJ also: ACHTUNG FRANZ!

ca0mgr

It's not that I don't want to create an importer for AGS, it's just I can't write VB code to do it. If someone could give me a hand, then AGS would be able to import the dg files created with the dialog editor. Anyone? email me on matthew.griffiths AT sunderland.ac.uk if you're any good at VB and we'll talk about getting it sorted.

Gregjazz

This dialog creation tool is awesome. I am using in Apprentice 2, and it is most helpful in the intricate dialog trees.

I don't really care about AGS integration -- it's fine the way it is right now for me.

One thing though: do you think you could implement the option-off-forever dialog function? I use it a LOT, and that way I'd be able to more accurately preview the dialogs.

ca0mgr

Done. You can update with the program or manually download from the usual place: www.3030deathwar.com/editor3.zip

SMF spam blocked by CleanTalk