Ported more name generators, fixed a bug.
This commit is contained in:
parent
5fce23b522
commit
44945aa50c
4 changed files with 323 additions and 2 deletions
199
plugins/data/name_files/general.json
Normal file
199
plugins/data/name_files/general.json
Normal file
|
@ -0,0 +1,199 @@
|
||||||
|
{
|
||||||
|
"name": "Generic names",
|
||||||
|
"author": "Johan Danforth",
|
||||||
|
"templates": {
|
||||||
|
"default": "{first}{mid}{final}"
|
||||||
|
},
|
||||||
|
"default_templates": [
|
||||||
|
"default"
|
||||||
|
],
|
||||||
|
"parts": {
|
||||||
|
"final": [
|
||||||
|
"a",
|
||||||
|
"and",
|
||||||
|
"b",
|
||||||
|
"bwyn",
|
||||||
|
"baen",
|
||||||
|
"bard",
|
||||||
|
"c",
|
||||||
|
"ctred",
|
||||||
|
"cred",
|
||||||
|
"ch",
|
||||||
|
"can",
|
||||||
|
"d",
|
||||||
|
"dan",
|
||||||
|
"don",
|
||||||
|
"der",
|
||||||
|
"dric",
|
||||||
|
"dfrid",
|
||||||
|
"dus",
|
||||||
|
"f",
|
||||||
|
"g",
|
||||||
|
"gord",
|
||||||
|
"gan",
|
||||||
|
"l",
|
||||||
|
"li",
|
||||||
|
"lgrin",
|
||||||
|
"lin",
|
||||||
|
"lith",
|
||||||
|
"lath",
|
||||||
|
"loth",
|
||||||
|
"ld",
|
||||||
|
"ldric",
|
||||||
|
"ldan",
|
||||||
|
"m",
|
||||||
|
"mas",
|
||||||
|
"mos",
|
||||||
|
"mar",
|
||||||
|
"mond",
|
||||||
|
"n",
|
||||||
|
"nydd",
|
||||||
|
"nidd",
|
||||||
|
"nnon",
|
||||||
|
"nwan",
|
||||||
|
"nyth",
|
||||||
|
"nad",
|
||||||
|
"nn",
|
||||||
|
"nnor",
|
||||||
|
"nd",
|
||||||
|
"p",
|
||||||
|
"r",
|
||||||
|
"ron",
|
||||||
|
"rd",
|
||||||
|
"s",
|
||||||
|
"sh",
|
||||||
|
"seth",
|
||||||
|
"sean",
|
||||||
|
"t",
|
||||||
|
"th",
|
||||||
|
"th",
|
||||||
|
"tha",
|
||||||
|
"tlan",
|
||||||
|
"trem",
|
||||||
|
"tram",
|
||||||
|
"v",
|
||||||
|
"vudd",
|
||||||
|
"w",
|
||||||
|
"wan",
|
||||||
|
"win",
|
||||||
|
"win",
|
||||||
|
"wyn",
|
||||||
|
"wyn",
|
||||||
|
"wyr",
|
||||||
|
"wyr",
|
||||||
|
"wyth"
|
||||||
|
],
|
||||||
|
"mid": [
|
||||||
|
"a",
|
||||||
|
"ae",
|
||||||
|
"ae",
|
||||||
|
"au",
|
||||||
|
"ao",
|
||||||
|
"are",
|
||||||
|
"ale",
|
||||||
|
"ali",
|
||||||
|
"ay",
|
||||||
|
"ardo",
|
||||||
|
"e",
|
||||||
|
"ei",
|
||||||
|
"ea",
|
||||||
|
"ea",
|
||||||
|
"eri",
|
||||||
|
"era",
|
||||||
|
"ela",
|
||||||
|
"eli",
|
||||||
|
"enda",
|
||||||
|
"erra",
|
||||||
|
"i",
|
||||||
|
"ia",
|
||||||
|
"ie",
|
||||||
|
"ire",
|
||||||
|
"ira",
|
||||||
|
"ila",
|
||||||
|
"ili",
|
||||||
|
"ira",
|
||||||
|
"igo",
|
||||||
|
"o",
|
||||||
|
"oa",
|
||||||
|
"oi",
|
||||||
|
"oe",
|
||||||
|
"ore",
|
||||||
|
"u",
|
||||||
|
"y"
|
||||||
|
],
|
||||||
|
"first": [
|
||||||
|
"A",
|
||||||
|
"Ab",
|
||||||
|
"Ac",
|
||||||
|
"Ad",
|
||||||
|
"Af",
|
||||||
|
"Agr",
|
||||||
|
"Ast",
|
||||||
|
"As",
|
||||||
|
"Al",
|
||||||
|
"Adw",
|
||||||
|
"Adr",
|
||||||
|
"Ar",
|
||||||
|
"B",
|
||||||
|
"Br",
|
||||||
|
"C",
|
||||||
|
"C",
|
||||||
|
"C",
|
||||||
|
"Cr",
|
||||||
|
"Ch",
|
||||||
|
"Cad",
|
||||||
|
"D",
|
||||||
|
"Dr",
|
||||||
|
"Dw",
|
||||||
|
"Ed",
|
||||||
|
"Eth",
|
||||||
|
"Et",
|
||||||
|
"Er",
|
||||||
|
"El",
|
||||||
|
"Eow",
|
||||||
|
"F",
|
||||||
|
"Fr",
|
||||||
|
"G",
|
||||||
|
"Gr",
|
||||||
|
"Gw",
|
||||||
|
"Gw",
|
||||||
|
"Gal",
|
||||||
|
"Gl",
|
||||||
|
"H",
|
||||||
|
"Ha",
|
||||||
|
"Ib",
|
||||||
|
"Jer",
|
||||||
|
"K",
|
||||||
|
"Ka",
|
||||||
|
"Ked",
|
||||||
|
"L",
|
||||||
|
"Loth",
|
||||||
|
"Lar",
|
||||||
|
"Leg",
|
||||||
|
"M",
|
||||||
|
"Mir",
|
||||||
|
"N",
|
||||||
|
"Nyd",
|
||||||
|
"Ol",
|
||||||
|
"Oc",
|
||||||
|
"On",
|
||||||
|
"P",
|
||||||
|
"Pr",
|
||||||
|
"R",
|
||||||
|
"Rh",
|
||||||
|
"S",
|
||||||
|
"Sev",
|
||||||
|
"T",
|
||||||
|
"Tr",
|
||||||
|
"Th",
|
||||||
|
"Th",
|
||||||
|
"V",
|
||||||
|
"Y",
|
||||||
|
"Yb",
|
||||||
|
"Z",
|
||||||
|
"W",
|
||||||
|
"W",
|
||||||
|
"Wic"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
38
plugins/data/name_files/hobbits.json
Normal file
38
plugins/data/name_files/hobbits.json
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{
|
||||||
|
|
||||||
|
"name": "Tolkien hobbit names",
|
||||||
|
"author": "Johan Danforth",
|
||||||
|
"templates": {
|
||||||
|
"default": "{first}{mid}{final}"
|
||||||
|
},
|
||||||
|
"default_templates": [
|
||||||
|
"default"
|
||||||
|
],
|
||||||
|
"parts": {
|
||||||
|
"final": [
|
||||||
|
"bo",
|
||||||
|
"do",
|
||||||
|
"doc",
|
||||||
|
"go",
|
||||||
|
"grin",
|
||||||
|
"m"
|
||||||
|
],
|
||||||
|
"mid": [
|
||||||
|
"a",
|
||||||
|
"e",
|
||||||
|
"i",
|
||||||
|
"ia",
|
||||||
|
"o",
|
||||||
|
"oi",
|
||||||
|
"u"
|
||||||
|
],
|
||||||
|
"first": [
|
||||||
|
"B",
|
||||||
|
"Dr",
|
||||||
|
"Fr",
|
||||||
|
"Mer",
|
||||||
|
"Per",
|
||||||
|
"S"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
81
plugins/data/name_files/narn.json
Normal file
81
plugins/data/name_files/narn.json
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
{
|
||||||
|
"name": "Babylon 5 Narn names",
|
||||||
|
"author": "Kevin G. Nunn",
|
||||||
|
"templates": {
|
||||||
|
"default": "{first}{mid}{final}"
|
||||||
|
},
|
||||||
|
"default_templates": [
|
||||||
|
"default"
|
||||||
|
],
|
||||||
|
"parts": {
|
||||||
|
"final": [
|
||||||
|
"ch",
|
||||||
|
"k",
|
||||||
|
"kk",
|
||||||
|
"l",
|
||||||
|
"n",
|
||||||
|
"r",
|
||||||
|
"th",
|
||||||
|
"s"
|
||||||
|
],
|
||||||
|
"mid": [
|
||||||
|
"Ba",
|
||||||
|
"Bo",
|
||||||
|
"Da",
|
||||||
|
"Do",
|
||||||
|
"Ga",
|
||||||
|
"Ge",
|
||||||
|
"Go",
|
||||||
|
"Ka",
|
||||||
|
"Ko",
|
||||||
|
"La",
|
||||||
|
"Le",
|
||||||
|
"Lo",
|
||||||
|
"Ma",
|
||||||
|
"Mo",
|
||||||
|
"Na",
|
||||||
|
"No",
|
||||||
|
"Oo",
|
||||||
|
"Pa",
|
||||||
|
"Po",
|
||||||
|
"Qua",
|
||||||
|
"Quo",
|
||||||
|
"Ra",
|
||||||
|
"Rala",
|
||||||
|
"Ro",
|
||||||
|
"Sha",
|
||||||
|
"Shali",
|
||||||
|
"Ska",
|
||||||
|
"Skali",
|
||||||
|
"Sta",
|
||||||
|
"Ste",
|
||||||
|
"Sto",
|
||||||
|
"Ta",
|
||||||
|
"Te",
|
||||||
|
"Tee",
|
||||||
|
"To",
|
||||||
|
"Tha",
|
||||||
|
"Tho",
|
||||||
|
"Va",
|
||||||
|
"Vo",
|
||||||
|
"Vy",
|
||||||
|
"Wa"
|
||||||
|
],
|
||||||
|
"first": [
|
||||||
|
"Ch'",
|
||||||
|
"Do'",
|
||||||
|
"G'",
|
||||||
|
"Gre'",
|
||||||
|
"Mak'",
|
||||||
|
"Na'",
|
||||||
|
"Re'",
|
||||||
|
"Sh'",
|
||||||
|
"So'",
|
||||||
|
"T'",
|
||||||
|
"Ta'",
|
||||||
|
"Th'",
|
||||||
|
"Thu'",
|
||||||
|
"Tu'"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -53,6 +53,9 @@ def namegen(inp, notice=None):
|
||||||
"namegen [generator] -- Generates some names using the chosen generator. " \
|
"namegen [generator] -- Generates some names using the chosen generator. " \
|
||||||
"'namegen list' will display a list of all generators."
|
"'namegen list' will display a list of all generators."
|
||||||
|
|
||||||
|
# clean and split up the input
|
||||||
|
args = inp.strip().lower().split()
|
||||||
|
|
||||||
# get a list of available name generators
|
# get a list of available name generators
|
||||||
files = os.listdir(GEN_DIR)
|
files = os.listdir(GEN_DIR)
|
||||||
all_modules = []
|
all_modules = []
|
||||||
|
@ -60,14 +63,14 @@ def namegen(inp, notice=None):
|
||||||
all_modules.append(os.path.splitext(i)[0])
|
all_modules.append(os.path.splitext(i)[0])
|
||||||
|
|
||||||
# command to return a list of all available generators
|
# command to return a list of all available generators
|
||||||
if inp == "list":
|
if args[0] == "list":
|
||||||
message = "Available generators: "
|
message = "Available generators: "
|
||||||
message += get_text_list(all_modules, 'and')
|
message += get_text_list(all_modules, 'and')
|
||||||
notice(message)
|
notice(message)
|
||||||
return
|
return
|
||||||
|
|
||||||
if inp:
|
if inp:
|
||||||
selected_module = inp.split(' ')[0]
|
selected_module = args[0]
|
||||||
else:
|
else:
|
||||||
# make some generic fantasy names
|
# make some generic fantasy names
|
||||||
selected_module = ["fantasy"]
|
selected_module = ["fantasy"]
|
||||||
|
|
Reference in a new issue