Description

Conedit is the conversation editor for Deus Ex. Its logic is very akin to assembler. Lacking a better option this is the tool you'll have to use to make changes or create translations. I'm sorry.

Preview
ConEdit
Post comment Comments
rikhanz
rikhanz - - 11 comments

Oh, hello there poo emoji!

Reply Good karma Bad karma+1 vote
KillerBeer
KillerBeer - - 16 comments

Hi, I'd like to clarify some points about .con file binary format, and I thought that you're the likeliest person to have answers I seek.

In the main file header, after the list of missions the file applies to, but before the list of actors involved, there's an integer with value I can't figure what it's for.

Straight before the list of conversations, there are two integers; one is apparently the amount of conversations in the list, but the second may or may not be equal to it. Does the second number have any importance and are there any integrity checks that it might be a part of?

In the Event header, between the Event type and label fields, there are two integers; one seems to be the index of the Event in an array, and the other *usually* is the former+1, but not always. What is it needed for?

(in fact, do Event indexes *ever* matter? Let's assume, hypothetically, that in a particular .con file events in a conversation were not sorted by the index: will it cause a crash in the game? Will entries appear in their physical order, or in a sorted order?)

In the Choice event, after the label and before the ClearScreen flag, there's another integer of uncertain purpose.

I'm writing an utility to implement exporting and importing data from .con files; it started simply as a slightly more rich text exporter than ConEdit itself would provide, and at that point I could simply ignore all those, but now that it supports exporting to XML *and* importing data back to .con, I feel I must be aware of all possible underwater stones that this data format has.

Thanks in advance.

Reply Good karma Bad karma+1 vote
Maiden_China Author
Maiden_China - - 10 comments

> In the main file header, after the list of missions the file applies to, but before the list of actors involved, there's an integer with value I can't figure what it's for.

I haven't gone indepth into the binary.

> Straight before the list of conversations, there are two integers; one is apparently the amount of conversations in the list, but the second may or may not be equal to it. Does the second number have any importance and are there any integrity checks that it might be a part of?

There aren't. It might be a problem with ConEdit or the decompiler (DEED) that created this mismatch, but you can create conversation trees quite freely with ConEdit. Apparently, only the first integer counts.

> In the Event header, between the Event type and label fields, there are two integers; one seems to be the index of the Event in an array, and the other *usually* is the former+1, but not always. What is it needed for?

Those are jumps. You can jump to any particular point in the conversation tree (or, if I recall correctly, other conversation trees), but unless specified otherwise it will default to moving to the next line.

> (in fact, do Event indexes *ever* matter? Let's assume, hypothetically, that in a particular .con file events in a conversation were not sorted by the index: will it cause a crash in the game? Will entries appear in their physical order, or in a sorted order?)

Conversations and events are ORDERED, and I cannot stress this enough. Near an actor, the game engine will try loading the first conversation belonging to it every 50ms (if I recall correctly). If it succeeds it will try loading the first event in it. If it fails the checks, it will try loading the next conversation in the tree, etc., etc. - and afterwards will try using a bark. In the default ConSys, barks aren't checked for flags.
The same goes for indices. As far as I know, if it doesn't know where to start, it will simply softlock. Moreover, using ConEdit, I had no way of directly altering the order of conversations - and they sorted themselves alphanumerically. So conversation A will try loading before B, and it's very important to keep it tidy - if you don't you'll have to check for numerous flags that might have impact on performance that's negligible, but is impact none-the-less.

> In the Choice event, after the label and before the ClearScreen flag, there's another integer of uncertain purpose.

This is probably the "Default" fallback index. In "Give" events, it is probably the "Failure" fallback (only used inventively in Mission1_Infolink, to check if using GMDX or vanilla).

> I'm writing an utility to implement exporting and importing data from .con files; it started simply as a slightly more rich text exporter than ConEdit itself would provide, and at that point I could simply ignore all those, but now that it supports exporting to XML *and* importing data back to .con, I feel I must be aware of all possible underwater stones that this data format has.

You might wanna talk to Hawkbird or Bjorn, both of them of Caustic Creative (the Deus Ex: Revision team) and are far more knowledgeable than me on anything related to how the files are actually built. In fact, if I recall correctly, they made a fixed ConSys a long long while ago that did allow barks to check flags, but at this point I've already made a hacky workaround for ConFix (split the offending barks into two types, and mods can enable some lines that don't make sense early game through the guidelines in AIBarks).
If possible, the vanilla text files export/import and compilation should also be targeted. They contain numerous typos and some formatting/continuity inconsistencies, and could be fixed as well.

Reply Good karma+1 vote
KillerBeer
KillerBeer - - 16 comments

> Those are jumps. You can jump to any particular point in the conversation tree (or, if I recall correctly, other conversation trees), but unless specified otherwise it will default to moving to the next line.

Not sure I understood you properly. I know there are Jump type events that allow you to jump to any *labeled* event in any conversation. What I'm talking about, though, are two 4-byte integers present in the header of *every* event. One of them follows the [0..N-1] incrementing pattern everywhere I saw it, but another follows [1..N] pattern *not* always - particularly not after adding or deleting events in a conversation with ConEdit. I was recently told that the game simply ignores them - which, if true, would be a great relief to me for a certain reason. Do you imply that they can be used for another kind of jumping between entries?

Thanks for your answer. I clears a lot of points.

Reply Good karma Bad karma+1 vote
Maiden_China Author
Maiden_China - - 10 comments

It's possible that ConSys will ignore that integer, but how I understand it - it points to which event should follow the current one. By default it's the next on the list, so i+1 - but it doesn't have to be, and can instead be any event in the conversation.

I'm pretty certain I didn't use it myself and made jumps explicit events, to make the code more readable and resemble ASM. If it doesn't work in ConSys, then I simply dodged a bullet when deciding on a coding style.

Reply Good karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account:

Tags

ConEdit has not been tagged yet.