Prev Up Top Next Contents
3.A Creating a symbol
A symbol is a drawing in the "gsymbol" directory.
Therefore, to create a symbol you need to make a new drawing in that
directory.
You can use Tunnel to create a new symbol drawing.
Open the "gsymbols" directory and open a new empty sketch
(menu "Tunnel | New empty sketch").
Alteratively, you can make a copy of an existing symbol file, an xml
file in the "symbols" directory, named with your new symbol name.
When you restart Tunnel, the "gsymbols"
directory will contain the new file.
You can open the drawing window and edit it to your
satisfaction. Save the XML directory (menu "File | Save XML dir")
when you are done.
As an example let's
use Tunnel to edit a symbol drawing and create a new xml file
for a "danger" symbol, say a square at 45 degrees with a '!' inside.

You now have a new xml file for the new symbol, and Tunnel will
load it in the gsymbol directory.
However when you try to add symbols to your cave map, the new symbol
will not appear in the list.
You need to add a line to the default style
definition file specification, "symbols/fontcolours.xml".
The entry for a symbol starts with the tag
symbolaut
which takes
the attributes
dname
(name of the symbol),
description
, and
optionally a
buttonaction
.
It contains the tag
asymbol
with attributes:
name
, name of the symbol file without xml;
picscale
, scale of the picture;
position
, it can have value "lattice", "endpath", or "random";
scale
, it can be "fixed", or "andhalf";
orientation
, it can be "fixed", "nearaxis", "alongaxis",
or "random";
area-interaction
, it can be "allowed-outside" or "trim";
multiplicity
, it can be a number, 1, 2, ..., or "fill".
Symbols are listed in one of the four subsets:
basevisiblecave
;
baseinvisiblecave
;
basevisiblegrid
;
baseinvisiblegrid
.
For example the symbol "snow" appear in the "basevisiblecave" with all the
attributes, and in the "baseinvisiblecave" (with no attribute).
"choke" is listed only in the "baseinvisiblecave".
Now edit this file and add some lines for your new symbol of "danger"
and check that it will appear in the list of symbols, so that
you can use it to mark a dangerous rock breakdown in your cave map.

marco corvi - Wed May 10 21:23:30 2006
Prev Up Top Next Contents