Documentation version 1.0 , 2005-08-01

The text output of TavernMaker is pure ASCII text. However, it can be automatically formated into a nicer form using output templates. All available templates are presented in a drop-down menu right of the text window. This section will tell you, how such an ouput template can be generated / modified.

Output-templates are RichTextFormat (*.rtf) files, which can be created/modified in Window´s "WordPad" or "WinWord" text editors. They are stored in the folder of TavernMaker in the subfolders /templates/description ; /templates/PPL and /templates/menu

When a RPS (e.g. AD&D English) is chosen in TavernMaker, all *.rtf files in those folders are checked, and valid output-templates are then listed (by their filename) in the drop-down menu.
A typical output-template is shown below:

$\\ language:english
$\\ RPS: AD&D - English

Tavern descriptions

$Block{<itemdescription>,< ( $Item{Number} ) $Item{Type}
DM Info:

It consists of some optional "defining" comands at the top, which tell TavernMaker for which chosen languages and/or chosen RPS the output template is valid. e.g. If only the first line "$\\ language:english" would be present, the output template could be found in the drop-down for any RPS which is based on the english language. The second line restricts the output template to on specific RPS (AD&D English) only.
The blue text is not a command but just text. It will appear as it is.

The main command is the $Block command, which is replaced by the generated items from TavernMaker. It will generate a list, where each entry is formated exactly the way the command itself is formated within the second set of brackets < >.
(The first set of brackets tells the command what to do. It should always be <itemdescription> here.)

Within the brackets, you can use the following commands:
$Item{Number} is replaced by the number shown for populated items in the map.
$Item{Type}is replaced by the type of item. (e.g. table, fireplace, etc.)
$Item{description}is replaced by the description text of the item.
$Item{ppl} is replaced by the pick-pocket text of the item.

All formats are used exactly as in the template. The example above will therfore create an output like the following:

Additional commands: If you are a developer and familar with the scripting commands within the database, you will like the fact that most of the scripting commands there will also work within the output template! You can therefore make use of global variables to create some depending output, e.g. you can use the following code:
$If{$>{$Sum{waiter},0},<There are several waiters working here!>,<Nobody is here to serve you!>}
This would produce the first line, if the algorithm counts at least one "waiter" in the generated descriptions, while the second line would be given, if no waiter was named in the descriptions. Note, that the commands were placed outside the block-command, so the text will only be shown once, after the list of descriptions.

Together with the possibility of "pre-generations" and "post-generation" scripts in the RPS, the scripting of the output-templates gives a wealth of possibilities for all kinds of "additionals" generators within a "main"-generator. e.g. A "rumor"-generator, or a "weather-generator" etc. could be easily implemented, so that all taverns will also give you the "most common rumor" or the "current weather outside", etc.

All of this, however, is "Developer"-stuff. So, if you are interested, become a developer and contact the project leaders!