Deploy deepseek 2
Some checks failed
Test / test (push) Failing after 2s
Build and Deploy Nuxt / build (push) Successful in 1m51s

This commit is contained in:
2026-10-19 19:04:28 +02:00
parent b5d5e570d5
commit 1ec29121e1
45 changed files with 3438 additions and 166 deletions

View File

@@ -11,7 +11,13 @@ The Foundry module uses the client-side package API and hooks documented by Foun
## 1. Install the Foundry module
Copy the contents of this directory into
In Foundry's **Setup → Add-on Modules → Install Module**, paste the manifest URL
`https://dragonroll.aranroig.com/foundry/module.json`. The frontend serves that manifest and the
zip it points to (`/foundry/dragonroll-foundry.zip`), both built from this directory, and the same
manifest URL is what Foundry checks for updates. A self-hosted Dragonroll serves it at
`https://<your-dragonroll-host>/foundry/module.json`.
Alternatively, copy the contents of this directory into
`{Foundry user data}/Data/modules/dragonroll-foundry/`. Restart Foundry, then enable **Dragonroll
Foundry API** in the world's module settings.
@@ -133,14 +139,34 @@ about it cross over: the scene's **background picture** and the **grid** laid ov
### Notes
The campaign's notes read like the campaign's journal in the world (Syndria98/dragonroll#98): every
note stands as a page of one JournalEntry named **Dragonroll**. The module creates that journal — or
adopts one the GM already made under that name, marking it as the notes' journal — and renders each
note's markdown into page HTML with Foundry's own renderer. Notes are written in Dragonroll, so this
copy runs one way: a note made or edited in the campaign rewrites its page on the next reconcile, and
a note deleted there takes its page with it. Pages the campaign does not own — the GM's own pages in
that journal — are left alone, and nothing written in the journal travels back. Autosync off stops it
too, like the rest of the sync.
The campaign's notes read like the campaign's journal in the world (Syndria98/dragonroll#98): each
folder stands as a JournalEntry named after its path. Notes in the root of the campaign share the
journal called **Dragonroll**, and notes in a folder called *Sessions* with a subfolder *Arc 1* share
the journal **Sessions / Arc 1**; a note is always a page of the journal of its folder. The module
creates those journals — or adopts ones the GM already made under the same name, marking them as the
notes' journals — and renders each note's markdown into the page's HTML (headings, lists, quotes,
code and the inline marks), so the page reads in the journal the way the note reads in Dragonroll. A
note's dice widgets become buttons in the page too: pressing one rolls the expression with Foundry's
own dice and posts the result to chat (`adv`/`dis` are sent as `kh1`/`kl1`), so the note rolls at the
table without going back to the app. Its `[[Name]]` links become Foundry content links that open the
note page, character, item or scene they name, and `![[Name]]` embeds a character or an item as a
sheet preview right in the page (Foundry's `@UUID` and `@Embed` enrichers). A name the world has no
document for is shown dimmed, the way Dragonroll dims a link to an entry it cannot find. If a folder
is renamed, its journal is renamed with it, and
moving a note to another folder moves its page to that folder's journal. Notes are written in
Dragonroll, so this copy runs one way: a note made or edited in the campaign rewrites its page, and a
note deleted there takes its page with it. Pages the campaign does not own — the GM's own pages in
those journals — are left alone, and nothing written in a journal travels back. A folder journal whose
notes have all moved or gone is removed too, unless the GM keeps pages of their own in it. Autosync
off stops it too, like the rest of the sync.
Unlike the actor and item reconciles, the notes are only pulled over when something moved. Every
fifteen seconds the module asks for `GET /api/foundry/sync/notes/revision` — a hash of the campaign's
notes and their folder paths — and compares it with the pages it last wrote into the journals. While
both are unchanged the check stops there, so an idle campaign costs one hash comparison instead of a
pull of every note and a journal rewrite. A note made, edited, moved or deleted in Dragonroll, a
folder renamed, or a page of a notes' journal the GM changed or removed, moves one of the two and the
next check writes the pages in step again.
The module calls these Dragonroll routes with the campaign sync token (no Dragonroll login):
@@ -153,7 +179,8 @@ The module calls these Dragonroll routes with the campaign sync token (no Dragon
| `POST /api/foundry/sync/scene-delete` | A scene was deleted |
| `GET /api/foundry/sync/characters` | Characters to apply back in Foundry |
| `GET /api/foundry/sync/items` | Items, and the item folders with their Dragonroll colours, to apply back in Foundry |
| `GET /api/foundry/sync/notes` | The campaign's notes, markdown and all, and the journal page each stands as |
| `GET /api/foundry/sync/notes` | The campaign's notes, markdown and all, their folder path, and the journal page each stands as |
| `GET /api/foundry/sync/notes/revision` | A hash of the campaign's notes and folder paths, for the module's change check |
| `POST /api/foundry/sync/map-note` | Store a note's journal page id after creating that page |
| `GET /api/foundry/sync/status` | The campaign this world's token belongs to, for the module's pairing status |
| `POST /api/foundry/sync/map` / `map-item` | Store an id mapping after creating a document |