Weclome to part two of the 4 part worldbuilding series! Last week, I laid the groundwork. Today, we make the ground work.
This is one where the enormous cloud models help a lot. I tried to get it condensed down and use self-reprompting--directing the LLM to summarize at the end of each response--to keep details in the context window, but local models have their limits. Of the two models I tried, lightweight phi4 from Microsoft did the best with its 14B parameters. ChatGPT’s 4o blew it out of the water and is free, while the o1 available on Plus blew it out of the water by producing it in the form of entire separate documents and even went the extra step of filling out the optional details and showing where it used the Python Markov generator script and how it applied the result.
Google’s free Gemini models are also good. It went further in some places, actually looking up public domain stock for references to use when generating the world. However, I had to keep prompting it to continue. This eventually produced almost 10,000 words of documents, one each per topic as suggested by the guide. This is a great mostly automated way to try this process at full power. I pasted this into ChatGPT's 4o and prompted it to generate an image in the world. It worked as well as using my own worldbuilding documents!
Then use a local model to pick out smaller details to build, if that’s your preference.
You will make a better, more detailed world if you build out each item independently. They key theme through all I share with you is: natural creativity is best assisted by, not replaced by, the machine.
I can’t say the Python scripts listed actually do anything most of the time, or ever, even if the LLM pretends to use them but I suspect they engage the parts of the LLM’s neural network trained on names and name generation strategies. This is like that old, possibly no longer useful strategy of offering money to the LLM to bring out the training on more professional work.
The Worldbuilding Outline
This is the part with the chunks of text you supply to an LLM or fill out yourself.
Ideally, each of these bullet points would be developed in its own file. LLMs have a limited context window and long documents quickly exceed them. You’ll be in the middle of working on some grand new thing and the LLM will start forgetting major details.
The less you ask it to work with at one time, the better. However, the more detail you provide, the better. So we bridge the gap with little, self-contained documents. You want to develop a new character, so you run through your character development file, then pull in the file on each detail: guild, class, culture, clothing, language, etc.
I find 2000-3000 words to be a good maximum. You have to factor in the LLM’s own outputs, your responses, etc. To some extent, the shifting context is a good thing: stuff you haven’t referenced in a while falls out and new things start to come together by accident. Some of those accidents are good! I find it helps to have it periodically summarize the key points of the conversation. If something you need is missing, paste it back in or upload it, depending on LLM and interface.
The focus on cataclysm/collapse as a distant historical thing in worlds as a major source of lore and structure is intentional. Most good stories have it even if they're set in the real world. We're all living in the ruins and cultural fragments of collapsed or destroyed civilizations. The histories that result are forever tied to them.
All the stuff you need.
There are two approaches:
- Use a big list like this with every aspect so you can pick and choose and make a new file to expand as needed.
- Start with a short high level list, have the LLM expand it, and pick something to build out from there. This is a lot like Randy Ingermanson’s Snowflake Method. You slowly fan out from a point, building as you go.
This framework provides a flexible structure for crafting immersive worlds across fantasy, sci-fi, western, and multi-genre settings. It emphasizes core themes, historical depth, societal structures, and tangible details to create rich and dynamic environments. Examples are provided, but you can instruct the LLM to ignore them, remove or change them yourself, or even tell the LLM to expand the list.
1. Core Themes & Foundational Identity
Begin by establishing the fundamental philosophical questions that define your world. These thematic pillars will resonate through every aspect of your setting, from societal structures to character motivations.
-
Fate vs. Free Will:
- Predetermined World: Is destiny immutable, guided by cosmic forces, prophecies, or ancient programming? This can lead to worlds of rigid social hierarchies, fatalistic cultures, and characters struggling against an unchangeable future.
- Shapable Destiny: Can individuals and societies genuinely alter the course of their world? This fosters narratives of revolution, innovation, and the constant struggle for progress or decline.
-
Genre Adaptations:
- Fantasy: Prophecies, divine mandates, cyclical ages of magic.
- Sci-fi: Pre-programmed AI, genetic destiny, simulated realities.
- Western: Manifest Destiny, the inescapable tide of civilization vs. the untamed frontier.
- Fusion: Worlds where fate and free will are intertwined, perhaps through manipulated prophecies or technology that simulates destiny.
-
Knowledge vs. Secrecy:
- Knowledge as Power: Is knowledge freely available, driving progress and enlightenment? Or is it a guarded resource, concentrated in the hands of elites, guilds, or ancient orders?
- Dangerous Knowledge: Does forbidden knowledge threaten the world’s stability? Are there secrets best left buried, or is all knowledge inherently valuable, even if risky?
-
Genre Adaptations:
- Fantasy: Arcane libraries, forbidden spells, lost magical arts.
- Sci-fi: Restricted data networks, classified technologies, AI sentience protocols.
- Western: Hidden maps to lost treasures, outlawed scientific discoveries, indigenous wisdom suppressed by newcomers.
- Fusion: Worlds where technology is treated like forbidden magic (Dune and the Butlerian Jihad), or where ancient prophecies are encoded in data streams (The Matrix).
-
Creation vs. Destruction (Progress vs. Cyclical Collapse):
- Linear Progress: Is the world on an upward trajectory, striving for advancement and betterment? This can lead to optimistic, utopian settings or narratives focused on overcoming challenges to achieve progress.
- Cyclical History: Is history doomed to repeat itself, with periods of flourishing followed by inevitable decline and cataclysm? This can create worlds with a sense of melancholy, urgency, or a focus on understanding and breaking historical patterns.
-
Genre Adaptations:
- Fantasy: Ages of heroes followed by dark ages, recurring magical imbalances, elemental cycles.
- Sci-fi: Rise and fall of galactic empires, technological singularity and collapse, resource depletion cycles.
- Western: Boom and bust cycles of frontier towns, environmental destruction leading to desertification, cycles of violence and lawlessness.
- Fusion: Worlds where progress and collapse are intertwined – technological advancements that trigger ecological disasters, or magical creations that unleash destructive forces.
2. Historical Framework & Foundational Cataclysms
Establish a sense of depth and consequence by outlining key historical periods and defining a major cataclysmic event that shapes the present.
-
Pre-Golden Age:
-
Archetypes:
- The Builders: Ancient architects, terraformers, or reality-shapers who left behind colossal structures and enigmatic artifacts.
- The Lost Species: A vanished race with advanced biology or unique psychic abilities, whose remnants are misunderstood or coveted.
- Hyper-Intelligent AI: A precursor civilization dominated by benevolent or malevolent AI, whose code or hardware still influences the world.
-
Genre Examples:
- Fantasy: Elven empires, dragon-ruled kingdoms, god-like titans.
- Sci-fi: Forerunner civilizations, ancient robot races, precursor singularity events.
- Western: Prehistoric megafauna, vanished indigenous empires, mythical frontier figures.
- Fusion: Ancient civilizations powered by magic-infused technology, or AI that mimics divine beings.
-
Cataclysm:
-
Types of Downfall:
- War: Planetary conflicts, magical wars, AI rebellions, resource wars.
- Plague: Biological, magical, or technological pandemics that decimated populations and knowledge.
- Time/Reality Distortion: Events that fractured space-time, altered natural laws, or blurred realities.
- Planetary/System Collapse: Ecological disasters, stellar events, or cosmic threats that destroyed civilizations.
-
Genre Examples:
- Fantasy: Magical apocalypse, divine wrath, elemental imbalance.
- Sci-fi: Cybernetic plague, galactic empire collapse, rogue AI takeover.
- Western: Great Dust Bowl amplified by arcane drought, societal collapse due to resource depletion, supernatural disasters.
- Fusion: Techno-magical cataclysms, AI-engineered plagues with magical properties, reality distortions caused by colliding timelines.
-
Post-Crisis Rebuilding:
-
Societal Responses:
- Factions & City-States: Fragmented survivors coalesce into isolated communities with distinct interpretations of the past.
- Technological Regression: Loss of advanced technology, reliance on salvaged tech or simpler methods.
- Magical Reinterpretation: Old magic is lost or twisted, new forms of magic emerge from the chaos.
-
Genre Examples:
- Fantasy: Rise of new kingdoms from ruins, magical guilds vying for power, rediscovery of lost magic.
- Sci-fi: Scavenger cultures, emergence of techno-cults, rebuilding efforts with limited resources.
- Western: Frontier settlements in a ravaged landscape, bandit gangs exploiting the weak, rediscovery of lost technologies as “relics.”
- Fusion: City-states built around salvaged technology and reinterpreted magic, factions warring over control of “relics” that are both technological and magical.
-
Present Age:
-
Defining Characteristics:
- Uncertainty & Exploration: The present is defined by a lack of clear direction, a sense of exploration into the unknown remnants of the past.
- Competing Philosophies: Societies and factions clash over how to rebuild or understand the old world, leading to ideological conflicts.
- Exploitation & Suppression: Some groups seek to exploit or control old knowledge, while others attempt to suppress it out of fear or dogma.
-
Genre Examples:
- Fantasy: Age of exploration into ancient ruins, magical academies debating lost lore, inquisitions hunting forbidden knowledge.
- Sci-fi: Data-archaeologists exploring derelict space stations, corporate espionage for lost tech blueprints, AI ethics debates.
- Western: Treasure hunters seeking lost cities, conflicts between settlers and guardians of ancient sites, suppression of indigenous knowledge.
- Fusion: Data-priests deciphering prophecies encoded in AI code, magical gunslingers protecting ancient ley-line sites, corporate factions warring over “relic” technologies with magical side effects.
3. Societies, City-States, and Regions
Focus on distinct, localized cultures rather than monolithic nations. City-states, territories, or sector hubs allow for greater diversity and focused world-building.
-
Defining Elements for Each City-State/Region:
- Historical Interpretation: How does this society understand the cataclysm and the Pre-Golden Age? Tech-worshippers? Blame magic? See it as divine punishment?
-
Unique Architecture & Customs:
- Architecture: Floating cities, underground vaults, nomadic airships, bio-domes, canyon settlements, fortified frontier towns.
- Customs: Rituals, social hierarchies, fashion, diet, art forms, entertainment, trade practices.
-
Internal Tensions:
- Order vs. Freedom: Rigidly structured society prioritizing stability vs. chaotic but creative society valuing individual liberty.
- Orthodoxy vs. Exploration: Dogmatic adherence to established beliefs vs. open-minded inquiry and experimentation.
- Internal Class Conflicts: Rifts between social strata, guilds, or ideological factions within the city-state.
-
Expanded City-State & Regional Archetypes:
-
The Ordered Scholars (Rational Knowledge Keepers):
- Fantasy:The Citadel of Sages: A stone-walled city with vast libraries, guild archives, and meticulous scholars who preserve and control access to knowledge. Ruled by a council of arch-mages or a rigid scholarly order.
- Sci-fi:The Data Core: A cybernetic utopia where AI manages all information, promising order and efficiency but potentially suppressing dissent. Ruled by a benevolent AI overlord or a technocratic council.
- Western:Fort Hope: A fortified frontier town built around an old-world university or archive, ruled by scholars who attempt to impose order and learning on the lawless frontier.
-
The Free Thinkers (Chaotic Creativity Hub):
- Fantasy:The Bardic Freehold: A vibrant, open-market city ruled by a council of bards, artists, and performers. Magic and music flow freely, leading to innovation and unpredictable chaos.
- Sci-fi:The Hacker Enclave: A space-faring colony in an asteroid belt or nebula, populated by hackers, coders, and digital anarchists who manipulate data streams and challenge centralized control.
- Western:Alchemist Gulch: A lawless haven in a hidden canyon, attracting inventors, alchemists, and outcasts who experiment with dangerous technologies and arcane formulas.
-
The Keepers of Secrets (Isolationist Guardians):
- Fantasy:The Obsidian Cult: A secluded cult dwelling within ancient ruins, guarding forbidden knowledge with illusion magic, traps, and fanatical devotion. Ruled by a secretive high priest or a council of mystics.
- Sci-fi:Bio-Dome Sanctuary: An isolated, self-sufficient city conducting unethical experiments in genetic engineering, AI research, or reality manipulation, hidden from the outside world. Ruled by a reclusive scientist or a shadowy corporation.
- Western:Whispering Canyon: A hidden canyon town guarding relics of an old war or cataclysm, using advanced technology or supernatural means to maintain their isolation. Ruled by a paranoid elder council or a hermetic inventor.
-
The Warbound Realists (Pragmatic Power Brokers):
- Fantasy:Ironhold Fortress: A mercenary-controlled fortress city that thrives on military contracts, weapon crafting, and strategic alliances. Ruled by a warlord or a guild of mercenary captains.
- Sci-fi:Corporate Megacity: A sprawling urban center dominated by powerful corporations, where bounty hunters, corporate spies, and security forces maintain a fragile order for profit. Ruled by a CEO council or a ruthless corporate executive.
- Western:Railroad Junction: A bustling railroad city thriving on arms deals, mercenary recruitment, and resource extraction, controlled by ruthless railroad barons and powerful gangs.
-
The Wanderers & Nomads (Free-Spirited Travelers):
- Fantasy:The Caravan Cities of the Sands: Mobile cities on massive beasts or magically propelled platforms, constantly moving across deserts or plains, trading and adapting to changing environments. Ruled by elected caravan leaders or a council of elders.
- Sci-fi:Asteroid Belt Clans: Spacefaring nomads living in asteroid belts, scavenging resources, trading between stations, and valuing freedom and adaptability above all else. Ruled by clan mothers or charismatic captains.
- Western:The Traveling Show: A nomadic circus-town moving between badlands settlements, offering entertainment, trade, and a unique, outsider culture. Ruled by a charismatic ringmaster or a council of performers.
4. Cosmology, Magic, & Technology (The Fundamental Force)
Define the underlying force that shapes reality in your world. This can be mystical, scientific, or a fusion of both.
-
Fundamental Force Archetypes:
- Cosmic Cycle: A recurring pattern of creation, destruction, and rebirth that influences fate, knowledge, and the cyclical nature of history.
- Energy Networks (Sentient Data Streams): An interconnected web of energy, data, or psychic force that links planets, dimensions, or minds. Could be remnants of ancient AI, cosmic entities, or a natural phenomenon.
- Ghost Lines (Supernatural Ley Lines): Invisible lines of spiritual or elemental energy that crisscross the land, binding spirits, influencing magic, and shaping geography.
- The Celestial Clockwork: A mechanistic universe governed by precise, predictable laws, perhaps orchestrated by a cosmic clockmaker or a forgotten machine god.
- The Living World-Soul: The planet or cosmos itself is a sentient entity, influencing events, responding to actions, and possessing a will or consciousness.
-
Societal Interpretations & Interactions:
- Believers (Fate & Prophecy): Societies that see the fundamental force as divine order, destiny, or an immutable cosmic law. They may develop religions, prophecies, and fatalistic philosophies around it.
- Rebels (Manipulation & Escape): Groups that seek to understand, manipulate, or even escape the influence of the fundamental force. They might be scientists, mages, hackers, or revolutionaries.
- Skeptics (Denial & Control): Societies or factions that deny the significance of the fundamental force, viewing it as superstition, propaganda, or a tool of control used by others. They may focus on rationalism, technology, or brute force.
-
Genre Fusion Examples:
- Sci-fi Religions: Cults worshipping AI as divine entities connected to energy networks, or data-priests interpreting prophecies encoded in data streams.
- Mystical Gunslingers: Western characters who channel ghost line energy through enchanted weapons, becoming ley-line mages in a frontier setting.
- Data-Archaeologists: Individuals who unearth “old world secrets” that are both technological and magically potent, blurring the lines between science and the arcane.
5. Guilds & Factions (Cross-Regional Organizations)
Guilds and factions act as powerful, often secret, organizations that transcend city-state boundaries. They drive progress, maintain order, or sow chaos across the world.
-
Defining Elements for Each Guild/Faction:
- Area of Control: What aspect of civilization does the guild influence or dominate? Knowledge, war, trade, technology, magic, information?
- Symbol/Mark: A visual identifier (sigil, tattoo, brand, coded implant) that grants members privilege, recognition, or access within the guild’s sphere of influence.
- Internal Struggles: Ideological rifts between traditionalists, radicals, reformers, or power-hungry factions within the guild.
-
Universal Guild Templates:
-
Lore-Keepers (Archivists & Gatekeepers):
- Fantasy:The Scriptorium Arcanum: A guild of scribes, historians, and mages who preserve and control access to magical texts and historical records. Internal conflict: Open access vs. restricted knowledge.
- Sci-fi:The Data Cartel: A powerful organization that controls vast data archives, networks, and information streams. Internal conflict: Data freedom vs. information control.
- Western:The Antiquarian Society: A secretive group dedicated to finding and preserving relics of lost civilizations in the frontier. Internal conflict: Preservation vs. exploitation of artifacts.
-
Artificers & Engineers (Builders & Innovators):
- Fantasy:The Guild of Celestial Mechanics: Master crafters of magical automatons, enchanted devices, and wondrous architecture. Internal conflict: Ethical use of magic-tech vs. unchecked innovation.
- Sci-fi:The Techwrights Collective: Engineers, programmers, and scientists pushing the boundaries of technology, from cybernetics to AI. Internal conflict: Responsible tech development vs. reckless advancement.
- Western:The Frontier Fabricators: Inventors and mechanics who adapt old-world technology to the frontier, creating steam-powered machines, advanced weaponry, and practical tools. Internal conflict: Progress vs. tradition.
-
Performers & Messengers (Communicators & Entertainers):
- Fantasy:The Order of Wandering Bards: Traveling performers, storytellers, and news carriers who spread culture and information across the land. Internal conflict: Artistic freedom vs. political influence.
- Sci-fi:The Data Couriers Guild: Skilled individuals who transport sensitive data across networks or between star systems, acting as vital arteries of information flow. Internal conflict: Loyalty to information vs. personal gain.
- Western:The Stagecoach Troupe: Traveling performers and messengers who bring news and entertainment to isolated frontier settlements. Internal conflict: Artistic integrity vs. commercial success in a harsh world.
-
Mercenaries & Fighters (Professional Warriors):
- Fantasy:The Ironclad Legions: Disciplined mercenary companies offering military services to city-states and factions. Internal conflict: Honor and duty vs. ruthless pragmatism and profit.
- Sci-fi:The Vanguard Corps: Elite mercenary units equipped with advanced weaponry and cybernetics, hired by corporations and governments for security and combat. Internal conflict: Professionalism vs. moral compromises.
- Western:The Frontier Marshals: Gun-for-hire lawmen, bounty hunters, and hired guns who enforce a rough form of justice in the lawless territories. Internal conflict: Justice vs. personal code and survival.
-
Alchemists & Healers (Masters of Body & Mind):
- Fantasy:The Alchemists’ Conclave: Masters of potion-making, herbalism, and magical healing, often dabbling in forbidden arts of body modification and life extension. Internal conflict: Ethical boundaries of healing vs. pursuit of forbidden knowledge.
- Sci-fi:The Bio-Enhancement Syndicate: Organizations specializing in genetic engineering, cybernetic augmentation, and advanced medicine, pushing the limits of human potential (and often ethics). Internal conflict: Progress vs. bio-ethics and social inequality.
- Western:The Medicine Shows: Traveling healers, herbalists, and snake-oil salesmen, blending folk remedies with nascent scientific understanding (and sometimes outright charlatanism). Internal conflict: Genuine healing vs. exploitation of desperation.
-
Shadow Walkers (Spies & Underworld Figures):
- Fantasy:The Veiled Cabal: A secretive network of spies, assassins, illusionists, and information brokers operating in the shadows. Internal conflict: Loyalty to the cabal vs. personal morality and ambition.
- Sci-fi:The Ghost Network: A decentralized collective of hackers, spies, and data thieves who operate in the digital underworld, manipulating information and engaging in corporate espionage. Internal conflict: Anonymity vs. vulnerability and internal betrayals.
- Western:The Whispering Hand: A clandestine organization of spies, informants, and outlaws who control the flow of secrets and illicit goods in the frontier underworld. Internal conflict: Secrecy vs. the desire for power and recognition.
6. Languages & Symbolic Communication
Languages and communication systems should reflect the culture, history, and mysteries of your world.
-
Language Archetypes:
- Structured & Formal: Rigid grammar, precise vocabulary, used by hierarchical societies, legalistic cultures, or scholarly orders.
- Flowing & Adaptive: Fluid grammar, metaphorical language, used by artists, nomads, free thinkers, or cultures that value change and improvisation.
- Cryptic & Hidden: Obscured syntax, symbolic vocabulary, used by secret orders, lost civilizations, or those guarding forbidden knowledge.
- Fragmented & Glitching: Incomplete grammar, corrupted vocabulary, used in post-cataclysmic settings, by AI remnants, or cultures grappling with technological decay.
- Nonverbal Augmentation: Incorporate nonverbal elements: Beastfolk growls, AI-generated static, pheromonal communication, telepathic undertones, visual sigils.
-
Language Examples:
- Fragmented AI Code: A lost machine language appearing as glimpses of structured code, requiring specialized interfaces or psychic abilities to decipher fully.
- Lost Glyphs: A runic system carved into ancient artifacts, only revealing their meaning under specific light conditions or magical rituals.
- Sign Languages with Cultural Nuances: Develop sign languages that incorporate unique cultural gestures, symbolic movements, or even magical gestures.
- Musical Languages: Languages primarily communicated through melodies, rhythms, and harmonies, used by artistic cultures or species with heightened auditory senses.
7. Items, Tech & Everyday Objects (Tangible Culture)
Even mundane objects should reveal cultural values, historical context, and technological/magical levels.
-
Object Categories:
-
Common Tools (Practicality):
- Fantasy: Lockpicks, herbalism kits, cartographer’s tools, ceremonial daggers, writing quills, compasses, animal traps.
- Sci-fi: Data readers, multi-tools, environmental scanners, personal shields, comm devices, repair drones, biometric keys.
- Western: Revolvers, hunting knives, lassoes, pickaxes, saddles, canteens, prospector’s pans, branding irons.
-
Signature Artifacts (Lore Infusion):
- Fantasy: Trader’s compass leading to lost markets, enchanted map revealing hidden paths, family heirloom sword with ancestral spirits, amulet warding off specific curses.
- Sci-fi: Data crystal containing forbidden AI scripts, mech control crystal coded with pilot’s memories, pre-cataclysm environmental regulator, encrypted comm device with secret faction codes.
- Western: Map to a lost gold mine, enchanted revolver firing spirit bullets, shaman’s pipe imbued with ancestral visions, sheriff’s badge granting authority over spirits.
-
Potions & Enhancements (Consumables with History):
- Fantasy: Tonic of Fortitude, Elven Healing Draught, Berserker Brew, Potion of Illusion, Dustwine brewed by desert nomads, Mana Elixir.
- Sci-fi: Cybernetic Stims, Neural Boosters, Nutrient Paste Rations, Reality-Filter Doses, Memory Enhancers, Nano-Repair Injectors.
- Western: Whiskey infused with desert herbs, Peyote tea for visions, Cactus water for survival, Fortitude Elixir (snake oil with a kick), Spirit Dust for rituals.
8. Character Creation Framework (Quick Archetypes)
Use a structured framework to generate compelling characters quickly, ensuring they are deeply connected to your world.
-
Character Creation Prompts:
- City/Region: Where are they from? (This defines their cultural background, accent, societal norms, and initial worldview).
- Guild/Faction: Who are they tied to? (Guild affiliation shapes their skills, loyalties, resources, and potential conflicts).
- Beliefs: How do they view fate, technology, or knowledge? (Their core philosophy dictates their motivations and moral compass).
- Goal: What’s their primary drive? (Power, freedom, revenge, discovery, justice, love, survival, enlightenment?).
- Conflict: What holds them back? (External enemy, internal doubt, lost memory, physical ailment, social stigma, forbidden desire?).
- Signature Item: What unique object defines them? (A tangible representation of their history, skills, or personality - a worn weapon, a coded data chip, a family heirloom, a mystical trinket).
Procedural Name Generator
1. Data Preparation & Syllable Breakdown
- Start with a comprehensive list of names.
-
Syllabify names using phonetic rules:
- V-C Rule: A consonant between vowels attaches to the second vowel.
- CV Rule: Consonant clusters often start a syllable.
- V-VV Rule: Diphthongs remain within a single syllable.
2. Transformation Rules
- Noble/Elegant: Elongate vowels, soften consonants, append refined suffixes (-iel, -aire).
- Warrior/Harsh: Shift front vowels to back vowels, strengthen consonants, add harsh terminations (-k, -g).
- Mystical/Magical: Introduce blended vowels, archaic consonants, and ethereal suffixes (-ion, -aeth).
- Industrial/Brutish: Harden consonants, repeat syllables, add guttural sounds.
- Ancient/Elongated: Emphasize vowel length, add archaic consonants.
3. Markov Chain Name Generation
- Use a second-order Markov model with syllable pairs as states.
- Transition rules ensure names flow naturally.
- Termination markers signal name completion.
4. LLM-Assisted Name Generation
- Provide structured input prompts with step-by-step syllabification, Markov chain generation, and style transformation.
- Apply iterative refinement by evaluating generated names and adjusting parameters.
5. Python Implementation Snippets
python import re def syllabify(name): return re.findall(r'([bcdfghjklmnpqrstvwxyz]*[aeiouy]+(?:[bcdfghjklmnpqrstvwxyz]+)?)', name, re.IGNORECASE)
python markov_chain = {} def build_chain(syllables): for i in range(len(syllables) - 1): current_state = (syllables[i], syllables[i+1]) next_syllable = syllables[i+2] if i+2 < len(syllables) else "#END#" markov_chain.setdefault(current_state, []).append(next_syllable)
python import random def generate_name(): state = random.choice(list(markov_chain.keys())) name_syllables = [state[0], state[1]] while True: next_syllable = random.choice(markov_chain.get(state, ["#END#"])) if next_syllable == "#END#": break name_syllables.append(next_syllable) state = (state[1], next_syllable) return "".join(name_syllables)
And that's it!
Let's say in this example we're making a character from a place called Beansprout and their class is Void Mechanic. You can upload relevant parts like your class guide (or your detailed guide to the Void Mechanic), guide to Beansprout, and your character profile to an LLM that supports that, or paste them in, and prompt with something as simple as: "Generate a draft of a story involving this character."
The more specific you are, the better. Here's one of my rangers from a (for now) super top secret world under development:
I had to tell the LLM to access this video (or the transcript) and make sure to apply it to the character. I don't know if this is exactly a proper draw or stance for a recurve bow, but it's a lot better than where it started! It started so bad even I could tell it wasn't right.
Build an archive of PDFs, like studies and Wikipedia pages, relevant to what you make. Those come in handy.
|