Sync your Published/ notes to a Role Call game. GM notes stay private.
An Obsidian community plugin that syncs your TTRPG campaign notes to a RoleCall game. RoleCall renders them on your campaign site — wikilinks and frontmatter are parsed there.
Requires a free https://rolecall.games account. The plugin pushes notes to a game you run there, authenticated by a per-game API token from that game's Plugins page (see Configure).
Published/ is for your players, GM/ is for youTwo folders, and which one a note is in is the only thing that decides who can read it:
| Folder | Sent to RoleCall? | Who can read it there |
|---|---|---|
Published/ |
Always. | Your players (or the public, if you made the campaign's notes public). |
GM/ |
Only if you turn on Also push my GM folder. Off by default. | GMs of the campaign. Nobody else, ever. |
| anything else | Never — with one exception: an image a synced note embeds. | Whoever can read the note that embeds it. |
Both folder names are configurable.
Images don't need a folder. If a note in Published/ embeds an image (![[map.png]]), the
image is uploaded with it wherever it lives in your vault — the vault root, an attachments folder,
anywhere — because your players are already meant to see it in that note. If only GM notes embed
it, it is uploaded GM-only, and only when the GM folder is switched on. Nothing else outside the two
folders is ever read: not notes, not images no synced note embeds.
The one place this never reaches is your GM folder. An image stored there is not published by
embedding it in a published note — with the GM folder off it never leaves this device, and with it
on it syncs GM-only. Move the image out of GM/ if your players should see it.
With the GM folder off (the default), nothing under it is read, let alone sent — your secrets, plans and spoilers stay on this device, exactly as in every earlier version of this plugin.
With it on, your GM notes sync to the GM side of your campaign's notes workspace on RoleCall, so
your prep is there when you run the game. Players never see a GM note: not in the notes list, not in
search, not in the activity feed — and a [[link]] from a published note to a GM note shows up for
them as plain text, not even as a link. This is enforced by the RoleCall server, not by this plugin:
the server files anything under GM/ as GM-only and re-checks every path itself.
Turning it off again removes those notes from RoleCall on your next push. (A GM note you went on to edit on RoleCall is kept there and flagged for you to decide, rather than deleted.)
Don't rely on
%%comments%%or> [!secret]callouts to hide things inside a published note — they are not hidden. If it shouldn't be seen, keep it inGM/.
A folder named
GMinsidePublished/is never sent — it would be indistinguishable from your real GM folder. The plugin tells you when it holds files back for this reason; rename the folder.
https://github.com/rolecall-games/rolecall-obsidian-sync (or your fork).main.js and manifest.json from the latest release.<YourVault>/.obsidian/plugins/rolecall-sync/.Fastest path — Connect to RoleCall. Open Settings → RoleCall Sync and click Connect (or just hit the ribbon's push button with no token set). Your browser opens on rolecall.games showing the same code as the plugin — sign in or create a free account right there, pick the campaign this vault should publish to (or create one, prenamed after the vault), and approve. The token lands in the plugin by itself; nothing to paste. Connecting uploads nothing from your vault — the first push is its own explicit step.
Prefer to wire it by hand? Open Settings → RoleCall Sync and fill in:
| Field | What goes here |
|---|---|
| API base URL | https://rolecall.games (default). Change only if you self-host RoleCall. |
| API token | A personal token. See How to generate a token below. |
| Published folder | Published (default). Notes inside this folder are synced and shown to your players. |
| Also push my GM folder | Off (default). Turn on to sync your GM folder too — GMs only, see the one rule. Turning it off removes those notes from RoleCall on the next push. |
| GM folder | GM (default). Only read when the switch above is on. Must not be inside the published folder. |
The token identifies which game receives the push — there's no separate Game ID setting. If you want to push to a different game, generate a token on that game's page and paste it here.
Easiest path: on your game's Plugins page, click Download starter vault. It gives you
a ready-made vault with the GM/+Published/ folders and this plugin already configured (token
baked in) — just install the plugin and push.
Obsidian, and copy the token immediately — it's only shown once.Cmd/Ctrl+P) and run RoleCall Sync: Push notes to RoleCall
(named Push published notes before 0.3.0).You'll see Syncing published notes… while it runs — or Syncing published and GM notes… when the
GM folder is on, so every push says what it is carrying — and a summary like
Synced: 3 added, 1 updated on success (or Already up to date). On failure, the notice explains
what went wrong (bad token, out-of-date plugin, network).
If the GM folder is switched on but can't be found (renamed, or a typo in the setting), the push carries your published notes only and leaves the GM notes already on RoleCall untouched — a folder the plugin can't find is never treated as "delete them all".
RoleCall keeps your campaign's NPCs, groups, quests and places as GM notes under GM/NPCs,
GM/Groups, GM/Quests and GM/Locations. When a push carries a new note there (with the GM
folder on), RoleCall makes it an NPC, group, quest or place and tells the plugin which one. The
plugin then writes one line into that note's properties:
rc_id: npc_01j9xk3f2m8qzr7w4e6t1yabcd
That rc_id is how RoleCall recognises the note across renames — rename it and edit it in one go
and it is still the same NPC. Leave it in. Nothing else in the file is touched: the line goes
right after the opening --- (or a small --- block is added on top of a note with no properties),
and your next push sends it without asking anything of you. A note that already has an rc_id is
never changed, unless RoleCall says its value is wrong or was emptied. A note saved with a
byte-order mark, or with an unclosed ---, is left alone; RoleCall still knows which NPC it is.
After a push, the notice may also say:
RoleCall kept N entity notes you deleted — a note that belongs to an NPC, place, group or
quest isn't deleted by deleting the file (nor by turning the GM folder off), and your next pull
brings it back. Remove the NPC (place, group, quest) in RoleCall first; after that its note
deletes like any other. GM pictures those notes show are kept with them.N notes carry an id another note already uses — a copy of an entity's note (Obsidian's
"Make a copy"). It is kept on RoleCall as a plain note; delete the copy, or its rc_id line.N player pages published without your GM properties — you dragged an entity's GM note into
your published folder. RoleCall shows that NPC to your players with a page that carries only
type and rc_id, and the plugin replaces your local copy with that page (unless you edited it
since the push — then your next pull offers RoleCall's version). The GM note itself stays in
RoleCall.The full lists are in the developer console. None of this sends anything new about your vault to RoleCall: the plugin only acts on what RoleCall named, and only for files it pushed.
Open the command palette and run RoleCall Sync: Pull notes from RoleCall.
A pull brings down every note, folder and image that is new or changed on RoleCall — notes you wrote in the campaign's notes workspace, notes your players wrote, edits made there to notes that came from this vault. Published notes land in your published folder; GM-only notes land in your GM folder, whether or not you push that folder (pulling them sends nothing).
What it will and won't do to your files:
| Your copy | RoleCall's copy | A pull… |
|---|---|---|
| doesn't exist | new | adds it |
| unchanged since the last sync | changed | updates it |
| changed | unchanged | leaves it — your next push sends it |
| changed | changed | leaves it exactly as it is, and asks you afterwards |
| deleted by you | still there | leaves it deleted — your next push tells RoleCall |
| still there | deleted or moved | leaves it — a pull never deletes or renames |
When something changed in both places, a dialog lists those notes after the pull with two buttons each: Keep mine (your copy stands, and your next push makes it RoleCall's version too) or Use RoleCall's (your copy is replaced). Anything you don't decide is asked about again next time. Nothing is ever overwritten without that choice.
Pulling needs permission to read your campaign's notes, which tokens issued before pulling existed (plugin 0.4.0) don't have — they could only push, on purpose. If a pull says the token can't pull, open Settings → RoleCall Sync and click Connect once; that grants it. (If you paste tokens by hand, tick the pull box when generating one on the Plugins page.)
The comparison is done on your device: RoleCall sends a list of what it holds, and nothing about your local files — names or contents — is sent up to make it.
git clone https://github.com/rolecall-games/rolecall-obsidian-sync
cd rolecall-obsidian-sync
npm install
npm run dev # watch-build to main.js
To test against a real vault, symlink the plugin into a throwaway vault:
ln -s "$PWD" "/path/to/TestVault/.obsidian/plugins/rolecall-sync"
Install the Hot Reload plugin in the test vault so changes to main.js reload automatically.
The rc_id stamp (src/stamp.ts) must write exactly the bytes the RoleCall server expects, so its
tests compare it with the server's own port on a shared corpus:
test/fixtures/frontmatter/stamp-golden.json, generated from the server's code by
test/fixtures/frontmatter/gen-stamp-golden.exs (usage in its header). Regenerate it, and recopy the
server's test/fixtures/frontmatter/obsidian/*.md, whenever the server's frontmatter rules change.
Production build, tests and lint:
npm run build
npm test # src/plan.ts, src/entities.ts and src/stamp.ts — no Obsidian runtime needed
npm run lint
What changes for a GM (details in NPCs, places, groups and quests):
rc_id: … line in its
properties; nothing else in the file changes. The next push sends that line once, and a pull in
between never asks you about it. A note RoleCall holds in a newer version than yours (pushed from
another device) is not touched until a pull has brought that version down.SYNC_VERSION stays 4, and against a
server without entity sync the plugin behaves exactly like 0.4.x.Rollout order: deploy the RoleCall server first, then tag the plugin. The server's response keys
(bound, entity_notes_kept, entity_attachments_kept, duplicate_ids, normalised) are what
this release acts on; the plugin tag only adds behaviour once they exist. rc_id stamping must
match the server's unstamp_candidates byte for byte, so regenerate
test/fixtures/frontmatter/stamp-golden.json against the server build being deployed before
tagging (see Local development).
SYNC_VERSION (src/api.ts), the RoleCall server must already be
deployed with it. A plugin that speaks a newer version than the server gets a 409 on every
push until the server catches up, and updating the plugin again cannot fix it.version in manifest.json and add a matching entry in versions.json mapping the new version to the minimum supported Obsidian version.v), e.g. 0.1.1.manifest.json and main.js as individual release assets.MIT © Framework and Fable LLC — see LICENSE.