← All documentation
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.
The numbers below are read from the code. A limit is enforced by the file in the last column; when a number looks wrong to you, that file is the truth. Messages you see when you cross a limit are in Troubleshooting. Sizes use MiB (1024 × 1024 bytes) and KiB. In the last column, a path is relative to crates/, except api/ (services/api/src), index/ (services/index/src) and desktop/ (apps/desktop/src/app).
Script budgets
A script is a mod, a skin or a map script. These budgets bind each script on the mods thread.
| Limit |
Value |
Source |
Execution time of one load, setup, event handler or tick |
30 ms |
modding/host.rs (ModLimits) |
| Memory of one script |
16 MiB (shipped mods share one engine whose reserve is 16 MiB × their number) |
modding/host.rs, runtime.rs |
| Stack |
1 MiB |
modding/host.rs |
| Disabled after |
3 failures in a row, or 3 timeouts in total |
modding/host.rs, runtime.rs |
| A disabled mod stays off |
until the host restarts (a skin or map script: until the next map launch) |
modding/runtime.rs |
Skin setup and the wait for chart.transform |
1000 ms each |
desktop/skins.rs, playback.rs |
| Event queue to the script thread |
1024 |
modding/host.rs |
| Message queue (log lines, errors) |
256; the rest is dropped and counted |
modding/host.rs |
| One log line |
1024 characters, then cut with … |
modding/api.rs |
game.tick |
30 per second |
modding/host.rs |
chart.transform: notes read or submitted |
100 000 |
core/scripted_notes.rs |
chart.transform: mods transforming one play |
8 |
core/scripted_notes.rs |
ui.popup: title / detail / actions |
96 / 512 characters / 4 |
modding/popup.rs |
ui.popup: open at once per game |
8 |
modding/api.rs |
ui.popup: total of a progress |
10 000 000 |
modding/popup.rs |
Timers and ctx.hot are declared by the SDK but are not driven by the game: callbacks of setTimeout and setInterval never run. Do not rely on them.
HUD and native drawing
| Limit |
Value |
Source |
| HUD nodes per mod |
384 |
modding/host.rs, scene.rs |
| Characters of one HUD text |
256 (control characters other than \n and \t are refused) |
modding/host.rs, scene.rs |
| Node id |
1 to 64 characters, no control character |
modding/scene.rs |
| Group depth |
8 |
modding/scene.rs |
| Gradient stops |
2 to 8 |
modding/scene.rs |
animate duration |
1 to 5000 ms |
modding/scene.rs |
transitionMs |
10 000 at most |
modding/scene.rs |
| Tier colors of a binding |
64 entries, keys of 32 characters |
modding/scene.rs |
HUD image (src) |
PNG, 8 MiB |
modding/assets.rs |
Declared images (images) |
64 .png paths |
modding/manifest.rs |
| Fonts per mod |
8, 8 MiB each, name 64 characters |
modding/fonts.rs, assets.rs |
Native elements per script (stage.*) |
128 |
stage/scene.rs |
| Emitters per script |
16 |
stage/scene.rs |
| Live particles per script |
1024 (512 per emitter, 256 per burst) |
stage/scene.rs, element.rs |
| Triggers / queued cues |
64 / 64 |
stage/scene.rs |
| Native element text |
128 characters |
stage/element.rs |
| Animations per element |
8, each up to 10 s |
stage/element.rs |
| Particle lifetime |
5 s |
stage/element.rs |
| Native element id |
64 characters |
stage/element.rs |
| Column of a native element |
below 32 |
stage/element.rs, skin/spec.rs |
Storage and reads
| Limit |
Value |
Source |
| Storage key |
1 to 128 characters |
modding/storage.rs |
| Keys per mod |
256 |
modding/storage.rs |
| Storage of one mod (keys plus JSON text) |
256 KiB |
modding/host.rs |
| Storage writes |
at most once per second, and when the host stops |
modding/storage.rs |
game.notes limit |
1 to 256 (64 by default) |
modding/entities.rs |
game.hits limit |
1 to 256 (50 by default) |
modding/entities.rs |
game.keys limit |
0 to 256 (64 by default); only lanes 0 to 15 are recorded |
modding/keys.rs |
Timing points of a Song |
1024 |
modding/entities.rs |
leaderboard limit / offset |
1 to 100 (20 by default) / 0 to 100 000 |
modding/leaderboard.rs |
| Pending leaderboard queries |
2 per mod, 16 in total |
modding/leaderboard.rs |
Charts scoped by library.chartsAdded |
8192 ids |
modding/library.rs |
| Pending rating backfills |
16 per mod, 64 in total |
modding/library.rs |
Ids and manifest
| Limit |
Value |
Source |
Mod and skin id |
1 to 64 characters among a-z 0-9 . - _, starting and ending with a letter or digit, no .., valid as a Windows file name |
modding/manifest.rs |
| Strict ids (judgement sets and tiers, gameplay modifiers, control actions, ratings, tabs, download declarations) |
1 to 32 characters among a-z 0-9 - |
modding/judgement.rs (check_id) |
| Package element name |
[a-z0-9-], 1 to 32 characters, starting with a letter |
modding/dependencies.rs |
name, author |
64 characters each |
modding/manifest.rs |
description |
1024 characters (line breaks allowed) |
modding/manifest.rs |
homepage |
http or https, 256 characters, no whitespace |
modding/manifest.rs |
version |
a semantic version (1.0.0, 1.0.0-beta.1) |
modding/manifest.rs |
loadOrder |
0 to 10 000 (1000 by default) |
modding/manifest.rs |
| Permissions |
stage, skinImport, network |
modding/manifest.rs |
Packages in uses |
16 |
modding/dependencies.rs |
| Elements provided per package |
16, with 32 options each |
modding/dependencies.rs |
Enum option values / string maxLength |
32 / 256 |
modding/dependencies.rs |
| Elements a player may override |
256 |
modding/dependencies.rs |
What a mod may register
Registrations happen in setup only and are capped per mod. Extra tabs and extensions beyond the global totals are dropped.
| Registry |
Per mod |
Other bounds |
Source |
| Judgement sets |
8 |
8 params; 32 tiers plus Miss; set name 64, id 32; at most 4096 combinations built eagerly |
modding/judgement.rs |
| Gameplay modifiers |
8 |
name 32, description 200, 8 conflicts; a noteMask modifier declares 8 sliders (id 32 letters and digits, label 32, description 200, bounds within ±1000000) |
modding/modifiers.rs |
| Control actions |
32 |
name 64 |
modding/controls.rs |
| Scroll speed systems |
8 |
name 64, 4096 values |
modding/scroll_speed.rs |
| Tabs |
4 (12 in total) |
title 24, 8 panels per tab, text 280, 10 leaderboard rows |
modding/tabs.rs |
| Tab extensions |
4 (24 in total) |
4 panels each |
modding/tabs.rs |
| Ratings |
16 |
4 panels, 16 fields, 12 patterns, 16 color stops |
modding/ratings.rs |
| Download declarations |
4 (64 in total) |
8 hosts, rate up to 120 per minute, page size up to 100, 16 params |
downloader/declared.rs |
| Download bridge |
|
6 requests, 60 s, 2 MiB per answer, 64 KiB body, 256 KiB per step, 8 KiB state, 100 results, 12 headers |
downloader/bridge.rs |
skinImport importers |
4 |
panel of 6 sections × 24 rows, 48 notes, 16 badges, 6 tiles, 4 actions |
modding/importers.rs |
Packages
| Limit |
.pvmod |
Skin .zip |
Source |
| Package file |
64 MiB |
64 MiB |
modding/package.rs, skin/package.rs |
| Entries |
1024 |
1024 |
same |
| Files |
256 |
512 |
same |
| One file, unpacked |
16 MiB |
32 MiB |
same |
| All files, unpacked |
64 MiB |
64 MiB |
same |
| Path |
200 characters, 8 levels |
the same |
skin/paths.rs |
| Entry file |
main.ts or index.ts |
skin.ts (1 MiB) |
modding/package.rs, skin/library.rs |
| Allowed files |
ts ttf otf png json md txt |
ts png ttf otf wav ogg flac mp3 |
same |
| In a skin: one PNG / one font |
|
4 MiB / 8 MiB |
skin/library.rs, modding/assets.rs |
The osu! skin converter reads a .osk with its own bounds (skin_import/source.rs): archive 512 MiB, 8192 entries, 64 MiB per entry, 1 GiB in total, folders 6 levels deep, 4096 images, 64 frames; skin.ini 2 MiB, 64 mania blocks, 32 keys; 8 layouts.
Replays, playlists, marathons
| Limit |
Value |
Source |
.pvreplay file |
8 MiB; 32 MiB once decompressed |
replay/formats/replay_file.rs |
| Inputs in a replay |
2 000 000 |
replay/formats/replay_file.rs |
| Metadata JSON of a replay |
1 MiB |
replay/formats/replay_file.rs |
| Input time |
within 24 h of the song's zero |
replay/formats/share.rs |
| Texts / names / extensions in a shared file |
256 / 64 / 32 |
core/chart_identity.rs, replay/formats/share.rs |
| Playback rate |
0.5 to 2 |
replay/formats/share.rs |
.pvplaylist file |
1 MiB |
core/playlist_share.rs |
| Maps in a shared playlist |
200 |
core/playlist.rs |
| Maps in a playlist of the library |
10 000 |
db/playlist.rs |
| Playlist name |
1 to 64 characters |
core/playlist.rs |
| Playlists in a library |
256, plus one per pack |
db/playlist.rs |
| Playlist share code |
512 KiB of text |
core/playlist_share.rs |
.pvmarathon file |
256 KiB |
core/marathon.rs |
| Maps in a marathon / creator |
200 / 64 characters |
core/marathon.rs |
Catalogue
The server and the game apply different limits to the same package; see the side-by-side tables.
| Limit |
Value |
Source |
| Package published by the server |
mod 2 MiB, skin 8 MiB, playlist 1 MiB |
api/catalog/validate.rs |
| Package the game accepts from the list |
mod 64 MiB, skin 256 MiB, playlist 1 MiB |
downloader/repository.rs |
| Archive checked by the server |
1024 entries, 512 files, 16 MiB per file, 64 MiB unpacked |
api/catalog/archive.rs |
| Skins per author |
2 distinct ids |
api/catalog/validate.rs |
| Server text caps |
id 64, name 64, author 64, version 32, description 2000 |
api/catalog/validate.rs |
| Permissions / tags / screenshots (server) |
8 / 8 of 24 characters / 3 of 512 KiB |
api/catalog/validate.rs |
| What the game keeps |
name and author 80, version 32, description 600, 8 tags, 6 screenshots |
downloader/repository.rs |
| The list the game reads |
1 MiB, 500 items |
downloader/repository.rs |
Online API and updates
| Limit |
Value |
Source |
| Public reads |
240 per minute per bucket and address |
api/app.rs, config |
| Catalogue |
120 per minute per address |
api/app.rs, config |
Accounts (/api/auth/*) |
60 per minute per address |
api/app.rs |
| Performance reports |
4 per minute per address |
api/controllers/perf.rs |
| Request body on the public host |
64 KB; profile picture 5 MiB; osu! import file 1 MiB |
deploy/Caddyfile |
| Access token / refresh token |
600 s / 30 days |
api/accounts/settings.rs |
| Access token read by the game server |
2048 bytes |
online_protocol/lib.rs |
| Board and ranking pages |
limit 1 to 100, offset up to 10 000 |
OpenAPI |
| Chartset and marathon lists |
perPage 1 to 60 (24 by default) |
OpenAPI |
| Chart index key counts |
4 to 9 |
index/lib.rs |
| Release list read by the game |
4 MiB; package 1 byte to 1 GiB; notes cut at 16 KiB |
updater/feed.rs |
| Signature file |
4 KiB |
updater/signature.rs |
| Redirects followed |
3, same host |
updater/net.rs, downloader |
| Automatic update check |
at most once a day (the first of each run is immediate) |
updater/lib.rs |
Source in the game repository: crates/modding/src/host.rs,crates/modding/src/runtime.rs,crates/modding/src/api.rs,crates/modding/src/scene.rs,crates/modding/src/storage.rs,crates/modding/src/entities.rs,crates/modding/src/keys.rs,crates/modding/src/manifest.rs,crates/modding/src/dependencies.rs,crates/modding/src/judgement.rs,crates/modding/src/modifiers.rs,crates/modding/src/controls.rs,crates/modding/src/tabs.rs,crates/modding/src/ratings.rs,crates/modding/src/scroll_speed.rs,crates/modding/src/importers.rs,crates/modding/src/library.rs,crates/modding/src/leaderboard.rs,crates/modding/src/popup.rs,crates/modding/src/fonts.rs,crates/modding/src/assets.rs,crates/modding/src/package.rs,crates/stage/src/scene.rs,crates/stage/src/element.rs,crates/skin/src/package.rs,crates/skin/src/library.rs,crates/skin/src/paths.rs,crates/skin/src/spec.rs,crates/skin_import/src/source.rs,crates/downloader/src/declared.rs,crates/downloader/src/bridge.rs,crates/downloader/src/repository.rs,crates/replay/src/formats/replay_file.rs,crates/replay/src/formats/share.rs,crates/core/src/chart_identity.rs,crates/core/src/playlist.rs,crates/core/src/playlist_share.rs,crates/core/src/marathon.rs,crates/core/src/scripted_notes.rs,crates/db/src/playlist.rs,crates/updater/src/feed.rs,crates/updater/src/lib.rs,crates/updater/src/net.rs,crates/updater/src/signature.rs,crates/online_protocol/src/lib.rs,apps/desktop/src/app/skins.rs,apps/desktop/src/app/playback.rs,services/index/src/lib.rs,services/api/src/catalog/validate.rs,services/api/src/catalog/archive.rs,services/api/src/app.rs,services/api/src/controllers/perf.rs,services/api/src/accounts/settings.rs,deploy/Caddyfile