print("Welcome to the character randomizer! This is intended to provide a character with a random race, subrace, class, archetype, and other traits. It is worth nothing that this was created for design purposes and not to create actual playable characters.") import random def racefunction(): races = ['Dragonborn', 'Dwarf', 'Elf', 'Gnome', 'Half-elf', 'Halfling', 'Half-orc', 'Human', 'Tiefling', 'Genasi', 'Goliath', 'Aasimar', 'Firbolg', 'Orc', 'Triton', 'Yuan-ti pureblood', 'Changeling', 'Kalashtar', 'Shifter', 'Gith', 'Dhampir', 'Hexblood', 'Reborn'] for i in range(1): race = random.choice(races) print("Race: " + race) if race == "Dragonborn": subrace1 = ['Black', 'Blue', 'Brass', 'Bronze', 'Copper', 'Gold', 'Green', 'Red', 'Silver', 'White'] subrace2 = ['Ravenite', 'Draconblood'] print("Subrace: " + random.choice(subrace1) + " " + random.choice(subrace2)) else: pass if race == "Dwarf": subrace = ['Duergar', 'Hill', 'Mark of Warding', 'Mountain'] print("Subrace: " + random.choice(subrace)) else: pass if race == "Elf": subraces = ['Drow', 'Eladrin', 'High', 'Mark of Shadow', 'Pallid', 'Sea', 'Shadar-kai', 'Wood'] subrace = random.choice(subraces) if subrace == "Eladrin": season = ['Autumn', 'Spring', 'Summer', 'Winter'] print("Subrace: " + subrace + " (" + random.choice(season) + ")") else: print("Subrace: " + subrace) if race == "Gnome": subrace = ['Svirfneblin', 'Forest', 'Mark of Scribing', 'Rock'] print("Subrace: " + random.choice(subrace)) else: pass if race == "Half-elf": half_race() print("Subrace: None " + halfrace) else: pass if race == "Halfling": subrace = ['Ghostwise', 'Lightfoot', 'Lotusden', 'Mark of Healing', 'Mark of Hospitality', 'Stout'] print("Subrace: " + random.choice(subrace)) else: pass if race == "Half-orc": half_race() print("Subrace: None " + halfrace) else: pass if race == "Tiefling": subrace = ['Baalzebul', 'Dispater', 'Fierna', 'Glasya', 'Levistus', 'Mammon', 'Mephistopheles', 'Zariel'] print("Subrace: " + random.choice(subrace)) else: pass if race == "Human": subrace = ['Mark of Finding', 'Mark of Handling', 'Mark of Making', 'Mark of Passage', 'Mark of Sentinel'] print("Subrace: " + random.choice(subrace)) else: pass if race == "Genasi": subrace = ['Air', 'Earth', 'Fire', 'Water'] half_race() print("Subrace: " + random.choice(subrace) + " " + halfrace) else: pass if race == "Goliath": print("Subrace: None") else: pass if race == "Aasimar": subrace = ['Fallen', 'Protector', 'Scourge'] half_race() print("Subrace: " + random.choice(subrace) + " " + halfrace) else: pass if race == "Firbolg": print("Subrace: None") else: pass if race == "Orc": print("Subrace: None") else: pass if race == "Triton": print("Subrace: None") else: pass if race == "Yuan-ti Pureblood": print("Subrace: None") else: pass if race == "Changeling": half_race() print("Subrace: None " + halfrace) else: pass if race == "Kalashtar": half_race() print("Subrace: None" + halfrace) else: pass if race == "Shifter": subrace = ['Beasthide', 'Longtooth', 'Swiftstride', 'Wildhunt'] half_race() print("Subrace: " + random.choice(subrace) + " " + halfrace) else: pass if race == "Gith": subrace = ['Githyanki', 'Githzerai'] print("Subrace: " + random.choice(subrace)) else: pass if race == "Dhampir": half_race() print("Subrace: None" + " " + halfrace) else: pass if race == "Hexblood": half_race() print("Subrace: None" + " " + halfrace) else: pass if race == "Reborn": half_race() print("Subrace: None" + " " + halfrace) else: pass def half_race(): races2 = ['Dragonborn', 'Dwarf', 'Elf', 'Gnome', 'Halfling', 'Human', 'Tiefling', 'Genasi', 'Goliath', 'Firbolg', 'Orc', 'Triton', 'Yuan-ti pureblood', 'Gith'] for i in range(1): race2 = random.choice(races2) global halfrace if race2 == "Dragonborn": subrace3 = ['Black', 'Blue', 'Brass', 'Bronze', 'Copper', 'Gold', 'Green', 'Red', 'Silver', 'White'] subrace4 = ['Ravenite', 'Draconblood'] halfrace = "(" + race2 + ", " + random.choice(subrace3) +" " + random.choice(subrace4) + ")" else: pass if race2 == "Dwarf": subrace3 = ['Duergar', 'Hill', 'Mark of Warding', 'Mountain'] halfrace = "(" + race2 + ", " + random.choice(subrace3) + ")" else: pass if race2 == "Elf": subraces2 = ['Drow', 'Eladrin', 'High', 'Mark of Shadow', 'Pallid', 'Sea', 'Shadar-kai', 'Wood'] subrace3 = random.choice(subraces2) if subrace3 == "Eladrin": season2 = ['Autumn', 'Spring', 'Summer', 'Winter'] halfrace = "(" + race2 + ", " + subrace3 + random.choice(season2) + ")" else: halfrace = "(" + race2 + ", " + random.choice(subraces2) + ")" if race2 == "Gnome": subrace3 = ['Svirfneblin', 'Forest', 'Mark of Scribing', 'Rock'] halfrace = "(" + race2 + ", " + random.choice(subrace3) + ")" else: pass if race2 == "Halfling": subrace3 = ['Ghostwise', 'Lightfoot', 'Lotusden', 'Mark of Healing', 'Mark of Hospitality', 'Stout'] halfrace = "(" + race2 + ", " + random.choice(subrace3) + ")" else: pass if race2 == "Tiefling": subrace3 = ['Baalzebul', 'Dispater', 'Fierna', 'Glasya', 'Levistus', 'Mammon', 'Mephistopheles', 'Zariel'] halfrace = "(" + race2 + ", " + random.choice(subrace3) + ")" else: pass if race2 == "Human": subrace3 = ['Mark of Finding', 'Mark of Handling', 'Mark of Making', 'Mark of Passage', 'Mark of Sentinel'] halfrace = "(" + race2 + ", " + random.choice(subrace3) + ")" else: pass if race2 == "Goliath": halfrace = "(" + race2 + ")" else: pass if race2 == "Firbolg": halfrace = "(" + race2 + ")" else: pass if race2 == "Orc": halfrace = "(" + race2 + ")" else: pass if race2 == "Triton": halfrace = "(" + race2 + ")" else: pass if race2 == "Yuan-ti Pureblood": halfrace = "(" + race2 + ")" else: pass if race2 == "Gith": subrace3 = ['Githyanki', 'Githzerai'] halfrace = "(" + race2 + ", " + random.choice(subrace3) + ")" else: pass def classfunction(): classes = ['Barbarian', 'Bard', 'Cleric', 'Druid', 'Fighter', 'Monk', 'Paladin', 'Ranger', 'Rogue', 'Sorcerer', 'Warlock', 'Wizard', 'Artificer', 'Blood Hunter'] for i in range(1): classs = random.choice(classes) print("Class: " + classs) if classs == "Barbarian": archetype = ['Path of the Ancestral Guardian', 'Path of the Battlerager', 'Path of the Beast', 'Path of the Berserker', 'Path of the Storm Herald', 'Path of the Totem Warrior', 'Path of the Zealot', 'Path of the Wild Magic'] print("Archetype: " + random.choice(archetype)) else: pass if classs == "Bard": archetype = ['College of Creation', 'College of Eloquence', 'College of Glamour', 'College of Lore', 'College of Spirits', 'College of Swords', 'College of Valor', 'College of Whispers'] print("Archetype: " + random.choice(archetype)) else: pass if classs == "Cleric": archetype = ['Arcana Domain', 'Forge Domain', 'Grave Domain', 'Knowledge Domain', 'Life Domain', 'Light Domain', 'Nature Domain', 'Order Domain', 'Peace Domain', 'Tempest Domain', 'Trickery Domain', 'Twilight Domain', 'War Domain'] print("Archetype: " + random.choice(archetype)) else: pass if classs == "Druid": archetype = ['Circle of Dreams', 'Circle of Spores', 'Circle of Stars', 'Circle of the Land', 'Circle of the Moon', 'Circle of the Shepherd', 'Circle of Wildfire'] print("Archetype: " + random.choice(archetype)) else: pass if classs == "Fighter": archetype = ['Arcane Archer', 'Battle Master', 'Cavalier', 'Champion', 'Echo Knight', 'Eldritch Knight', 'Gunslinger', 'Psi Warrior', 'Purple Dragon Knight', 'Rune Knight', 'Samurai'] print("Archetype: " + random.choice(archetype)) else: pass if classs == "Monk": archetype = ['Way of Mercy', 'Way of Shadow', 'Way of the Ascendant Dragon', 'Way of the Astral Self', 'Way of the Cobalt Soul', 'Way of the Drunken Master', 'Way of the Four Elements', 'Way of the Kensei', 'Way of the Long Death', 'Way of the Open Hand', 'Way of the Sun Soul'] print("Archetype: " + random.choice(archetype)) else: pass if classs == "Paladin": archetype = ['Oath of Conquest', 'Oath of Devotion', 'Oath of Glory', 'Oath of Redemption', 'Oath of the Ancients', 'Oath of the Crown', 'Oath of the Open Sea', 'Oath of the Watchers', 'Oath of Vengeance'] print("Archetype: " + random.choice(archetype)) else: pass if classs == "Ranger": archetype = ['Beast Master', 'Drakewarden', 'Fey Wanderer', 'Gloom Stalker', 'Horizon Walker', 'Hunter', 'Monster Slayer', 'Swarmkeeper'] print("Archetype: " + random.choice(archetype)) else: pass if classs == "Rogue": archetype = ['Arcane Trickster', 'Assassin', 'Inquisitive', 'Mastermind', 'Phantom', 'Scout', 'Scoulknife', 'Swashbuckler', 'Thief'] print("Archetype: " + random.choice(archetype)) else: pass if classs == "Sorcerer": archetype = ['Abberant Mind', 'Clockwork Soul', 'Divine Soul', 'Draconic Bloodline', 'Shadow Magic', 'Storm Sorcery', 'Wild Magic'] print("Archetype: " + random.choice(archetype)) else: pass if classs == "Warlock": archetype = ['The Archfey', 'The Celestial', 'The Fathomless', 'The Fiend', 'The Genie', 'The Great Old One', 'The Hexblade', 'The Undead', 'The Undying'] print("Archetype: " + random.choice(archetype)) else: pass if classs == "Wizard": archetype = ['Bladesinging', 'Chronurgy Magic', 'Graviturgy Magic', 'Order of Scribes', 'School of Abjuration', 'School of Conjuration', 'School of Divination', 'School of Enchantment', 'School of Evocation', 'School of Illusion', 'School of Necromancy', 'School of Transmutation', 'War Magic'] print("Archetype: " + random.choice(archetype)) else: pass if classs == "Artificer": archetype = ['Alchemist', 'Armorer', 'Artillerist', 'Battle Smith'] print("Archetype: " + random.choice(archetype)) else: pass if classs == "Bloodhunter": archetype = ['Order of the Ghostslayer', 'Order of the Lycan', 'Order of the Mutant', 'Order of the Profane Soul'] print("Archetype: " + random.choice(archetype)) else: pass def listfunction(): lists = [1, 2, 3, 4, 5] chance1 = random.choice(lists) if chance1 == 5: print("Multiclassed as a:") classfunction() else: pass def colorsfunction(): colors = ['Red', 'Red-orange', 'Orange', 'Yellow-orange', 'Yellow', 'Yellow-green', 'Green', 'Blue-green', 'Blue', 'Blue-purple', 'Purple', 'Red-purple'] color1 = random.choice(colors) color2 = random.choice(colors) print("Primary Color: " + color1) if color1 == color2: colorsfunction() else: print("Seconary Color: " + color2) def shapefunction(): shapes = ['Circle', 'Square', 'Triangle'] shape = random.choice(shapes) print("Primary Shape: " + shape) def hairfunction(): hairlength1 = ['None', 'Buzzcut', 'Extremely short', 'Short', 'Shoulder-length', 'Long', 'Extremely long'] hairlength = random.choice(hairlength1) print("Hair Length: " + hairlength) if hairlength != "None": hairstyle1 = ['Roughed up', 'Down', 'Half-up', 'Styled', 'Extravagently styled'] hairstyle = random.choice(hairstyle1) print("Hair Style: " + hairstyle) else: pass def heightfunction(): heights = ['Very short', 'Short', 'Normal', 'Tall', 'Very tall'] height = random.choice(heights) print("Height: " + height) def weaponfunction(): weaponamounts = ['No weapons', 'Minimal weapons', 'Few weapons', 'Many weapons', 'Significant amount of weapons'] weaponamount = random.choice(weaponamounts) if weaponamount != "No weapons": print("Weapon Amount: " + weaponamount) weaponstatuses = ['Extremely worn', 'Rough', 'Used', 'Slightly used', 'New'] weaponstatus = random.choice(weaponstatuses) print("Weapon Status: " + weaponstatus) weaponvalues = ['Horrible', 'Cheap', 'Normal', 'Above average', 'Extravagant'] weaponvalue = random.choice(weaponvalues) print("Weapon Value: " + weaponvalue) else: print("No weapons") def armorfunction(): armorquestion = ['None', 'Lowest defense', 'Medium defense', 'High defense'] armor = random.choice(armorquestion) if armor != "None": print("Armor Defense: " + armor) armorstatuses = ['Extremely worn', 'Rough', 'Used', 'Slightly used,' 'New'] armorstatus = random.choice(armorstatuses) print("Armor Status: " + armorstatus) armorvalues = ['Horrible', 'Cheap', 'Normal', 'Above average', 'Extravagant'] armorvalue = random.choice(armorvalues) print("Armor Value: " + armorvalue) else: print("No armor") def baseprompt(): global amount amount = int(input("Enter the number of characters you would like to generate.")) racefunction() classfunction() listfunction() colorsfunction() shapefunction() hairfunction() heightfunction() weaponfunction() armorfunction() while amount > 1: print("--------------------------------------------------------------------------") racefunction() classfunction() listfunction() colorsfunction() shapefunction() hairfunction() heightfunction() weaponfunction() armorfunction() amount = amount - 1 print("--------------------------------------------------------------------------") baseprompt() global amount amount = int(input("Enter the number of characters you would like to generate.")) while amount > 0: print("--------------------------------------------------------------------------") racefunction() classfunction() listfunction() colorsfunction() shapefunction() hairfunction() heightfunction() weaponfunction() armorfunction() amount = amount - 1 print("--------------------------------------------------------------------------") baseprompt()