About Examples Documentation Download Authors
Installing it... Windows
Installing it... Linux
Using it
Adding names
License and cast

Installing it under Windows

You have to do some things to get it running:
Unzip everything into a folder on your hard disk (you will not onla need rpg_names.exe, but other folders are also important for i to run. The data folder contains the data needed to create the names. Just take all and copy it) If you have't got it already, download GTK from:
Get GTK 2.8. While you are already here, you can also download GIMP (a very good Photoshop like program to edit graphics).

Well done.

Installing it under Linux

make install
You will need the glib. ou got it with GNOME. If you are using KDE, just install it.

Using it


To call rpg_names execute "cmd" (in German Windows it is "Ausführen" in the menu bar, in english ones I guess you have to call "Execute", enter "cmd" and press OK).
Well. Command line is here. Don't be shocked. It is easier than you thought.
Go on to "Both". The program to execute is rpg_names.exe. You haveto go into the path where it is located. Use cd .. and cd for this.


Ths linux tool consists of a library (libnamegen.so) and a command line tool called rpg_names


There are severyl commands to pass to the tool:
  • --help return information about how to use the tool
  • -l Lists the database content. It returns the worlds, the countries in these worlds and the number of names it can generate. It also returns a database quality in textual and (if available) the tags.
  • -n nuber of names to generate
  • -s Sex (m=male, f=female, v=village, c=city, h=mountin, r=river, l=lake, t=tavern (hotel, inn, pub...)) of the person to generate names for.
  • -w The world to generate names for. Example: -w real
  • -c The country to generate names for. Example: -c germany
  • -t Tags. You can add one or more tags (separated by ','). If none are passed, a '*' or all is used
  • --style If you want something other than just the ascii name, you can submit
    'all' for full name
    'html' for a html file
    'unicode' for unicode name only
    'ascii' for ascii name only
    'notag' removes HTML tags like links
To get a name, you need to pass at least the parameters: world, country and sex Example:
rpg_names -s m -c sweden -w real <ENTER>
Claes Kurt Hermansson

rpg_names -l <ENTER>
Outputs a long list. A part is
rome Female names: 445120420 Male names: 1032027650 Freakish
Tags present: very_poor poor normal noble
Where 0 is the world. Our world at about Jesus's birth. "rome" is the country. The numbers after Female and Male names represent the total amount of names which can be generated for it. "Freakish" is the quality of this database.
In the next line there are the tags available. Noble romans got other names than the poor ones. And you can pass any tag to switch which kind of name you want.

Adding Names

After you created names, please send them to me.

The database

In Linux/Unix, the database is stored in /usr/local/share/libnamegen. The windows path is install-dir/data. If you go to this path, you will find several directorys representing the worlds. In these world-directories there are the directories for the countries. Each country path contains he file "rules". In this file the data is stored how libnamegen concats the data found in the database files to create names. The names of the database files can be seen in the rules file. Open it with a text editor and search for something enclosed in {}. These are the data files. Just open them and have a look. Encoding of all these files should be western-european: ISO-8859-15. It would be kind if you would add the extension .ngen to the database files. Windows users would appreciate it.

Adding names

Go into a world/country, identify the database and open the name list you want to enhance. The name list is a text file. In every line there is a name. Optionally some lines starting with # are comments. Names do neither have to be unique nor sorted. You can do it, if you want. Please set encoding to ISO-8859-15 to avoide confusion. Avoid non-standard signs for this ISO-8859-15. Remember these names have to be displayed on a japanese PC also. And they will not have all those fancy special signs installed. If you are adding japanese names: Please use "Romanji". This is: Write the names in a way every person with a bit of english knowledge can understand. I would be grateful if you also would ad the original written name in Unicode (see below, advanced techniques).

Creating new worlds/countries

Creating new worlds is easy, just add the new directory. Please use lowercase and numbers only.
I want to collect names from the whole human history, sorted by epochs. I use 100 year steps. When creating countries, check if an other epoch has this country already and use the same name.

Now you will have to create a rule file. If you are lucky, there is already a country using the same name-scheme, so you just need to copy the rule file and add your name and a small description to the top remark lines.

Rule file

