| Message |
The MUSHclient XML file format has been around for about 5 years now. Version 3.21, released in May 2002, changed from saving world files (and other MUSHclient-related files such as trigger files, alias files etc.) from a proprietary "binary" format, to industry-standard XML format.
The advantage of the XML format is that it is readily readable, and easily extended, as options (for worlds, triggers, etc.) are simply a line that can be present or omitted, in most cases.
For example, a trigger looks like this:
<triggers>
<trigger
enabled="y"
match="You are hungry."
sequence="100"
>
<send>
get food bag
eat food
</send>
</trigger>
</triggers>
If you want to add another options (eg. the "keep evaluating" flag) you simply add another line, as in this example:
<triggers>
<trigger
enabled="y"
keep_evaluating="y"
match="You are hungry."
sequence="100"
>
<send>
get food bag
eat food
</send>
</trigger>
</triggers>
This is much easier than finding and tweaking some bit inside a binary file.
Also, without much effort you can make batch copies (eg. groups of triggers or variables) from one file to another, simply using a text editor.
The new XML format has had 5 years to "bed down" now, and certainly seems stable. Thus, from version 3.85 onwards we will discontinue support for the old binary world file format. This saves space in the executable code, and clutter in the source code.
If anyone is still using an old world file, created prior to version 3.21, they can still read it in, using any of the intermediate versions (3.21 to 3.84) and then re-save it, which will automatically convert it to XML format. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|