Skip to content

Preparations

tilttek/session-prep

A preparation

A Preparation is the game master's preparation of one session of a campaign:

ValueBoundsMeaning
idan identifierthe preparation
campaignan identifierthe campaign, which a change never moves
gameMasteran identifierthe member who prepares it and changes it
titleone line, 1 to 200 characterswhat the game master calls it
sessionan identifier, or null by defaultthe session it is for, in the application's schedule
scenes0 to 50 Scenethe scenes that might happen, in their order
secrets0 to 50 Secretwhat the players may learn, with its clues
characters0 to 100 NonPlayerCharacterthe characters the game master plays
places0 to 50 Placethe places the characters may go
notes0 to 100 Notefree notes
checklist0 to 50 ChecklistItemthe steps of the preparation
statusa PreparationStatus, Draft by defaultbeing written, ready or closed
version0 or more, 0 by default0 for a new preparation; the store's version otherwise

An identifier is 1 to 128 letters, digits, _, ., : or -, starting with a letter: an opaque reference, never a name or an address. The session's identifier is the one the application's scheduler gives, such as a session of tilttek/session-scheduler; the library reads nothing from it.

Its parts

Each part implements Part: its key, 1 to 64 letters, digits, _, ., : or - starting with a letter, is unique among the parts of its kind in the preparation, and names it in every call.

PartValues
Scenetitle, one line of 1 to 200 characters; summary, lines of at most 4000; characters, the keys of at most 20 characters it features; places, the keys of at most 10 places it happens in; status, a SceneStatus: Planned, Played or Skipped
Secrettext, lines of 1 to 1000 characters; clues, at most 10 Clue; revealed
Cluetext, one line of 1 to 500 characters — a letter, a rumour, a track —; found
NonPlayerCharactername, one line of 1 to 120 characters; role, one line of at most 200 — what they want, what they do —; notes, lines of at most 2000; reference, the identifier of their entry elsewhere, or null
Placename, one line of 1 to 120 characters; description, lines of at most 2000; reference, the identifier of its entry elsewhere, or null
Notetext, lines of 1 to 4000 characters
ChecklistItemlabel, one line of 1 to 200 characters; required, whether the preparation waits for it before it is ready; checked

A text is valid UTF-8, trimmed, and counted in characters. One line holds no control character; lines may hold line breaks and tabulations, their ends written \n. No text holds the characters that embed, override or isolate the direction of a text. A scene features only the characters and places its preparation holds.

A secret is tied to no scene: it comes out wherever it fits, and a clue found does not reveal it, the game master says when it is.

Changing a preparation

A preparation is a value: each method returns a new one, checked as a whole, and leaves the first as it was.

MethodReturns the preparation
withTitle(), withGameMaster(), withSession(), withStatus(), withVersion()with that value
withScene(), withSecret(), withCharacter(), withPlace(), withNote(), withItem()with the part in place of the part of its key, or after the others
withoutScene(), withoutSecret(), withoutNote(), withoutItem()without the part of the key
withoutCharacter(), withoutPlace()without the part of the key, nor any scene featuring it
moveScene($key, $before), moveItem($key, $before)with the part moved just before another, or after every other when $before is null
withSceneStatus(), withSecretRevealed(), withClueFound(), withItemChecked()with that fact
withFactsOf($other)with each fact as the part of its key is in the other, and the rest at their start; null starts them all

The order of a list is the order the game master gives it: there is no number to sort by. A key that no part has raises InvalidPreparation, and so does a list made too long.

scene(), secret(), character(), place(), note() and item() give a part by its key, or null. unrevealedSecrets() gives the secrets not revealed yet, and missingItems() the keys of the required items not checked yet.

Checklist templates

A ChecklistTemplate holds up to 50 items, none checked. applyTo() adds them after the preparation's own items, leaving those whose key it holds already.

ChecklistTemplate::standard() goes through the usual steps of a preparation, each named by what it is for:

KeyStepRequired
recapRecall what happened in the last session
charactersReview the player characters and what they are after
limitsCheck the content limits the table agreed on
openingWrite an opening that starts in the actionyes
scenesSketch the scenes that might happenyes
secretsWrite secrets and the clues that lead to themyes
placesPick the places the characters may visit
npcsPick the non-player characters and what they want
threatsPick the threats and look up their statistics
rewardsPick the rewards
materialsGather the maps, handouts and music

The labels are in English; an application that shows them in another language translates them by their key, or keeps templates of its own.