# Sessions

A session is a folder inside a campaign for the prep of one game, with a summary, scenes, NPCs and maps.

## Making a session

On a campaign's page, choose **New session**. The sidebar has the same button at the top while it shows the campaign. Inside a campaign, the **New** menu of a folder that isn't in a session also has a **Session** row.

Dunjii doesn't ask for a name. It creates the next numbered session directly in the campaign folder and opens it: `Session 5` when the highest is `Session 4`, and `Session 1` in a new campaign. The new folder contains one file, `metadata.md`:

```markdown
---
type: session
---
```

- `type: session`: Makes this folder a session. The folder's name can be anything.

You can rename the folder afterwards. To make an existing folder a session, right-click it in the sidebar, choose **Info**, and set **Kind** to **Session**. A session has to be inside a campaign, and can't be inside another session.

![The sidebar on the Mistwood campaign, with New session at the top.](https://dunjii.com/docs-assets/organizing/campaign-sidebar-new-session.webp)

## The session page

A session folder opens on its **Session** tab. From the top:

- **Session summary** opens the session's summary and lists its sections. When there is no summary yet, the row says **Not started**. Click it to create one.
- **Add a scene**, **Add an NPC**, **Add a map** and **Add something else…** create a file in the session folder. You can also drag files onto the page.
- One line from the campaign's [party document](https://dunjii.com/docs/organizing/workspace-and-campaigns.md#the-party-document): the number of PCs, their levels and the purse.
- **Scenes**, with how long each one runs and whether it will happen.
- **Ways in**: each link in the scenes' `Clues` sections, and how many scenes contain it.
- Every other file in the session, grouped by type. A file in a subfolder shows the subfolder's name beside it.

When the summary has a `#` title, the session page uses it as its heading, so `Session 10` can show "Loudwater Arrival" instead.

![The Session tab of a session with two scenes and one NPC.](https://dunjii.com/docs-assets/organizing/session-tab.webp)

## Session summary

A session has one summary document. On a session with none, click **Session summary**: Dunjii creates `Session.md` in the session folder and opens it in the editor. The suggested sections are listed in gray under the text. Click one to add it.

| Section      | What goes in it |
| ------------ | --------------- |
| At the Table | Who is playing. Dunjii writes one line per character in the party document, player first: `Farr (Tink)`. Delete anyone who isn't coming. |
| Previously   | Bullets to read out at the start of the session. |
| Vibe         | How the session should feel: how much fighting, how much talking. |
| Brainstorm   | Every idea you have for the session. |
| Plan         | What you'll run: the ideas you kept, and how they fit together. |

```markdown
---
type: session-summary
durationMinutes: 180
---

# Loudwater Arrival

## At the Table

<!-- block: layout=inline -->

- Farr (Tink)
- Moss (Thistle)
```

- `type: session-summary`: Makes this the session's summary, whatever the file is called.
- `durationMinutes: 180`: How long the session runs, in minutes. The session page compares it with the length of your scenes.
- `# Loudwater Arrival`: The session page uses this as its heading.

`durationMinutes` has no button. Open **Settings** at the top of the summary in the editor and type it there.

![A session summary in the editor, with its five suggested sections.](https://dunjii.com/docs-assets/organizing/session-summary-suggestions.webp)

## Scenes

**Add a scene** opens a name field in the sidebar. Type the name and press Enter: Dunjii creates the scene in the session folder and opens it. Press Esc to cancel. A scene suggests four sections: `Situation`, `Cast`, `Clues` and `Notes`.

Each scene has two buttons, on the session page and at the top of the scene itself:

| Button          | Choices | Key it writes |
| --------------- | ------- | ------------- |
| How long?       | Short, A chunk, Most of the session | `minutes: 10`, `30` or `60` |
| Will it happen? | Must, Likely, Maybe | `expected: must`, `likely` or `maybe` |

The session page lists Must scenes first, then Likely, Maybe, and scenes with no answer. Beside **Scenes** it adds up the lengths, for example `3h planned · about 2h 20m of material`. When the scenes add up to more than `durationMinutes`, it says how many scenes you'd have to cut.

When a `[[link]]` is in the `Clues` of only one scene, and the session has other scenes, the session page shows a question: "Only one way in to The mill's debts. Where else could they learn it?" **Pick scenes** lists the other scenes, and Dunjii adds the link to the `Clues` of the ones you check. **Not now** hides the question in this browser.

```markdown
---
type: scene
minutes: 40
expected: must
---

# The Tithe Barn
*Tense, at the edge of the village*

## Clues

- [[The mill's debts]]
```

- `minutes: 40`: Any whole number of minutes. The button offers 10, 30 and 60.
- `*Tense, at the edge of the village*`: Shown beside the scene's name on the session page.
- `- [[The mill's debts]]`: Each scene that links to a page counts as one way in to it.

![The menu for whether a scene will happen.](https://dunjii.com/docs-assets/organizing/scene-expected-menu.webp)

## Cast and NPCs

In a scene, click the gray **Cast** section in the editor, or type `/cast`. In **Add to Cast**, search your NPC pages and the Sourcebook, check the ones in the scene, and choose **Add**. Dunjii writes a heading for each one under `## Cast`:

```markdown
## Cast

### [[Warden Hollis]]

### [[Brannoc Vey]]
```

- `### [[Warden Hollis]]`: One heading per person or creature, linked to their page.

For someone with no page yet, type their name and choose **Make a page for “Brannoc Vey”**. Dunjii creates an NPC page with that name and adds it to the cast. When the scene is in a session, the new page goes in the session folder. Otherwise it goes in the Library folder that contains your NPCs, or a new `Library/NPCs`.

**Add an NPC** on the session page also creates the NPC in the session folder itself, even when the session has an `NPCs` subfolder. To create one in a subfolder, right-click that folder in the sidebar and choose **New**.

![Add to Cast, searching for Warden, with the option to make a new page.](https://dunjii.com/docs-assets/organizing/add-to-cast.webp)

## The sidebar in a session

When you open a session, or any file in it, the sidebar shows the whole session as a file tree. Click the arrow beside a folder to expand it in place.

The line at the top shows the session's planned length and its number of scenes, or its number of files before it has a scene. Click the line to open the session page. **Add** opens the same list as **New**.

You can set how the sidebar shows any folder. Right-click the folder, choose **Info**, and set **Side nav** to **File tree** or **One folder at a time**. The setting applies to the folders inside it too. A session uses **File tree** unless it, or a folder above it, sets **Side nav**. Set **File tree** on a campaign to see the whole campaign as one tree.

```markdown
---
type: campaign
navDisplayMode: tree
---
```

- `navDisplayMode: tree`: tree is File tree. folder is One folder at a time.

Players who open a session through a share link see the same tree.

![The sidebar in Session 3, with the name field that Add an NPC opens.](https://dunjii.com/docs-assets/organizing/session-sidebar-tree.webp)
