public
Created

Quick and dirty dungeon name generator.

  • Download Gist
namegenerator.py
Python
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
import random
 
NOUNS = [
'Tomb', 'Castle', 'Dungeon', 'Catacombs', 'Sewers', 'Mansion', 'Cave', 'Mines',
'Laboratory', 'Hobble', 'Prison', 'Asylum', 'Stockade', 'Vault', 'Reformatory',
'Oubliette', 'Sepulcher', 'Mausoleum', 'Pit', 'Crypt', 'Necropolis', 'Culverts',
'Grotto',
]
 
ADJECTIVES = [
'Ancient', 'Smelly', 'Terrible', 'Empowered', 'Feminist', 'Wandering', 'Moronic',
'Sexy', 'Perverted', 'Insane', 'Immature', 'Sticky', 'Amorous', 'Mysterious',
'Sparkling', 'Magnificent', 'Unsightly', 'Elegant', 'Fancy', 'Old-Fashioned',
'Clumsy', 'Fierce', 'Lazy', 'Jealous', 'Itchy', 'Grumpy', 'Embarrassed', 'Panicky',
'Repulsive', 'Uptight', 'Snobbish', 'Worried', 'Obnoxious', 'Agreeable', 'Jolly',
'Screeching', 'Raspy', 'Abnormal', 'Bashful', 'Devilish', 'Elderly', 'Bizarre',
]
 
GROUPS = [
'Kings', 'Presidents', 'Vampires', 'Werewolves', 'Shoguns', 'Emperors', 'Scientists',
'Stoners', 'Hippies', 'Nerds', 'Unknowns', 'Furries', 'Otaku', 'Ninjas', 'Pirates',
'Robots', 'Bandits', 'Thieves', 'Rogues', 'Degenerates', 'Titans', 'Sumo Wrestlers',
]
 
LOCATION_PIECES = [
'horne', 'castel', 'bent', 'fair', 'schyppe', 'combe', 'sparth', 'wan', 'stream',
'clock', 'fen', 'wort', 'snow', 'pine', 'fire', 'wood', 'ton', 'garth', 'hap', 'gate',
'wick', 'felde', 'leech', 'marsh', 'burg', 'strath', 'dal', 'mire', 'onyx', 'water',
'glass', 'moss', 'alaun', 'arvale', 'great', 'windle', 'hylles', 'shady', 'spleen',
'cliffe', 'holde', 'dayl', 'cob', 'withy', 'wold', 'corrie', 'tethe'
]
 
def dungeon(seed=None):
if seed: random.seed(seed)
nameA = random.choice(LOCATION_PIECES)
nameB = nameA
while nameA == nameB:
nameB = random.choice(LOCATION_PIECES)
if nameA[-1] == nameB[0]: nameB = nameB[1:]
name = nameA+nameB
noun = random.choice(NOUNS)
adj = random.choice(ADJECTIVES)
grp = random.choice(GROUPS)
return '%s, %s of the %s %s' % (name.capitalize(), noun, adj, grp)
 
if __name__ == '__main__':
# generate ten names and exit
for i in range(10):
print dungeon()

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.