How Do I ... ? Troubleshooting Unit Definitions AutoNAME RUL Files
AutoNAME uses a RUL file to generate random names. You can create your own RUL files if you want to generate your own style of names. AutoNAME RUL files are a text file with an extension .RUL; you can use Notepad to create one. Looking at the example RUL files is probably the best place to start with your own. Here are some tips on how to construct a RUL file.
NAME=>[ADJ] PLACE[ of ADJ NOUN]
[The ]PLACE of ADJ NOUN
[The ]PLACE of OWNER
PLACE =>Bog
[10%]=>Catacombs
=>Cave
OWNER => The [ADJ] MONSTER
=> [The ]{MONSTER}s
MONSTER=>Beast
Creature
NOUN=>Horror
Chaos
ADJ=> Sooty
Wretched
// Replacement rules; applied after all production rules are finished.
The The==The
s's==s'
There are two types of rules used in the .rul files read by AutoNAME. They are production rules (=>) and replacement rules (==). Comments are started by //, and continue to the end of a line.
Production rules govern generation of strings in a context-free grammar, are randomly selected (using either an equally divided percentage, or one supplied by the user). Although all non-terminals are by convention upper-case, any series of consecutive alpha characters can be used as a non-terminal. Any non-alpha characters can be used to separate a non-terminal. To place two non-terminals immediately adjacent to eachother, or to place alpha letters next to a non-terminal, you must enclose the non-terminal in curly braces.
The first non-terminal in the file is considered the primary rule, and is used to start each generated name. Any line that is missing a left hand side or arrow uses the last valid non-terminal.
Production rules may have a percentage or weight to the left of the arrow. All rules that are part of a non-terminal that do not have a specified probability divide the remaining probability equally among themselves. E.g.
RULE [%25] => One quarter the time
[%50] => One-half the time
[.10] => Ten percent of the time
=> Remaining percent split between this rule...
=> ...and this one, for 7.5% each.
The following special symbols are used in production rules:
"" Quotes the rule contents.
E.g. RULE => "His'n hers"
{} Used to separate two adjacent non-terminals.
E.g. RULE => {FIRST}{LAST}
Also contains dice roll expressions, like 3d6, etc. for rolling dice. Rolls must be of the form
{<NUMDICE>d<DIEFACES>[Max|Min<INTEGER>][+|-<INTEGER>]}
E.g. RULE => {3d6}{4d4+2}{5d6Max3}
[] Contents of brackets are inserted 50% of the time.
E.g. RULE => This [and] that
Replacement rules are applied after all production rules are finished. Replacement rules occur in order, replace until no longer applicable, do not require any particular strings on either left or right hand sides, and are always applied (i.e. not random).
#include first.rul
#include second half.rul