RPGs
How Patter slots into an RPG.
An RPG has a lot of dialogue, and most of it has to react: to the quest the player is on, what they did last time, their reputation, and their stats. Patter holds the conversations and the flags they set, and reads everything else from your game. Your game runs the quests, the stats, the checks, combat, and the shops.
Quest givers that follow the quest
Section titled “Quest givers that follow the quest”Your quest system knows each quest’s stage. Report it as a @world property and the
quest giver’s lines follow it, with a branch to pick the opener.
(branch)(if @world.ring_quest == "notStarted")ODA: You look like someone who can find things.(if @world.ring_quest == "active")ODA: Any sign of my ring?(if @world.ring_quest == "returned")ODA: You found it! I'd given up hope.ODA: Busy day. Come back later.The last line has no condition, so it plays for any other state, such as a quest the player failed.
When a conversation starts or finishes a quest, an effect sets a writable @world value, or a
game event carries a quest field in its Game Data, and your quest system acts on it.
Which of the two to use is your call: a value your game reads, or a cue it reacts to.
Hub conversations
Section titled “Hub conversations”Most RPG conversations are a hub: an opener, then a list of things to ask or say, each answered and back to the
list, until the player leaves. The hub is a block holding a choice,
and each option ends with a jump back to it. The options’ conditions do most of the
work.
- Topics that follow the game. An option gated on quest state, reputation, faction, or a flag from another conversation appears only when it applies: “About the ring…” once the quest is active.
- Locked options the player can see. By default an option whose condition fails still reaches your game,
marked unavailable with the reason, so you can show
“[Charisma 6] Talk them down” greyed out. Mark it
secretUntilEligibleto keep it hidden instead. - Asked once, or always there. Options are once-only by default, so a question goes once asked. Sticky ones, such as “What do you sell?” or “Goodbye”, stay.
- A way out. A sticky “Goodbye” ends it from anywhere. Without one, a fallback is taken by itself once nothing else is left.
(block hub: choice)> About the ring... (if @world.ring_quest == "active") ODA: It was my mother's. Please hurry. (jump to hub)> [Charisma 6] Couldn't you pay a bit more? (if @world.charisma >= 6) ODA: Fine. Fifty more, and not a coin over. (jump to hub)> What do you sell? (sticky) (game event: open = "shop") (jump to hub)> Goodbye. (sticky) ODA: Safe roads.Remembering what the player said
Section titled “Remembering what the player said”Flags the conversations own, such as “insulted the mayor” or “promised to help”, are @patter
properties. They last the whole game, save with it, and any scene can
test them. patter_seen() and patter_visits() tell a scene whether the player has already been somewhere or
heard something, in any conversation. The plain seen() and visits() count only within the current flow.
Reputation, stats, and checks
Section titled “Reputation, stats, and checks”Options can be gated on anything your game reports. A persuade option gated on @world.charisma >= 6 reaches
your game as unavailable for a low-charisma player, so you
can show it locked with its requirement, or leave it out.
Dice rolls and skill checks are your game’s. Put a game event in the option asking for the check, have your game roll and report the result before it advances, and let the next lines follow it. The dialogue never needs to know how the check works, only how it came out.
> [Charisma 6] Talk them down. (if @world.charisma >= 6) (game event: check = "persuade") (branch) (if @world.check_passed) GUARD: Fine. Go on, then. GUARD: Nice try.Companions and relationships
Section titled “Companions and relationships”How a companion feels about the player is a @patter property: a
number for approval, a quality for a stage that only moves
forward, or flags for facts such as “trusts you” or “saw you lie”.
Effects on options move it, and conditions on options open what a closer relationship allows: a personal
question, a favour, a romance.
(block camp: choice)> How are you holding up? KAEL: Better, now you ask. (effect: @kael_approval = @kael_approval + 1) (jump to camp)> Tell me about your brother. (if @kael_approval >= 5) KAEL: I don't talk about him. But for you, I'll try. (effect: set_flags(@kael, +told_about_brother)) (jump to camp)> I need you to lie for me. (if check_flags(@kael, +trusts_you)) KAEL: Just this once. (jump to camp)> Let's move on. (sticky)The same values can gate options in other conversations, so a companion who trusts you can vouch for you to someone else. A companion’s comments during play react to the moment with Best match: the most specific line for the current state wins, and a plain one covers the rest.
A shopkeeper’s greeting can follow reputation the same way. The shop itself, its stock and prices, is your game’s: an option sends a game event to open it, as in the hub above.
A large cast and a lot of voice
Section titled “A large cast and a lot of voice”The cast keeps every character’s name and voice consistent across the project. Every line has a recording status and a place in the voice script (Audio). Tracking and reports shows how much is written, approved, and recorded, and coverage testing plays every branch to find the ones nobody can reach. Localisation takes the text into other languages.
What stays in your game
Section titled “What stays in your game”- The quest system, stats, checks, and combat.
- The shops, the inventory, and the economy.
- Which conversation starts when the player talks to someone.
Where Storylet Studio fits
Section titled “Where Storylet Studio fits”Often. Storylet Studio is good at the parts of an RPG where the game chooses what happens: encounters around the map, rumours that whoever you talk to first gets to tell, jobs on a board, and finds that turn up as you explore. Its starting kits cover each of these (box kits). Storylet Studio picks the beat, and Patter plays the conversation for it.
Where next
Section titled “Where next”- World Properties for reading and writing your game’s state.
- Choices and logic for Best match and option flags.
Open source under the MIT licence, made by Ian Thomas.