jespergunde

AI Dungeon script

Jul 10th, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //-----------------------------------------------------------------------------------
  2. // AI Dungeon script: Name generation and more
  3. // Scenario: https://play.aidungeon.io/scenario/8d530120-b99e-11ea-84b4-4d52634a4dbd
  4. //-----------------------------------------------------------------------------------
  5. Generate random names and descriptions with this script.
  6. Enter one of the commands below for the desired effect.
  7.  
  8. E.g. if you write the following:
  9. My name is rnm_barb. My friend is rnf_elf. I have a sword called rni_weapon, and a horse called rn_horse.
  10. It will be replaced with something like this:
  11. My name is Sejr. My friend is Feawen. I have a sword called Thundershard, and a horse called Stormheart.
  12. or:
  13. My name is Grímnir. My friend is Lachril. I have a sword called Cryptic, and a horse called Bolt. / etc. It's random.
  14.  
  15. It can also be used for descriptions, e.g.:
  16. rd_region
  17. Will be replaced with something like this:
  18. The region is mainly covered in rivers and has a calm climate. The region's landscape is cheerful; small, playful waterfalls,       cascading rivers and gorgeous flower fields.
  19. or:
  20. The region is mainly covered in caves and has a stormy climate. The region's landscape is unsightly; fallen towers and ruins marks the entrance to many hidden caves and somber architecture.
  21. etc.
  22.  
  23. Or spawn a demon encounter with renc_demon, which will be replaced by something like:
  24. A howl in the desolation, a burst of fire, and suddenly you are challenged by a foul soul of blood and fury.
  25. or:
  26. A shriek in the fog, a strike of a clock, and suddenly you are stared at by an immense creation of decay and blood.
  27. etc.
  28.  
  29. //-----------------------------------------------------------------------------------
  30. Commands:
  31. NAMES:
  32.    rnm_gen = Random Name Male, generic
  33.    rnf_gen = Random Name Female, generic
  34.    rnm_barb = Random Name Male, barbarian
  35.    rnf_barb = Random Name Female, barbarian
  36.    rnm_human = Random male name, anglo-saxon (think rohirrim)
  37.    rnf_human = Random female name, anglo-saxon (think rohirrim)
  38.    rnm_knight = Random Name Male, knight
  39.    rnf_knight = Random Name Female, knight
  40.    rnm_wizard = Random Name Male, wizard
  41.    rnf_wizard = Random Name Female, wizard
  42.  
  43.    rnm_elf = Random Name Male,  elf.
  44.    rnf_elf = Random Name Female, elf.
  45.    rn_dwarf = Random name, dwarf
  46.    rn_demon = Random name, demon
  47.    rnm_hobbit = Random Name Male, hobbit
  48.    rnf_hobbit = Random Name Female, hobbit
  49.  
  50.    rnm_darkelf = Random Name Male, dark elf
  51.    rnf_darkelf = Random female name, dark elf
  52.    rnm_fairy = Random Name Male, fairy
  53.    rnf_fairy = Random Name Female, fairy
  54.  
  55.    rnm_orc = Random Name Male, orc
  56.    rnf_orc = Random Name Female, orc
  57.    rnm_succubus = Random Name Male, succubus/incubus
  58.    rnf_succubus = Random Name Female, succubus
  59.    rnm_vampire = Random Name Male, vampire
  60.    rnf_vampire = Random Name Female, vampire
  61.    rn_nymph = Random name nymph (female by default)
  62.  
  63.    rn_dragon = Dragon name (inspired by Elder Scrolls)
  64.    rn_nick = Random nickname
  65.    rn_horse = Horse name
  66.  
  67.    rn_disease = Random magical disease name
  68.  
  69. ITEMS:
  70.    rni_weapon = Random Name Item, Weapon name
  71.  
  72.    PLACES:
  73.    rnc_elf = Random Name City, Elf
  74.    rnc_dwarf = Random Name City, Dwarf
  75.    rnc_fantasy = Random Name City, generic fantasy
  76.    rnc_barb = Random Name City, Barbarian
  77.  
  78.    rn_mountain = random mountain range name, needs more work.
  79.  
  80. DESCRIPTIONS:
  81.    rd_forest = Random description, forest
  82.    rd_region = Random description of a region
  83.    rd_cave_dwarf = Random description of dwarf cave/city
  84.    rd_cave_dark = Random description of dark cave
  85.    rd_castle = Random description of a castle
  86.     rd_town = Random description of a town/village/city etc.
  87.  
  88. ENCOUNTERS:
  89.    renc_demon = spawn a random demon
  90. //-----------------------------------------------------------------------------------
  91.  
  92. I have included DJORTNER's world entry script.
  93.  
  94. //-----------------------------------------------------------------------------------
  95. // The script:
  96. //-----------------------------------------------------------------------------------
  97.  
  98. const modifier = (text) => {
  99.  
  100.     let modifiedText = text
  101.     var lowered = text.toLowerCase()
  102.    
  103.     modifiedText = generateRandName(modifiedText, lowered)
  104.     modifiedText = generateRandForest(modifiedText, lowered)
  105.     modifiedText = generateDiseaseName(modifiedText, lowered)
  106.  
  107.     const bDescribePopulation = false;
  108.     const bGiveRegionAName = false;
  109.  
  110.     modifiedText = generateRegion(modifiedText, lowered, bDescribePopulation, bGiveRegionAName)
  111.     modifiedText = generateCaveDescription(modifiedText, lowered)
  112.     modifiedText = generateCastle(modifiedText, lowered)
  113.     modifiedText = generateEncounter(modifiedText, lowered)
  114.    
  115.     const bDescriptiveTown = false
  116.     modifiedText = generateTown(modifiedText, lowered, bDescriptiveTown)
  117.    
  118.     //worldEntryScript(modifiedText)
  119.     modifiedText = worldEntryScript(modifiedText)
  120.    
  121.     // You must return an object with the text property defined.
  122.     return {text: modifiedText}
  123. }
  124.  
  125. //#region WorldInfo
  126. /*
  127. Credit to DJORTNER:
  128. https://pastebin.com/GJgjU1D1
  129. Commands:
  130. /addkey [key] [entry] - Adds key to World info.
  131. /editkey [key] [updated entry] - Allows you overwrite entry in world info.
  132. /delkey [key] - Deletes key in world info.
  133. /showkeys - Show keys, this will clear in next input
  134. /import [/export output] - Allows you to import world info JSON.
  135. /export - Allows you to export world info JSON.
  136. */
  137. function worldEntryScript(text) {
  138.     let modifiedText = text
  139.     var lowered = text.toLowerCase()
  140.     if(state.command == null) {
  141.         state.command = false
  142.     }
  143.     if(lowered.includes('/addkey')) {
  144.         state.command = true
  145.    
  146.         text = cleanText(text, false)
  147.         var str = text.substring(lowered.search('/addkey'))
  148.    
  149.         var keys = getKeys(str)
  150.         var entry = getEntry(str, keys)
  151.         if(keys == 'gengirl'|| keys == 'genboy') {
  152.             const boyNames = JSON.parse('{"year": 2018, "names": ["Liam", "Noah", "William", "James", "Oliver", "Benjamin", "Elijah", "Lucas", "Mason", "Logan", "Alexander", "Ethan", "Jacob", "Michael", "Daniel", "Henry", "Jackson", "Sebastian", "Aiden", "Matthew", "Samuel", "David", "Joseph", "Carter", "Owen", "Wyatt", "John", "Jack", "Luke", "Jayden", "Dylan", "Grayson", "Levi", "Isaac", "Gabriel", "Julian", "Mateo", "Anthony", "Jaxon", "Lincoln", "Joshua", "Christopher", "Andrew", "Theodore", "Caleb", "Ryan", "Asher", "Nathan", "Thomas", "Leo", "Isaiah", "Charles", "Josiah", "Hudson", "Christian", "Hunter", "Connor", "Eli", "Ezra", "Aaron", "Landon", "Adrian", "Jonathan", "Nolan", "Jeremiah", "Easton", "Elias", "Colton", "Cameron", "Carson", "Robert", "Angel", "Maverick", "Nicholas", "Dominic", "Jaxson", "Greyson", "Adam", "Ian", "Austin", "Santiago", "Jordan", "Cooper", "Brayden", "Roman", "Evan", "Ezekiel", "Xavier", "Jose", "Jace", "Jameson", "Leonardo", "Bryson", "Axel", "Everett", "Parker", "Kayden", "Miles", "Sawyer", "Jason", "Declan", "Weston", "Micah", "Ayden", "Wesley", "Luca", "Vincent", "Damian", "Zachary", "Silas", "Gavin", "Chase", "Kai", "Emmett", "Harrison", "Nathaniel", "Kingston", "Cole", "Tyler", "Bennett", "Bentley", "Ryker", "Tristan", "Brandon", "Kevin", "Luis", "George", "Ashton", "Rowan", "Braxton", "Ryder", "Gael", "Ivan", "Diego", "Maxwell", "Max", "Carlos", "Kaiden", "Juan", "Maddox", "Justin", "Waylon", "Calvin", "Giovanni", "Jonah", "Abel", "Jayce", "Jesus", "Amir", "King", "Beau", "Camden", "Alex", "Jasper", "Malachi", "Brody", "Jude", "Blake", "Emmanuel", "Eric", "Brooks", "Elliot", "Antonio", "Abraham", "Timothy", "Finn", "Rhett", "Elliott", "Edward", "August", "Xander", "Alan", "Dean", "Lorenzo", "Bryce", "Karter", "Victor", "Milo", "Miguel", "Hayden", "Graham", "Grant", "Zion", "Tucker", "Jesse", "Zayden", "Joel", "Richard", "Patrick", "Emiliano", "Avery", "Nicolas", "Brantley", "Dawson", "Myles", "Matteo", "River", "Steven", "Thiago", "Zane", "Matias", "Judah", "Messiah", "Jeremy", "Preston", "Oscar", "Kaleb", "Alejandro", "Marcus", "Mark", "Peter", "Maximus", "Barrett", "Jax", "Andres", "Holden", "Legend", "Charlie", "Knox", "Kaden", "Paxton", "Kyrie", "Kyle", "Griffin", "Josue", "Kenneth", "Beckett", "Enzo", "Adriel", "Arthur", "Felix", "Bryan", "Lukas", "Paul", "Brian", "Colt", "Caden", "Leon", "Archer", "Omar", "Israel", "Aidan", "Theo", "Javier", "Remington", "Jaden", "Bradley", "Emilio", "Colin", "Riley", "Cayden", "Phoenix", "Clayton", "Simon", "Ace", "Nash", "Derek", "Rafael", "Zander", "Brady", "Jorge", "Jake", "Louis", "Damien", "Karson", "Walker", "Maximiliano", "Amari", "Sean", "Chance", "Walter", "Martin", "Finley", "Andre", "Tobias", "Cash", "Corbin", "Arlo", "Iker", "Erick", "Emerson", "Gunner", "Cody", "Stephen", "Francisco", "Killian", "Dallas", "Reid", "Manuel", "Lane", "Atlas", "Rylan", "Jensen", "Ronan", "Beckham", "Daxton", "Anderson", "Kameron", "Raymond", "Orion", "Cristian", "Tanner", "Kyler", "Jett", "Cohen", "Ricardo", "Spencer", "Gideon", "Ali", "Fernando", "Jaiden", "Titus", "Travis", "Bodhi", "Eduardo", "Dante", "Ellis", "Prince", "Kane", "Luka", "Kash", "Hendrix", "Desmond", "Donovan", "Mario", "Atticus", "Cruz", "Garrett", "Hector", "Angelo", "Jeffrey", "Edwin", "Cesar", "Zayn", "Devin", "Conor", "Warren", "Odin", "Jayceon", "Romeo", "Julius", "Jaylen", "Hayes", "Kayson", "Muhammad", "Jaxton", "Joaquin", "Caiden", "Dakota", "Major", "Keegan", "Sergio", "Marshall", "Johnny", "Kade", "Edgar", "Leonel", "Ismael", "Marco", "Tyson", "Wade", "Collin", "Troy", "Nasir", "Conner", "Adonis", "Jared", "Rory", "Andy", "Jase", "Lennox", "Shane", "Malik", "Ari", "Reed", "Seth", "Clark", "Erik", "Lawson", "Trevor", "Gage", "Nico", "Malakai", "Quinn", "Cade", "Johnathan", "Sullivan", "Solomon", "Cyrus", "Fabian", "Pedro", "Frank", "Shawn", "Malcolm", "Khalil", "Nehemiah", "Dalton", "Mathias", "Jay", "Ibrahim", "Peyton", "Winston", "Kason", "Zayne", "Noel", "Princeton", "Matthias", "Gregory", "Sterling", "Dominick", "Elian", "Grady", "Russell", "Finnegan", "Ruben", "Gianni", "Porter", "Kendrick", "Leland", "Pablo", "Allen", "Hugo", "Raiden", "Kolton", "Remy", "Ezequiel", "Damon", "Emanuel", "Zaiden", "Otto", "Bowen", "Marcos", "Abram", "Kasen", "Franklin", "Royce", "Jonas", "Sage", "Philip", "Esteban", "Drake", "Kashton", "Roberto", "Harvey", "Alexis", "Kian", "Jamison", "Maximilian", "Adan", "Milan", "Phillip", "Albert", "Dax", "Mohamed", "Ronin", "Kamden", "Hank", "Memphis", "Oakley", "Augustus", "Drew", "Moises", "Armani", "Rhys", "Benson", "Jayson", "Kyson", "Braylen", "Corey", "Gunnar", "Omari", "Alonzo", "Landen", "Armando", "Derrick", "Dexter", "Enrique", "Bruce", "Nikolai", "Francis", "Rocco", "Kairo", "Royal", "Zachariah", "Arjun", "Deacon", "Skyler", "Eden", "Alijah", "Rowen", "Pierce", "Uriel", "Ronald", "Luciano", "Tate", "Frederick", "Kieran", "Lawrence", "Moses", "Rodrigo", "Brycen", "Leonidas", "Nixon", "Keith", "Chandler", "Case", "Davis", "Asa", "Darius", "Isaias", "Aden", "Jaime", "Landyn", "Raul", "Niko", "Trenton", "Apollo", "Cairo", "Izaiah", "Scott", "Dorian", "Julio", "Wilder", "Santino", "Dustin", "Donald", "Raphael", "Saul", "Taylor", "Ayaan", "Duke", "Ryland", "Tatum", "Ahmed", "Moshe", "Edison", "Emmitt", "Cannon", "Alec", "Danny", "Keaton", "Roy", "Conrad", "Roland", "Quentin", "Lewis", "Samson", "Brock", "Kylan", "Cason", "Ahmad", "Jalen", "Nikolas", "Braylon", "Kamari", "Dennis", "Callum", "Justice", "Soren", "Rayan", "Aarav", "Gerardo", "Ares", "Brendan", "Jamari", "Kaison", "Yusuf", "Issac", "Jasiah", "Callen", "Forrest", "Makai", "Crew", "Kobe", "Bo", "Julien", "Mathew", "Braden", "Johan", "Marvin", "Zaid", "Stetson", "Casey", "Ty", "Ariel", "Tony", "Zain", "Callan", "Cullen", "Sincere", "Uriah", "Dillon", "Kannon", "Colby", "Axton", "Cassius", "Quinton", "Mekhi", "Reece", "Alessandro", "Jerry", "Mauricio", "Sam", "Trey", "Mohammad", "Alberto", "Gustavo", "Arturo", "Fletcher", "Marcelo", "Abdiel", "Hamza", "Alfredo", "Chris", "Finnley", "Curtis", "Kellan", "Quincy", "Kase", "Harry", "Kyree", "Wilson", "Cayson", "Hezekiah", "Kohen", "Neil", "Mohammed", "Raylan", "Kaysen", "Lucca", "Sylas", "Mack", "Leonard", "Lionel", "Ford", "Roger", "Rex", "Alden", "Boston", "Colson", "Briggs", "Zeke", "Dariel", "Kingsley", "Valentino", "Jamir", "Salvador", "Vihaan", "Mitchell", "Lance", "Lucian", "Darren", "Jimmy", "Alvin", "Amos", "Tripp", "Zaire", "Layton", "Reese", "Casen", "Colten", "Brennan", "Korbin", "Sonny", "Bruno", "Orlando", "Devon", "Huxley", "Boone", "Maurice", "Nelson", "Douglas", "Randy", "Gary", "Lennon", "Titan", "Denver", "Jaziel", "Noe", "Jefferson", "Ricky", "Lochlan", "Rayden", "Bryant", "Langston", "Lachlan", "Clay", "Abdullah", "Lee", "Baylor", "Leandro", "Ben", "Kareem", "Layne", "Joe", "Crosby", "Deandre", "Demetrius", "Kellen", "Carl", "Jakob", "Ridge", "Bronson", "Jedidiah", "Rohan", "Larry", "Stanley", "Tomas", "Shiloh", "Thaddeus", "Watson", "Baker", "Vicente", "Koda", "Jagger", "Nathanael", "Carmelo", "Shepherd", "Graysen", "Melvin", "Ernesto", "Jamie", "Yosef", "Clyde", "Eddie", "Tristen", "Grey", "Ray", "Tommy", "Samir", "Ramon", "Santana", "Kristian", "Marcel", "Wells", "Zyaire", "Brecken", "Byron", "Otis", "Reyansh", "Axl", "Joey", "Trace", "Morgan", "Musa", "Harlan", "Enoch", "Henrik", "Kristopher", "Talon", "Rey", "Guillermo", "Houston", "Jon", "Vincenzo", "Dane", "Terry", "Azariah", "Castiel", "Kye", "Augustine", "Zechariah", "Joziah", "Kamryn", "Hassan", "Jamal", "Chaim", "Bodie", "Emery", "Branson", "Jaxtyn", "Kole", "Wayne", "Aryan", "Alonso", "Brixton", "Madden", "Allan", "Flynn", "Jaxen", "Harley", "Magnus", "Sutton", "Dash", "Anders", "Westley", "Brett", "Emory", "Felipe", "Yousef", "Jadiel", "Mordechai", "Dominik", "Junior", "Eliseo", "Fisher", "Harold", "Jaxxon", "Kamdyn", "Maximo", "Caspian", "Kelvin", "Damari", "Fox", "Trent", "Hugh", "Briar", "Franco", "Keanu", "Terrance", "Yahir", "Ameer", "Kaiser", "Thatcher", "Ishaan", "Koa", "Merrick", "Coen", "Rodney", "Brayan", "London", "Rudy", "Gordon", "Bobby", "Aron", "Marc", "Van", "Anakin", "Canaan", "Dario", "Reginald", "Westin", "Darian", "Ledger", "Leighton", "Maxton", "Tadeo", "Valentin", "Aldo", "Khalid", "Nickolas", "Toby", "Dayton", "Jacoby", "Billy", "Gatlin", "Elisha", "Jabari", "Jermaine", "Alvaro", "Marlon", "Mayson", "Blaze", "Jeffery", "Kace", "Braydon", "Achilles", "Brysen", "Saint", "Xzavier", "Aydin", "Eugene", "Adrien", "Cain", "Kylo", "Nova", "Onyx", "Arian", "Bjorn", "Jerome", "Miller", "Alfred", "Kenzo", "Kyng", "Leroy", "Maison", "Jordy", "Stefan", "Wallace", "Benicio", "Kendall", "Zayd", "Blaine", "Tristian", "Anson", "Gannon", "Jeremias", "Marley", "Ronnie", "Dangelo", "Kody", "Will", "Bentlee", "Gerald", "Salvatore", "Turner", "Chad", "Misael", "Mustafa", "Konnor", "Maxim", "Rogelio", "Zakai", "Cory", "Judson", "Brentley", "Darwin", "Louie", "Ulises", "Dakari", "Rocky", "Wesson", "Alfonso", "Payton", "Dwayne", "Juelz", "Duncan", "Keagan", "Deshawn", "Bode", "Bridger", "Skylar", "Brodie", "Landry", "Avi", "Keenan", "Reuben", "Jaxx", "Rene", "Yehuda", "Imran", "Yael", "Alexzander", "Willie", "Cristiano", "Heath", "Lyric", "Davion", "Elon", "Karsyn", "Krew", "Jairo", "Maddux", "Ephraim", "Ignacio", "Vivaan", "Aries", "Vance", "Boden", "Lyle", "Ralph", "Reign", "Camilo", "Draven", "Terrence", "Idris", "Ira", "Javion", "Jericho", "Khari", "Marcellus", "Creed", "Shepard", "Terrell", "Ahmir", "Camdyn", "Cedric", "Howard", "Jad", "Zahir", "Harper", "Justus", "Forest", "Gibson", "Zev", "Alaric", "Decker", "Ernest", "Jesiah", "Torin", "Benedict", "Bowie", "Deangelo", "Genesis", "Harlem", "Kalel", "Kylen", "Bishop", "Immanuel", "Lian", "Zavier", "Archie", "Davian", "Gus", "Kabir", "Korbyn", "Randall", "Benton", "Coleman", "Markus"]}')
  153.             const girlNames = JSON.parse('{"year": 2018, "names": ["Emma", "Olivia", "Ava", "Isabella", "Sophia", "Charlotte", "Mia", "Amelia", "Harper", "Evelyn", "Abigail", "Emily", "Elizabeth", "Mila", "Ella", "Avery", "Sofia", "Camila", "Aria", "Scarlett", "Victoria", "Madison", "Luna", "Grace", "Chloe", "Penelope", "Layla", "Riley", "Zoey", "Nora", "Lily", "Eleanor", "Hannah", "Lillian", "Addison", "Aubrey", "Ellie", "Stella", "Natalie", "Zoe", "Leah", "Hazel", "Violet", "Aurora", "Savannah", "Audrey", "Brooklyn", "Bella", "Claire", "Skylar", "Lucy", "Paisley", "Everly", "Anna", "Caroline", "Nova", "Genesis", "Emilia", "Kennedy", "Samantha", "Maya", "Willow", "Kinsley", "Naomi", "Aaliyah", "Elena", "Sarah", "Ariana", "Allison", "Gabriella", "Alice", "Madelyn", "Cora", "Ruby", "Eva", "Serenity", "Autumn", "Adeline", "Hailey", "Gianna", "Valentina", "Isla", "Eliana", "Quinn", "Nevaeh", "Ivy", "Sadie", "Piper", "Lydia", "Alexa", "Josephine", "Emery", "Julia", "Delilah", "Arianna", "Vivian", "Kaylee", "Sophie", "Brielle", "Madeline", "Peyton", "Rylee", "Clara", "Hadley", "Melanie", "Mackenzie", "Reagan", "Adalynn", "Liliana", "Aubree", "Jade", "Katherine", "Isabelle", "Natalia", "Raelynn", "Maria", "Athena", "Ximena", "Arya", "Leilani", "Taylor", "Faith", "Rose", "Kylie", "Alexandra", "Mary", "Margaret", "Lyla", "Ashley", "Amaya", "Eliza", "Brianna", "Bailey", "Andrea", "Khloe", "Jasmine", "Melody", "Iris", "Isabel", "Norah", "Annabelle", "Valeria", "Emerson", "Adalyn", "Ryleigh", "Eden", "Emersyn", "Anastasia", "Kayla", "Alyssa", "Juliana", "Charlie", "Esther", "Ariel", "Cecilia", "Valerie", "Alina", "Molly", "Reese", "Aliyah", "Lilly", "Parker", "Finley", "Morgan", "Sydney", "Jordyn", "Eloise", "Trinity", "Daisy", "Kimberly", "Lauren", "Genevieve", "Sara", "Arabella", "Harmony", "Elise", "Remi", "Teagan", "Alexis", "London", "Sloane", "Laila", "Lucia", "Diana", "Juliette", "Sienna", "Elliana", "Londyn", "Ayla", "Callie", "Gracie", "Josie", "Amara", "Jocelyn", "Daniela", "Everleigh", "Mya", "Rachel", "Summer", "Alana", "Brooke", "Alaina", "Mckenzie", "Catherine", "Amy", "Presley", "Journee", "Rosalie", "Ember", "Brynlee", "Rowan", "Joanna", "Paige", "Rebecca", "Ana", "Sawyer", "Mariah", "Nicole", "Brooklynn", "Payton", "Marley", "Fiona", "Georgia", "Lila", "Harley", "Adelyn", "Alivia", "Noelle", "Gemma", "Vanessa", "Journey", "Makayla", "Angelina", "Adaline", "Catalina", "Alayna", "Julianna", "Leila", "Lola", "Adriana", "June", "Juliet", "Jayla", "River", "Tessa", "Lia", "Dakota", "Delaney", "Selena", "Blakely", "Ada", "Camille", "Zara", "Malia", "Hope", "Samara", "Vera", "Mckenna", "Briella", "Izabella", "Hayden", "Raegan", "Michelle", "Angela", "Ruth", "Freya", "Kamila", "Vivienne", "Aspen", "Olive", "Kendall", "Elaina", "Thea", "Kali", "Destiny", "Amiyah", "Evangeline", "Cali", "Blake", "Elsie", "Juniper", "Alexandria", "Myla", "Ariella", "Kate", "Mariana", "Lilah", "Charlee", "Daleyza", "Nyla", "Jane", "Maggie", "Zuri", "Aniyah", "Lucille", "Leia", "Melissa", "Adelaide", "Amina", "Giselle", "Lena", "Camilla", "Miriam", "Millie", "Brynn", "Gabrielle", "Sage", "Annie", "Logan", "Lilliana", "Haven", "Jessica", "Kaia", "Magnolia", "Amira", "Adelynn", "Makenzie", "Stephanie", "Nina", "Phoebe", "Arielle", "Evie", "Lyric", "Alessandra", "Gabriela", "Paislee", "Raelyn", "Madilyn", "Paris", "Makenna", "Kinley", "Gracelyn", "Talia", "Maeve", "Rylie", "Kiara", "Evelynn", "Brinley", "Jacqueline", "Laura", "Gracelynn", "Lexi", "Ariah", "Fatima", "Jennifer", "Kehlani", "Alani", "Ariyah", "Luciana", "Allie", "Heidi", "Maci", "Phoenix", "Felicity", "Joy", "Kenzie", "Veronica", "Margot", "Addilyn", "Lana", "Cassidy", "Remington", "Saylor", "Ryan", "Keira", "Harlow", "Miranda", "Angel", "Amanda", "Daniella", "Royalty", "Gwendolyn", "Ophelia", "Heaven", "Jordan", "Madeleine", "Esmeralda", "Kira", "Miracle", "Elle", "Amari", "Danielle", "Daphne", "Willa", "Haley", "Gia", "Kaitlyn", "Oakley", "Kailani", "Winter", "Alicia", "Serena", "Nadia", "Aviana", "Demi", "Jada", "Braelynn", "Dylan", "Ainsley", "Alison", "Camryn", "Avianna", "Bianca", "Skyler", "Scarlet", "Maddison", "Nylah", "Sarai", "Regina", "Dahlia", "Nayeli", "Raven", "Helen", "Adrianna", "Averie", "Skye", "Kelsey", "Tatum", "Kensley", "Maliyah", "Erin", "Viviana", "Jenna", "Anaya", "Carolina", "Shelby", "Sabrina", "Mikayla", "Annalise", "Octavia", "Lennon", "Blair", "Carmen", "Yaretzi", "Kennedi", "Mabel", "Zariah", "Kyla", "Christina", "Selah", "Celeste", "Eve", "Mckinley", "Milani", "Frances", "Jimena", "Kylee", "Leighton", "Katie", "Aitana", "Kayleigh", "Sierra", "Kathryn", "Rosemary", "Jolene", "Alondra", "Elisa", "Helena", "Charleigh", "Hallie", "Lainey", "Avah", "Jazlyn", "Kamryn", "Mira", "Cheyenne", "Francesca", "Antonella", "Wren", "Chelsea", "Amber", "Emory", "Lorelei", "Nia", "Abby", "April", "Emelia", "Carter", "Aylin", "Cataleya", "Bethany", "Marlee", "Carly", "Kaylani", "Emely", "Liana", "Madelynn", "Cadence", "Matilda", "Sylvia", "Myra", "Fernanda", "Oaklyn", "Elianna", "Hattie", "Dayana", "Kendra", "Maisie", "Malaysia", "Kara", "Katelyn", "Maia", "Celine", "Cameron", "Renata", "Jayleen", "Charli", "Emmalyn", "Holly", "Azalea", "Leona", "Alejandra", "Bristol", "Collins", "Imani", "Meadow", "Alexia", "Edith", "Kaydence", "Leslie", "Lilith", "Kora", "Aisha", "Meredith", "Danna", "Wynter", "Emberly", "Julieta", "Michaela", "Alayah", "Jemma", "Reign", "Colette", "Kaliyah", "Elliott", "Johanna", "Remy", "Sutton", "Emmy", "Virginia", "Briana", "Oaklynn", "Adelina", "Everlee", "Megan", "Angelica", "Justice", "Mariam", "Khaleesi", "Macie", "Karsyn", "Alanna", "Aleah", "Mae", "Mallory", "Esme", "Skyla", "Madilynn", "Charley", "Allyson", "Hanna", "Shiloh", "Henley", "Macy", "Maryam", "Ivanna", "Ashlynn", "Lorelai", "Amora", "Ashlyn", "Sasha", "Baylee", "Beatrice", "Itzel", "Priscilla", "Marie", "Jayda", "Liberty", "Rory", "Alessia", "Alaia", "Janelle", "Kalani", "Gloria", "Sloan", "Dorothy", "Greta", "Julie", "Zahra", "Savanna", "Annabella", "Poppy", "Amalia", "Zaylee", "Cecelia", "Coraline", "Kimber", "Emmie", "Anne", "Karina", "Kassidy", "Kynlee", "Monroe", "Anahi", "Jaliyah", "Jazmin", "Maren", "Monica", "Siena", "Marilyn", "Reyna", "Kyra", "Lilian", "Jamie", "Melany", "Alaya", "Ariya", "Kelly", "Rosie", "Adley", "Dream", "Jaylah", "Laurel", "Jazmine", "Mina", "Karla", "Bailee", "Aubrie", "Katalina", "Melina", "Harlee", "Elliot", "Hayley", "Elaine", "Karen", "Dallas", "Irene", "Lylah", "Ivory", "Chaya", "Rosa", "Aleena", "Braelyn", "Nola", "Alma", "Leyla", "Pearl", "Addyson", "Roselyn", "Lacey", "Lennox", "Reina", "Aurelia", "Noa", "Janiyah", "Jessie", "Madisyn", "Saige", "Alia", "Tiana", "Astrid", "Cassandra", "Kyleigh", "Romina", "Stevie", "Haylee", "Zelda", "Lillie", "Aileen", "Brylee", "Eileen", "Yara", "Ensley", "Lauryn", "Giuliana", "Livia", "Anya", "Mikaela", "Palmer", "Lyra", "Mara", "Marina", "Kailey", "Liv", "Clementine", "Kenna", "Briar", "Emerie", "Galilea", "Tiffany", "Bonnie", "Elyse", "Cynthia", "Frida", "Kinslee", "Tatiana", "Joelle", "Armani", "Jolie", "Nalani", "Rayna", "Yareli", "Meghan", "Rebekah", "Addilynn", "Faye", "Zariyah", "Lea", "Aliza", "Julissa", "Lilyana", "Anika", "Kairi", "Aniya", "Noemi", "Angie", "Crystal", "Bridget", "Ari", "Davina", "Amelie", "Amirah", "Annika", "Elora", "Xiomara", "Linda", "Hana", "Laney", "Mercy", "Hadassah", "Madalyn", "Louisa", "Simone", "Kori", "Jillian", "Alena", "Malaya", "Miley", "Milan", "Sariyah", "Malani", "Clarissa", "Nala", "Princess", "Amani", "Analia", "Estella", "Milana", "Aya", "Chana", "Jayde", "Tenley", "Zaria", "Itzayana", "Penny", "Ailani", "Lara", "Aubriella", "Clare", "Lina", "Rhea", "Bria", "Thalia", "Keyla", "Haisley", "Ryann", "Addisyn", "Amaia", "Chanel", "Ellen", "Harmoni", "Aliana", "Tinsley", "Landry", "Paisleigh", "Lexie", "Myah", "Rylan", "Deborah", "Emilee", "Laylah", "Novalee", "Ellis", "Emmeline", "Avalynn", "Hadlee", "Legacy", "Braylee", "Elisabeth", "Kaylie", "Ansley", "Dior", "Paula", "Belen", "Corinne", "Maleah", "Martha", "Teresa", "Salma", "Louise", "Averi", "Lilianna", "Amiya", "Milena", "Royal", "Aubrielle", "Calliope", "Frankie", "Natasha", "Kamilah", "Meilani", "Raina", "Amayah", "Lailah", "Rayne", "Zaniyah", "Isabela", "Nathalie", "Miah", "Opal", "Kenia", "Azariah", "Hunter", "Tori", "Andi", "Keily", "Leanna", "Scarlette", "Jaelyn", "Saoirse", "Selene", "Dalary", "Lindsey", "Marianna", "Ramona", "Estelle", "Giovanna", "Holland", "Nancy", "Emmalynn", "Mylah", "Rosalee", "Sariah", "Zoie", "Blaire", "Lyanna", "Maxine", "Anais", "Dana", "Judith", "Kiera", "Jaelynn", "Noor", "Kai", "Adalee", "Oaklee", "Amaris", "Jaycee", "Belle", "Carolyn", "Della", "Karter", "Sky", "Treasure", "Vienna", "Jewel", "Rivka", "Rosalyn", "Alannah", "Ellianna", "Sunny", "Claudia", "Cara", "Hailee", "Estrella", "Harleigh", "Zhavia", "Alianna", "Brittany", "Jaylene", "Journi", "Marissa", "Mavis", "Iliana", "Jurnee", "Aislinn", "Alyson", "Elsa", "Kamiyah", "Kiana", "Lisa", "Arlette", "Kadence", "Kathleen", "Halle", "Erika", "Sylvie", "Adele", "Erica", "Veda", "Whitney", "Bexley", "Emmaline", "Guadalupe", "August", "Brynleigh", "Gwen", "Promise", "Alisson", "India", "Madalynn", "Paloma", "Patricia", "Samira", "Aliya", "Casey", "Jazlynn", "Paulina", "Dulce", "Kallie", "Perla", "Adrienne", "Alora", "Nataly", "Ayleen", "Christine", "Kaiya", "Ariadne", "Karlee", "Barbara", "Lillianna", "Raquel", "Saniyah", "Yamileth", "Arely", "Celia", "Heavenly", "Kaylin", "Marisol", "Marleigh", "Avalyn", "Berkley", "Kataleya", "Zainab", "Dani", "Egypt", "Joyce", "Kenley", "Annabel", "Kaelyn", "Etta", "Hadleigh", "Joselyn", "Luella", "Jaylee", "Zola", "Alisha", "Ezra", "Queen", "Amia", "Annalee", "Bellamy", "Paola", "Tinley", "Violeta", "Jenesis", "Arden", "Giana", "Wendy", "Ellison", "Florence", "Margo", "Naya", "Robin", "Sandra", "Scout", "Waverly", "Janessa", "Jayden", "Micah", "Novah", "Zora", "Ann", "Jana", "Taliyah", "Vada", "Giavanna", "Ingrid", "Valery", "Azaria", "Emmarie", "Esperanza", "Kailyn", "Aiyana", "Keilani", "Austyn", "Whitley", "Elina", "Kimora", "Maliah"]}')
  154.             var name = ''
  155.             if(keys == 'gengirl') {
  156.                 name = girlNames.names[Math.floor(Math.random() * (Object.keys(girlNames.names).length))]
  157.             } else if (keys == 'genboy') {
  158.                 name = boyNames.names[Math.floor(Math.random() * (Object.keys(boyNames.names).length))]
  159.             }
  160.             keys = name.toLowerCase()
  161.         }
  162.         entry = entry.replace('[name]', name)
  163.         addWorldEntry(keys, entry)
  164.     } else if(lowered.includes('/editkey')) {
  165.         state.command = true
  166.         text = cleanText(text, false)
  167.         var str = text.substring(lowered.search('/editkey'))
  168.    
  169.         var keys = getKeys(str)
  170.         var entry = getEntry(str)
  171.         var found = false
  172.         for(var i = 0; i < worldEntries.length; i++) {
  173.             if(worldEntries[i].keys == keys) {
  174.                 found = true
  175.                 updateWorldEntry(i, keys, entry)
  176.             }
  177.         }
  178.         if(!found)
  179.             state.message = 'Unable to find key(s) \'' + keys + '\''
  180.     } else if(lowered.includes('/delkey')) {
  181.         state.command = true
  182.         text = cleanText(text, true)
  183.         var str = text.substring(lowered.search('/delkey'))
  184.    
  185.         var keys = getKeys(str)
  186.         var entry = getEntry(str)
  187.         var found = false
  188.         for(var i = 0; i < worldEntries.length; i++) {
  189.             if(worldEntries[i].keys == keys) {
  190.                 found = true
  191.                 removeWorldEntry(i)
  192.             }
  193.         }
  194.         if(!found)
  195.             state.message = 'Unable to find key(s) \'' + keys + '\''
  196.     } else if(lowered.includes('/showkeys')) {
  197.         state.command = true
  198.         msg = ''
  199.         for(var i = 0; i < Object.keys(worldEntries).length; i++) {
  200.             msg += worldEntries[i].keys + ': ' + worldEntries[i].entry + '\n'
  201.         }
  202.         state.message = msg
  203.     } else if(lowered.includes('/import')) {
  204.         state.command = true
  205.         text = cleanText(text, false)
  206.    
  207.         var str = text.substring(lowered.search('/import') + 8)
  208.         var obj = JSON.parse(str)
  209.    
  210.         var currKeys = []
  211.         for(var i = 0; i < Object.keys(worldEntries).length; i++) {
  212.             currKeys.push(worldEntries[i].keys)
  213.         }
  214.         for(var i = 0; i < Object.keys(obj).length; i++) {
  215.             if(!currKeys.includes(obj[i].keys))
  216.                 addWorldEntry(obj[i].keys, obj[i].entry)
  217.         }
  218.     } else if(lowered.includes('/export')) {
  219.         state.command = true
  220.         state.message = JSON.stringify(worldEntries)
  221.     } else {
  222.         state.message = ''
  223.     }
  224.     if(state.command) {
  225.         modifiedText = null
  226.         state.command = false
  227.     }
  228.     // You must return an object with the text property defined.
  229.     //return {text: modifiedText}
  230.     return modifiedText
  231. }
  232.  
  233. function getKeys(str) {
  234.     var res = str.split(" ")
  235.     if(res[1].startsWith(';')) {
  236.         var temp = ''
  237.         var foundFirst = false
  238.         for(var i = 0; i < str.length; i++) {
  239.             if(str.charAt(i) == ';') {
  240.                 if(!foundFirst) {
  241.                     i++
  242.                     foundFirst = true
  243.                 } else {
  244.                     i = str.length
  245.                 }
  246.             }
  247.             if(foundFirst && i != str.length) {
  248.                 temp += str.charAt(i)
  249.             }
  250.         }
  251.         res[1] = temp
  252.     }
  253.     if(res[1].includes(',')) {
  254.         var temp = res[1].split(',')
  255.         res[1] = ''
  256.         for(var i = 0; i < temp.length; i++) {
  257.             if(i != temp.length - 1) {
  258.                 res[1] += temp[i] + ', '
  259.             } else {
  260.                 res[1] += temp[i]
  261.             }
  262.         }
  263.     }
  264.     res[1] = res[1].toLowerCase()
  265.     return res[1]
  266. }
  267. function getEntry(str, key) {
  268.     var entry = ''
  269.     if(key.includes(', ')) {
  270.         var temp = key.split(',')
  271.         key = ''
  272.         for(var i = 0; i < temp.length; i++) {
  273.             if(temp[i].startsWith(" ")) {
  274.                 temp[i] = temp[i].substring(1)
  275.             }
  276.             if(i != temp.length - 1) {
  277.                 key += temp[i] + ','
  278.             } else {
  279.                 key += temp[i]
  280.             }
  281.         }
  282.     }
  283.     if(str.startsWith('/addkey ;') || str.startsWith('/editkey ;') || str.startsWith('/delkey ;')) {
  284.         var found = false;
  285.         for(var i = 0; i < str.length; i++) {
  286.             if(str.charAt(i) == ';' && !found) {
  287.                 found = true
  288.             } else if (str.charAt(i) == ';' && found) {
  289.                 entry = str.substring(i + 2);
  290.             }
  291.         }
  292.     } else {
  293.         entry = str.substring(str.toLowerCase().search(key) + key.length + 1)
  294.     }
  295.     if(entry.startsWith(" ")) {
  296.         entry = entry.substring(1)
  297.     }
  298.     return entry
  299. }
  300. function cleanText(str, keepPeriods) {
  301.     if(str.includes('> You say \"')) {
  302.         str = str.substring(12, str.length - 2)
  303.     } else if (str.includes('> You') && !keepPeriods) {
  304.         if(str.charAt(str.length - 1) == '.') {
  305.             str = str.substring(6, str.length - 2)
  306.         }
  307.     }
  308.     return str
  309. }
  310.  
  311. //#endregion
  312.  
  313.  
  314. function generateRandName(text, lowered) {
  315.    
  316.     if (!lowered.includes('rn_') && !lowered.includes('rni_') && !lowered.includes('rnc_') && !lowered.includes('rnf_') && !lowered.includes('rnm_')) {
  317.         //console.log('Returning from gen')
  318.         return text;
  319.     }
  320.  
  321.     let name = ''
  322.  
  323.     const names = {
  324.         // #GENERIC
  325.         'mNames' : ["Liam", "Noah", "William", "James", "Oliver", "Benjamin", "Elijah", "Lucas", "Mason", "Logan", "Alexander", "Ethan", "Jacob", "Michael", "Daniel", "Henry", "Jackson", "Sebastian", "Aiden", "Matthew", "Samuel", "David", "Joseph", "Carter", "Owen", "Wyatt", "John", "Jack", "Luke", "Jayden", "Dylan", "Grayson",
  326.             "Levi", "Isaac", "Gabriel", "Julian", "Mateo", "Anthony", "Jaxon", "Lincoln", "Joshua", "Christopher", "Andrew", "Theodore", "Caleb", "Ryan", "Asher", "Nathan", "Thomas", "Leo", "Isaiah", "Charles", "Josiah", "Hudson", "Christian", "Hunter", "Connor", "Eli", "Ezra", "Aaron", "Landon", "Adrian", "Jonathan", "Nolan", "Jeremiah",
  327.             "Easton", "Elias", "Colton", "Cameron", "Carson", "Robert", "Angel", "Maverick", "Nicholas", "Dominic", "Jaxson", "Greyson", "Adam", "Ian", "Austin", "Santiago", "Jordan", "Cooper", "Brayden", "Roman", "Evan", "Ezekiel", "Xavier", "Jose", "Jace", "Jameson", "Leonardo", "Bryson", "Axel", "Everett", "Parker", "Kayden", "Miles",
  328.             "Sawyer", "Jason", "Declan", "Weston", "Micah", "Ayden", "Wesley", "Luca", "Vincent", "Damian", "Zachary", "Silas", "Gavin", "Chase", "Kai", "Emmett", "Harrison", "Nathaniel", "Kingston", "Cole", "Tyler", "Bennett", "Bentley", "Ryker", "Tristan", "Brandon", "Kevin", "Luis", "George", "Ashton", "Rowan", "Braxton", "Ryder",
  329.             "Gael", "Ivan", "Diego", "Maxwell", "Max", "Carlos", "Kaiden", "Juan", "Maddox", "Justin", "Waylon", "Calvin", "Giovanni", "Jonah", "Abel", "Jayce", "Jesus", "Amir", "King", "Beau", "Camden", "Alex", "Jasper", "Malachi", "Brody", "Jude", "Blake", "Emmanuel", "Eric", "Brooks", "Elliot", "Antonio", "Abraham", "Timothy", "Finn",
  330.             "Rhett", "Elliott", "Edward", "August", "Xander", "Alan", "Dean", "Lorenzo", "Bryce", "Karter", "Victor", "Milo", "Miguel", "Hayden", "Graham", "Grant", "Zion", "Tucker", "Jesse", "Zayden", "Joel", "Richard", "Patrick", "Emiliano", "Avery", "Nicolas", "Brantley", "Dawson", "Myles", "Matteo", "River", "Steven", "Thiago", "Zane",
  331.             "Matias", "Judah", "Messiah", "Jeremy", "Preston", "Oscar", "Kaleb", "Alejandro", "Marcus", "Mark", "Peter", "Maximus", "Barrett", "Jax", "Andres", "Holden", "Legend", "Charlie", "Knox", "Kaden", "Paxton", "Kyrie", "Kyle", "Griffin", "Josue", "Kenneth", "Beckett", "Enzo", "Adriel", "Arthur", "Felix", "Bryan", "Lukas", "Paul",
  332.             "Brian", "Colt", "Caden", "Leon", "Archer", "Omar", "Israel", "Aidan", "Theo", "Javier", "Remington", "Jaden", "Bradley", "Emilio", "Colin", "Riley", "Cayden", "Phoenix", "Clayton", "Simon", "Ace", "Nash", "Derek", "Rafael", "Zander", "Brady", "Jorge", "Jake", "Louis", "Damien", "Karson", "Walker", "Maximiliano", "Amari", "Sean",
  333.             "Chance", "Walter", "Martin", "Finley", "Andre", "Tobias", "Cash", "Corbin", "Arlo", "Iker", "Erick", "Emerson", "Gunner", "Cody", "Stephen", "Francisco", "Killian", "Dallas", "Reid", "Manuel", "Lane", "Atlas", "Rylan", "Jensen", "Ronan", "Beckham", "Daxton", "Anderson", "Kameron", "Raymond", "Orion", "Cristian", "Tanner", "Kyler",
  334.             "Jett", "Cohen", "Ricardo", "Spencer", "Gideon", "Ali", "Fernando", "Jaiden", "Titus", "Travis", "Bodhi", "Eduardo", "Dante", "Ellis", "Prince", "Kane", "Luka", "Kash", "Hendrix", "Desmond", "Donovan", "Mario", "Atticus", "Cruz", "Garrett", "Hector", "Angelo", "Jeffrey", "Edwin", "Cesar", "Zayn", "Devin", "Conor", "Warren", "Odin",
  335.             "Jayceon", "Romeo", "Julius", "Jaylen", "Hayes", "Kayson", "Muhammad", "Jaxton", "Joaquin", "Caiden", "Dakota", "Major", "Keegan", "Sergio", "Marshall", "Johnny", "Kade", "Edgar", "Leonel", "Ismael", "Marco", "Tyson", "Wade", "Collin", "Troy", "Nasir", "Conner", "Adonis", "Jared", "Rory", "Andy", "Jase", "Lennox", "Shane", "Malik",
  336.             "Ari", "Reed", "Seth", "Clark", "Erik", "Lawson", "Trevor", "Gage", "Nico", "Malakai", "Quinn", "Cade", "Johnathan", "Sullivan", "Solomon", "Cyrus", "Fabian", "Pedro", "Frank", "Shawn", "Malcolm", "Khalil", "Nehemiah", "Dalton", "Mathias", "Jay", "Ibrahim", "Peyton", "Winston", "Kason", "Zayne", "Noel", "Princeton", "Matthias",
  337.             "Gregory", "Sterling", "Dominick", "Elian", "Grady", "Russell", "Finnegan", "Ruben", "Gianni", "Porter", "Kendrick", "Leland", "Pablo", "Allen", "Hugo", "Raiden", "Kolton", "Remy", "Ezequiel", "Damon", "Emanuel", "Zaiden", "Otto", "Bowen", "Marcos", "Abram", "Kasen", "Franklin", "Royce", "Jonas", "Sage", "Philip", "Esteban", "Drake",
  338.             "Kashton", "Roberto", "Harvey", "Alexis", "Kian", "Jamison", "Maximilian", "Adan", "Milan", "Phillip", "Albert", "Dax", "Mohamed", "Ronin", "Kamden", "Hank", "Memphis", "Oakley", "Augustus", "Drew", "Moises", "Armani", "Rhys", "Benson", "Jayson", "Kyson", "Braylen", "Corey", "Gunnar", "Omari", "Alonzo", "Landen", "Armando", "Derrick",
  339.             "Dexter", "Enrique", "Bruce", "Nikolai", "Francis", "Rocco", "Kairo", "Royal", "Zachariah", "Arjun", "Deacon", "Skyler", "Eden", "Alijah", "Rowen", "Pierce", "Uriel", "Ronald", "Luciano", "Tate", "Frederick", "Kieran", "Lawrence", "Moses", "Rodrigo", "Brycen", "Leonidas", "Nixon", "Keith", "Chandler", "Case", "Davis", "Asa", "Darius",
  340.             "Isaias", "Aden", "Jaime", "Landyn", "Raul", "Niko", "Trenton", "Apollo", "Cairo", "Izaiah", "Scott", "Dorian", "Julio", "Wilder", "Santino", "Dustin", "Donald", "Raphael", "Saul", "Taylor", "Ayaan", "Duke", "Ryland", "Tatum", "Ahmed", "Moshe", "Edison", "Emmitt", "Cannon", "Alec", "Danny", "Keaton", "Roy", "Conrad", "Roland",
  341.             "Quentin", "Lewis", "Samson", "Brock", "Kylan", "Cason", "Ahmad", "Jalen", "Nikolas", "Braylon", "Kamari", "Dennis", "Callum", "Justice", "Soren", "Rayan", "Aarav", "Gerardo", "Ares", "Brendan", "Jamari", "Kaison", "Yusuf", "Issac", "Jasiah", "Callen", "Forrest", "Makai", "Crew", "Kobe", "Bo", "Julien", "Mathew", "Braden", "Johan",
  342.             "Marvin", "Zaid", "Stetson", "Casey", "Ty", "Ariel", "Tony", "Zain", "Callan", "Cullen", "Sincere", "Uriah", "Dillon", "Kannon", "Colby", "Axton", "Cassius", "Quinton", "Mekhi", "Reece", "Alessandro", "Jerry", "Mauricio", "Sam", "Trey", "Mohammad", "Alberto", "Gustavo", "Arturo", "Fletcher", "Marcelo", "Abdiel", "Hamza", "Alfredo",
  343.             "Chris", "Finnley", "Curtis", "Kellan", "Quincy", "Kase", "Harry", "Kyree", "Wilson", "Cayson", "Hezekiah", "Kohen", "Neil", "Mohammed", "Raylan", "Kaysen", "Lucca", "Sylas", "Mack", "Leonard", "Lionel", "Ford", "Roger", "Rex", "Alden", "Boston", "Colson", "Briggs", "Zeke", "Dariel", "Kingsley", "Valentino", "Jamir", "Salvador",
  344.             "Vihaan", "Mitchell", "Lance", "Lucian", "Darren", "Jimmy", "Alvin", "Amos", "Tripp", "Zaire", "Layton", "Reese", "Casen", "Colten", "Brennan", "Korbin", "Sonny", "Bruno", "Orlando", "Devon", "Huxley", "Boone", "Maurice", "Nelson", "Douglas", "Randy", "Gary", "Lennon", "Titan", "Denver", "Jaziel", "Noe", "Jefferson", "Ricky",
  345.             "Lochlan", "Rayden", "Bryant", "Langston", "Lachlan", "Clay", "Abdullah", "Lee", "Baylor", "Leandro", "Ben", "Kareem", "Layne", "Joe", "Crosby", "Deandre", "Demetrius", "Kellen", "Carl", "Jakob", "Ridge", "Bronson", "Jedidiah", "Rohan", "Larry", "Stanley", "Tomas", "Shiloh", "Thaddeus", "Watson", "Baker", "Vicente", "Koda",
  346.             "Jagger", "Nathanael", "Carmelo", "Shepherd", "Graysen", "Melvin", "Ernesto", "Jamie", "Yosef", "Clyde", "Eddie", "Tristen", "Grey", "Ray", "Tommy", "Samir", "Ramon", "Santana", "Kristian", "Marcel", "Wells", "Zyaire", "Brecken", "Byron", "Otis", "Reyansh", "Axl", "Joey", "Trace", "Morgan", "Musa", "Harlan", "Enoch", "Henrik",
  347.             "Kristopher", "Talon", "Rey", "Guillermo", "Houston", "Jon", "Vincenzo", "Dane", "Terry", "Azariah", "Castiel", "Kye", "Augustine", "Zechariah", "Joziah", "Kamryn", "Hassan", "Jamal", "Chaim", "Bodie", "Emery", "Branson", "Jaxtyn", "Kole", "Wayne", "Aryan", "Alonso", "Brixton", "Madden", "Allan", "Flynn", "Jaxen", "Harley",
  348.             "Magnus", "Sutton", "Dash", "Anders", "Westley", "Brett", "Emory", "Felipe", "Yousef", "Jadiel", "Mordechai", "Dominik", "Junior", "Eliseo", "Fisher", "Harold", "Jaxxon", "Kamdyn", "Maximo", "Caspian", "Kelvin", "Damari", "Fox", "Trent", "Hugh", "Briar", "Franco", "Keanu", "Terrance", "Yahir", "Ameer", "Kaiser", "Thatcher",
  349.             "Ishaan", "Koa", "Merrick", "Coen", "Rodney", "Brayan", "London", "Rudy", "Gordon", "Bobby", "Aron", "Marc", "Van", "Anakin", "Canaan", "Dario", "Reginald", "Westin", "Darian", "Ledger", "Leighton", "Maxton", "Tadeo", "Valentin", "Aldo", "Khalid", "Nickolas", "Toby", "Dayton", "Jacoby", "Billy", "Gatlin", "Elisha", "Jabari",
  350.             "Jermaine", "Alvaro", "Marlon", "Mayson", "Blaze", "Jeffery", "Kace", "Braydon", "Achilles", "Brysen", "Saint", "Xzavier", "Aydin", "Eugene", "Adrien", "Cain", "Kylo", "Nova", "Onyx", "Arian", "Bjorn", "Jerome", "Miller", "Alfred", "Kenzo", "Kyng", "Leroy", "Maison", "Jordy", "Stefan", "Wallace", "Benicio", "Kendall", "Zayd",
  351.             "Blaine", "Tristian", "Anson", "Gannon", "Jeremias", "Marley", "Ronnie", "Dangelo", "Kody", "Will", "Bentlee", "Gerald", "Salvatore", "Turner", "Chad", "Misael", "Mustafa", "Konnor", "Maxim", "Rogelio", "Zakai", "Cory", "Judson", "Brentley", "Darwin", "Louie", "Ulises", "Dakari", "Rocky", "Wesson", "Alfonso", "Payton", "Dwayne",
  352.             "Juelz", "Duncan", "Keagan", "Deshawn", "Bode", "Bridger", "Skylar", "Brodie", "Landry", "Avi", "Keenan", "Reuben", "Jaxx", "Rene", "Yehuda", "Imran", "Yael", "Alexzander", "Willie", "Cristiano", "Heath", "Lyric", "Davion", "Elon", "Karsyn", "Krew", "Jairo", "Maddux", "Ephraim", "Ignacio", "Vivaan", "Aries", "Vance", "Boden",
  353.             "Lyle", "Ralph", "Reign", "Camilo", "Draven", "Terrence", "Idris", "Ira", "Javion", "Jericho", "Khari", "Marcellus", "Creed", "Shepard", "Terrell", "Ahmir", "Camdyn", "Cedric", "Howard", "Jad", "Zahir", "Harper", "Justus", "Forest", "Gibson", "Zev", "Alaric", "Decker", "Ernest", "Jesiah", "Torin", "Benedict", "Bowie", "Deangelo",
  354.             "Genesis", "Harlem", "Kalel", "Kylen", "Bishop", "Immanuel", "Lian", "Zavier", "Archie", "Davian", "Gus", "Kabir", "Korbyn", "Randall", "Benton", "Coleman", "Markus"],
  355.        
  356.         'fNames' : ["Emma", "Olivia", "Ava", "Isabella", "Sophia", "Charlotte", "Mia", "Amelia", "Harper", "Evelyn", "Abigail", "Emily", "Elizabeth", "Mila", "Ella", "Avery", "Sofia", "Camila", "Aria", "Scarlett", "Victoria", "Madison", "Luna", "Grace", "Chloe", "Penelope", "Layla", "Riley", "Zoey", "Nora", "Lily", "Eleanor", "Hannah",
  357.             "Lillian", "Addison", "Aubrey", "Ellie", "Stella", "Natalie", "Zoe", "Leah", "Hazel", "Violet", "Aurora", "Savannah", "Audrey", "Brooklyn", "Bella", "Claire", "Skylar", "Lucy", "Paisley", "Everly", "Anna", "Caroline", "Nova", "Genesis", "Emilia", "Kennedy", "Samantha", "Maya", "Willow", "Kinsley", "Naomi", "Aaliyah", "Elena",
  358.             "Sarah", "Ariana", "Allison", "Gabriella", "Alice", "Madelyn", "Cora", "Ruby", "Eva", "Serenity", "Autumn", "Adeline", "Hailey", "Gianna", "Valentina", "Isla", "Eliana", "Quinn", "Nevaeh", "Ivy", "Sadie", "Piper", "Lydia", "Alexa", "Josephine", "Emery", "Julia", "Delilah", "Arianna", "Vivian", "Kaylee", "Sophie", "Brielle",
  359.             "Madeline", "Peyton", "Rylee", "Clara", "Hadley", "Melanie", "Mackenzie", "Reagan", "Adalynn", "Liliana", "Aubree", "Jade", "Katherine", "Isabelle", "Natalia", "Raelynn", "Maria", "Athena", "Ximena", "Arya", "Leilani", "Taylor", "Faith", "Rose", "Kylie", "Alexandra", "Mary", "Margaret", "Lyla", "Ashley", "Amaya", "Eliza",
  360.             "Brianna", "Bailey", "Andrea", "Khloe", "Jasmine", "Melody", "Iris", "Isabel", "Norah", "Annabelle", "Valeria", "Emerson", "Adalyn", "Ryleigh", "Eden", "Emersyn", "Anastasia", "Kayla", "Alyssa", "Juliana", "Charlie", "Esther", "Ariel", "Cecilia", "Valerie", "Alina", "Molly", "Reese", "Aliyah", "Lilly", "Parker", "Finley",
  361.             "Morgan", "Sydney", "Jordyn", "Eloise", "Trinity", "Daisy", "Kimberly", "Lauren", "Genevieve", "Sara", "Arabella", "Harmony", "Elise", "Remi", "Teagan", "Alexis", "London", "Sloane", "Laila", "Lucia", "Diana", "Juliette", "Sienna", "Elliana", "Londyn", "Ayla", "Callie", "Gracie", "Josie", "Amara", "Jocelyn", "Daniela", "Everleigh",
  362.             "Mya", "Rachel", "Summer", "Alana", "Brooke", "Alaina", "Mckenzie", "Catherine", "Amy", "Presley", "Journee", "Rosalie", "Ember", "Brynlee", "Rowan", "Joanna", "Paige", "Rebecca", "Ana", "Sawyer", "Mariah", "Nicole", "Brooklynn", "Payton", "Marley", "Fiona", "Georgia", "Lila", "Harley", "Adelyn", "Alivia", "Noelle", "Gemma",
  363.             "Vanessa", "Journey", "Makayla", "Angelina", "Adaline", "Catalina", "Alayna", "Julianna", "Leila", "Lola", "Adriana", "June", "Juliet", "Jayla", "River", "Tessa", "Lia", "Dakota", "Delaney", "Selena", "Blakely", "Ada", "Camille", "Zara", "Malia", "Hope", "Samara", "Vera", "Mckenna", "Briella", "Izabella", "Hayden", "Raegan",
  364.             "Michelle", "Angela", "Ruth", "Freya", "Kamila", "Vivienne", "Aspen", "Olive", "Kendall", "Elaina", "Thea", "Kali", "Destiny", "Amiyah", "Evangeline", "Cali", "Blake", "Elsie", "Juniper", "Alexandria", "Myla", "Ariella", "Kate", "Mariana", "Lilah", "Charlee", "Daleyza", "Nyla", "Jane", "Maggie", "Zuri", "Aniyah", "Lucille",
  365.             "Leia", "Melissa", "Adelaide", "Amina", "Giselle", "Lena", "Camilla", "Miriam", "Millie", "Brynn", "Gabrielle", "Sage", "Annie", "Logan", "Lilliana", "Haven", "Jessica", "Kaia", "Magnolia", "Amira", "Adelynn", "Makenzie", "Stephanie", "Nina", "Phoebe", "Arielle", "Evie", "Lyric", "Alessandra", "Gabriela", "Paislee", "Raelyn",
  366.             "Madilyn", "Paris", "Makenna", "Kinley", "Gracelyn", "Talia", "Maeve", "Rylie", "Kiara", "Evelynn", "Brinley", "Jacqueline", "Laura", "Gracelynn", "Lexi", "Ariah", "Fatima", "Jennifer", "Kehlani", "Alani", "Ariyah", "Luciana", "Allie", "Heidi", "Maci", "Phoenix", "Felicity", "Joy", "Kenzie", "Veronica", "Margot", "Addilyn",
  367.             "Lana", "Cassidy", "Remington", "Saylor", "Ryan", "Keira", "Harlow", "Miranda", "Angel", "Amanda", "Daniella", "Royalty", "Gwendolyn", "Ophelia", "Heaven", "Jordan", "Madeleine", "Esmeralda", "Kira", "Miracle", "Elle", "Amari", "Danielle", "Daphne", "Willa", "Haley", "Gia", "Kaitlyn", "Oakley", "Kailani", "Winter", "Alicia",
  368.             "Serena", "Nadia", "Aviana", "Demi", "Jada", "Braelynn", "Dylan", "Ainsley", "Alison", "Camryn", "Avianna", "Bianca", "Skyler", "Scarlet", "Maddison", "Nylah", "Sarai", "Regina", "Dahlia", "Nayeli", "Raven", "Helen", "Adrianna", "Averie", "Skye", "Kelsey", "Tatum", "Kensley", "Maliyah", "Erin", "Viviana", "Jenna", "Anaya",
  369.             "Carolina", "Shelby", "Sabrina", "Mikayla", "Annalise", "Octavia", "Lennon", "Blair", "Carmen", "Yaretzi", "Kennedi", "Mabel", "Zariah", "Kyla", "Christina", "Selah", "Celeste", "Eve", "Mckinley", "Milani", "Frances", "Jimena", "Kylee", "Leighton", "Katie", "Aitana", "Kayleigh", "Sierra", "Kathryn", "Rosemary", "Jolene",
  370.             "Alondra", "Elisa", "Helena", "Charleigh", "Hallie", "Lainey", "Avah", "Jazlyn", "Kamryn", "Mira", "Cheyenne", "Francesca", "Antonella", "Wren", "Chelsea", "Amber", "Emory", "Lorelei", "Nia", "Abby", "April", "Emelia", "Carter", "Aylin", "Cataleya", "Bethany", "Marlee", "Carly", "Kaylani", "Emely", "Liana", "Madelynn",
  371.             "Cadence", "Matilda", "Sylvia", "Myra", "Fernanda", "Oaklyn", "Elianna", "Hattie", "Dayana", "Kendra", "Maisie", "Malaysia", "Kara", "Katelyn", "Maia", "Celine", "Cameron", "Renata", "Jayleen", "Charli", "Emmalyn", "Holly", "Azalea", "Leona", "Alejandra", "Bristol", "Collins", "Imani", "Meadow", "Alexia", "Edith", "Kaydence",
  372.             "Leslie", "Lilith", "Kora", "Aisha", "Meredith", "Danna", "Wynter", "Emberly", "Julieta", "Michaela", "Alayah", "Jemma", "Reign", "Colette", "Kaliyah", "Elliott", "Johanna", "Remy", "Sutton", "Emmy", "Virginia", "Briana", "Oaklynn", "Adelina", "Everlee", "Megan", "Angelica", "Justice", "Mariam", "Khaleesi", "Macie", "Karsyn",
  373.             "Alanna", "Aleah", "Mae", "Mallory", "Esme", "Skyla", "Madilynn", "Charley", "Allyson", "Hanna", "Shiloh", "Henley", "Macy", "Maryam", "Ivanna", "Ashlynn", "Lorelai", "Amora", "Ashlyn", "Sasha", "Baylee", "Beatrice", "Itzel", "Priscilla", "Marie", "Jayda", "Liberty", "Rory", "Alessia", "Alaia", "Janelle", "Kalani", "Gloria",
  374.             "Sloan", "Dorothy", "Greta", "Julie", "Zahra", "Savanna", "Annabella", "Poppy", "Amalia", "Zaylee", "Cecelia", "Coraline", "Kimber", "Emmie", "Anne", "Karina", "Kassidy", "Kynlee", "Monroe", "Anahi", "Jaliyah", "Jazmin", "Maren", "Monica", "Siena", "Marilyn", "Reyna", "Kyra", "Lilian", "Jamie", "Melany", "Alaya", "Ariya",
  375.             "Kelly", "Rosie", "Adley", "Dream", "Jaylah", "Laurel", "Jazmine", "Mina", "Karla", "Bailee", "Aubrie", "Katalina", "Melina", "Harlee", "Elliot", "Hayley", "Elaine", "Karen", "Dallas", "Irene", "Lylah", "Ivory", "Chaya", "Rosa", "Aleena", "Braelyn", "Nola", "Alma", "Leyla", "Pearl", "Addyson", "Roselyn", "Lacey", "Lennox",
  376.             "Reina", "Aurelia", "Noa", "Janiyah", "Jessie", "Madisyn", "Saige", "Alia", "Tiana", "Astrid", "Cassandra", "Kyleigh", "Romina", "Stevie", "Haylee", "Zelda", "Lillie", "Aileen", "Brylee", "Eileen", "Yara", "Ensley", "Lauryn", "Giuliana", "Livia", "Anya", "Mikaela", "Palmer", "Lyra", "Mara", "Marina", "Kailey", "Liv", "Clementine",
  377.             "Kenna", "Briar", "Emerie", "Galilea", "Tiffany", "Bonnie", "Elyse", "Cynthia", "Frida", "Kinslee", "Tatiana", "Joelle", "Armani", "Jolie", "Nalani", "Rayna", "Yareli", "Meghan", "Rebekah", "Addilynn", "Faye", "Zariyah", "Lea", "Aliza", "Julissa", "Lilyana", "Anika", "Kairi", "Aniya", "Noemi", "Angie", "Crystal", "Bridget",
  378.             "Ari", "Davina", "Amelie", "Amirah", "Annika", "Elora", "Xiomara", "Linda", "Hana", "Laney", "Mercy", "Hadassah", "Madalyn", "Louisa", "Simone", "Kori", "Jillian", "Alena", "Malaya", "Miley", "Milan", "Sariyah", "Malani", "Clarissa", "Nala", "Princess", "Amani", "Analia", "Estella", "Milana", "Aya", "Chana", "Jayde", "Tenley",
  379.             "Zaria", "Itzayana", "Penny", "Ailani", "Lara", "Aubriella", "Clare", "Lina", "Rhea", "Bria", "Thalia", "Keyla", "Haisley", "Ryann", "Addisyn", "Amaia", "Chanel", "Ellen", "Harmoni", "Aliana", "Tinsley", "Landry", "Paisleigh", "Lexie", "Myah", "Rylan", "Deborah", "Emilee", "Laylah", "Novalee", "Ellis", "Emmeline", "Avalynn",
  380.             "Hadlee", "Legacy", "Braylee", "Elisabeth", "Kaylie", "Ansley", "Dior", "Paula", "Belen", "Corinne", "Maleah", "Martha", "Teresa", "Salma", "Louise", "Averi", "Lilianna", "Amiya", "Milena", "Royal", "Aubrielle", "Calliope", "Frankie", "Natasha", "Kamilah", "Meilani", "Raina", "Amayah", "Lailah", "Rayne", "Zaniyah", "Isabela",
  381.             "Nathalie", "Miah", "Opal", "Kenia", "Azariah", "Hunter", "Tori", "Andi", "Keily", "Leanna", "Scarlette", "Jaelyn", "Saoirse", "Selene", "Dalary", "Lindsey", "Marianna", "Ramona", "Estelle", "Giovanna", "Holland", "Nancy", "Emmalynn", "Mylah", "Rosalee", "Sariah", "Zoie", "Blaire", "Lyanna", "Maxine", "Anais", "Dana", "Judith",
  382.             "Kiera", "Jaelynn", "Noor", "Kai", "Adalee", "Oaklee", "Amaris", "Jaycee", "Belle", "Carolyn", "Della", "Karter", "Sky", "Treasure", "Vienna", "Jewel", "Rivka", "Rosalyn", "Alannah", "Ellianna", "Sunny", "Claudia", "Cara", "Hailee", "Estrella", "Harleigh", "Zhavia", "Alianna", "Brittany", "Jaylene", "Journi", "Marissa", "Mavis",
  383.             "Iliana", "Jurnee", "Aislinn", "Alyson", "Elsa", "Kamiyah", "Kiana", "Lisa", "Arlette", "Kadence", "Kathleen", "Halle", "Erika", "Sylvie", "Adele", "Erica", "Veda", "Whitney", "Bexley", "Emmaline", "Guadalupe", "August", "Brynleigh", "Gwen", "Promise", "Alisson", "India", "Madalynn", "Paloma", "Patricia", "Samira", "Aliya",
  384.             "Casey", "Jazlynn", "Paulina", "Dulce", "Kallie", "Perla", "Adrienne", "Alora", "Nataly", "Ayleen", "Christine", "Kaiya", "Ariadne", "Karlee", "Barbara", "Lillianna", "Raquel", "Saniyah", "Yamileth", "Arely", "Celia", "Heavenly", "Kaylin", "Marisol", "Marleigh", "Avalyn", "Berkley", "Kataleya", "Zainab", "Dani", "Egypt",
  385.             "Joyce", "Kenley", "Annabel", "Kaelyn", "Etta", "Hadleigh", "Joselyn", "Luella", "Jaylee", "Zola", "Alisha", "Ezra", "Queen", "Amia", "Annalee", "Bellamy", "Paola", "Tinley", "Violeta", "Jenesis", "Arden", "Giana", "Wendy", "Ellison", "Florence", "Margo", "Naya",
  386.             "Robin", "Sandra", "Scout", "Waverly", "Janessa", "Jayden", "Micah", "Novah", "Zora", "Ann", "Jana", "Taliyah", "Vada", "Giavanna", "Ingrid", "Valery", "Azaria", "Emmarie", "Esperanza", "Kailyn", "Aiyana", "Keilani", "Austyn", "Whitley", "Elina", "Kimora", "Maliah"],
  387.        
  388.         // #BARBARIAN
  389.         'mBarb' : ["Adolf","Bernódus","Bjarmi","Björgúlfur","Dónaldur","Einthór","Erlar","Fossmar","Gill","Grímnir","Harald","Herluf","Hersir","Hjallkár","Hjalte","Hreimur",
  390.             "Ívar","Júlíus","Katarínus","Kjartan","Leifur","Loftur","Lói","Morgan","Rúnar","Rune","Runólfur","Sejr","Styrr","Theódór","Thórar","Tindri","Valur","Vilmar"],
  391.         'fBarb' : ["Albjört","Atena","Eybjörg","Eygló","Eyrós","Fura","Gabriela","Gullbrá","Herlaug","Hinrika","Íselín","Jórunn","Julia","Maia","Málmfridur","Marja","Millý",
  392.             "Minney","Peta","Rafney","Rósmunda","Sigdís","Símona","Snæborg","Sónata","Tíalilja","Unndís","Villa","Vinbjörg"],
  393.        
  394.         // #ELF
  395.         'mElf' : ["Remmo", "Lanatno", "Sercemo", "Ceutano", "Estano", "Sanwo", "Ferender", "Cuilon", "Lemyamo", "Ramano", "Fanano", "Poicon", "Lilómëion", "Nambamo", "Tino",
  396.             "Ñarmon", "Thanyano", "Olótion", "Tino", "Varyo", "Culumaldon", "Ciryon", "Caimon", "Mantamo", "Sirilon", "Harmamo", "Arinder", "Tyavno", "Yalmo", "Londion",
  397.             "Árener", "Wistaro", "Wilmo", "Iestor", "Gwilithon", "Thurilostor", "Gruithedir", "Harnon", "Hûrchon", "Corudor", "Bardor"],
  398.         'fElf' : ["Eruwen", "Gaussel", "Awarthadis", "Deliril", "Pelilassien", "Breniadis", "Teliriel", "Calphil", "Duineneth", "Parcheth", "Lachril", "Cabriel", "Nirormes",
  399.             "Dimaethorel", "Iail", "Padradis", "Adlegril", "Galenasdes", "Gwathil", "Nîdiel", "Neithriel", "Rostril", "Calemirien", "Gruinthel", "Haewil", "Hwiniril",
  400.             "Lachadis", "Tulussien", "Pethiel", "Magolil", "Narrien", "Gwathrril", "Morgulel", "Halel", "Suilril", "Nodrien"],
  401.        
  402.         'ElfPrefix' : ["Mal", "Gwaer", "Baran", "Rista", "Had", "Galad", "Telir", "Lach", "Niror", "Suil", "Deli", "Nîd", "Thâr", "Teitha", "Delos", "Míria", "Maed",
  403.             "Iphan", "Beleg", "Far", "Iaun", "Colfin", "Fea", "Eru", "Rem", "Gau", "Awartha", "Esta", "San", "Deli", "Calph", "Duinen", "Lilómë", "Namba", "Olót", "Vary",
  404.             "Culmal", "Cir", "Celeb", "Gwath", "Nîd", "Caim"],
  405.         'ElfSuffixMale' : ["ion", "on", "dir", "hawn", "tor", "en", "no", "mo"],
  406.         'ElfSuffixFemale' : ["dis", "mes", "es", "bes", "des", "dis", "ril", "iel", "wen", "il", "hil", "eth", "sil", "rían"],
  407.        
  408.         // #DWARF
  409.         'Dwarf' : ["Borlun", "Khemlor", "Bosrim", "Nenram", "Bresrer", "Khem", "Gluti", "Nake", "Nadu", "Doim", "Mhandom", "Kosuk", "Friben", "Glumbak", "Frenrek", "Floba",
  410.             "Goina", "Kot", "Thog", "Dwum", "Glemuk", "Felrak", "Furim", "Mhumuk", "Tifon", "Beg", "Gret", "Frumu", "Meti", "Goil", "Khurer", "Gendon", "Dofran",
  411.             "Frenuk", "Mhisren", "Flaini", "Flek", "Fugo", "Glaili", "Thrada", "Mulbar", "Kobak", "Thamok", "Tindor", "Mindom", "Kidu", "Drele", "Kroge", "Nain"],
  412.         'DwarfPrefix' : ["Borl", "Khem", "Bos", "Nen", "Bres", "Glu", "Na", "Gloi", "Mhand", "Flo", "Fro", "Goi", "Dw", "Fu", "Ti", "Fel", "Beg", "Dof", "Flai"],
  413.         'DwarfSuffix' : ["un", "lor", "im", "rim", "ram", "am", "rer", "ti", "ke", "du", "uk", "na", "um", "ak", "rak", "on", "li", "le", "ar", "bar", "bak", "rek", "ek", "l" ],
  414.        
  415.         'DemonPrefix' : ["Bund", "Zon", "Vut", "Nuk", "Bhol", "Non", "Hukga", "Votro", "Runi", "Bobaz", "Zaz", "Gug", "Nok", "Dek", "Heg", "Gul", "Nalvu", "Hakva",
  416.             "Geke", "Vuluz", "Dhuz", "Val", "Bel", "Zath", "Bul", "Bot", "Bunzo", "Nubru", "Dotul", "Donu", "Khug", "Dhez", "Ra", "Bobak", "Broz", "Kinn", "Jolva", "Bok",
  417.             "Raz", "Xork", "Zuglo", "Rorror", "Gugr", "Rag"],
  418.         'DemonSuffix' : ["od", "zur", "zin", "rak", "gor", "gud", "bil", "dak", "throd", "rod", "zag", "zug", "rur", "ur", "gol", "dur", "zun", "ger", "val", "kan", "cok",
  419.             "nul", "al", "dal", "rel", "rel", "zomun", "mun", "un", "nad", "ad", "zad", "gol", "kes", "mis", "goraz", "uz"],
  420.        
  421.        
  422.         'fHobbit' : ["Lyla", "Eglantine", "Dicentra", "Angelonia", "Beryl", "Scilla", "Dora", "Rosa", "Sapphire", "Bell", "Lily", "Jasmina", "Firiel", "Monarda", "Clover", "Liatra", "Laura"],
  423.         'mHobbit' : ["Sad", "Rat", "Oth", "Albe", "Theode", "Arn", "Gross", "Theo", "Anso", "Nor", "Leode", "Agil", "Ebro", "Vig", "Bilb", "Tim", "Isem", "Vig", "Liu"],
  424.         'mHobbitSuffix' : ["oc", "doc", "old", "o", "bo", "ric", "bert", "man", "bald", "vald", "fride", "in", "go", "gar", "bold", "dolf"],
  425.        
  426.        
  427.         'fOrc' : ["Oghash", "Ghak", "Agrob", "Urzul", "Bor", "Urog", "Gonk", "Ghorza", "Sharn", "Morn", "Dura", "Durgat", "Gharol", "Murzush", "Bashuk", "Ugor",
  428.             "Borgakh", "Bolar", "Ghak", "Ugak", "Borgakh", "Orbul", "Mogak", "Yazgash", "Sharamph", "Bagrak", "Bulfim", "Sharn"],
  429.         'mOrc' : ["Yukha", "Zogugh", "Kupgugh", "Kurz", "Mazhug", "Yukha", "Ulgan", "Nag", "Durzum", "Yadba", "Krugbu", "Kogan", "Ushnar", "Feldgulg", "Zurpigig",
  430.             "Taghig", "Zarod", "Vultog", "Larek", "Ghamborz", "Gnoth", "Dular", "Mol", "Sharkub", "Ginug", "Oilug", "Yak"],
  431.        
  432.        
  433.         'fSuccubus' : ["Iphisrahne", "Zarinana", "Usinvyra", "Vylnell", "Brizeli", "Lilixia", "Felrahne", "Jilryss", "Ynisess", "Charysh", "Dhysoria", "Nemorynore",
  434.             "Azaervienne", "Meridania", "Fyrlienne", "Qyryla", "Sareli", "Penerris", "Nymrahne", "Risania", "Fyrelyla", "Zrixelin", "Winsya"],
  435.         'mSuccubus' : ["Oranorin", "Orannarax", "Joranrel", "Maznear", "Garantihr", "Survix", "Xalaxis", "Lanarnil", "Unorsyx", "Arlennar", "Unoraris", "Ezrinniran",
  436.             "Brennar", "Zohnan", "Zohnilan", "Najlyx", "Jhorovan", "Surlahin", "Lanarlarin", "Azersan", "Kyllead", "Azernyx", "Xinriad", "Praxsyx"],
  437.        
  438.        
  439.         'fKnight' : ["Bela", "Tetty", "Jennet", "Lilias", "Tillote", "Annet", "Mathila", "Isolde", "Malle", "Arlette", "Malie", "Cristina", "Geue", "Sosanna", "Esobel",
  440.             "Mylle", "Libby", "Izot", "Sabelina", "Jaquelot", "Juliana", "Alys", "Tibb", "Jocea", "Milisant", "Auicia", "Havisa", "Ybelote", "Ebota", "Mariun"],
  441.         'mKnight' : ["Udo", "Rex", "Huelin", "Mosseus", "Renaud of the North", "Arnaldus", "Janot", "Tristram", "Guarinet", "Hewelin", "Jupp", "Hardi", "Dumpty", "Anfroi",
  442.             "Randulfus", "Tobye", "Richie", "Percyvallus", "Beroldus", "Randoul", "Renaut", "Taffy", "Nel", "Guiot", "Basequin", "Ansell", "Barnet", "Bryan", "Sanse", "Davy"],
  443.         'KnightSuffix' : ["the Wild", "the Lion", "the Swift", "the Loner", "the Dreamer", "of the Sea", "the Maneater", "the Friendly", "the Humble", "the Timid", "the Vigilant",
  444.             "the Lionheart", "the Horrific", "the Caring", "the Wolf", "the Hound", "the Mountain", "the Outsider", "the Keen", "the Humble", "the Guardian", "the Poet",
  445.             "the Kingslayer", "the Shield", "the Cold", "the Shephard", "the Brave", "the Gracious", "the Defender", "the Cold", "the Mercyful", "the Highborn", "the Allegiant",
  446.             "the Champion", "the Daring", "the Adamant", "the Poor", "the Strong", "the Illuminator", "the Fierce", "the Beast", "the Twisted", "the Titan", "the Colussus",
  447.             "the Relentless", "the Magnificent", "of the North", "of the South", "of the West", "of the East", "the Observant"],
  448.  
  449.         'DragonPrefix' : ["Odtuz", "Viinfun", "Briilon", "Aldu", "Paarthu", "Pelzaan", "Nahlrul", "Vusfeyn", "Ulgaar", "Vulmid", "Niviin", "Malbah", "Bonis", "Ondjud", "Paakvik",
  450.             "Zahont", "Tilvus", "Rotkel", "Ahjo", "Grindlah", "Loriiz", "Zindag", "Zehfel", "Rotya", "Vodviir", "Dezkrii", "Zunwol", "Venzein"],
  451.         'DragonSuffix' : ["hul", "gaar", "mal", "dom", "sil", "sul", "bein", "uin", "bex", "leh", "viir", "vaaz", "in", "nax", "brom", "sar", "krii", "gus", "lir", "nir", "viing",
  452.             "kras", "twen", "ond", "ind", "daan", "faad", "ru", "gut"],
  453.  
  454.         'Nickname' : ["The Bronze", "The Prodigy", "Deathbringer", "Backstab", "Smooth-Spoken", "The Sentinel", "The Firm", "The Monster", "The Wall", "The Inferior", "The Modest",
  455.             "Queen of Nothing", "The Innocent", "The Sloth", "The Boar", "Lord of Blood", "The Great", "Hero of Fools", "The Inept", "The Eunuch", "The Bastard",
  456.             "The Heartless", "Venom Tongue", "The Colossal", "The Rider", "The Pompous", "The Tempest", "Lapdog", "The Pretender", "Stormbringer", "The Restless", "Horsehead", "The Wildling",
  457.             "The Kind", "The Fiend", "Little Boot", "The Guardian", "The Savage", "The Cunning", "The Firm", "The Dragon", "The Damned", "Mumbling Mouth",
  458.             "Ironhide", "Silent Foot", "The Ghost", "The Hog", "Snow King", "The Crow", "Sidestep", "The Gutless", "Twice Killed", "The Pretender"],
  459.  
  460.         'Horse' : ["Fleetlight", "Kingston", "Muscade", "Pacific", "Appichi", "Aferditie", "Brocco", "Remrock", "Thunderbird", "Solmyr", "Stormfeet", "Icefall", "Morningfeet", "Fastflame",
  461.             "Wildheart", "Snowmane", "Joy", "Tempo", "Aftershock", "Hasty", "Midnightfire", "Shadelight", "Reflexion", "Phantagero", "Chrome", "Gulliver", "Sundancer", "Epic", "Sky Feet",
  462.             "Thunderflame", "Sunflash", "Quickheart", "Bolt", "Shadow Step", "Nightfire", "Flash", "Thunder Step", "Eagle", "Stormheart", "Sunrise", "Andale", "Falcon", "Pebbles", "Billie", "Billy", "Stormheart", "Roach"],
  463.  
  464.  
  465.         'fDarkElfPrefix' : ["Duad", "Saed", "Nim", "Ied", "Faf", "Toth", "Cus", "Umut", "Ial", "Um", "Eth", "Nen", "Cashad", "Vagl", "Hif", "Ath", "Elo"],
  466.         'mDarkElfPrefix' : ["Ful", "Min", "Chae", "Dus", "Dior", "Ae", "Vea", "Hiom", "Tomu", "Iorb", "Rib", "Err", "Geh", "Vir", "Orv", "God", "Fib", "Mai", "Ai"],
  467.         'fDarkElfSuffix' : ["ti", "hie", "unn", "thla", "laes", "fiollo", "frun", "ash", "ha", "hu", "munn", "esh", "las", "rol", "hae", "ua", "al", "ta"],
  468.         'mDarkElfSuffix' : ["ba", "vas", "go", "la", "na", "aich", "um", "as", "un", "genn", "dru", "lea", "arr", "darr", "dac", "ac", "ril", "ann", "doc", "hel"],
  469.        
  470.         'fFairyPrefix' : ["Tulip", "Lovely", "Parsley", "Flirty", "Cotton", "Rose", "Fern", "Crystal", "Swift", "Wood", "Sea", "Swift", "Olive", "Snow", "Sun", "Bumble", "Swan", "Raen", "Walnut", "Daisy", "Apple", "Windy"],
  471.         'fFairySuffix' : ["horn", "bottom", "fig", "griddle", "wink", "valley", "spring", "glimmer", "whisper", "vine", "gust", "meadow", "dust", "fog", "hill", "petal", "mist", "dew", "lily", "blossom"],
  472.         'mFairyPrefix' : ["Night", "Spark", "Nimbus", "Spark", "Cosmo", "Dew", "Stone", "Falcon", "Black", "Silver", "Wolf", "Moon", "Jelly"],
  473.         'mFairySuffix' : ["fall", "dew", "bottom", "horn", "bird", "hill", "meadow", "flame", "fall", "white", "beam", "rock"],
  474.  
  475.  
  476.         'fWizardPrefix' : ["Onna", "Thor", "Udo", "Ina", "Onu", "Va", "Em", "En", "Eq", "Est", "Ami", "Asu", "Inno", "Ozu", "Oli", "Zuph"],
  477.         'fWizardSuffix' : ["trixi", "ish", "vys", "tosh", "key", "gaell", "nora", "ora", "ia", "rea", "phior", "rass", "prixy", "ane"],
  478.         'mWizardPrefix' : ["Eso", "Ulze", "Wob", "Ub", "Eliba", "Onul", "Strig", "Ura", "Up", "Kril", "Elu", "Wi", "Gan", "Dumble"],
  479.         'mWizardSuffix' : ["rin", "bahn", "in", "eus", "dor", "or", "rus", "grus", "dore", "ius", "wyn", "key", "dalf", "dolf"],
  480.  
  481.         'fVampire' : ["Lamia", "Star", "Silver", "Delia", "Florence", "Raven", "Raphaelle", "Emberlynn", "Ivory", "Lenchsinska", "Ruby", "Guinevere",
  482.             "Lyllith", "Violeta", "Pandora", "Aurora", "Ianira", "Ivory", "Topaz", "Tatiana", "Belladonna", "Venus", "Destiny", "Scarlett", "Trista",
  483.             "Rosalyn", "Angelica", "Arabella"],
  484.         'mVampire' : ["Lycidas", "Marcel", "Corbin", "Dante", "Daire", "Armand", "Demitri", "Anton", "Severn", "Damien", "Marcus", "Emil", "Severn",
  485.             "Balthazar", "Demetrius", "Dreven", "Heskel", "Gareth", "Astaroth", "Fabian", "Lazarus", "Saber", "Vladimir", "Marius", "Ciaran", "Nikolas",
  486.             "Kane", "Cain", "Iancu", "Raoul", "Constantine"],
  487.  
  488.         'mHumanFantasy' : {"prefix": ["Bir", "Ceol", "Elu", "Wulf", "Wald", "Ealh", "Bea", "Wig", "Sige", "Frea", "Aelf", "Leod", "Aethel", "Bea", "Éo", "Léof", "Gár", "Théo"],
  489.             "suffix": ["stan", "an", "ard", "ric", "beald", "here", "gnoth", "maer", "wine", "heard", "wulf", "wald", "geat", "lac", "laf", "red", "mer", "leth", "orl", "man"]},
  490.         'fHumanFantasy' : {"prefix": ["Balde", "Leof", "Ear", "Frit", "Hring", "Aedil", "Wit", "Wilt", "Ead", "Ean", "Hild", "Cuth", "Ceol", "Eah", "Elf", "Gold", "Théo"],
  491.             "suffix": ["thiva", "waru", "ryth", "with", "wynn", "burh", "wine", "fled", "hilda", "gifu", "yth", "ild"]},
  492.  
  493.         'fNymph' : ["Xaniphe", "Ida", "Themistae", "Akiria", "Liriope", "Philyra", "Klytie", "Axiphiche", "Acalephia", "Themistae", "Theliphe", "Eletea",
  494.             "Minthe", "Chania", "Larishae", "Oinoie", "Phaethosia", "Klaia", "Anithraci", "Amphise", "Kleodora", "Endeis", "Laromedia", "Melanippe",
  495.             "Ephemei", "Syrianix", "Amithelia", "Psamaphine", "Monithei", "Ambrosia", "Pasithoe", "Helleori", "Peria", "Caligeina", "Pomedosa", "Lampetia", "Phonia", "Laripha", "Kleorei", "Aethusa"],
  496.     }
  497.  
  498.     let replace = ''
  499.  
  500.     //const randNameSimple = (nameArray) => { return nameArray[getRandomRange(nameArray.length)]}
  501.  
  502. //#region FunctionsNames
  503.  
  504.     if (lowered.includes('rnm_gen')) {
  505.         replace = 'rnm_gen'
  506.         while (text.includes(replace)) {
  507.             name = randNameSimple(names.mNames)
  508.             text = text.replace(replace, name)
  509.         }
  510.     }
  511.  
  512.     if (lowered.includes('rnf_gen')) {
  513.         replace = 'rnf_gen'
  514.         while (text.includes(replace)) {
  515.             name = randNameSimple(names.fNames)
  516.             text = text.replace(replace, name)
  517.         }
  518.     }
  519.  
  520.     if (lowered.includes('rnm_barb')) {
  521.         replace = 'rnm_barb'
  522.         while (text.includes(replace)) {
  523.             name = randNameSimple(names.mBarb)
  524.             text = text.replace(replace, name)
  525.         }
  526.     }
  527.  
  528.     if (lowered.includes('rnf_barb')) {
  529.         replace = 'rnf_barb'
  530.         while (text.includes(replace)) {
  531.             name = randNameSimple(names.fBarb)
  532.             text = text.replace(replace, name)
  533.         }
  534.     }
  535.  
  536.     if (lowered.includes('rnm_elf')) {
  537.         replace = 'rnm_elf'
  538.         while (text.includes(replace)) {
  539.             name = randNameSimple(names.ElfPrefix)
  540.             name += randNameSimple(names.ElfSuffixMale)
  541.             text = text.replace(replace, name)
  542.         }
  543.     }
  544.  
  545.     if (lowered.includes('rnf_elf')) {
  546.         replace = 'rnf_elf'
  547.         while (text.includes(replace)) {
  548.             name = randNameSimple(names.ElfPrefix)
  549.             name += randNameSimple(names.ElfSuffixFemale)
  550.             text = text.replace(replace, name)
  551.         }
  552.     }
  553.  
  554.     if (lowered.includes('rn_dwarf')) {
  555.         replace = 'rn_dwarf'
  556.         while (text.includes(replace)) {
  557.             name = randNameSimple(names.DwarfPrefix)
  558.             name += randNameSimple(names.DwarfSuffix)
  559.             text = text.replace(replace, name)
  560.         }
  561.     }
  562.  
  563.     if (lowered.includes('rn_demon')) {
  564.         replace = 'rn_demon'
  565.         while (text.includes(replace)) {
  566.             name = randNameSimple(names.DemonPrefix)
  567.             name += randNameSimple(names.DemonSuffix)
  568.             text = text.replace(replace, name)
  569.         }
  570.     }
  571.  
  572.     if (lowered.includes('rnm_hobbit')) {
  573.         replace = 'rnm_hobbit'
  574.         while (text.includes(replace)) {
  575.             name = randNameSimple(names.mHobbit)
  576.             name += randNameSimple(names.mHobbitSuffix)
  577.             text = text.replace(replace, name)
  578.         }
  579.     }
  580.  
  581.     if (lowered.includes('rnf_hobbit')) {
  582.         replace = 'rnf_hobbit'
  583.         while (text.includes(replace)) {
  584.             name = randNameSimple(names.fHobbit)
  585.             text = text.replace(replace, name)
  586.         }
  587.     }
  588.  
  589.     if (lowered.includes('rnm_orc')) {
  590.         replace = 'rnm_orc'
  591.         while (text.includes(replace)) {
  592.             name = randNameSimple(names.mOrc)
  593.             text = text.replace(replace, name)
  594.         }
  595.     }
  596.  
  597.     if (lowered.includes('rnf_orc')) {
  598.         replace = 'rnf_orc'
  599.         while (text.includes(replace)) {
  600.             name = randNameSimple(names.fOrc)
  601.             text = text.replace(replace, name)
  602.         }
  603.     }
  604.  
  605.     if (lowered.includes('rnm_succubus')) {
  606.         replace = 'rnm_succubus'
  607.         while (text.includes(replace)) {
  608.             name = randNameSimple(names.mSuccubus)
  609.             text = text.replace(replace, name)
  610.         }
  611.     }
  612.  
  613.     if (lowered.includes('rnf_succubus')) {
  614.         replace = 'rnf_succubus'
  615.         while (text.includes(replace)) {
  616.             name = randNameSimple(names.fSuccubus)
  617.             text = text.replace(replace, name)
  618.         }
  619.     }
  620.  
  621.     if (lowered.includes('rnm_knight')) {
  622.         replace = 'rnm_knight'
  623.         while (text.includes(replace)) {
  624.             name = randNameSimple(names.mKnight)
  625.             name += " " + randNameSimple(names.KnightSuffix)
  626.             text = text.replace(replace, name)
  627.         }
  628.     }
  629.  
  630.     if (lowered.includes('rnf_knight')) {
  631.         replace = 'rnf_knight'
  632.         while (text.includes(replace)) {
  633.             name = randNameSimple(names.fKnight)
  634.             name += " " + randNameSimple(names.KnightSuffix)
  635.             text = text.replace(replace, name)
  636.         }
  637.     }
  638.  
  639.     if (lowered.includes('rn_dragon')) {
  640.         replace = 'rn_dragon'
  641.         while (text.includes(replace)) {
  642.             name = randNameSimple(names.DragonPrefix)
  643.             name += randNameSimple(names.DragonSuffix)
  644.             text = text.replace(replace, name)
  645.         }
  646.     }
  647.  
  648.     if (lowered.includes('rn_nick')) {
  649.         replace = 'rn_nick'
  650.         while (text.includes(replace)) {
  651.             name = randNameSimple(names.Nickname)
  652.             text = text.replace(replace, name)
  653.         }
  654.     }
  655.  
  656.     if (lowered.includes('rn_horse')) {
  657.         replace = 'rn_horse'
  658.         while (text.includes(replace)) {
  659.             name = randNameSimple(names.Horse)
  660.             text = text.replace(replace, name)
  661.         }
  662.     }
  663.  
  664.     if (lowered.includes('rnm_darkelf')) {
  665.         replace = 'rnm_darkelf'
  666.         while (text.includes(replace)) {
  667.             name = randNameSimple(names.mDarkElfPrefix)
  668.             name += randNameSimple(names.mDarkElfSuffix)
  669.             text = text.replace(replace, name)
  670.         }
  671.     }
  672.  
  673.     if (lowered.includes('rnf_darkelf')) {
  674.         replace = 'rnf_darkelf'
  675.         while (text.includes(replace)) {
  676.             name = randNameSimple(names.fDarkElfPrefix)
  677.             name += randNameSimple(names.fDarkElfSuffix)
  678.             text = text.replace(replace, name)
  679.         }
  680.     }
  681.  
  682.     if (lowered.includes('rnm_fairy')) {
  683.         replace = 'rnm_fairy'
  684.         while (text.includes(replace)) {
  685.             name = randNameSimple(names.mFairyPrefix)
  686.             name += randNameSimple(names.mFairySuffix)
  687.             text = text.replace(replace, name)
  688.         }
  689.     }
  690.  
  691.     if (lowered.includes('rnf_fairy')) {
  692.         replace = 'rnf_fairy'
  693.         while (text.includes(replace)) {
  694.             name = randNameSimple(names.fFairyPrefix)
  695.             let suffix = randNameSimple(names.fFairySuffix)
  696.             while (suffix === name) {
  697.                 suffix = randNameSimple(names.fFairySuffix)
  698.             }
  699.             name += suffix
  700.             text = text.replace(replace, name)
  701.         }
  702.     }
  703.  
  704.     if (lowered.includes('rnm_wizard')) {
  705.         replace = 'rnm_wizard'
  706.         while (text.includes(replace)) {
  707.             name = randNameSimple(names.mWizardPrefix)
  708.             name += randNameSimple(names.mWizardSuffix)
  709.             text = text.replace(replace, name)
  710.         }
  711.     }
  712.  
  713.     if (lowered.includes('rnf_wizard')) {
  714.         replace = 'rnf_wizard'
  715.         while (text.includes(replace)) {
  716.             name = randNameSimple(names.fWizardPrefix)
  717.             name += randNameSimple(names.fWizardSuffix)
  718.             text = text.replace(replace, name)
  719.         }
  720.     }
  721.  
  722.     if (lowered.includes('rnm_vampire')) {
  723.         replace = 'rnm_vampire'
  724.         while (text.includes(replace)) {
  725.             name = randNameSimple(names.mVampire)
  726.             text = text.replace(replace, name)
  727.         }
  728.     }
  729.  
  730.     if (lowered.includes('rnf_vampire')) {
  731.         replace = 'rnf_vampire'
  732.         while (text.includes(replace)) {
  733.             name = randNameSimple(names.fVampire)
  734.             text = text.replace(replace, name)
  735.         }
  736.     }
  737.  
  738.     if (lowered.includes('rnm_human')) {
  739.         replace = 'rnm_human'
  740.         while (text.includes(replace)) {
  741.             name = randNameSimple(names.mHumanFantasy.prefix)
  742.             name += randNameSimple(names.mHumanFantasy.suffix)
  743.             text = text.replace(replace, name)
  744.         }
  745.     }
  746.  
  747.     if (lowered.includes('rnf_human')) {
  748.         replace = 'rnf_human'
  749.         while (text.includes(replace)) {
  750.             name = randNameSimple(names.fHumanFantasy.prefix)
  751.             name += randNameSimple(names.fHumanFantasy.suffix)
  752.             text = text.replace(replace, name)
  753.         }
  754.     }
  755.  
  756.     if (lowered.includes('rn_nymph')) {
  757.         replace = 'rn_nymph'
  758.         while (text.includes(replace)) {
  759.             name = randNameSimple(names.fNymph)
  760.             text = text.replace(replace, name)
  761.         }
  762.     }
  763.  
  764. //#endregion
  765.  
  766.  
  767.     text = generateItemNames(text, lowered)
  768.     text = generateCityNames(text, lowered)
  769.     text = generateMiscNames(text, lowered)
  770.  
  771.     return text
  772. }
  773.  
  774. function generateItemNames(text, lowered)
  775. {
  776.     const itemNames = {
  777.         'Weapon' : ["Illumina", "Eclipse", "Remorse", "Nethersong", "Oracle", "Reflection", "Ashes", "Lazarus", "Soulkeeper", "Verdict", "Doomguard", "Celestia", "Serenity", "Trinity", "Netherbane", "Duskshadow", "Thunderfury", "Dreamsong",
  778.         "Benediction", "Necrolight", "Ghost", "Lull", "Duskshadow", "Prudence", "Chaos", "Soulsiphon", "Dusksong", "Dreamwhisper", "Sapience", "Blazefury", "Dusksong", "Oathkeeper", "Crucifer", "Soulshadow", "Visage", "Relentless",
  779.         "Remorse", "Earthfire", "Quicksilver", "Nexus", "Soulshard", "Lament", "Supinity", "Thorn", "Emberling", "Dragonbane", "Twinkle", "Pursuit", "Phantom", "Nightfall", "Cryptic", "Blightspore", "Snowfall", "Doomward", "Malice", "Duskshadow",
  780.         "Firestorm", "Harmony", "Omega", "Spellkeeper", "Dawn", "Moonlight", "Stormrage", "Sleepwalker", "Inertia", "Thundersoul", "Dawn", "Scar", "Deathsong", "Frenzy", "Alakaslam", "Silverlight", "Cometfall", "Eclipse", "Verdict", "Clarity",
  781.         "Phobia", "Mirage", "Oblivion", "Glimmer"],
  782.         'WeaponPrefix' : ["Necro", "Ghost", "Glimmer", "Spell", "Thunder", "Dusk", "Dawn", "Night", "Storm", "Fire", "Death", "Doom", "Nether", "Dream", "Earth", "Scar", "Blaze", "Oath", "Blight", "Snow", "Comet", "Quick"],
  783.         'WeaponSuffix' : ["keeper", "breaker", "bane", "shadow", "fury", "song", "fall", "storm", "slam", "rage", "soul", "light", "shard", "guard", "fire", "eclipse"],
  784.     }
  785.  
  786.     if (lowered.includes('rni_weapon'))
  787.     {
  788.         replace = 'rni_weapon'
  789.         while (text.includes(replace)) {
  790.            
  791.             let suffix = ''
  792.  
  793.             if (Math.random() >= 0.5) {
  794.                 name = randNameSimple(itemNames.Weapon)
  795.             } else {
  796.                 name = randNameSimple(itemNames.WeaponPrefix)
  797.                 suffix = randNameSimple(itemNames.WeaponSuffix)
  798.                 while (suffix === name) {
  799.                     suffix = randNameSimple(itemNames.WeaponSuffix)
  800.                 }
  801.                 name += suffix
  802.             }
  803.  
  804.             text = text.replace(replace, name)
  805.         }
  806.     }
  807.  
  808.     return text
  809. }
  810.  
  811. function generateCityNames(text, lowered)
  812. {
  813.     // TODO: Make prefix and suffixes for all city names
  814.  
  815.     const cityNames = {
  816.         'Elf' : ["Namanora", "Neeth Themar", "Fylnserine", "Isflenor", "Lyls Serine", "Olyve Edhil", "Yllfelenora", "Thaana Taesi", "Shylo Lenora", "Mathanlian", "Unyren Alora", "Ava Tirion", "Mellelone", "Yaaserine", "Imyelshys", "Anyen Aiqua", "Nelsalume", "Ylloqua", "Offelone", "Nyathlean", "Tholona", "Ollethalas", "Maths Elunore", "Nytfe Thalore", "Sanehone", "Nahadell", "Inneluna", "Waena Ortheiad", "Iyhenora", "Uo Entheas"],
  817.         'Dwarf' : ["Dundum", "Thegeruhm", "Hom Farum", "Khimbuldar", "Gumelduhr", "Thamgrom", "Degh Loduhr", "Mirn Toduhr", "Gurnuluhr", "Dimdarim", "Thigtoduhr", "Deghburim", "Vir Garohm", "Then Farum", "Girn Thurum", "Bun Boram", "Belfurum", "Harn Darum", "Bhern Lodihr", "Nir Lodihr", "Hern Toruhm", "Nunyaruhm", "Holria", "Dhughtuhrm", "Kangrun", "Thaghbadur", "Bon Buldohr", "Kirneduhr", "Dham Todihr", "Dornboram"],
  818.        
  819.         'FantasyPrefix' : ["Pure", "Still", "Silent", "Stage", "Lost", "Dry", "Maple", "Salt", "Bleak", "Winter", "Fay", "Whit", "Dusk", "Dawn", "Clear", "Boulder", "Small", "Spring", "Fear", "Wild", "Summer", "Chill", "Lake", "Crag", "Cliff",
  820.             "Gold", "Dog", "Dawn", "Stone", "Pure", "Swan", "Timber", "Green", "Grime", "Hound", "High", "Sleet", "Rose", "Mill", "Swamp", "Never", "Bell", "Ox", "Dead", "Lost"],
  821.         'FantasySuffix' : ["star", "brook", "ville", "breach", "band", "fair", "break", "mond", "hallow", "cross", "grasp", "call", "wall", "scar", "bell", "chill", "town", "burn", "moor", "glen", "hand", "fell", "bury", "water", "denn",
  822.             "vale", "cliff", "well", "acre", "post", "gulf", "storm", "fall", "vein", "shore", "gulch", "bourne", "mere", "hold", "hollow", "moor", "bourne", "coast", "break", "stall", "shire"],
  823.         'Fantasy' : ["Purestar", "Stillbrook", "Silentville", "Stagbreach", "Lostband", "Dryfair", "Cavebreak", "Maplemond", "Salthallow", "Bleakcross", "Wintergrasp", "Faycall", "Whitwall", "Duskscar", "Dawnhallow", "Clearbell", "Boulderchill",
  824.         "Smalltown", "Sprinburn", "Fearmoor", "Wildglen", "Summerhand", "Chillfell", "Lakehand", "Cragbury", "Cliffwater", "Golddenn", "Dogvale", "Dawncliff", "Stonewell", "Pureacre", "Swanpost", "Timbergulf", "Greenstorm", "Grimefall",
  825.         "Houndvein", "Highshore", "Lostgulch", "Sleetbourne", "Cliffgulch", "Houndmere", "Doghold", "Rosehollow", "Millmoor", "Swampbourne", "Nevercoast", "Bellbreak", "Oxstall", "Lostvault", "Deadshire"],
  826.         'Barbarian' : ["Ljosavatnsskaro", "Kambakista", "Borg", "Melar", "Hvarf", "Fljotshverfi", "Reynir", "Boroeyrr", "Geirshlio", "Baugsstaoir", "Meoallond", "Reyoarfell", "Eyvindarmuli", "Brunahaugr", "Naumdaelafylki", "Kleifarlond", "Auokulustaoir", "Kolbeinsaross", "Fura", "Sireksstaoir", "Jafnaskaro", "Hvanna", "Skutilsfjoror", "Reykjaa", "Kjaransvik", "Halland", "Rytagnupr", "Signyjarbuoir", "Leiruloekr", "Gufua"]
  827.     }
  828.  
  829.     if (lowered.includes('rnc_elf')) {
  830.         replace = 'rnc_elf'
  831.         while (text.includes(replace)) {
  832.             text = text.replace(replace, randNameSimple(cityNames.Elf))
  833.         }
  834.     }
  835.  
  836.     if (lowered.includes('rnc_dwarf')) {
  837.         replace = 'rnc_dwarf'
  838.         while (text.includes(replace)) {
  839.             text = text.replace(replace, randNameSimple(cityNames.Dwarf))
  840.         }
  841.     }
  842.  
  843.     if (lowered.includes('rnc_fantasy'))
  844.     {
  845.         replace = 'rnc_fantasy'
  846.         while (text.includes(replace)) {
  847.            
  848.             let suffix = ''
  849.  
  850.             if (Math.random() >= 0.667) {
  851.                 name = randNameSimple(cityNames.Fantasy)
  852.             } else {
  853.                 name = randNameSimple(cityNames.FantasyPrefix)
  854.                 suffix = randNameSimple(cityNames.FantasySuffix)
  855.                 while (suffix === name) {
  856.                     suffix = randNameSimple(cityNames.FantasySuffix)
  857.                 }
  858.                 name += suffix
  859.             }
  860.  
  861.             text = text.replace(replace, name)
  862.         }
  863.     }
  864.  
  865.     if (lowered.includes('rnc_barb')) {
  866.         replace = 'rnc_barb'
  867.         while (text.includes(replace)) {
  868.             text = text.replace(replace, randNameSimple(cityNames.Barbarian))
  869.         }
  870.     }
  871.  
  872.     return text;
  873. }
  874.  
  875. function generateMiscNames(text, lowered) {
  876.  
  877.     const miscNames = {
  878.         'Mountains' : ["The Hopeless Hills", "The Decaying Hills", "The Silver Tips"],
  879.         'MountainPrefix' : ["Misty", "Hopeless", "Decaying", "Silver", "Blue", "Red", "Black", "Grey", "Symmetrical", "Slumbering", "Quiet", "Colorless", "Adamantine", "Titanic", "Snowy", "Gloomy", "Jagged", "Charmed"],
  880.         'MountainSuffix' : ["Hills", "Tips", "Slopes", "Mountains", "Tops", "Horns", "Rise"]
  881.     }
  882.  
  883.     if (lowered.includes('rn_mountain'))
  884.     {
  885.         replace = 'rn_mountain'
  886.         while (text.includes(replace)) {
  887.            
  888.             let suffix = ''
  889.  
  890.             if (Math.random() >= 0.8) {
  891.                 name = randNameSimple(miscNames.Mountains)
  892.             } else {
  893.                 name = "The " + randNameSimple(miscNames.MountainPrefix)
  894.                 suffix = randNameSimple(miscNames.MountainSuffix)
  895.                 while (suffix === name) {
  896.                     suffix = randNameSimple(miscNames.MountainSuffix)
  897.                 }
  898.                 name += " " + suffix
  899.             }
  900.  
  901.             text = text.replace(replace, name)
  902.         }
  903.     }
  904.  
  905.     return text
  906. }
  907.  
  908. function generateRandForest(text, lowered) {
  909.  
  910.     if (!lowered.includes('rd_forest'))  return text
  911.  
  912.     const forest = {
  913.         'Size' : ["tremendous", "vast", "gigantic", "huge", "small", "humble"],
  914.         'Desc' : ["clear", "budding", "gloomy", "young", "wet", "lush", "shadowy", "foggy", "primal", "dense", "verdant", "ancient", "misty", "prospering", "radiant", "diverse"],
  915.         'Color' : ["golden", "orange", "jade green", "pink", "olive green", "multicolored", "yellow", "silver", "red", "red and white", "chartreuse", "forest green", "laurel green", "moss green", "mint green"],
  916.         'Trees' : ["hawthorn", "buxus", "larch", "ash", "apple", "redwood", "beech", "asp", "alder", "pine", "fir", "chestnut", "elm", "linden", "rowan", "juniper", "hemlock", "willow"],
  917.         'FloraTree' : ["Coiling creepers waves from every", "Quiet branches waves from many a", "Thick vines waves from the occasional", "Curving creepers grasps many a", "Thin branches hold onto many a", "Thin branches grasps every", "Silent vines grasps every", "Swooping creepers suspended from every"],
  918.         'FloraGround' : ["and an array of flowers, which blossoms brightly, on the forest floor", "and a vast amount of mossy boulders and tree stumps cover the forest floor"],
  919.         'SoundsClose' : ["Braying animal noises can be heard", "The sound of rustling leaves and branches can be heard from the tree tops in the wind,", "A mishmash of wild sounds, predominantly those of varmint can be heard", "A variation of animal noises, which are caused by prowling animals, resonates through the air,"],
  920.         'SoundsDistant' : ["the sounds of several woodpeckers", "the occasional roar of a large animal", "the occasional sounds of birds of prey", "a barrage of noise coming from a waterfall"]
  921.     }
  922.  
  923.     const replace = 'rd_forest'
  924.     while (text.includes(replace))
  925.     {
  926.         let size = randNameSimple(forest.Size)
  927.         const desc = randNameSimple(forest.Desc)
  928.         const color = randNameSimple(forest.Color)
  929.         let treeA, treeB, treeC
  930.         treeA = randNameSimple(forest.Trees)
  931.         treeB = randNameSimple(forest.Trees)
  932.         treeC = randNameSimple(forest.Trees)
  933.  
  934.         while (treeB === treeA) treeB = randNameSimple(forest.Trees)
  935.         while (treeC === treeA || treeC === treeB) treeC = randNameSimple(forest.Trees)
  936.  
  937.         const floraTree = randNameSimple(forest.FloraTree)
  938.         const floraGround = randNameSimple(forest.FloraGround)
  939.         const soundClose = randNameSimple(forest.SoundsClose)
  940.         const soundDist = randNameSimple(forest.SoundsDistant)
  941.  
  942.         var ret = "The forest is " + size + ", " + desc + " and " + color + ". "
  943.         ret += "Its canopy is dominated by " + randNameSimple(forest.Size) + " " + treeA + ", " + treeB + " and " + treeC + " trees. "
  944.         ret += floraTree + " tree " + floraGround + ". "
  945.         ret += soundClose + " and " + soundDist + " in the distance."
  946.         text = text.replace(replace, ret)
  947.     }
  948.     return text;
  949. }
  950.  
  951. function generateDiseaseName(text, lowered) {
  952.  
  953.     const replace = 'rn_disease'
  954.     if (lowered.includes(replace)) {
  955.        
  956.         const disease = {
  957.             'prefix' : ["Echo", "Dryad", "Changeling", "Angelic", "Ectoplasm", "Witcher", "Void", "Pyro", "Werewolf", "Chimera", "Chaos", "Flying", "Wizard", "Skeleton", "Vampire", "Magnetic", "Pendulum", "Rune", "Hellion",
  958.                 "Haunted", "Faerie", "Orcale", "Hypnotic", "Vanishing", "Warlock", "Goblin", "Troll", "Aether", "Clairvoyance", "Outsider", "Demon", "Lich", "Succubus", "Tooth", "Crotch"],
  959.             'suffix' : ["Infection", "Curse", "Virus", "Rot", "Delusion", "Fatigue", "Cold", "Blight", "Limb", "Vapors", "Pox", "Spasm", "Thirst", "Insanity", "Malady", "Gut", "Puffs", "Chills", "Amnesia", "Rash", "Cramps",
  960.                 "Haze", "Disorder", "Anemia", "Rage", "Disease", "Drip", "Decay", "Thirst", "Cough", "Death", "Lust", "Plague", "Disorder", "Mark", "Blindness", "Ache"]
  961.         }
  962.  
  963.         while (text.includes(replace))
  964.         {
  965.             var diseaseDesc = randNameSimple(disease.prefix) + " " + randNameSimple(disease.suffix)
  966.             text = text.replace(replace, diseaseDesc);
  967.         }
  968.     }
  969.    
  970.     return text;
  971. }
  972.  
  973. function generateRegion(text, lowered, bPopulation, bNameRegion) {
  974.  
  975.     if (!lowered.includes('rd_region')) {
  976.         return text;
  977.     }
  978.  
  979.     const replace = 'rd_region'
  980.  
  981.     const regionStruct = {
  982.         'Name' : ["Osium", "Udeth", "Olios", "Omend", "Flaegrun", "Aenin", "Uslai", "Omen", "Toria", "Cedoria", "Oxtrad", "Lessau", "Bunia", "Athea"],
  983.         'Gen' : ["rivers", "rock formations", "marshlands", "hills", "caves", "steep mountains", "tundras"],
  984.         'Climate' : ["temperate", "arctic", "warm", "tropical", "stormy", "wet", "calm", "humid"],
  985.         'Population' : ["sparsely spread population", "lightly spread population", "stretched population", "loosely concentrated population", "closely concentrated population", "cramped population"],
  986.         'LandscapeType' : ["stunning", "unsightly", "cheerful", "depressing", "friendly", "delightful", "sublime"],
  987.         'RiverWater' : ["small, playful waterfalls, cascading rivers", "rushing rivers and great waterfalls"],
  988.         'Rocks' : ["huge, jutting rocks", "imposing fjords", "fiercy rock formations, icy springs"],
  989.         'Marshland' : ["wild rivers", "wild, overgrown forests and smelly, overgrown ponds"],
  990.         'Hills' : ["red leaved trees, mellow rivers", "soft, foggy fields", "dramatic mountain views", "pink blossom forests, magnificent wildlife"],
  991.         'Caves' : ["overgrown boulders marks the entrance to many hidden caves", "fallen towers and ruins marks the entrance to many hidden caves"],
  992.         'Mountains' : ["dramatic mountain views", "steep, magnificent mountains"],
  993.         'Tundra' : ["gorgeous flower fields, pristine, snow covered fields"],
  994.         // climate
  995.         'Temperate' : ["gorgeous flower fields.", "jade green fields.", "green forests and mellow rivers.", "terraced fields of green.", "green forests and luscious fields."],
  996.         'Arctic' : ["gorgeous flower fields, luscious fields and steep, magnificent mountains.", "cold, windy mountains, icy springs and rocky beaches.", "aggressive wildlife, icy, snow covered fields."],
  997.         'Warm' : ["white sandy beaches.", "terraced fields of green."],
  998.  
  999.        
  1000.         'Unsightly' : ["withered flower fields.", "somber architecture.", "smelly, overgrown ponds and ominous trees."],
  1001.         'Depressing' : ["black lakes, bleak, bare forests and drying rivers.", "smelly, overgrown ponds and ominous trees."],
  1002.        
  1003.         'Foreigner': ["insensitive", "rude", "reserved", "welcoming", "kindhearted", "cold", "spiteful"],
  1004.         'ForeignerWelcomePos' : ["food", "friendliness", "generosity"],
  1005.         'ForeignerWelcomeNeg' : ["resentment", "disintrest", "apathy"],
  1006.         'ForeignerDislike': ["restrict", "delay"],
  1007.         'ForeignerLike': ["aid", "nurse", "strengthen", "thwart"]
  1008.     }
  1009.  
  1010.     while (text.includes(replace))
  1011.     {
  1012.         var regionName = regionStruct.Name[getRandomRange(regionStruct.Name.length)]
  1013.         var gen = regionStruct.Gen[getRandomRange(regionStruct.Gen.length)];
  1014.         var climate = regionStruct.Climate[getRandomRange(regionStruct.Climate.length)]
  1015.         var population = regionStruct.Population[getRandomRange(regionStruct.Population.length)];
  1016.         var lsType = regionStruct.LandscapeType[getRandomRange(regionStruct.LandscapeType.length)];
  1017.        
  1018.         var desc = '';
  1019.  
  1020.         if (!lsType.includes('depressing')) {
  1021.             switch (gen) {
  1022.                 default:
  1023.                 case 'rock':
  1024.                     desc += regionStruct.Rocks[getRandomRange(regionStruct.Rocks.length)]
  1025.                     break;
  1026.                 case 'rivers':
  1027.                     desc += regionStruct.RiverWater[getRandomRange(regionStruct.RiverWater.length)]
  1028.                     break;
  1029.                 case 'marshlands':
  1030.                     desc += regionStruct.Marshland[getRandomRange(regionStruct.Marshland.length)]
  1031.                     break;
  1032.                 case 'hills':
  1033.                     desc += regionStruct.Hills[getRandomRange(regionStruct.Hills.length)]
  1034.                     break;
  1035.                 case 'steep mountains':
  1036.                     desc += regionStruct.Mountains[getRandomRange(regionStruct.Mountains.length)]
  1037.                     break;
  1038.                 case 'tundras':
  1039.                     desc += regionStruct.Tundra[getRandomRange(regionStruct.Tundra.length)]
  1040.                     break;
  1041.                 case 'caves':
  1042.                     desc += regionStruct.Caves[getRandomRange(regionStruct.Caves.length)]
  1043.                     break;
  1044.             }
  1045.         }
  1046.        
  1047.         if (bPopulation) {
  1048.             gen += " and has a " + climate + " climate, which has lead to a " + population + "."
  1049.         } else {
  1050.             gen += " and has a " + climate + " climate."
  1051.         }
  1052.  
  1053.         if (desc) {
  1054.             desc += " and "
  1055.         }
  1056.        
  1057.  
  1058.         if (lsType.includes('unsightly') || lsType.includes('depressing')) {
  1059.            
  1060.             if (lsType.includes('depressing')) {
  1061.                 desc += regionStruct.Depressing[getRandomRange(regionStruct.Depressing.length)]
  1062.             }
  1063.             else {
  1064.                 desc += regionStruct.Unsightly[getRandomRange(regionStruct.Unsightly.length)]
  1065.             }
  1066.            
  1067.         }
  1068.         else
  1069.         {
  1070.             switch (climate) {
  1071.                 default:
  1072.                 case 'temperate':
  1073.                     desc += regionStruct.Temperate[getRandomRange(regionStruct.Temperate.length)]
  1074.                     break;
  1075.                 case 'arctic':
  1076.                     desc += regionStruct.Arctic[getRandomRange(regionStruct.Arctic.length)]
  1077.                     break;
  1078.                 case 'warm':
  1079.                     desc += regionStruct.Warm[getRandomRange(regionStruct.Warm.length)]
  1080.                     break;
  1081.             }
  1082.         }
  1083.        
  1084.  
  1085.    
  1086.  
  1087.         var foreigner = regionStruct.Foreigner[getRandomRange(regionStruct.Foreigner.length)];
  1088.         var bForeignerPositive = false
  1089.  
  1090.        
  1091.         //ner': ["insensitive", "rude", "reserved", "welcoming", "kindhearted", "cold", "spiteful"],
  1092.         switch (foreigner) {
  1093.             default:
  1094.                 break;
  1095.             case 'welcoming':
  1096.             case 'kindhearted':
  1097.                 bForeignerPositive = true
  1098.                 break;
  1099.         }
  1100.  
  1101.         var foreignerWelcome = bForeignerPositive ? regionStruct.ForeignerWelcomePos[getRandomRange(regionStruct.ForeignerWelcomePos.length)] : regionStruct.ForeignerWelcomeNeg[getRandomRange(regionStruct.ForeignerWelcomeNeg.length)]
  1102.         var foreignerCountry = bForeignerPositive ? regionStruct.ForeignerLike[getRandomRange(regionStruct.ForeignerLike.length)] : regionStruct.ForeignerDislike[getRandomRange(regionStruct.ForeignerDislike.length)]
  1103.  
  1104.         if (bNameRegion) {
  1105.             var ret = "The region of " + regionName + " is mainly covered in " + gen + " The region's landscape is " + lsType + "; " + desc
  1106.         }
  1107.         else {
  1108.             var ret = "The region is mainly covered in " + gen + " The region's landscape is " + lsType + "; " + desc
  1109.         }
  1110.        
  1111.        
  1112.        
  1113.         if (bPopulation) {
  1114.             if (bNameRegion) {
  1115.                 ret += " The people of " + regionName + " are " + foreigner + " towards foreigners and tend to welcome them with " + foreignerWelcome + "." //". They feel foreigners could " + foreignerCountry + " the region's well being."
  1116.             } else {
  1117.                 ret += " The people of the region are " + foreigner + " towards foreigners and tend to welcome them with " + foreignerWelcome + "." //". They feel foreigners could " + foreignerCountry + " the region's well being."
  1118.             }
  1119.         }
  1120.    
  1121.  
  1122.    
  1123.         text = text.replace(replace, ret)
  1124.     }
  1125.  
  1126.     return text;
  1127. }
  1128.  
  1129. function generateCaveDescription(text, lowered) {
  1130.  
  1131.     if (!lowered.includes('rd_cave')) return text;
  1132.  
  1133.     //var replace = ''
  1134.  
  1135.     const caves = {
  1136.  
  1137.         'DwarfA' : ["immeasurable halls, filled with an everlasting music of water that tinkles into pools, as fair as a mirror in the starlight.", "many miles of caves and tunnels of various shapes and sizes carved through the rock, which is possibly limestone. There are three Great Halls centered around the other tunnels and caves.", "mighty halls of shiny gold and marble."],
  1138.         'DwarfB' : ["an immense, beautiful, and ore-laden cave system that extends deep down into the mountains for many miles and consists of many different paths, tunnels, and chambers.", "a grand underground fortress and city, and in the deepest of the caves is the Innermost Chamber, where treasures are hoarded.", "a glorious cave system that softly rise and fall, consisting of many chambers."],
  1139.         'DwarfC' : ["A small stream runs down through the mountain and into the caves and is its source of water.", "The silver lanterns shine a pale light, making the caves glitter like starlight.", "Gems are infused with light, bathing the halls in pale kaleidoscopic hues."],
  1140.         'CaveDark' : ["dark and moist, you hear water dripping somewhere, echoing in the deep.", "dark and overgrown. Small insects can be heard buzzing around. You hear running water somewhere.", "dark and dusty. Great pillars lie sundered, making transversal cumbersome."]
  1141.     }
  1142.  
  1143.    
  1144.     if (lowered.includes('rd_cave_dwarf')) {
  1145.         var replace = 'rd_cave_dwarf'
  1146.         while (text.includes(replace)) {
  1147.             var caveDesc = caves.DwarfA[getRandomRange(caves.DwarfA.length)]
  1148.             var ret = "The dwarven city consists of " + caveDesc
  1149.             caveDesc = caves.DwarfB[getRandomRange(caves.DwarfB.length)]
  1150.             ret += " It is " + caveDesc
  1151.             caveDesc = caves.DwarfC[getRandomRange(caves.DwarfC.length)]
  1152.             ret += " " + caveDesc
  1153.             text = text.replace(replace, ret)
  1154.         }
  1155.     }
  1156.  
  1157.     if (lowered.includes('rd_cave_dark')) {
  1158.         var replace = 'rd_cave_dark'
  1159.         while (text.includes(replace)) {
  1160.             var caveDesc = caves.CaveDark[getRandomRange(caves.CaveDark.length)]
  1161.             var ret = "The cave is " + caveDesc
  1162.             text = text.replace(replace, ret)
  1163.         }
  1164.     }
  1165.  
  1166.     return text;
  1167. }
  1168.  
  1169. function generateCastle(text, lowered) {
  1170.  
  1171.     if (!lowered.includes('rd_castle')) return text;
  1172.  
  1173.     const castle = {
  1174.         'TowerAmount' : ["Nine", "Ten", "Eleven", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen", "Twenty"],
  1175.         'Towers' : ["lean, square towers surround the castle, they reach twice the height of the walls"],
  1176.         'WallSize' : ["enormous, vast", "huge, firm", "tall, chunky", "fortified, solid", "enormous, massive", "fortified, wide"],
  1177.         'MatPrefix' : ["dark", "bright", ""],
  1178.         'MatColor' : ["blue", "red", "white", "black", "grey"],
  1179.         'Material' : ["stone", "marble", "glistening obsidian", "sandstone", "stone", "basalt"],
  1180.         'Windows' : ["Simple windows are scattered generously across the walls in a seemingly random pattern, along with symmetric crenelations for archers and artillery.", "Wide windows are scattered thinly across the walls in an asymmetric pattern, along with symmetric holes for archers and artillery.", "Elegant windows are scattered generously around the walls in seeminly perfect symmetry, along with huge crenelations for archers and artillery.", "Elegant windows are scattered generously across the walls in an asymmetric pattern, along with symmetric crenelations for archers and artillery."],
  1181.         'Gate' : ["A regular gate with giant wooden doors and hot oil pots guards the only passage into the castle, but it's not the only way in when you know the castle's secret passages.", "A sizable gate with large metal doors, a regular bridge and hot oil pots offers a safe home to all those in need, but it's not the only way in when you know the castle's secret passages.", "A vast gate with thick metal doors, a draw bridge and a moat guards the only entrance to the castle build at the edges of a shoreline, but it's not the only way in.", "A sizable gate with huge metal doors, a regular bridge and strong defenses. It's the only easy way in."],
  1182.         'Outside' : ["Various large houses are scattered outside the castle gates, surprisingly the rich are comfortable with living outside the gates as well. This castle has stood the test of time and despite knowing some very rough times, the castle still stands and it looks like it will do so for many years to come.", "Remnants of broken siege engines, swords and shields litter the fields outside, a painful reminder of a past war. This castle has clearly stood the test of time, the rocks of the walls are aged and vines and plants grow inside the cracks, but this castle will last for ages to come.", "Plain fields of a type of grass cover most of the fields outside of the castle, adding to the castle's aesthetics. This castle is relatively new, but so far it stood its ground with ease and it'll likely do so for ages to come.", "Large boulders litter the fields outside the castle, paths to and from the castle snake around them and farm plots are small and scattered all around. This castle has clearly stood the test of time and its inhabitants are intend on making sure it stays that way for ages to come.", "The forest outside of the castle gates is light up with bioluminescent creatues, adding to the atmosphere of the castle. This castle looks very new, but without knowing its history it's impossible to tell if it's a newly build castle or a well kept one.", "Well kept gardens with fragrant flowers, gorgeous trees and many bushes decorate the outside of the castle. This castle has stood the test of time and despite knowing some very rough times, the castle still stands and it looks like it will do so for many years to come.", "Small buildings, houses and other structures populate the grounds outside the castle walls, homes for the poorest of the poor. This castle looks very new, but without knowing its history it's impossible to tell if it's a newly build castle or a well kept one."]
  1183.     }
  1184.  
  1185.     var replace = 'rd_castle'
  1186.     while (text.includes(replace))
  1187.     {
  1188.         var ret = castle.TowerAmount[(getRandomRange(castle.TowerAmount.length))]
  1189.         ret += " " + castle.Towers[(getRandomRange(castle.Towers.length))]
  1190.         ret += " and are connected by " + castle.WallSize[(getRandomRange(castle.WallSize.length))] + " walls made of ";
  1191.         ret += castle.MatPrefix[(getRandomRange(castle.MatPrefix.length))] + " " + castle.MatColor[(getRandomRange(castle.MatColor.length))]
  1192.         ret += " " + castle.Material[(getRandomRange(castle.Material.length))] + "."
  1193.         ret += " " + castle.Windows[(getRandomRange(castle.Windows.length))] + " " + castle.Gate[(getRandomRange(castle.Gate.length))] + " " + castle.Outside[(getRandomRange(castle.Outside.length))]
  1194.         text = text.replace(replace, ret)
  1195.     }
  1196.     return text;
  1197. }
  1198.  
  1199. function generateEncounter(text, lowered) {
  1200.  
  1201.     if (!lowered.includes('renc_')) return text
  1202.  
  1203.        
  1204.     if (lowered.includes('renc_demon'))
  1205.     {
  1206.         const demon = {
  1207.             'Intro' : {
  1208.                 'Sound' : ["crash", "moan", "blare", "crackle", "howl", "bawl", "shriek", "roar", "boom", "scream", "bark", "bong",
  1209.                             "chime", "growl", "neigh", "murmur", "hiss", "slam", "snort", "snarl", "wail", "yelp", "wheeze", "whine", "yap"],
  1210.                 'A' : ["blackness", "fog", "mist", "sky", "smoke", "desolation", "hazy air", "wind"],
  1211.                 'B' : ["strike of a clock", "buzz of a drill", "creak of wood", "beat of a heart", "burst of fire", "trembling of stones",
  1212.                         "flicker of flames", "wave of heat", "ringing of ears", "whisper of wind", "blood-curdling scream", "sepulchral laugh",
  1213.                         "stench of ozone", "stench of rotting corpses", "rancid stench", "rumble of distant thunder", "sense of vertigo",
  1214.                         "feeling of claustrophobia", "sound of countless legs"]
  1215.             },
  1216.             'Encounter' : ["face to face with", "stared at by", "eye to eye with", "challenged by", "greeted by"],
  1217.             'Form' : {
  1218.                 'Prefix' : ["a foul", "a tiny", "a bizarre", "a peculiar", "an immense", "a towering", "a daunting", "an alarming", "a cruel",
  1219.                             "a crawly", "a gruesome", "a hair-raising", "a nightmarish", "a macabre", "a petrifying", "a sinister", "a horrible",
  1220.                             "a repulsive", "a terrible", "an amorphous", "a many-legged", "a cephalopod", "a colossal", "a nameless", "a drooling"],
  1221.                 'Type' : ["beast", "soul", "creature", "creation", "entity", "being", "blasphemy"],
  1222.                 'Suffix' : ["blood", "sickness", "shadows", "heat", "decay", "sin", "flame", "terror", "blood", "dread", "fury", "anguish", "ire", "wrath", "madness", "rotting skin"]
  1223.             },
  1224.             'Appendage' : ["A scythe-like tail slithers behind it, it ends in a barbed tip covered in sticky goo", "Two ethereal wings extend themselves fully. Fiery bones, and shadowy feathers stretch upward over the creature"]
  1225.         }
  1226.  
  1227.         var replace = 'renc_demon'
  1228.         while (text.includes(replace)) {
  1229.             const sound = randNameSimple(demon.Intro.Sound)
  1230.             const introA = randNameSimple(demon.Intro.A)
  1231.             const introB = randNameSimple(demon.Intro.B)
  1232.             const encounter = randNameSimple(demon.Encounter)
  1233.             const formPrefix = randNameSimple(demon.Form.Prefix)
  1234.             const formType = randNameSimple(demon.Form.Type)
  1235.             const formSuffixA = randNameSimple(demon.Form.Suffix)
  1236.             let formSuffixB = randNameSimple(demon.Form.Suffix)
  1237.             while (formSuffixB === formSuffixA) formSuffixB = randNameSimple(demon.Form.Suffix)
  1238.  
  1239.             let ret = "A " + sound + " in the " + introA + ", a " + introB
  1240.                 ret += ", and suddenly you are " + encounter + " " + formPrefix + " " + formType + " of " + formSuffixA + " and " + formSuffixB + "."
  1241.                 //ret += " "
  1242.  
  1243.             text = text.replace(replace, ret)
  1244.         }
  1245.     }
  1246.    
  1247.  
  1248.  
  1249.  
  1250.     return text
  1251. }
  1252.  
  1253. function generateTown(text, lowered, bDescriptive) {
  1254.  
  1255.     if (!lowered.includes('rd_town')) return text
  1256.  
  1257.     const town = {
  1258.         'Prefix' : ["Stationed besides", "Designed on", "Forged around", "Located on", "Found on", "Set on", "Established inside", "Cast above", "Erected on", "Rooten on", "Formed on"],
  1259.         'LocationType' : ["the Northern side of", "the highest point of", "the right side of", "the base of", "the left side of", "above", "the lowest point of", "the bottom of", "the Southern side of", "the end of"],
  1260.         'Location' : ["a canyon", "a waterfall", "a mound", "a cavern", "a stream", "a lava stream", "a stream", "a river", "a covert", "a woodlands", "a field", "a wetlands", "a greyser field", "a peninsula", "a vulcano"],
  1261.         'TownType' : ["hamlet", "city", "town", "village", "crossroad", "outpost", "port"],
  1262.         'Inhabitants' : ["orcs", "hobbits", "elves", "humans"],
  1263.         'BuildReason' : ["rare plants", "rare resources", "ancient, unexplained statues", "a dark history", "ancient burial grounds", "hidden tunnels", "an ancient water source", "medicinal plants",
  1264.                         "spiritual significance", "unique wildlife"],
  1265.         'Looks' : {
  1266.             'Pos' : ["ordinary", "mediocre", "unexciting", "delightful", "graceful", "stunning", "grandiose", "humble"],
  1267.             'Neg' : ["gruesome", "dreadful", "macabre", "ghastly", "dull", "worn"],
  1268.             'bIsPos' : true,
  1269.         },
  1270.         'Materials' : {
  1271.             'Pos' : ["copper", "ceramic tile", "bamboo", "birch wood", "wheat straw", "maple wood", "pine wood", "blackwood", "ash wood", "oak wood", "silky oak wood"],
  1272.             'Neg' : ["rusted", "gloomy wooden", "galvanised steel", "grey", "black wooden", "faded marble"]
  1273.         },
  1274.         'Flora' : {
  1275.             'Pos' : ["lucious gardens", "calming ocean front", "aromatic flowers", "stunning canyon", "frozen ponds"],
  1276.             'Neg' : ["dirty roads", "absolute silence", "scary animals", "barren grounds", "a lot of insects"]
  1277.         }
  1278.     }
  1279.  
  1280.     var replace = 'rd_town'
  1281.     while (text.includes(replace)) {
  1282.  
  1283.         const location = randNameSimple(town.Location)
  1284.         const inhabitants = randNameWeight(town.Inhabitants, Math.random() * 0.667) //randNameSimple(town.Inhabitants)
  1285.  
  1286.         const bIsPos = (inhabitants != 'orcs') && Math.random() <= 0.75
  1287.        
  1288.         const looks = bIsPos ? randNameSimple(town.Looks.Pos) : randNameSimple(town.Looks.Neg)
  1289.         const matA = bIsPos ? randNameSimple(town.Materials.Pos) : randNameSimple(town.Materials.Neg)
  1290.         let matB = bIsPos ? randNameSimple(town.Materials.Pos) : randNameSimple(town.Materials.Neg)
  1291.         while (matB === matA) matB = bIsPos ? randNameSimple(town.Materials.Pos) : randNameSimple(town.Materials.Neg)
  1292.         const flora = bIsPos ? randNameSimple(town.Flora.Pos) : randNameSimple(town.Flora.Neg)
  1293.         const townType = randNameSimple(town.TownType)
  1294.         let cityName = "invalid"
  1295.        
  1296.         switch (inhabitants)
  1297.         {
  1298.             // TODO: Implement city names for all races
  1299.             default:
  1300.             case 'humans':
  1301.             case 'hobbits':
  1302.                 cityName = generateCityNames('rnc_fantasy', 'rnc_fantasy')
  1303.                 break;
  1304.             case 'elves':
  1305.                 cityName = generateCityNames('rnc_elf', 'rnc_elf')
  1306.                 break;
  1307.         }
  1308.  
  1309.         let ret = randNameSimple(town.Prefix) + " " + randNameSimple(town.LocationType) + " " + location + ", the " + townType + " of " + cityName + " is home to " + inhabitants + ". "
  1310.        
  1311.         if (bDescriptive) {
  1312.             ret += "The " + townType + " has " + randNameSimple(town.BuildReason) + ", which is of great importance to the people of " + cityName + ". "
  1313.             ret += "The " + townType + " itself looks " + looks + ". "
  1314.         }
  1315.         else {
  1316.             ret += "The " + townType + " has " + randNameSimple(town.BuildReason) + " and it looks " + looks + ". "
  1317.         }
  1318.        
  1319.        
  1320.        
  1321.         ret += "With its " + matA + " rooftops, " + matB + " walls and " + flora + "."
  1322.         text = text.replace(replace, ret)
  1323.     }
  1324.  
  1325.     return text
  1326. }
  1327.  
  1328.  
  1329. const getRandomRange = (length) => { return Math.floor(Math.random() * (length)) }
  1330. const randNameSimple = (nameArray) => { return nameArray[getRandomRange(nameArray.length)]}
  1331. const clamp = (v, min, max) => { return Math.max(min, Math.min(v, max))}
  1332.  
  1333. const randNameWeight = (nameArray, weight) => {
  1334.    
  1335.     var r = (Math.random() + weight) * nameArray.length
  1336.     r = clamp(r, 0, nameArray.length)
  1337.     var r2 = Math.floor(clamp(r, 0, nameArray.length - 1))  
  1338.     return nameArray[r2]
  1339. }
  1340.  
  1341. // Don't modify this part
  1342. modifier(text)
Add Comment
Please, Sign In to add comment