I mailing list I am on recently got mail from Kahn in which he mentioned that he is creating yet another area file format. It seems that every IMP decides sooner or later to add something which needs to make their codebase incompatible with the rest of the world. This makes server-independent tools like MZF a drag to keep current.
I propose a new file format which is extensible without breaking compatibility. (I sent this to Kahn, but he never replied so I doubt it will be in Envy 2.0.) Anyway, the idea is that we will use parenthesis for any enhancements that we do to the base file format. For example, here are three mobiles:
#7500 gardener old~ the old gardener~ An old gardener carefully tends his trees. ~ The gardener ignores you in his pursuit of the perfect orchard. ~ 64 512 100 S 4 1 0 1d1+1 1d1+1 50 0 8 8 1 #7502 buzz buzzing wasp~ the buzzing wasp~ A buzzing wasp flies around your head. ~ The wasp is much bigger than wasps from your homeland. ~ 64 512 0 S 4 1 0 1d1+1 1d1+1 15 0 8 8 0 (race insect) (size small) #7503 weeds green~ the green weeds~ The orchard is overun with green weeds. ~ Thick weeds cover the ground and if you look, they seem to move. ~ 64 512 0 S 1 1 0 1d1+1 1d1+1 15 0 8 8 0 (race plant) (attacks (grasp~ 4d4) (thorn burst~ 2d6) (cut~ 1d8))The first mobile, the gardener, doesn't have any special attributes. The second mobile, the wasp, has two attributes. A server that doesn't know about races and sizes can ignore these attributes. Finally, the third mobile, the weeds, shows how parenthesis can be nested to represent more complex new fields, in this case special attack names and damage amounts.
New sections can be represented like this:
#SECTION (Name { 1 5 } Mort Orchard~) (Repop You hear much raking and howling in the distance.~) (Weather 40 80 0 100 0 50 50 50 5) (Timezone 0) (Flags 1)This replaces custom section notation, such as Troll MUD's AREADATA:
#AREADATA Name { 1 5 } Mort Orchard~ Repop You hear much raking and howling in the distance.~ Weather 40 80 0 100 0 50 50 50 5 Timezone 0 Flags 1 EndAlthough making these changes to db.c is beyond the coding skill of many new IMPs, I am sure the people who design new codebases could do it quite easily.
Note that a server which enables this can still read their old area files, as they are just like the first case above, the gardener, which doesn't use any special fields.
Tools like MZF could just carry the tags it doesn't know about and write them back when saving the file. The tags could be edited with embedded text editors.
If an area file already includeds parenthesis these will need to be escaped, for example
Repop You hear much raking (and howling) in the distance.~becomes
(Repop You hear much raking \(and howling\) in the distance.~)