Developer documentation
Everything you need to write a mod, a skin, a map script or a theme for Prism, and to publish it. Every code example is type-checked against the SDK.
Mod API version 2 Theme API version 2
Where do I start?
Write a mod
A HUD, a judgement set, a rating, a filter, a download source: five minutes to a first mod.
Make a skin
Notes, receptors, lights: a skin folder and a skin.ts.
Script a map
A script that sits next to one chart and changes how it plays.
Use the online API
Maps, scores, profiles and the catalogue over HTTP, with an OpenAPI description.
Make a theme
Interface themes and layouts.
Feed an AI assistant
llms.txt, llms-full.txt and a raw Markdown file for every page.
For AI assistants and editors
The typed SDK and a single file to paste into a coding assistant. The addresses are stable.
Get started
Start here
What you can build for Prism, what each kind needs, the versions to match, where the SDK is, and which page to read for what.
A first mod
A working HUD mod in five minutes: the file, the folder, where to put it, the Mods page, type checking, exporting, and what an error looks like.
A first skin
A working skin in five minutes: skin.ts, one image, where skins live, the Skins page, the skin editor, and what an error looks like.
A first map script
A map script that animates the playfield with the music: where the file goes next to a chart, what it may change, its budgets, and how replays treat it.
Concepts
How scripts run in Prism: the three kinds, the lifecycle, threads and budgets, events, permissions, errors, determinism, units, ids and what is forbidden.
Tooling
Type checking, installing, reloading, the log, exporting, the command-line flags and environment variables of the game, the TypeScript packages, and the tools of the repository.
Feed an AI assistant
The llms files and raw Markdown pages of this site, their stable addresses, and how an agent should use them.
Reference
SDK reference
The typed SDK of mods, skins and map scripts, generated from the game: every function, event and type.
Declarations and ctx
defineMod, defineSkin, defineChart, defineEditorMod, the manifest types, permissions and the ctx global.
Events
Every event a script can subscribe to with ctx.on, and its payload type.
Game state, storage, logging and keys
game.*, playfield.*, lanes.*, log.*, ui.*, storage.* and controls.*.
HUD
hud.*: the on-screen elements a mod or a skin adds.
Native drawing (stage)
stage.*: sprites, shapes and animations drawn by the renderer (permission stage).
Judgements, modifiers, scroll speeds and chart transforms
judgements.*, gameplay.*, scrollSpeed.* and chart.*.
Ratings, tables, calculators and library filters
ratings.*, tables.*, metron.* and library.*.
Tabs and the local leaderboard
tabs.* and leaderboard.*.
Download sources and skin import
downloads.* (mirrors, sources, bridges) and skinImport.*.
Editor mods (editor.*)
defineEditorMod and the interfaces of the map editor's API: panels, tools, patterns, validations.
Skin fields
Every value of a playfield a skin, a map script or the player can set: kind, bounds, scope and a note for each.
Guides
Build a HUD element
Draw text, boxes and images over the game with hud.*: bindings, layout, style, show conditions, animation, images and fonts, with a complete working mod.
Native rendering with stage.*
Draw sprites, shapes, text and particles in the game's own renderer, in the same frame as the notes, with animations and triggers that run without your script.
Configurable elements, settings and storage
Expose an element that skins, other mods and the player configure, depend on other packages, keep data between sessions, and know what survives a reload.
Writing a skin
How a skin is built, from its folder and defineSkin to the three layers of the playfield, images, sounds, live changes and the errors you will see.
Writing a map script
A script that sits next to a chart and animates its playfield while it plays, like an ITG modchart, with the files, the declaration, transitions, images, budgets and errors.
Importing an osu! skin
How the osu!mania skin converter works, the skinImport API that mods use to build an importer, the permission it needs and the limits the game enforces.
Write a judgement set
Register judgement sets with judgements.register: tiers, asymmetric windows in ms, weights, combo breaks, colours and gradients, parameters, the rules the game validates, the built-in sets and how the player picks one.
Add a difficulty rating
Declare a library rating with tables.register and ratings.register: the ten Metron calculators, panels, colour scales, pattern chips, backfill, metron.difficulty and metron.performance, and how the library shows them.
Add library filters
Register library search criteria with library.filters.register: the table and rating behind a filter, the typed query the library sends, the host's own criteria, the limits and the errors.
Add chart tabs and read the local leaderboard
Add a tab or extra sections to the song selection's chart panel with tabs.register and tabs.extend, with typed panels and a closed list of icons, and read a chart's local ranking with leaderboard.query and leaderboard.best.
Gameplay modifiers, scroll speeds and key actions
Declare switches for the Mods tab, scroll speed systems and key actions of a mod, with every closed list and limit Rust applies.
Transforming a chart
Write a modifier that rewrites the notes of a chart at the start of a play, with typed arrays, and see exactly what Rust accepts, refuses and records in the replay.
Adding a download source or mirror
Let the Download page search a new site, either with a declaration (URL templates and JSON paths) or with a bridge (pure functions), without your mod ever touching the network.
Editor mods
Add panels, commands, tools, note patterns and checks to the map editor with defineEditorMod, and know exactly what loads today and what the registry refuses.
File formats
The .pvmod package
The ZIP format that carries a mod between players, its entry file, allowed files, limits, install and replace rules, and the errors you can see.
The skin package
The <id>.zip that carries a skin, its entry file skin.ts, allowed files, limits, the import rule that never replaces, and how it differs from the catalogue and from .osk.
The .pvreplay file
The binary container of a recorded play: magic, version, zstd frame, rkyv archive, limits, field order, metadata JSON, how chart_hash is computed, and the errors.
The .pvplaylist file and its share code
The JSON schema of a shared playlist (pvng-playlist v1), the rates extension, limits, errors, and the one-line share code.
The .pvmarathon file
The JSON recipe of a marathon (pvng-marathon v1), its fields, limits, the constants that shape the composed chart, and the errors.
Share strings, config files and file associations
The settings and skin-config export files, the judgement and controls share strings, the prism://map link, and the seven file types a double-click opens.
Rox files and chart hashes
The .rox chart container, how Prism reads it, and the three identities of a chart (note hash, chart hash, chart version) with the API that takes each.
releases.json and release signatures
The public contract of the downloads feed the game reads, how the client parses it, and how a release zip is verified with minisign.
Online API and catalogue
Online API
Where the Prism web API is described, how to sign in, what needs no account, the real rate limits, and how to generate a typed client.
Map index, boards and rankings
The public read API of the map index, the online boards, players, rankings and marathons: identities, parameters, answers and limits, with curl examples.
Catalogue API and package rules
The public catalogue of mods, skins and playlists: the GET /api/catalog contract, what the server accepts, what the game reads and installs, side by side.
Submit to the verified catalogue
Build a mod, skin or playlist package, what the server checks and what the team reviews, how to send it from the game, and how updates and versions work.
Game updates (the player's side)
How the game finds, downloads, verifies and installs an update: channels, the daily list read, install on click, signature check, rollback, repair and what's new.
Help and limits
Troubleshooting
Problems by symptom with the real message, its cause and the fix: a mod that is not listed or is disabled, declaration errors, budgets, permissions, skins and map scripts, packages.
Limits and budgets
Every limit and budget of the modding API, packages, replays, the catalogue and the online API, grouped, each with the source file that enforces it.
Versions and changes
Which version numbers exist in Prism, how the mod API and the theme API are versioned, what a mismatch does, what counts as breaking, and where the release notes live.
Themes and menus
Interface themes
What a theme is, what it can and cannot change, the files of a theme folder, where themes are found, and how the theme contract is versioned.
Quick start
Make your first theme in ten minutes: a palette in tokens.css, then a first change of layout with theme.ts.
Theme concepts
The ideas behind a theme: tokens, styles, templates, screens and places, contracts and faces, live data, motion, localisation, accent and fallbacks.
Templates (theme.ts)
The language of theme.ts: how a template runs and its budgets, the constructors, bindings, conditions, events, places, each and when, faces, and how to read the typed context.
theme.css
The validated CSS subset of a theme: how it is rewritten, how to reach the game's elements, plate variables, specificity, motion, images, limits and the full allow-list.
Token reference
Every design token a theme may set in tokens.css: its type, its bounds, its words and what it changes.
Contracts reference
Every screen and component a theme.ts may template: its input, outputs, slots, parts, host classes and the musts a template keeps.
Nodes and context reference
The node kinds of theme.ts, their attributes, the typed context (bind, field, on, t, fmt, conditions) and the closed lists and limits of a template.
theme.css allow-list
Every selector, at-rule, property, value form and variable that theme.css accepts, and its limits, read from the validator.
Theme cookbook
Seven small complete themes, each built around one idea, with the rules that shaped them.
Reading theme errors
How to run the checker, how to read a message, what each kind of problem removes, and a catalogue of the common errors with their fix.
Install, share, troubleshoot
Install a theme, what is and is not available to share one today, the checklist before you publish, and a symptom-to-fix table.
Menus: behaviour and themes
Menus: behaviour, the behaviour API and themes, the modifier selector.