"""Page copy: how-to, article sections, example intro, FAQs. One H1 lives in the hero.""" HOW_TO_HTML = """

This free DnD random encounter generator rolls one complete, ready-to-run scene — not a line from a d100 table, and not a multi-scene quest. Every result is a single encounter with everything a Dungeon Master needs to run it cold: a setup you can nearly read aloud, creatures with counts and named SRD stat blocks, a motivation, tactical terrain, a mid-scene complication, scaling notes, and what the party gets out of winning, talking, or running. It works for 5e and the 2024 rules, runs right on this page, and needs no signup.

  1. Pick an environment, or don't. Forest, swamp, Underdark, urban streets, open sea — or type your own. Every field is optional; blanks become creative freedom.
  2. Tell it about the party. Level and size shape the composition: the generator picks creature counts that make sense for four level-3 adventurers instead of handing them a lich. Difficulty feel sets the stakes from Easy to Deadly.
  3. Choose a flavor, or let it roll. Combat, Social, Exploration, or Mixed — leave it blank and the generator picks what fits the environment and time of day. Night on a graveyard road and noon in a market district want different kinds of trouble.
  4. Roll, then run it. You get a structured encounter sheet, not a wall of prose. Copy the Markdown into your prep notes or download the file, and hit Roll Again until the scene feels right. The Surprise Me button rolls the environment, level, flavor, and time of day for you.
""" INCLUDES_HTML = """

A d100 table gives you "2d4 wolves." That was never the hard part. The hard part is the thirty seconds after the roll, when you have to know why the wolves are here, what the ground looks like, and what happens when the ranger tries to talk to them. Every encounter this tool rolls includes the fields that survive contact with a party:

""" EXAMPLE_INTRO_HTML = """

Here is a complete, unedited output from this generator. The inputs were: environment Forest, party level 3, party size 4, difficulty Medium, time of day Night — flavor left blank, so the generator chose.

""" CRAFT_HTML = """

Random encounters get a bad reputation because so many of them are run as speed bumps: roll, fight, loot, resume the real game. A rolled encounter becomes a real scene with a few habits:

""" FAQS = [ ( "How do random encounters work in 5e?", "Traditionally the DM rolls periodically during travel or rest — often once " "per travel day or watch, on a d20 or a regional table — and a triggered " "result means something finds the party. The rules leave the content of that " "something almost entirely to the DM. This generator replaces the flat table " "lookup with a complete scene: instead of \"1d6 giant spiders,\" you get the " "setup, the counts, the reason they're hunting here, and what the fight or " "parley actually looks like.", ), ( "How many random encounters should there be per travel day?", "For most tables, zero to two. One meaningful encounter per travel day keeps " "journeys dangerous without turning them into a grind; long or dangerous " "routes might check morning, evening, and one night watch. If a day rolls " "more than two, keep the best one and turn the rest into signs — tracks, " "smoke, distant lights — that make the survivor feel inevitable.", ), ( "How do I balance a random encounter for my party?", "Tell the generator your party's level, size, and the difficulty feel you " "want, and the composition comes out with counts that respect encounter-" "building math — action economy included. Every result also carries scaling " "notes: one line to make it easier, one to make it harder, for the night " "half your table cancels. If you want to design and tune a specific fight " "against exact XP budgets, that's an encounter builder's job — a different " "tool for a different moment in prep. This one hands you a finished scene.", ), ( "Aren't random encounters outdated DM practice?", "The criticism is fair when it's aimed at the old style: random fights with " "no purpose that eat an hour and change nothing. Modern practice hasn't " "abandoned random encounters, though — it has repurposed them as texture and " "pacing. An encounter with a motivation, stakes, and a follow-up hook isn't " "filler; it's the world acting on its own schedule instead of the plot's. " "Roll them less often, make each one mean something, and skip freely — a " "generator that includes motivation by default makes that style cheap.", ), ( "Can I get social or exploration encounters, not just combat?", "Yes — set the encounter flavor to Social, Exploration, or Mixed. A social " "result might be a tense parley with a toll-taking patrol; an exploration " "result might be a hazard with a choice buried in it. Every non-combat " "encounter still includes stat blocks and terrain, because the defining " "feature of a social encounter in D&D is that it can stop being one.", ), ( "What stat blocks does the generator reference?", "Only SRD-named stat blocks — Bandit, Veteran, Green Hag, Will-o'-Wisp, " "Ghoul, Spy, and the rest of the open-license roster — each with a count, " "so any core-rules table can run the result without conversion. Creatures " "get creative names and dressing on top (\"a bog hag — use Green Hag\"), " "but the mechanical anchor is always a block you already own.", ), ( "How is this different from the quest generator?", "Scope. This tool generates one scene: a single encounter in a single place " "at a single moment, run-and-done in part of a session. Our quest generator " "builds a multi-scene arc — hook, escalating middle, climax — that spans " "sessions. They chain nicely: a random encounter's follow-up hook is exactly " "the kind of thread a quest generator can grow into an arc.", ), ( "Does it work with the 2024 rules?", "Yes. Encounters are described in system-light prose, and the SRD stat " "blocks it references exist in both the 2014 and 2024 cores — where a block " "was revised, use your table's version and nothing else changes. Encounter " "difficulty intuition shifted slightly in the 2024 DMG, so trust the " "difficulty feel you selected and the scaling notes over any older XP " "arithmetic.", ), ]