A theme is a folder, so installing one is copying a folder and sharing one is sending a folder. This page covers both, what the game tells you when it refuses a theme, and what to check before you hand a theme to someone.
Installing a theme
Where the folder goes
Put the theme's folder in your own themes folder, <data>/themes:
- Open the Skins page and, in the Interfaces section, the Actions menu. Choose Open themes folder. The game creates
<data>/themesif needed and opens it. On Windows it is%LOCALAPPDATA%\Prism\PrismNG\data\themes(PrismNG-PBEfor the preview channel). If the environment variablePRISM_THEMES_DIRis set, that folder is used instead. - Copy the theme's folder in. The path to its manifest must be
themes\<id>\theme.json. A zip usually unpacks to one extra level (themes\my-theme-1.0\my-theme\theme.json): move the inner folder up. - The folder's name must be the theme's
id. Rename it if it is not. - Back in the game, choose Reload themes in the same menu. Then click the theme's card.
The game also reads themes/ next to prism.exe: that is where the themes that ship with the game live, and it is searched first. You do not need to touch it. Because it comes first, a theme of yours cannot replace a shipped theme by taking its id. See where themes are looked up.
To try a theme without touching your own, start the game with PRISM_THEMES_DIR pointing at an empty folder.
When a theme is refused
The game never drops a theme without saying so. Every problem is a notice of the form "<id>": <file>: <where>: <reason>, shown in two places:
- in the Interfaces section of the Skins page, in the list under the cards, titled Theme folders that cannot be used. The list also holds warnings and refused templates, not only whole themes;
- in the game's log, one line per problem, prefixed
Themes:.
What each kind of notice means:
| Notice looks like | Meaning |
|---|---|
"<id>": theme.json: …, tokens.css: … or theme.css: … |
The theme is not listed. Fix the file named. |
"<id>": theme.ts: <message> |
The script failed or went over a budget: the theme is listed without its templates (it takes _base's). |
"<id>": theme.ts: <contract> › <nodes>: <reason> |
One template was refused: the others stand. |
"<id>": theme.css: warning: line N: … |
The theme is listed and works; the author should read it (today: an infinite animation). |
"<id>" in <folder>: the theme "<id>" was already found earlier in the search path and wins |
The same id exists in an earlier folder; yours is ignored. |
"<id>": at most 64 themes are loaded |
Too many theme folders. |
"_base" in <folder>: the base templates belong to the game's own themes folder; this folder is ignored |
A _base folder in your themes folder. Delete it: only the game's own is read. |
Reading errors explains how to read the longer messages of theme.ts and has a catalogue of them.
The log lines
The game writes its theme messages to its standard error, as Themes: <notice>: one line per notice in the list above, plus Themes: creating <path>: <error> when the themes folder cannot be created, and Themes: file <id>/<path>: <error> when a picture of a theme cannot be served. To see them, start prism.exe from a terminal. The same sentences are in the list in Skins, so you rarely need the terminal.
Sharing a theme
What to ship
Send the whole folder, named after the id, as a .zip that unpacks to that one folder:
my-theme/
theme.json
tokens.css
theme.css (if you have one)
theme.ts (if you have one)
preview.png (if theme.json names one)
images/… (what your tokens, templates and stylesheet refer to)
Leave out everything the game does not read: a copy of theme.d.ts, a tsconfig.json, notes, source art, node_modules. The game ignores them, but they weigh on the zip. The limits that apply to the content: the manifest 64 KiB; tokens.css and theme.css 64 KiB each; theme.ts 128 KiB; each picture 4 MiB.
What exists today, and what does not
Be precise with the people you share with:
- A theme is installed by copying its folder. There is no button that imports a theme's zip: unlike skins, a theme has no import dialog.
- The game's catalogue does not carry themes. The catalogue (
GET /api/catalog, the Download page's Mods, Skins and Playlists) knows three kinds,mod,skinandplaylist(services/api/docs/CATALOG.md,docs/catalogue.md). An item of another kind is ignored. So there is no catalogue entry, listing or one-click install for a theme. ts_packageis not packaging. The function of that name incrates/themes/src/interface.rswrites the TypeScript types (@pvng/themes) that the game's own page uses to receive validated themes. It does nothing to a theme folder.- The themes that ship with the game are the folders of
content/themes/in the repository (andthemes/next toprism.exein a release). A theme that you write lives in<data>/themesfor you and for anyone you give it to.
So today, sharing a theme means handing over a zip (or a link to a repository) with the instructions of Installing a theme.
Versioning your theme
versionintheme.jsonis your label: letters, digits and. _ + -, 32 characters at most. Raise it when you publish a change.themeApiis the version of the game's contract the theme was written for. Write the version you tested against. A theme that asks for a newer one than the game speaks is refused withthemeApi N is newer than this game speaks (theme API M): update the game, or use a version of the theme written for API M. An older one loads as long as the game can read it, but it is refused the screens, faces and"accent": "map"that a later version added: see what changes in version 2. See versions and stability.- Within one
themeApi, the game only adds: a game update does not break a valid theme. When a newthemeApiarrives, re-runcheck_themeon your theme (it reports the version the game speaks) and port what it reports. - Say in your release notes which
themeApiit needs, and which languageslocalizedcovers.
Checklist before you share
- [ ]
check_themeprints no problem, and no warning. A warning is a problem you chose not to fix (concepts). - [ ]
idequals the folder's name;name,description,versionandauthorare filled in;themeApiis written. - [ ]
localizedhas at least English and French (enandfr: the name and the description), and the languages of anyone you know you will help (zh,ko). - [ ] Reduced motion. Every moving animation and transition is inside
@media (prefers-reduced-motion: no-preference); no infinite animation. Switch your system's reduce motion setting on and look at the theme. See concepts. - [ ] Contrast. Text is readable on every plate in light and dark: the tokens
--pv-text*on--pv-plate*, and--pv-inkon your accent and on a few custom accents ifaccentis"preference". A common target is a contrast ratio of 4.5:1 for body text; the game does not enforce one. A light theme sets--pv-color-scheme: lightand redefines the tokens whose defaults assume a dark surface (tokens). - [ ] The map's picture is still visible (the validator refuses a theme that buries it) and the text over it reads on bright and dark pictures.
- [ ] Sizes. Look at 1920×1080, 1366×768 and 1280×720, and at a narrow window (your
@media (max-width)blocks). - [ ] Keyboard. Tab order follows your tree. Enter plays, Escape closes, arrows move the list. These do not depend on your template, but a bad
overfloworinertcan hide the focus ring. - [ ] Both accent modes, if
accentis"preference": Theme default, Map artwork and a Custom colour. - [ ] A picture for the card.
previewnames an image of the folder; it is cropped to fill the card (cover). Without it the game draws the card from your tokens, which is a fair preview. - [ ] A clean install. Copy the folder, and only the folder, into an empty
PRISM_THEMES_DIR, start the game, and pick the theme. - [ ] Screenshots for your readers: the map selection, and the Settings window if you template it.
Troubleshooting
Read the list under the cards in Skins first: it names the file, the line or the node, and the reason. The table covers the cases where the cause is not in a message.
| Symptom | Likely cause | Fix |
|---|---|---|
| The theme is not in the list and no notice mentions it | The folder is in the wrong place, one level too deep, or the list was not reloaded. PRISM_THEMES_DIR may point elsewhere. |
Use Open themes folder, check that themes\<id>\theme.json exists, then Reload themes. |
no theme.json |
The folder is nested (my-theme\my-theme\…) or the file is misnamed. |
Move the inner folder up; the file is theme.json. |
the id "…" must be the folder name |
id and the folder differ. |
Make them equal. |
the folder name must be lower-case letters, digits and hyphens (at most 32) |
A capital, a space, an underscore or a long name. A name that starts with _ is never a theme. |
Rename the folder and the id. |
already found earlier in the search path and wins |
A shipped or other theme has the same id. | Change your id and your folder name. |
| The theme is listed, but the layout did not change | theme.ts failed or one of its templates was refused (a notice says which), or the old file is still loaded. |
Read the theme.ts notice; fix; Reload themes. A template that fails is replaced by the base's: the theme looks like the default layout. |
| The theme is listed, tokens work, my template does not | Its key is wrong (screens: { 'screen.library' } instead of library), or it is for a contract that the screen does not use. |
Use the key rules of templates. |
| Tokens are ignored | The value was refused (the whole theme is then unlisted), or the token is overridden in a subtree by theme.css. Layout words, images and --pv-art-filter work only in tokens.css. |
Check the notice; search your theme.css for the token. |
the required slot "…" is not placed or the required output "confirm" is not bound to any control |
The template forgot a place or the button. | Place every required place; bind confirm to a button. |
| The Play button vanished | A template cannot remove it: the validator refuses a footer without a button bound to confirm, and a screen without the footer place. So it is hidden or pushed out by layout: a parent with overflow: hidden and no room, zero height, a wrong z-index, the strip drawn only when something is selected, or a disabled button. Enter still plays. |
Give the parent room; look at the footer's class and when; test with the rule removed. |
theme.css is ignored |
A rule of a refused file takes the whole theme out. If the theme loads, a game rule is more specific (the game wins), the selector aims at a class the template does not put on a node, or it aims at a game class instead of a data-* mark. |
Repeat a data-* mark to gain specificity; check the class is on a node in theme.ts. See theme.css. |
a selector starts with one of the theme's classes (.name) |
The selector starts with an element, [data-…], :root or *. |
Start with one of your classes and descend. |
| A picture does not show | The path does not match, the extension is not an image, it is over 4 MiB, or it is outside images/. A log line says Themes: file <id>/<path>: …. |
Use images/name.png, a supported type, and the folder. |
| The accent is not the one I set | accent is "preference": the player's setting wins. |
Set "accent": "fixed" if the palette needs it. |
| The theme drops frames, or the fans spin on a menu left alone | An infinite animation (the validator warns), a transition on elements updated every frame (the live bars), animation of width, height or top, an animation outside prefers-reduced-motion: no-preference. |
Play motion once per selection under [data-entering]; animate transform and opacity; see animation rule. |
theme.ts: interrupted, or … over the … limit |
interrupted is the script stopped at its 500 ms budget (a heavy loop at load time). over the … limit is a source, a tree or a node count over a budget. |
Build less at load time; see the budgets. |
themeApi N is newer than this game speaks |
The theme was written for a newer game. | Update the game, or use an older version of the theme. |
the map picture must stay visible: … |
A shade, a filter or an overlay hides the map's picture. | Lighten the layers in tokens.css; see tokens. |
If a case is not here, run check_theme on the folder and read reading errors.