QML - Create Your Own Adventure

Tutorial

This tutorial describes how to create QML (Quest Mark-Up Language) files to make for choose-your-own-adventure style interactive stories.

For very basic stations, you don't even need to understand QML-Syntax but can instead use the program QML-Edit.
If you want to use the advanced features of QML-Edit, you can jump ahead in the tutorial to Stations.

As alternative, you can create QML files by writing the simple, text-based QL and converting to QML afterwards.

Preparations

You need to edit the source XML file "story/your_adventure.xml" you find it in QML Package. You can also use the program QML-Edit to assist you writing quests. My text-editor of choice is Netpadd (XML coloring and many other features are built in).

If you use QML-Edit, you can skip this and the following chapter and go right to QML-Stations.

Naming

If you want to change the name of the XML file, also change the string "your_adventure" inside the text of the file "your_adventure.htm" in the topmost folder. This file can have any name and will be the one that is opened with IE5 to start the game.

The Story file

Each story file is held in XML (an industry-wide standard for the syntax of markup languages). The document is structured like this (you don't have to understand the first three lines):

<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE quest SYSTEM "../script/quest.dtd">
<quest>

    [ the about section ]

    [ the optional style section ]

    [ a single station section ]

    [ another station ]

    [ and many more stations... ]

</quest>

Quest element

If the Quest is encoded for distribution, attribute encoded is set to "true".
If the quest attribute debug is set to "true", you can press [space] during the game to display debug information.
You can switch the language attribute value to "german". The default is "english". This determines in which language the player gets additional information, such as Save/ Load dialogs.

Refer to the FAQ for more information on encoding, debugging and language.

About section

Inside the "quest"-element first comes the "about" element. For example:

<about>
    <title>The Quest</title>
    <author>Philipp Lenssen</author>
    <date>06-08-2000</date>
    <email>lenssen@hitnet.rwth-aachen.de</email>
    <homepage>http://www.outer-court.com</homepage>
</about>

These elements should be self-explanatory. They give some information on who wrote the adventure and how that person can be contacted. Everything but title and author is optional.

Additional elements (appearing before or after date) are cover (containing the source of a cover image) and intro (containing introductory text).

Continue with QML Style