DAGGERFALL BOOK EDITOR - BOOKEDIT - REFERENCE DOCUMENT
============================================================================
    Written by Dave Humphrey                            16 December 1997
    aj589@freenet.carleton.ca                     www.m0use.net/~uesp


This document is intended to describe the program BOOKEDIT in as much detail
as possible.  This includes proper use of the various features of the program
and instructions on how to successfully create or edit book files for
Daggerfall.  This allows custom books to be created and used in the actual
game, one of the many custom editting utilities for the game.


   TABLE OF CONTENTS
=================================================
        Introduction
        Features
        Requirements
        Installation
        Using BookEdit
                The Menus
                Editting Text
        Editting Book Texts
	Known Bugs - Limitations - Etc...
	Source Code
        Legal Stuff


   INTRODUCTION
=================================================
Not too long ago someone posted a note on the Daggerfall mailing list asking
about the format of the Daggerfall book files (found in the ARENA2\BOOKS
directory).  A few days later I had some spare time and managed to figure out
most of the book format.  After posting the findings a few people inquired
about a book editor.  After asking around a bit I discovered that I was
nominated to write it, and BOOKEDIT was born.  Due to more reuse of
previously written code the first version (0.10) took me less than a day.
It's a relatively simple editor, much like the DOS Edit program with a few
less features.

If you ever notice any bugs/crashes with the program please let me know so
I can fix them.  Similarily with any ideas you might have to improve the
program for future versions.


   FEATURES
=================================================
        - Load/Save any of the Daggerfall Book files and edit them in a
          simple text editor.  
        - Load or Save plain text files is also supported.
        - Color coded edit window makes special text codes plainly stand out

   REQUIREMENTS
=================================================
Since this is a regular DOS application, the requirements are very bare.
        - DOS v3.0 or greater
        - Mouse, any mouse should work fine
        - 286 or greater


   INSTALLATION
=================================================
- Simply unzip or copy the file into the DAGGER directory on whatever drive
  it exists on.  BOOKEDIT automatically assumes it is in the DAGGER
  directory but you can place it anywhere you wish.

   USING BOOKEDIT
=================================================
The program should be very straight forward but I'll go through everything
one step at a time.  When you load up the program you'll be presented with
a simple text editor.  At the very top of the screen are a number of menu
options, 'File', 'Edit', and 'Help'.  Clicking these will display the
contents of the appropiate menu.  The whole other part of the screen is the
area where the text file will be displayed when one is created/loaded.

     THE MENUS
The file menu contains a number of options related to file management such
as loading and saving, etc...

        New
          This clears any text in the editor. You aren't prompted if the text
          hasn't been saved so use with caution.
        Load Book
        Save Book
          These two options allow one to load or save a Daggerfall Book file.
          You are presented with a file dialogue window allowing you to
          select a file, change directories/drives, enter wildcards, etc...
        Load Text
        Save Text
          This allows you to load and save plain text files.  Useful if you
          don't particularily like this text editor, you can save book files
          as pure text, edit them as plain text in some other editor, and
          then reload the text file.
        Exit
          Exits the program.  A prompt is displayed to make sure you want to
          exit.

The edit menu contains only two options currently.

        Change Title
          Edit the Title of the current book.  This value is use when you
          click on a book in your inventory to see what it is.
        Change Author
          Same as the previous option except for the book's author.

The help menu displays a simple help screen with various keys and status
information.


     EDITTING TEXT
Editting text in BookEdit is just like in most other text editors. Use the
various cursor keys and the mouse to scroll through the document. Use the
DEL and BackSpace keys to delete, etc...  There aren't a whole lot of
features implemented at the moment although there might be in the future.
Lines of text up to 78 characters are supported, anything longer will be
wrapped automatically.

     VARIOUS KEYS
There are a number of keyboard shortcuts to various tasks...
        CTRL+Y - Delete the Current Line
        ALT+F - File Menu
        ALT+E - Edit Menu
        ALT+Q - Quit Program
        F1 - Help Screen
        F2 - Save Book
        F3 - Load Book


   EDITTING BOOK TEXTS
