Skip to content

Instantly share code, notes, and snippets.

@sli
Created August 3, 2012 02:43
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sli/3243799 to your computer and use it in GitHub Desktop.
Save sli/3243799 to your computer and use it in GitHub Desktop.
Quick and dirty dungeon name generator.
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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment