INML 1.0

Contents

What Is INML?

INML stands for Interactive Novel Markup Language. It is a proposed XML-based format for choice-driven interactive fiction. It has been devised with the following principles in mind:

  1. Simplicity for Authors - An open XML-based format should open the field to a wider range of authoring tools and potential authors who are daunted by existing Interactive Fiction systems which often require an author to write their story in a compiled programming or scripting language.
  2. Simplicity for Readers - INML is not a replacement for existing parser-based interactive fiction systems such as Inform or TADS. While it is technically possible to achieve the same style of choice-based interactive novel using these systems, they are geared towards more granular and complex interactions between reader and story, generally require more thought and work on the part of the reader to achieve those interactions, and cater more to event-driven open world stories as opposed to linear stories. To state it broadly, reading an INML novel should feel more like reading a book than playing a game—the full extent of the reader's interaction will consist of somehow specifying one out of a number of presented options at certain points in the novel.
  3. Portability - The features described by INML should be implementable in any reading or visualization system that supports some form of hyperlinking. Ultimately, this means it must be assumed that there is no memory stack or other means of maintaining state on the target medium.

What Is An Interactive Novel?

While many different valid definitions of an interactive novel exist, INML specifically describes stories that may be directly influenced by the reader through the selection of desired outcomes from choices presented at various points in the story. Probably the most famous example of this form of novel in print media is the Choose Your Own Adventure series of books. Many other similar books and series exist, such as Fighting Fantasy, and Sorcery!, which often include additional ways for the player to interact with the story (for example: characters with modifiable attributes and abilities, inventory management, battle systems). By both necessity and design, INML 1.0 does not include a way to describe these additional features.

INML Specification

A DTD for the INML specification is available here.

An INML file consists of a single root Novel element, which contains a Meta element and one or more Scene elements.

The Meta element is required, and contains information about the novel being described, including its title, and optionally its author, version, and license information.

There must be at least one Scene element. Each Scene element represents a block of content to be displayed to the reader, at the end of which the reader may be presented with a set of options to choose from. Choosing any of the options would result in the reader being redirected to a different scene within the novel. A "leaf node" scene with no options represents an end to the novel (of which there could be any number).

The Meta element has a required startRecord attribute which specifies the first scene of the novel (of which there is only one). The format attribute is assumed to be "text" if omitted, and can optionally specify "html" instead. It specifies the format of all content within the License element and all Description elements (Prompt and Choice elements do not support html format in the 1.0 specification). Here you can also specify a PageBreakSeq element, which specifies a sequence of characters that is used to represent pagebreaks within Description elements. If omitted, it will be assumed that the story does not use pagebreaks.

Each Scene element has a required id attribute, which must be a unique identifier for that scene. They can also have an optional name attribute, which should be a short human-readable identifier for the scene (this value should never actually be displayed to the reader—it is primarily for the author to identify the scenes when working on the story). They must also each contain a Description element which contains the actual content to be displayed to the reader for that scene. The Prompt element is optional and can contain text to give some context to the options that will be presented to the reader. The Options element must contain one or more Choice elements, and each choice specifies the scene that the reader will get sent to via the required scene attribute, and must contain the content of the choice to be displayed to the reader.

Example

Here is an example of a very simple novel described in INML format:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE Novel SYSTEM "http://inml.rudism.com/inml-1_0.dtd">
<Novel>
	<Meta startRecord="a" format="text">
		<Title>A Simple Interactive Novel</Title>
		<Author>Rudis Muiznieks</Author>
		<Version>1.0 (2010-05-04)</Version>
		<License>Copyright (C) 2010</License>
		<PageBreakSeq>\n\n</PageBreakSeq>
	</Meta>
	<Scene id="a" name="Intro">
		<Description>Bill stood to the west of the large white house.</Description>
		<Prompt>What should Bill do next?</Prompt>
		<Options>
			<Choice scene="b">Enter the house.</Choice>
			<Choice scene="c">Go home and watch American Idol.</Choice>
		</Options>
	</Scene>
	<Scene id="b" name="Approaching House">
		<Description>As Bill approached the house to enter, it vanished forever.</Description>
		<Prompt>There was only one thing left for Bill to do.</Prompt>
		<Options>
			<Choice scene="c">Go home and play FarmVille.</Choice>
		</Options>
	</Scene>
	<Scene id="c" name="End">
		<Description>Bill shrugged and went home.</Description>
	</Scene>
</Novel>

Conventions

Linking a choice back to the startRecord is called a "dead end" link, and should be considered as a placeholder for a choice whose scene has not yet been written.

Software

Currently there is no known software that supports the INML format. If you know of any, email rudis@sitosis.com with the details.

Authoring Tools

Tools to author interactive novels which can export INML files.

Readers/Interpretors

Programs that display INML novels for the purpose of reading.

Converters/Compilers

Tools to convert INML files to other formats (for example: Kindle, HTML, PDF, executables, or Inform code).

Other Links