[lib] LuaNameGen - random name generator

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
lukems
Prole
Posts: 5
Joined: Sun Jan 29, 2017 4:09 pm

[lib] LuaNameGen - random name generator

Post by lukems » Sat Feb 11, 2017 7:29 pm

Image

Current version: 1.1.0

LuaNameGen (Lua Name Generator) is a random name generator for RPGs, Roguelikes and other game genres that makes use of procedural content. It can be used for character, item, place names, etc. (it all depends on the syllable sets you use, and you can create your own).

It has no dependencies (but uses 'inspect', if available, and only on debug mode), supports libtcod's existing .cfg syllable sets, provides additional (15) custom syllable groups that you can use for complex sets and comes with lots of racial name sets (listed below).

Check it on github and read its documentation.
If something is not working as expected or is poorly documented let me know and I'll try to fix/improve it.

PROJECT GOALS

The project goals are (green means done, red not yet):
  • provide what libtcod's namegen already does, but in Lua;
  • name sets for many races (see below);
  • unidentified potion names;
  • unidentified book names;
  • town names;
  • inns and shop names
  • ethnic'ish/gibberish speech for unknown languages: a way for races to speak, when the player doesn't know that language, using a vocabulary formed from the syllables of that given race/language. Focus here will be on language-like looks, not semantics, just to provide some flavor to games.
  • improve it as needed/desired/requested (sounds easier to do with LuaNameGen/Lua then libtcod's namegen/ANSI C :ultrashocked: )
BASIC USAGE

Code: Select all

local namegen = require("namegen")

local name = namegen.generate("dwarf male")  --  Dolin
local surname = namegen.generate("dwarf surname")  --  Steelcutter
SUPPORTED RACES/NAMES

My personal goal is to have an easy-to-use-and-modify generator with appropriate name sets for all PFSRD races (considering only the core books and a generic campaign setting).
Current support for each of those races is shown below (green means done, red not yet, stroked race names don't have a name pattern at all):
  • Dwarf
  • Elf
  • Gnome
  • Half-Elf (human/elf)
  • Half-Orc (human/orc)
  • Halfling
  • Human
  • Aasimar
  • Catfolk
  • Dhampir (human)
  • Drow
  • Fetchling
  • Goblin
  • Hobgoblin
  • Ifrit
  • Kobold
  • Orc
  • Oread
  • Ratfolk
  • Sylph
  • Tengu
  • Tiefling
  • Undine
  • Changelings
  • Duergar
  • Gillmen
  • Grippli
  • Kitsune
  • Merfolk
  • Nagaji
  • Samsarans
  • Strix
  • Suli
  • Svirfneblin
  • Vanara
  • Vishkanya
  • Wayangs
NAME EXAMPLES

Example of generated names (for each of the currently available sets)
Last edited by lukems on Wed Feb 15, 2017 1:20 am, edited 17 times in total.

User avatar
Ikroth
Citizen
Posts: 72
Joined: Thu Jul 18, 2013 4:44 am

Re: [lib] LuaNameGen 1.0.0

Post by Ikroth » Sat Feb 11, 2017 7:58 pm

Wow, this looks pretty awesome! Perfect timing too, I was just starting to write a CFG parser last night but I didn't have a good way to generate names yet. This looks like a perfect fit.

User avatar
lukems
Prole
Posts: 5
Joined: Sun Jan 29, 2017 4:09 pm

Re: [lib] LuaNameGen - random name generator

Post by lukems » Tue Feb 14, 2017 12:53 pm

LuaNameGen 1.1.0:

Added books, potions and towns name sets:
  • towns.cfg is a copy of Mingos and Jice town name sets for libtcod's namegen;
  • books.cfg and potions.cfg were based on common roguelike names for unidentified items.
LuaNameGen 1.0.1:
  • Fixed a critical error that prevented the data files (.cfg, .index) from being loaded at all while calling the library from outside of its own directory;
  • (doc stuff) Made a generator to provide sphinx-like basic literalinclude function (github doesn't support it).

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests