Ok... First off a little info on one things. Below I'll give a list with the
following inf... command name... it's numaical value... data it expects. All
command values are 1 byte. All strings are store as follows. 1 byte for the
length of the string +1. I byte for the length of the string. And then the
string itself (with no extra space). It MAY seem strange that I did TWO
length bytes. BUT the second is an aspect of pascal strings... the first
makes it possible to do thus :
BLOCKREAD(file,1,strsize,result);
BLOCKREAD(file,strsize,string,result);
Which is easier (and takes less code) then it would if I read in EACH byte
of the string seprately. (And I of course didn't wanna save a whole 256k
pascal string when all that is being use is "Hello World!")

Ok... Now that that is outta the way I'm not gonna repeat it...

---------- Monster File -----------------------
Monster Index is
 mon_inx_rec=record
  name:string[80]; {Monster name}
  at:longint; {Begining of this monster... Read the NEXT rec to get the end}
 end;


 Name        Code Expects
 ----------- ---- ------------------------------------------
 #           N/A  This is used to seperate the monsters. When found it
                  adds to the index
 : :         255  1 Word
   This is the case brackets which should follow a CASE statement.
   The CASE statement creates a value (called it casenum) if casenum
   does not = the word this command returns the next command will
   be ignored
 CASE        250  1 Word
   This is the CASE statement. Casenum = 0 to WORD - 1
 NAME        n/a  This is saved into the index file only
 LRWEAPON    1    1 InGameItem
 SRWEAPON    2    1 InGameItem
 ARMOUR      3    1 InGameItem
 SPELLBOOK   4    1 InGameItem
 SUIT        5    1 InGameItem
 COMPUTER    6    1 InGameItem
 SHIELD      7    1 InGameItem
 INV         8    1 Byte, 1 InGameItem
   The byte repesents the % of time that this item will be in the monsters
   invintory
 JEWL        9    1 Byte, 1 InGameItem
   see INV above
 CHAR        15   1 Byte (or char)
 CHARCOLOR   16   1 Byte
 RACE        30   1 Byte
 SUB_TYPE    31   1 Byte
 A_FLAG      32   1 Word (Bitmaped)
 B_FLAG      33   1 Word (Bitmaped)
 SEX         20   1 Byte (0 = male, 1 = Female, 2 = Other, 3 = Random [m/f])
 STR         21   1 Word
 DEX         22   1 Word
 AGL         23   1 Word
 HIT         24   1 Word
 MAG         25   1 Word
 EXP         26   1 DoubleWord (Longint)
 CSH         27   1 DoubleWord (Longint)
 LEV         28   1 Word
 DHIT        40   1 Word
 DMISS       41   1 Word
 DKILLS      42   1 Word
 DDIED       43   1 Word
 QUEST       44   1 Byte (Toggle) Has no effect on the game
 IMPLANTS    45   1 Byte (Toggle)
 POTIONS     46   2 Bytes (Immunity number, Immunity Level)
 DEFAULTS    47   2 Bytes (Pref number, New Setting);
 MEMORIZE    61   2 Bytes (Clerical Spell number, Number Memorize) {+}
 CAST_SPELL  60   3 Bytes, 4 Words, 1 Byte (gonna get back to this
 SPEED       N/A  Does a default # 34...
 MODE        N/A  Does a default # 5
 NAME_TYPE   N/A  Does a Default # 40
 HOLD_FLAG   N/A  Does a Default # 29
 EGO         N/A  Does a Default # 26
 CORPSE      N/A  Does a Default # 35
 CORPSE_SUB  N/A  Does a Default # 36
 PRINT_NAME  N/A  Used to generate Monsters.Txt
 DISC        N/A  Used to generate Monsters.Txt

---------- Party File ----------------------------------------------------
This file is the battles... You will need to get some info from the monsters
file. In otherwords if the monster file changes this one may have to be
recompiled... Even if it hasn't changed.

 a_rec=record
  name:string[80]; {Battle Name}
  at:longint;      {Begining of this monster... Read the NEXT rec to get the end}
  orgx,
  orgy,            {Used to determan when a battle happend}
  distmin,
  distmax,
  zmin,
  zmax,
  class:byte
 end;

These can be used in the NAME and CASE commands
;; Math functions    +(pluse),-(minus),/(div),*(Mult),&(mod)
;; Math vars         xcor  = Players X position
;;                   ycor  = Players Y Position
;;                   zcor  = Players Z position
;;                   level = Players Level
;;                   dist  = Players distance from Llnerva


 Name        Code Expects
 ----------- ---- ------------------------------------------
 #           N/A  This is used to seperate the monsters. When found it
                  adds to the index
 : :         255  1 Word
   This is the case brackets which should follow a CASE statement.
   The CASE statement creates a value (called it casenum) if casenum
   does not = the word this command returns the next command will
   be ignored
 CASE        250  1 String <*<*<*<*<*<* Diffrent from monster file!
   This is a string becouse it was EASIER to store that way... party
   case statements have 2 values... The way thay interact it doesn't
   matter which is which but 1 is a maximum cap and the other is the
   value like in the first. BUT there is support for variables. I'll get
   info for those at the begining of this section. (althow it's in the
   *.wrk file)
 CLASS       N/A  Adds to the index
 ORGX        N/A  Adds to the index
 ORGY        N/A  Adds to the index
 DISTMIN     N/A  Adds to the index
 DISTMAX     N/A  Adds to the index
 ZMIN        N/A  Adds to the index
 ZMAX        N/A  Adds to the index
 NAME        50   Word (Monster Number) Byte (1 = RANDOM   String
                                              2 = STATIC)
   The string will represent one or two vard values depending on if random
   of static is selected. If random there are two values (smallest then
   largest number of monsters) of static there is one value (number of
   monsters)
 KLLMSG      20   String
 SURMSG      21   String (has no use at this time)
 RUNMSG      22   String
 ATTMSG      23   String
 GENMSG      24   String
 DEATHMSG    25   String
   The MSG commands are for the Messages which will be displayed in the
   approprate time during combat. KLLMSG is for winning the battle, SURMSG
   is for surrendering (which you CAN'T do) RUNMSG is for running from
   battle ATTMSG is the message displayed before battle GENMSG is for
   leaving a battle with out running OR surendering (useful in vendor
   "battles") and DEATHMSG is for when you die.
 KLLPIC      60   String
 SURPIC      61   String (has no use at this time)
 RUNPIC      62   String
 ATTPIC      63   String
 GENPIC      64   String
 DEATHPIC    65   String
   For the extended ansi setting. Displays ANSI picture specified by String.
   not avaible in any currently released version. (new 2.10 feature)
 FLAGS       30   Word        Sets flags... I'll look and explain these later
 TALK        31   Nothing     Turns the talk flag on
 BUY         32   Nothing     Turns the buy flag on (for vendor type "Battles")
 OPTION      10   Nothing     Ask (A)ttack (R)un question....
 PAUSE       11   Nothing     Press any key
 FIGHT       12   Nothing     Starts battle... More then one of these means
                              more then one battle
 REPORT      13   Nothing     Displays EXP extra
 CLRSCR      14   Nothing     Clears the screen


-------------- NPC_INFO --------------------------------------
NPC info is used to determine what items NPC's can ready during maintance...
Anything that isn't covered in NPC info can ready any weapon/armour but
nothing else. If you place Level # at the begining of a monsters name it
will be striped off when taken as an NPC thus a Level 1 Mage and a Level 2
Mage both will simply be Mage in the NPC rauster.

 Name        Code Expects
 ----------- ---- ------------------------------------------
 NAME        0    String
 ITEM        1    Byte (the specific itemnum)
 ANY         1    Byte (Encoded as such)
                  Name            Code or modifier
                  --------------  ----------------
                  srweapon             1
                  lrweapon             2
                  armour               3
                  shield               4
                  suit                 5
                  spellbook            6
                  computer             7
                  set                  7
                  jewelry              8
                  scroll               9
                  non                 +100
                  enchanted           +10
                  enhanced            +20

--------------- Towns -----------------------------------------------------

 index=array[1..256,1..2] of word;
This is the town index... The words are the start and end of the town.
Expect towns to be VERY complex and intracate. But the encode was made
as simple as possible.

Boolean values         A few things use this value to decide
 0       off           weather it'll work or not. A few things
 1       true          to keep in mind. If a special or perm quest
 2       false         is set the value becomes true. If a battle is
                       won it becomes true. Isquest sets it to true IF
                       that quest is compleated false otherwise. All 
                       others do not effect boolean. Only check to
                       see how it's set.

 Name        Code Expects
 ----------- ---- ------------------------------------------
 #           N/A   The number after # is for which slot in the index is
                   updated for this town. Doesn't save anything to the .dat
                   file
 ENDIF        6
 IF           7   Byte, Varies
 AND          8   Byte, Varies
 OR           9   Byte, Varies
 XOR          10  Byte, Varies
                  all of the above work togeather there must be an if first
                  if a         if a      if a            if a
                  and b        or b      xor b            code
                   lines of code                         xor b
                  endif        endif     endif            code
                                                         endif 
                  what thay expect depends on what byte is 
                   Name      Code    Expects
                   --------- ---- -------------------------------
                   not       255   Negates those below
                   quest      0    byte (which quest)
                   permquest  1    byte ("         ")
                   sex        2    byte (0 = male, 1 = female, 2 = other)
                   item       3    ingameitem
                   itemtype   4    byte (Item typ)
                   status     5    byte, longint (byte is which status
                                                  longint is low value)
                                   Name        Code
                                   ----------- ----
                                   hits         0
                                   magik        1
                                   str          2
                                   agl          3
                                   dex          4
                                   int          5
                                   wis          6
                                   con          7
                                   chr          8
                                   cash         9
                                   bank         10
                                   exp          11
                                   ac           12
                                   thac0        13
                                   level        14
 Name         0   String
 Menu_name    49  String
 Displaytype  1   Byte    {How the menu title is displayed}
 namecolor    2   byte
 boardercolor 3   Byte
 lettercolor  4   byte
 bracecolor   5   byte
 menucolor    6   Byte
 :            255 String (This is a goto marker)
 goto         254 String (Case sensitive)
 gameinfo     9   Nothing (displays current settings)
 batinfo      10  Nothing (Combat information)
 whoshere     11  Nothing (who is in town)
 viewplayer   12  nothing (look at a players char sheet)
 sellitem     13  nothing (Sell some junk)
 deposit      14  nothing (put money in bank)
 withdraw     15  nothing (take money from bank)
 viewbank     16  nothing (show your bank account)
 entermail    17  nothing
 readmail     18  nothing (enter/read mail...)
 news         19  nothing
 ranking      20  nothing
 store        21  string.... List of items as follows
                    Code Expects
                    ---- -------------
                      0  Ingameitem
                    250  nothing ('end' the store is done)
 petstore     22 string... List of pets as follows
                    Code Expects
                    ---- -------------
                      0  word (monster number)
                    250  nothing ('end' the store is done)
 listpetstore 23 String
 buypetstore  24 string
 liststore    25 string
 buystore     26 string
 talk         27 byte (which talk block)
 showtext     28 byte, string (see boolean values for byte)
 pause        29 nothing
 train        30 nothing
 listquest    31 nothing
 viewtextfile 32 string
 attackmonster33 word (party number)
 givestat     34 byte, long, byte (the first byte is explained below... the
                  longi is the value to 'Give' the last is a boolean value)
                             name  code
                             ----- ----
                             exp   0
                             agl   1
                             dex   2
                             str   3
                             mag   4
                             hits  5
                             cash  6
 giveitem     35 byte, ingameitem (the byte is a boolean value)
 addtonews    36 byte, string (the byte is boolean value... Adds string to news)
 takeitem     37 byte, ingameitem (the byte is a boolean value)
                  I may change the give/takeitem commands to give/loseitem
 isquest      38 byte
 quest        39 2 bytes (the second is boolean value)
 permquest    40 2 bytes (the second is boolean value)
 attackplayer 41 byte (accesses 'camp' menu, byte is first level no longer safe)
 nameweapon   42 longint
 hire_npc     43 longint, word (longint is min price, mword is monster number)
 slot         44 longint
 blackjack    45 string
 quit         46 nothing
 quittown     47 nothing
 lookstore    60 string
 tav          61 byte
 clrscr       62
 transfer     63
 modify       68 longint
 readin      251 Nothing
 end         250 nothing
 ask         252 char,string
     Note: the readin ask end structure is how menus work in the town file..
     you MUST start the menu with the readin command. This is what gets the
     input from the user. The ask commands are the menus them selfs and end
     tells the interpter that the menu is done. It should look something like

     readin
      Some possible commands here. Displayed once when you first enter the
      menu
     ask a first command
      some possible commands here
     ask b the second commmand
      some possible commands here
     ask c the third command
      some possible commands here
     end

--------------------- Implants --------------------------------------------
the implant index (notice that the newer indexs use longints :) the older
                   ones don't... I may need to change that in future versions)
 a_rec=array[1..51] of longint;

 Name        Code Expects
 ----------- ---- ------------------------------------------
 #           N/A   The number after # is for which slot in the index is
                   updated for this town. Doesn't save anything to the .dat
                   file
 name         0    string
 tounch       1    nothing
 gaze         2    nothing
 screach      3    nothing
 breath       4    nothing
 damagemod    5    byte
 damage       6    2 longints (1billion to 2 billion damage. Ouch!)
 pref         7    2 bytes
 immune       8    byte (never coded into the game)
 charm        24   nothing
 leveldrain   25   nothing (never coded into the game)
 effect       26   byte
                        fire    1
                        water   6
                        acid    4
                        ice     2
                        earth   5
                        elect   3
 %            27  byte
 color        28  byte

--------------- text and ansi ---------------------------------------------
misctext.inx
 index=array[0..255] of word;

Ansi.inx
 index=record
  start,ends:word;
  name:string[15];
 end;

These are just a bunch of strings one right after the other.
