Example output
# Dialogue Tree: Magistrate Korven — The Toll Gate Confrontation
## Context
The player needs to pass through Whitecrest Crossing, a bridge controlled by Magistrate Korven, a corrupt but intelligent bureaucrat who has been overcharging travelers. The player's objective is to reach the Ashwood Forest on the other side. Korven has 4 guards and controls the only bridge for 30 miles.
---
## NODE_ROOT — Opening
**[Korven stands at a wooden desk beside the bridge gate, reviewing papers. He's mid-50s, well-fed, wearing a magistrate's chain that's slightly too large — inherited, not earned. Two guards flank him, two more stand at the gate. He looks up as the player approaches, adjusting his spectacles with practiced authority.]**
**KORVEN:** Another traveler. Wonderful. The crossing toll is 200 gold — non-negotiable, non-refundable, and effective immediately under Emergency Decree... *(flips through papers)* ...47-B. Welcome to Whitecrest Crossing.
**[He smiles without warmth. His hand rests casually near a small bell on the desk.]**
→ **[A] "200 gold? The posted rate is 5 silver."** *(Diplomatic — leads to negotiation)*
→ **[B] "I'm crossing this bridge. Move or I'll move you."** *(Aggressive — leads to confrontation)*
→ **[C] "Interesting decree. Mind if I see the seal?"** *(Cunning — leads to exposure)*
---
## BRANCH A — The Negotiator
### NODE_A1
**KORVEN:** *(adjusts spectacles, expression unchanged)* Posted rates are for... standard conditions. We're in a state of emergency. Bandits, you see. Terrible business. The additional fee funds the extra security. *(gestures at his guards, who look bored)*
→ **[A1a] "What if I offered something other than gold?"** *(Barter path)*
→ **[A1b] "I represent the Merchant Guild. We have an arrangement."** *(Reputation check: Merchant Guild reputation ≥ Friendly)*
→ **[A1c] "Let's find a number that works for both of us."** *(Persuasion check: Charisma 14+)*
### NODE_A1a — Barter
**KORVEN:** *(leans forward, interest flickering behind his careful facade)* I'm a public servant, not a merchant. But... public servants do have personal needs. What did you have in mind?
**[His eyes briefly dart to a locked chest behind his desk — the kind used for personal correspondence, not official documents.]**
**PLAYER:** I noticed you keep glancing at that chest. Something troubling you, Magistrate?
**KORVEN:** *(expression tightens, then deliberately relaxes)* You're observant. Fine. I'm expecting a letter from Thornwall — a private matter. The courier is three days late, and the road south has been... unreliable. Deliver it to me, and your toll is waived. Both directions.
**[LORE — OPTIONAL]** *(If player asks about the letter's contents:)* It concerns a property dispute. My late brother's estate. Nothing that would interest an adventurer. **[Note: This is a lie. The letter contains evidence of Korven's embezzlement. This becomes relevant in Act 3 if the player intercepts it.]**
**OUTCOME:** Quest added — "The Magistrate's Letter." Toll waived on return if completed. Korven's disposition: Neutral → Cautiously Cooperative.
### NODE_A1b — Guild Card *(Requires: Merchant Guild reputation ≥ Friendly)*
**KORVEN:** *(freezes momentarily, then recovers)* The Guild, you say. *(takes guild token, examines it, returns it more carefully than he received it)* Of course. Guild members are... exempt from emergency surcharges. My apologies for the confusion. Sergeant, open the gate.
**[He waves you through quickly — too quickly. He doesn't want you talking to the other travelers waiting in line, who are paying full price.]**
**[LORE — CRITICAL]** *(If player has Perception 12+, passive check:)* You notice Korven pocket a second ledger beneath the first when he sees your Guild token. The visible ledger shows the 200 gold toll. The hidden one likely shows different numbers.
**OUTCOME:** Toll waived. Gate opens. Korven's disposition: Wary. If the player reports the dual ledgers to the Merchant Guild later, triggers side quest "Cooking the Books."
### NODE_A1c — Silver Tongue *(Persuasion check: Charisma 14+)*
**[SUCCESS]**
**KORVEN:** *(holds your gaze for a long moment, then chuckles — a real one this time)* You know, most people either pay or bluster. It's refreshing to meet someone who just... talks. *(lowers voice)* Forty gold. And you didn't hear that number from me.
**OUTCOME:** Toll reduced to 40 gold. Korven's disposition: Neutral → Mildly Amused.
**[FAILURE]**
**KORVEN:** *(unmoved)* I appreciate the effort. Truly. Two hundred gold, please. Or there's a ford about thirty miles north. I hear the river's only waist-deep this time of year. *(pause)* In some places.
**OUTCOME:** No discount. Player can try Branch B or C, or pay full price.
---
## BRANCH B — The Enforcer
### NODE_B1
**KORVEN:** *(doesn't flinch. His hand moves closer to the bell.)* I see. *(turns to guards)* Sergeant Holtz, our guest is feeling... impatient.
**[The two gate guards shift to combat-ready stances. Korven takes one step back — he's clearly done this before.]**
→ **[B1a] *(Draw weapon)* "Last chance, Korven."** *(Intimidation check: Strength 16+ or Reputation: Feared)*
→ **[B1b] "I've killed men tougher than your guards."** *(Bluff — Charisma 13+)*
→ **[B1c] *(Attack)* — Initiative roll**
### NODE_B1a — Intimidation *(Requires: Strength 16+ OR Reputation: Feared)*
**[SUCCESS]**
**[Korven's composure cracks. One of the guards glances at the others — they've heard stories. The sergeant's hand is on his sword but he hasn't drawn it.]**
**KORVEN:** *(swallows, adjusts collar)* Perhaps... perhaps the emergency decree can be suspended temporarily. For administrative reasons. Sergeant, open the gate. Now.
**[The gate opens. No one makes eye contact as you pass.]**
**OUTCOME:** Toll waived. Gate opens. Korven's disposition: Terrified. Guards will not help Korven in future encounters. However, Korven sends a bounty notice to the nearest garrison — bounty hunter encounter triggers in 48 in-game hours.
**[FAILURE]**
**KORVEN:** *(rings the bell. Two additional guards emerge from the guardhouse.)* I've dealt with scarier than you, traveler. Four hundred gold. The rate just doubled.
**OUTCOME:** Toll doubled to 400. Combat available but now 6 guards. Korven flees into guardhouse if combat starts.
### NODE_B1c — Combat
**[Combat encounter: 4 guards (CR 2 each), Korven (CR 0, non-combatant, flees to guardhouse on round 1)]**
**If player wins:**
- Loot: 340 gold from toll box, Korven's personal key, confiscated traveler goods
- Korven surrenders if cornered: "Please — I have a family in Thornwall. The corruption wasn't my idea, I was appointed to this post by —" *(he'll name Lord Ashwick if pressed)*
- **[LORE — CRITICAL]** Lord Ashwick's involvement in the toll scheme connects to the main questline
**OUTCOME:** Bridge accessible. Reputation: Whitecrest Crossing → Hostile. Wanted level increases. Travelers previously in line will remember the player favorably (+reputation with common folk).
---
## BRANCH C — The Investigator
### NODE_C1
**KORVEN:** *(a flicker of something — annoyance? concern? — crosses his face before the mask snaps back)* The seal? Of course. Transparency is the foundation of governance. *(produces a document with an official-looking seal)*
**[The document looks legitimate at first glance. The seal is real — it's from the provincial office. But...]**
→ **[C1a] *(Examine the document closely)* — Investigation check: Intelligence 13+**
→ **[C1b] "I happen to know the Provincial Secretary. Shall I confirm this with her?"** *(Requires: Having completed "The Provincial Records" quest)*
→ **[C1c] "This seal is genuine. But this decree number doesn't exist, does it?"** *(Requires: Scholar background OR Intelligence 16+)*
### NODE_C1a — Document Examination *(Intelligence 13+)*
**[SUCCESS]**
**PLAYER:** The seal is real, but this isn't Decree 47-B. The numbering format changed six months ago — provincial decrees now use a three-part code. This is either very old or very fake.
**KORVEN:** *(the mask slips for two full seconds. When it returns, his voice is quieter)* You're educated. That's... inconvenient. *(glances at guards, calculating)*
→ **[C1a-i] "I don't care about your scheme. Just let me through."** *(Leverage for free passage)*
→ **[C1a-ii] "How much of this 200 gold actually reaches the provincial office?"** *(Dig deeper)*
### NODE_C1a-ii — Following the Money
**KORVEN:** *(long pause. Removes spectacles. Cleans them. A stalling gesture you suspect he uses often.)* None of it. Are you satisfied?
*(quieter, almost tired)* I was appointed by Lord Ashwick. The toll revenue funds his private garrison in the eastern hills. I take a percentage. The guards take a percentage. Everyone in this arrangement takes a percentage except the people paying it.
**[LORE — CRITICAL]** Lord Ashwick is building a private army. The eastern hills garrison is not sanctioned by the Crown. This information is worth significant value to multiple factions.
**KORVEN:** So now you know. The question is: what are you going to do with it? Because if Lord Ashwick learns I told a stranger his business, I won't live long enough to regret it.
→ **[C1a-ii-DEAL] "Your secret's safe. In exchange for free passage and a favor I can call in later."**
→ **[C1a-ii-EXPOSE] "I'm going to make sure the right people hear about this."**
**OUTCOME (DEAL):** Toll permanently waived. Korven becomes a reluctant informant. Faction quest unlocked: "The Ashwick Conspiracy." Korven's disposition: Begrudging Respect.
**OUTCOME (EXPOSE):** Korven gives passage freely, knowing he's finished either way. Quest updated with evidence for provincial authorities. Korven disappears from the bridge within 24 in-game hours — can be found later in Thornwall, either in hiding or dead, depending on how quickly the player reports.
---
## Implementation Notes
- All node IDs are sequential for state machine implementation
- Skill checks use the format: ABILITY SCORE ≥ THRESHOLD
- Reputation gates reference the global faction reputation system
- [LORE — CRITICAL] markers indicate content that connects to main quest flags
- [LORE — OPTIONAL] markers indicate flavor content safe to miss
- Korven's disposition tracking persists across save states for future encounters
- The bell prop on Korven's desk should be interactable — stealing it before dialogue removes guard reinforcement option in Branch B