Dungeon Keeper Text Editor (DKText32)

By James "Quasar" Haley -- haleyjd@hotmail.com

This program is distributed under the GNU General Public License. See the file
"COPYING" for full details. This program is covered by no warranty.

* What it does *

This program can edit the text.dat and dd1text.dat files from Dungeon Keeper.
You are allowed to edit any message, but because the order of messages is
important, messages may only be added or deleted from the end of the file.

To change a message, highlight a message in the list and do one of the 
following actions:

* Select Edit -> Edit Message from the menu bar (Alt+E, E)
* Press Enter with the message highlighted
* Double-click the message
* Press the "M|" button on the toolbar.

A dialog will appear where you can edit the message to your liking, including
using functions such as copy, paste, and cut. Press "OK" to save your changes
to the message, or "Cancel" to forget about them and keep the message like it
was.

Note that messages in Dungeon Keeper should not contain line breaks. As you
type, the words will wrap in the text box automatically. Pressing "Enter" on
the message editing dialog will activate the "OK" button and save your message
changes. You can also press Escape to cancel.

Messages may also be copied, pasted, and cut in their entirety directly from the
list view. Use the menu items, toolbar buttons, or Ctrl shortcut keys with the
target message highlighted. Note that cutting a message does not delete it from
the file; it only clears its text.

To add a new message to the end of the file, select Edit -> Add Message, or
press the Insert key on the keyboard. The message editing dialog will appear as
usual, and the message you type into the box will be added to the end of the
list if you press the OK button. Canceling will cause the item to not be added.

To delete an item from the end, select Edit -> Delete Last, or press the Delete
key on the keyboard. A prompt will appear asking you if you are sure that you
want to delete the message. Only the currently last message can be deleted. If
you want to simply clear a message, use the Cut function (Ctrl+X).

Undo and Redo functions are fully implemented. Use the menu items, toolbar 
buttons, or Ctrl+Z / Ctrl+Y to undo and redo actions.

* How to Use This in Your Levels *

The messages in the text.dat file work with the DISPLAY_INFORMATION,
DISPLAY_OBJECTIVE, and DISPLAY_*_WITH_POS functions. The number provided as the
first parameter to these functions is the message number you see in this
program. So for example, if you create a new message 887 and want to show it
to the first player, your script will look like this:

DISPLAY_OBJECTIVE(887, PLAYER0)

Some of the game's built-in strings are also stored in the text.dat file, such
as the messages you get for victory and defeat, names of spells, names of
creatures, and importantly, the names of levels that are displayed on the map.
You can edit these to achieve the desired effect on the game immediately without
need for any scripting.

* Cautions *

Dungeon Keeper expects at least 886 messages in its text.dat file. Deleting any
of the original messages may have unknown consequences.

It is also currently unknown how large the text.dat file may be either in total
size of text or in number of messages. This means that if you make a very large
text.dat with many new messages, the game could conceivably have a problem with
it and not work or crash. Some experimentation is advised, and the author would
gladly like to hear about your results. For most purposes, replacing the 
original messages will provide plenty of space, though.

I also don't know if there is a limit on the length of individual messages or
not. This program places no limitation on their length, so creating an
EXTREMELY long message might be a bad idea. Consider breaking it up into 
multiple messages and using a timer to delay the display of each in your
level script instead.

Always keep a backup of your game's original text data files. I cannot be held
responsible if you overwrite them without a backup and cannot fix your game.