A remark line starts with a hash sign ("#"). Use it often. Others want to know who did what and how. other lines can start with m: or f:. Lines with the m are male rules, with the f are female ones. There can be more than one male/female rule, if there is more than one, one is chosen randomly. This makes you more flexibl if there are several styles a person can be names.
After the : the rule is started. Everything will be passed to the name literally. If the rule is
m:Abdul ibn Mohammed
The output will be "Abdul ibn Mohammed". Not very useful, but it works. If you change it to
m:{m.ngen} ibn {m.ngen}
Libnamegen will open the file m.ngen in the world/country path, select a random line and put it there where the {m.ngen} is. This is very usefull. Just add a file with 100 male arabic names and here we go.
Maths: This rule above, 100 names in the list, this is 100x100 and you get 10 000 different male arab names. Congratulations. Repeate this with female names.

Names enhanced-Unicode

The unicode name is additional for display in a game or to print on a character sheet. It looks fancy, but keep in mind, most of the people will not be able to read it (never learned Chinese, if I can identify 3 japanese signs that's much and so on).

Names enhanced-Rules


You can add tags to special rules. These rules are only used, if all tags are passed to the library. If a country has separate rules for simple people and nobles, you need a rule starting with:
The tags you are using depend on your choice only. But use lowercase, no numbers, no special signs. If you want ore than one tag, separate them by ",". All tags must be passed for this rule to be available.
See usage of the tags in 0/rome.
It would be good if you would use the same tag-names like the other rules. And documnt them in description.html. If you don't do, the meaning of this tag will be forgotten soon.

Names for country sites

You already know how to create names for people. There are additional identifiers where you can create rule for other kinds of names. For a Book Author, Role Playing Gamer or Game Designer it will be very useful to know how villages are named, rivers and hills.
  • m: Male
  • f: Female
  • l: Lake
  • h: Mountain (Hill, the m is at the Male.)
  • r: River
  • c: City (Well known City in this Country, (Bombay, NewYork, Oxford...)
  • v: Village (Unknown small town, where there are many of them with the same name.)
  • t: Taverns, Hotels, Inns, Pubs...


You should gather a description file from an other language and change it. Please add yourself as an author, quote sources (maybe others want to continue your work), write a description about how a name is composed, a few tidbits about the culture.

Sending them to me

Please test your names first.
As soon as you have enhanced a name list or started a new one, please send it to me ! I will add this to the official released version.
thorstensick@users .so urceforge.net

Legal issues

If you took a name list released somewhere else and entered it into namegen, please check the creator for an ok. If you start to create name list for invented countries (out of a book, out of a role playing game), please check the author for her/his ok ! Normally they are very grateful for feedback and interest so most of the time you will get positive answers and additional material.


At the moment, the API is discussed. We plan to rewrite it, as soon as we have a better idea. If you want to use the API, please contact me to get the full documentation for the released API and the planned differences (I think they will be minor).
Here I will write down the API as-is (for discussion on the features needed by the new API)

struct libnamegen_init_int* libnamegen_init(struct libnamegen_initstruct init, GError ** error)

The user passes data to initialise the name-engine. the init structure contains the basepath of the database, the dabase-version and the API version. API version is important to ensure the API fits the expected one. The returned data is passed on to every other function.

gint libnamegen_done (struct libnamegen_init_int **preset_stuff)

This frees this data. Call it at the end.

gint libnamegen_getname (struct libnamegen_init_int *init, gchar *rpg, gchar *country, gint sex, gchar *special_tags, gchar *name, GError **error)

you pass the string for the rpg and the country (which selects the db-position). The sex is an identifier (defined in the header) selecting which name to create: male, female, tavern, mountain.... Special tags is a list of tags (',' separated) to pass into the lib. The name is a fixed size buffer, allocated by the API tp put the name in. The error is returned. The name contains tags and other data you will want to remove.

gint libnamegen_keep_unicode (gchar *name)

Keep only content of the unicode tag. This is the unicode name.

gint libnamegen_remove_html_tags (gchar *name)

Everything between < and > is gone afterwards. Names can contain links to descriptions online.

gint libnamegen_remove_unicode (gchar *name)

This one removes the Tag and everything contained. There are also functions to browser worlds/countries.


LGPL 2.1 or later
Written by Thorsten Sick with the help of many others:
Sharth Kumar
Siegfried Gevatter
Alexander Ellwein
Stefan Peschl
Johan Eklundh
I hope I forgot no one

Thorsten Sick thorstensi ck@users.s ourceforge.net

SourceForge.net Logo