parent help_node
object help_help

var root name 'help_help

eval
    var structure, navigation, commands, example;

    .initialize();
    .set_brief("How to use the help system");
    .set_text(["Coldmud uses a hypertext help system.  The help database is stored as a hierarchical list of help topics.  When you request help on a topic, it looks for that topic in the last accessed help node.", "", "You can access the database sequentially by typing `??' to advance to the next node, or `?' to reread the current node."]);

    structure = $help_help.create_subnode("Structure", "How help is stored", []);
    navigation = $help_help.create_subnode("Navigation", "How to browse through the help", []);
    commands = $help_help.create_subnode("Commands", "Navigational commands", []);
    example = $help_help.create_subnode("Example", "Examples of help command syntax", []);

    structure.set_text(["The help database is divided into a number of nodes.  Each node contains a help text (like the one you are reading right now) and a list of subnodes which can themselves contain subnodes.  Subnodes usually provide more detail about a particular aspect of the current node's topic.  The node's text provides a list of subnodes, one per line, with their name and brief description.","","The node's text can also include references and footnotes.  References provide an easy way to reference information that isn't on a subnode.  Footnotes are short comments that are stored in the node itself.","", "References are opened by a `(' followed by `:' and closed by ':' followed by ')'. The reference name thus delimited can be used as part of a help path (:navigation:"+toliteral(navigation)+":).","","Footnotes are opened by a `[' followed by `:' and closed by `:' followed by `]'.  The footnote number thus delimited cannot be used as part of a help path. [:To read a footnote, you must use `?num' from the
 node it is defined on:]"]);

    navigation.set_text(["The help system keeps track of your last accessed help node. All help commands are relative to this current node.  The help command takes one of the following forms: `help <help-path>' or `? <help-path>', where help-path is a list of blank seperated words; and `help <num>' or `? <num>', where <num> is a footnote number.","","If an integer is provided, a footnote with that number is searched for on the current node and is displayed.","","If a help-path is provided the following checks are performed to find what node each word refers to:","","  * The player's help dictionary is checked","  * The navigational commands are checked (:commands:"+toliteral(commands)+":)","  * The current node's subnodes are checked","  * The current node's references are checked","","The next word in the path is then matched relatively to the previous match.  If the whole path is matched successfully, the current node is set to the matched node and its text is displayed."]);

    commands.set_text(["Navigation commands allow you to access the first subnode (?), the next node at the same level (>), the previous node (<) and the previous level (..).","","  `??' accesses the first subnode of the current node.  If there are no subnodes, the command is equivalent to `?>'.","","  `?>' accesses the next node at the same level.  If the current node has no successor, the command is equivalent to `?.. >', that is: go up one and find the next node at that level.  If the current node is at the top level, the command fails.","","  `?<' accesses the previous node at the same level.  If the current node has no predecessor, the command is equivalent to `?.. <'.  If the current node is at the top level, the command fails.","","  `?..' accesses the supernode (the node that has the current node as a subnode).  If the current node is the top node, the command fails."]);

    example.set_text(["The `*' is useful for setting absolute pathes. So to review the navigational comands you would:","","     help * help commands","or   ?* help commands","","Most often though, one would access it interactively. When looking for some specific information:","","     ?*","     ?help","     ?commands","","Or when you want all the details on a suject:","","     ?* help","     ??","     ??","     ...","","To follow a reference like (:commands:"+toliteral(commands)+":), type:","","     ?commands","","To read a footnote like [:mostly harmless:], type:","","     ?1",""]);
.