Dialog file converter

Started by HeirOfNorton, Wed 19/01/2005 05:41:30

Previous topic - Next topic

HeirOfNorton

Hey folks. As my "teach yourself C++" project I'm working on a simple program to convert the exported .DLG files to something a little easier to manipulate and back again.. I'm leaning toward an XML file, currently, as there are several free- and shareware programs to edit XML files in a tree view. But I have a couple of questions...

First, for CJ:
When importing .DLG files, is it necesarry to have the compiled code included as well as the plain text source code, or will it still import successfully with only the text source? If the compiled code is necesarry, is there any way you could make the compiler available to me for the program? (I'd be satisfied with a binary I can call from my program, if you want to keep your source code private).

Also, what exactly ARE the entryPoints and topicFlags? I thought I knew what the entryPoints were, but when I read them from a .DLG file they didn't turn out that way, and all the topicFlags come out as nulls.

For everyone else:
For the XML files, would you prefer to have have the Option numbers/topic numbers/stuff like as entities (eg: <topic>1 <option><number>1</number> <text> Hi there!</text></option></topics>) or as attributes (eg: <topic number=1> <option number=1>Hi there! </option> </topic>? I prefer the latter, but I can go either way at this point, and I want it to be the easiest to work with for everyone.
Alternatively, if anyone doesn't like XML  :o, what file formats would you suggest?

HoN

strazer

You might be interested in this thread in the Technical Archive.

Pumaman

It should be fine importing without the compiled code. So long as you set "hasCompiledScript" to 0 for all the topics, the editor shouldn't have a problem.

EntryPoints are related to the compiled script and are therefore not relevant if you're just working with the source.

TopicFlags are currently mostly unused, except I think it's 1 if the "show text parser in this dialog" box is checked.

HeirOfNorton

[qoute] It should be fine importing without the compiled code.
Quote

Neat, that'll make things MUCH easier.

QuoteYou might be interested in this thread in the Technical Archive.

Yeah, I'd looked at that editor before. My main desire with my little program (besides to teach myself C++) is specifically to be able to export AGS dialogs to an easy to edit format, and import them back in. Currently,  co0mgr's editor doesn't allow easy import/export. I will look at converting to his format with my program, though, couse it is a neat editor, espcially for anyone who doesn't want to bother with XML.

HoN

strazer

XML is fine with me, I like working with text files directly.

I'd prefer
  <topic number=1><option number=1>Hi there!</option></topic>
as well.

SMF spam blocked by CleanTalk