pdirt/data/
pdirt/data/HELP/
pdirt/data/HELP/0/
pdirt/data/HELP/F/
pdirt/data/HELP/G/
pdirt/data/HELP/H/
pdirt/data/HELP/J/
pdirt/data/HELP/K/
pdirt/data/HELP/O/
pdirt/data/HELP/Q/
pdirt/data/HELP/R/
pdirt/data/HELP/U/
pdirt/data/HELP/V/
pdirt/data/HELP/Y/
pdirt/data/HELP/Z/
pdirt/data/MESSAGES/
pdirt/data/POWERINFO/
pdirt/data/WIZ_ZONES/
pdirt/drv/
pdirt/drv/bin/
pdirt/drv/compiler/converter/
pdirt/drv/compiler/libs/
pdirt/drv/compiler/scripts/
pdirt/drv/include/AberChat/
pdirt/drv/include/InterMud/
pdirt/drv/include/machine/
pdirt/drv/src/InterMud/
pdirt/drv/src/Players/
pdirt/drv/utils/UAFPort/
pdirt/drv/utils/dnsresolv/
pdirt/drv/utils/gdbm/
Proposal for a new zone file format.                              Version 1.1
==============================================================================


I suggest removing the sections for mobiles, locations and object and move
to "objects" that can be placed anywhere in the file. To do this there needs
to be a way to seperate an object from a mobile. Therefore I suggest the
follow "object" tags.


Object		= <objectname>
Name		= <string>
AltName		= <string>
Location	= <Carryflag>:<locationname>
Linked		= <objectname>
BaseValue	= <value>
State		= <value>
MaxState	= <value>
Armor		= <value>
Damage		= <value>
Size		= <value>
Weight		= <value>
Examine		= <string>
Desc[0]		= <string>
Desc[1]		= <string>
Desc[2]		= <string>
Desc[3]		= <string>
Oflags		= <flagname> [, <flagname>]
Trap		= <event>
<code>
EndTrap		= <event>
EndObject	= <objectname>

Mobile		= <mobilename>
Name		= <string>
Location	= <locationname>
Strength	= <value>
Damage		= <value>
Armor		= <value>
Speed		= <value>
Aggression	= <value>[%]
Wimpy		= <value>
Desc		= <string>
Examine		= <string>
MFlags		= <flagname> [, <flagname>]
Pflags		= <flagname> [, <flagname>]
Sflags		= <flagname> [, <flagname>]
Trap		= <event>
<code>
EndTrap		= <event>
EndMobile	= <mobilename>

Location	= <locationname>
North		= <locationname>
South		= <locationname>
East		= <locationname>
West            = <locationname>
Up              = <locationname>
Down            = <locationname>
NorthEast       = <locationname>
SouthEast       = <locationname>
SouthWest       = <locationname>
NorthWest       = <locationname>
Title		= <string>
Desc		= <string>
Lflags		= <flagname> [, <flagname>]
Trap		= <event>
<code>
EndTrap		= <event>
EndLocation	= <locationname>

Zone		= <zonename>
Author		= <string>
Quest		= <string>
Data		= <zonename>
<code>
EndData		= <zonename>
EndZone		= <zonename>


TYPES:
<objectname>	: Internal identifier for an object. This can be build up
                  from two parts <objectname>[@<zonename>].
<mobilename>	: Internal identifier for a mobile. This can be build up
                  from two parts <mobilename>[@<zonename>].
<locationname>	: Internal identifier for a location. This can be build up
                  from two parts <locationname>[@<zonename>].
<zonename>	: Internal identifier for a zone.
<string>	: A string is a set of characters enclosed in either quotes,
                  or without. If there are no quotes then the string ends at
                  the first white space character. Characters that act as
                  quotes are '," and . Placing two quotes after eachother
                  will be replaced by one quote in the text string and will
                  not be seen as the end of the string.
<value>		: A integer number in the range from -20.000 to 20.000 
<flagname>	: A flagname as defined in one of the Tables. Can only
                  consist of the characters A-Z, a-z and 0-9.
<carryflag>	: An identifier used to indicate if the object is stored in
                  a room, container, or carried/wielded/worn/both by a
                  mobile.
<event>		: An identifier for a specific event. An event name can only
                  consist of the characters A-Z, a-z and 0-9
<code>          : A piece of text of one or more lines which has to be
                  translated into c-code (more about this later).

TAGS:
Most tags are known from the current system, some have changed. I have
changed the Description tag of a mobile to Desc to be more uniform across
all objects.  The location now used the same format as objects and mobiles, 
which i think will be much clearer. The Trap tag can occur more than once 
allowing the user to trap more events at once. The rest is self explenatory.

All tags should be case-insensitive. As should all names for objects,
mobiles, locations, events and flagnames.

CODE:
The code is a piece of text that can be translated into c, but is more
readable for a non-c expert and easier to build. It should at least have the
following structures of possibilities:

- Variable definition.
- Constant definition.
- For loop.
- While loop. 
- Repeat Until loop (do while loop).
- If then else
- Block structure. (Begin End, like { })
- Mathematics operators (+,-,*,/,div,mod)
- Boolean operators/expressions
- String operators (=/==/+?)
- Return/break
- Case construction (switch)

Furthermore i think someone should be able to use zonename, objectname,
locationname or mobilename names in the code instead of LOC_ZONE_NAME etc.
So someone should be able to call an object by its name as it is used in the
zone file.

The code in the zone object will need to be placed into a header file so it
can serve as global data, allowing to make global variables for a zone.
(this is needed for counters, since variables will be translated to
non-static variables in c)

A Repeat loop can be build with a while loop, but some functions are easier
done with a repeat loop.

Also the code should have a library to simulate the most frequently used
functions and should be able to simulate the internal function as is used by
the mud. Also we should build a function that will allow the use of real
c-code, so any code constructions can be build. 

Example of functions and what they may look like translated. Open to
proposals:

bprintf		: send_player(<mobile> who,<string> message)
sendf		: send_player(<mobile> who,<string> message) OR
		  send_location(<location> location,<string> message) OR
		  send_world(<string> message)
broad		: send_world(<string> message)
pname		: player_name(<mobile> mob) OR
		  mobile_name(<mobile> mob)
oname		: object_name(<object> obj)
trapch		: teleport_to(<mobile> who, <location> location)
Normal c-code	: c_construct(<string> c_code)
send_msg	: send_mortals ?
		  send_wizards ?
		  send_powers ?
                  send_special ?

Also defining certain global variables could be usefull to removed the
aliases used now like THIS_PLAYER, THIS_OBJECT etc. 

OUTPUT:

Output should be the same as the current output which are the following
files:

data/mobiles		: Readable db format holding mobiles
data/locations		: Readable db format holding locations
data/zones		: Listing of zones and their respective start
			  locations.
data/verbs		: Listing of the verbs and their respective
			  identifier.
include/locations.h	: c include file holding the LOC_ZONE_LOC defines
include/mobiles.h	: c include file holding the MOB_ZONE_MOB defines
include/objects.h	: c include file holding the OBJ_ZONE_OBJ defines
include/verbs.h		: c include file holding the VERB_NAME defines
include/zonetab.h	: c include file holding a table with zone numbers
			  and the quests they contain (newer versions of 
			  pdirt only) Used in questing system
src/NPC/mobtable.h	: c include file holding special code includes
src/Rooms/loctable.h	: c include file holding special code includes
stc/Objects/objtable.h	: c include file holding special code includes