RandLang4

RandLang 4 is a modern take on the Ever Changing Book of Names by Sami Pyörre.1

Interface

  1. Menus. Save, load, etc.

  2. Name File Edit Box. Type here to add names or sections.

  3. Compile Names button. Enabled when the name file is changed. The file must be compiled for new changes to take effect in name generation.

  4. Generate Names button. Clicking once will generate one new name and place it in (5).

  5. Current Name Box. Displays the most recently generated name.

  6. Name History. Displays recently generated names.

  7. Build Structure. Displays how the name was generated. On the right is the set of characters that were available. On the left of the <, is the character that was selected.

  8. Phon Dictionary. A representation of the compiled data from the name set.

  9. Options.

    • Min Length. Names smaller than this will be thrown out and regenerated.
    • Starting Character. Allows the user to declare what the starting character of generated names will be. List is drawn from the starting characters of the seed names. Asterisk (*) means "any".
    • Fit Level. How many characters the program looks back at to determine which character should come next. A higher fit level will mean names that match the name set better. Lower, means more randomized names.
    • Auto Compile. When toggled, the program will automatically compile whenever the name file is changed. This can slow the program down on large name sets.
    • Max Runs. Maximum number of times the program will throw out names due to being too small or identical to the last one. Prevents infinite looping and program slowdown.

Name File Format

To generate names, you must have a name file to use as a seed for generating more names. Fortunately, writing new name files is as easy as writing down a few names you like. The more names you come up with, the better the set will be.

Invalid Characters

There are only 3 characters that you can't use in a name:

Simple File Example

This is a simple sample file to show how easily you can generate a simple name list. Simply type each name on a new line.

names.txt

vwen
Gyara
olgrith
argim
prescus
fen
vonic
leonic
ulfra
vygraf
lancelarg
ban
ran
lon
vycelon
oniscel
vyg
banis

File Sections

By default, a simple name list is all that's required, but you can further specify options and other modifications by using file sections.

Full Example File

 
x
# Preferences
maxruns:100
minlength:3
fitlevel:2
startingchar:*
# Names
Bill
Paul
Frank
# Affixes
10 mac:
2 :born
1 :ia

The Guts

You don't need to know this to generate names. This is for people who want to understand what's going on in the background.

RL4 is a Winforms application written in C-Sharp. The core library is self-contained, and can be purchased for use in other programs and games from http://voidspiral.com. Very little of the functionality is actually written in the UI; the library will be able to do everything you need it to.

RL4 takes in a string, usually the contents of a text file read from disk. BuildDictionary() is then run (either by the UI, or by a specific call to the class).

Generation first splits the string into sections, then parses each section line by line.

Each Seed Name is iterated through, character by character. The class stores that character, the last two, and the last three in the Phons dictionary. If there is a character after the current one, it's stored in the list of next characters for that particular phon set.

Example Name: Krog

Phon dictionary generated from Krog

k: r
kr: o
r: o
kro: g
ro: g
o: g
rog: *
og: *
g: *

Note that if a character combination already exists, it will be appended to.

 
xxxxxxxxxx
# Seed Names
Krog
Rog

Phon Dictionary generated:

k: r
kr: o
r: o, o
kro: g
ro: g, g
o: g, g
rog: *, *
og: *, *
g: *, *

Since characters in the next list are duplicated, it makes them more frequently generated compared with characters that show up less often.

If there is no character after the current one in iteration, we simply add an asterisk, * to the next character list for that phon. This shows us the program that this phon is likely to end the word.

 
xxxxxxxxxx
# Sample Names
Krog
Rog
Trok

Generated Dictionary

k: r, *
kr: o
r: o, o, o
kro: g
ro: g, g, k
o: g, g, k
rog: *, *
og: *, *
g: *, *
t: r
tr: o
tro: k
rok: *
ok: *

In this name set there's finally some "branching." Branching is when one phon leads to several different characters. Good name sets will be richly branched. In this one, once we've gotten an o, we can either go to g or k, with g being more likely. g can be seen as "terminal" because it has a high likelihood of ending the word, in this case 100%.

Sample Generated Names:

Rog
Trog
Rog
Trog
Rog
Trog
Krok
Rok
Trok
Rok
Trog

You can see that with such a small, tight name set, we get lots of repeating names. We could mitigate this slightly by changing the Fit Level down from 2 to 1, or even 0 (Krro, Ror, Rorr, etc.) but that's not going to change the fact that the name set itself is poorly branched overall. Ideally, you want a set of names that's pretty big, but also has at least a little overlap between each. This will lead to diverse but similar names.


1 This was as much a black box project as a labor of love. No code has been duplicated to my knowledge and no copyright/IP infringement is intended.