Name ReadNamesFile
Type Method
Summary Loads in a file for generating character names
Prototype long ReadNamesFile(BSTR FileName);
Description This is used to load in a file of character names for the random name generator.

The names file should be loaded before calling GenerateName.

The file should contain lines with "[start]", "[middle]", "[end]" and "[stop]" in it (see below for example). Using the example file below, a generated name might be Wicorebwyn (Wic - ore - bwyn). By setting up different files you can generate names with a different "feel" to them.

Example names file:

[start]
A
Ab
Ac
Ad
W
Wic
[middle]
a
ae
ore
u
y

[end]
a
and
b
bwyn
baen
bard
[stop]
VBscript example
world.readnamesfile "mynames.nam"
Jscript example
world.readnamesfile("mynames.nam");
PerlScript example
$world->readnamesfile("mynames.nam");
Returns eNoNameSpecified: File name cannot be blank
eCouldNotOpenFile: Could not open file, or file was not a valid names file
eOK: Processed file OK

See also ...