=================================================
There are a number of special text codes that one needs to be aware about
to successfully edit or create Daggerfall book texts.

     Page Breaks
       Page breaks are required in the text in order to seperate the
       different pages so that Daggerfall can scroll through them properly.
       There can be at most 23 lines of text between successive page breaks,
       otherwise the text will overflow the Daggerfall window.  Page breaks
       are represented in the editor by the '~' tilde character which is
       displayed in a violet color.  Page breaks should be contained on
       seperate lines by themselves, although they should work just about
       anywhere.  There is a current limit of 100 pages.
     Font Selection
       There are two different fonts available for use in the book text. The
       normal font used for most of the text, and the fancy font used for the
       book title.  The font is represented in the edit window by the
       strings '{FancyFont}' and '{NormFont}' displayed in a yellow colour.
       To change the font type in one of the font strings.  All text after
       this point will be displayed in the selected font until the next
       font selected string.
     Centered Lines
       It is possible to center text lines in the Daggerfall window by using
       the centering character '|'.  If this is the first character in a line
       the string will be displayed as centered in Daggerfall.  Useful for
       titles, author name, etc...
     Undefined Characters
       There are a number of undefined characters in the existing Daggerfall
       book files.  These are represented by special character codes preceded
       by the '#' character and displayed in red and white.  The function of
       these characters are not yet known and can probably be deleted at will.
       For example, the text code '#4A' indicates that the character 0x4A in
       hexadecimal (or 74 in decimal) will be written to the file.  Any hex
       code from 00 to FF is supported.  Most users shouldn't worry about
       these codes until such time that they are understood and fully supported
       by the program.

A few other things to keep in mind. Don't forget to put page breaks at least
every 23 lines.  Also don't create lines that are too long, a line length of
around 60 should be considered the maximum for displaying in the Daggerfall
window.  I have successfully created a trial book from scratch and have had
it displayed in Daggerfall with no problems.


   KNOWN BUGS - LIMITATIONS - ETC...
=================================================
  - The development of this program was very quick so I'm sure I've managed
    to overlook a slew of bugs.  Just make sure you e-mail me when you find
    any (aj589@freenet.carleton.ca).
  - I haven't run across any memory problems in this program so you shouldn't
    have to worry about running out of memory or anything.
  - While you can change drives the support for error handling the floppy
    drives is limited at best.
  - Limited to 100 pages of text which can be easily expanded if this
    proves too little.
  - Size of pages is limited to 64kb although the entire document can be
    larger as long as there is enough conventional memory.
  - The text editting code is taken from a simple and terribly written code
    I wrote some years ago.  This makes it harder to implement some of the
    things I wanted to in the first version.  Although I did rewrite
    significant portions for this version I may completely change the editor
    code so that more advanced features can be added easily.


   SOURCE CODE
=================================================
Included in the ZIP file are the code files DAGBUTIL.CPP and DAGBUTIL.H.
These are only included for any interested programmers and can be deleted.
The files contains the class DAGBOOK_TYPE for loading and saving the DF
book format.  Of course there was much more code used to create the program
but its not included to reduce to size (about 7000 lines in total).  I
thought that these two files might be useful for anyone else wanting to make
a book editor so they wouldn't have to spend time creating and testing the
input/output routines. All other source code is freely available upon
request.


   LEGAL STUFF
=================================================
This program and related source code is public domain and can be
copied and distributed at will.  If you decide to use any of the
source code for any commerical or non-commercial purposes, I do
ask that you give credit where it is due.  I would also consider
it courtesy to tell me where are for what its being used for (for
gloating purposes only...;).

I cannot be held responsible for any damage incurred through the
use of this program.  Through-out the many hours of debugging/
testing I've never had anything happen more severe than a mild
freeze up (most often due to my incompetance by attempting to
delete a NULL pointer or something). If you due notice any bug
or crash, please let me know so I can fix it..Thanks.




If you have any problems, suggestions or comments on this page or website, please feel free to use the Contact Form to send a message to the WebMaster.
This document was last modified on: Saturday, 19 February 2011, at 09:55:52 and has been accessed 2707 times ( dagger/files/bookedit.txt ).
/text.shtml