ToME in-game helpfile mark-up language

ToME's in-game help is essentially plain text, with a simple mark-up language to add colour, links, index headings and the like. Developers or documentation writers should benefit from this page which outlines the markup language.

Wrapping

Please wrap your helpfiles to 80 displayed characters. It is easiest to write the helpfile content first and THEN add formatting to make this easier.

Adding coloured text to part of a line

You can add colour to part of a line by preceding the selction with 5 square brackets and one of the 15 single-letter colour codes, and suffixing it with a single square bracket.

You could make [[[[[Rsome words red] for instance

This will NOT wrap around line breaks.

Adding coloured text to a whole line

You can add colour to a whole line by prefixing it with 5 hashes and then a colour code.

#####BYou could make a whole line blue!

This automatically ends at the line break.

Suggested colouring

As a guide and to maintain some amount of consistency, the suggested helpfile colouring is:

Adding a link to go to the top of another page

Start by prefixing the filename of the page you are going to link to with five asterisks. Suffix it with a single asterisk and a zero, then open square brackets, add the linking text and close square brackets.

You can add a *****skills.txt*0[link] to the top of the skills help for instance.

The colours of the links are determined by five pipes at the top of each help page and then two colour codes, one for the inactive links and one for the active links.

|||||oy

You'll see that at the top of every page, it ensures that inactive links are orange, and active links are yellow.

Adding a link to go to another anchor point

The format is the same as above, only the number zero is replaced with a number that corresponds to an anchor. If you look at the monster-lore skill help in skills.txt for example, you'll see the following above it:

~~~~~42|Skills|Monster-lore

The five tildes indicate that this is an anchor. The number is the anchor number on that page. The pipes and other text are for the Lua function gen_idx.lua that automatically generates the help index. (more on that later)

Therefore, you can add a link to a part of that page, eg a direct link to the 
available information on the *****skills.txt*42[Monster-Lore] skill.

Helpfile screen dumps

Sometimes it is useful to take a screenshot of the game and insert it into the helpfiles. This is quite possible but yields some lengthy syntax, whereby EVERY character is preceded by a colour code. The whole line is precede by five ampersands to make sure it is displayed properly. In order to take a helpfile screenshot, go into wizard mode and take a normal html screenshot (Ctrl-]). The game will ask if you wish to take a helpfile dump (say yes!) and enter a path for it. Then copy/paste into your help file. Here's an example of how ugly it looks in markup

&&&&&BEBnBtBeBrW WtWoW WdWeWvWeWlWoWpW WaW WbWrWaWnWcWhW,W BuBpW/BdBoBwBnW WtWoW WmWoWvWeW

That's not even a whole line! Use only when necessary please - it really adds to filesize!

Insert a comment

You can insert a comment by prefixing it with five opening curly braces and suffixing it with a single closing brace.

{{{{{<p>} removes the HTML command

Colour codes

Here's a list of the colour codes:

Documentation/HelpfileFormat (last edited 2004-07-05 15:17:22 by FearofFours)