A marathon is a map composed on demand from several maps. The .pvmarathon file is the recipe: it lists the maps in order with their hashes and rates, and nothing else. No chart or audio file is generated. Prism lays the maps end to end on one clock, so one play judges the whole run, with one combo and one accuracy.
A .pvmarathon is not opened by double-click. The library scan reads the recipes in your library, and the marathon then behaves like a map.
The file
The file is plain JSON. Keys are camelCase. Unknown fields are ignored.
| Field | Type | Rule |
|---|---|---|
format |
string | Exactly "pvng-marathon" |
version |
integer | 1. A higher version is refused rather than half read |
title |
string | Name of the marathon |
artist |
string | Always "Marathon" |
creator |
string, optional | Who wrote the recipe. At most 64 characters, no control characters, trimmed. Absent when there was no name; never made up. It is never part of the marathon's identity |
maps |
array | 1 to 200 entries, in play order |
Each entry of maps:
| Field | Type | Rule |
|---|---|---|
chartHash |
string | Chart hash of the map as the game plays it, 64 lowercase hexadecimal characters |
noteHash |
string | Note hash of the same chart, 64 lowercase hexadecimal characters |
rate |
number | The rate this map is played at in the marathon, 0.5 to 2 |
title |
string, optional | A hint for naming the map. Default empty |
path |
string, optional | Where the map was when the recipe was written. It is tried first, then the library is searched by hash |
variant |
integer | Which chart of the file at path (a file can hold several). Default 0 |
A map is named by its hashes. path and title are only hints: a file found at path must still match both hashes, or the game says its notes are not the ones the marathon was made with.
{
"format": "pvng-marathon",
"version": 1,
"title": "Endurance",
"artist": "Marathon",
"creator": "alice",
"maps": [
{
"chartHash": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"noteHash": "fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210",
"rate": 1.0,
"title": "Example Song",
"variant": 0
},
{
"chartHash": "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff",
"noteHash": "ffeeddccbbaa99887766554433221100ffeeddccbbaa99887766554433221100",
"rate": 1.2,
"title": "Another Song",
"path": "Songs/another/another.osu",
"variant": 0
}
]
}
Limits
| Limit | Value |
|---|---|
| File | 256 KiB |
| Maps | 200 (the playlist limit) |
| Rate of a map | 0.5 to 2 |
| Creator | 64 characters |
All maps of a marathon must have the same number of keys, and every map must have notes.
How maps are laid out
Each map gets a slot: a lead-in, the map from its first note to its last, then a tail. These constants are part of the marathon's note hash, since they move the composed notes. Changing one changes the hash of every marathon.
| Constant | Value | Meaning |
|---|---|---|
LEAD_US |
2.5 s | The longest lead-in. A map whose audio has more than this before its first note is cut to it |
MIN_LEAD_US |
1.5 s | The shortest lead-in. A map whose audio starts later is padded with silence |
TAIL_US |
1 s | Time kept after the last note before the next slot |
The music ramps up into each map (a raised cosine ending on the first note). Each map plays its own audio file at its own rate; each chart is prepared for its own rate first, and the composed chart is played at rate 1. A composed marathon is cached for 10 seconds.
The composed chart is read like any other chart: the scan gives it its own chart hash and note hash, and a play records an ordinary replay.
Errors
| Message | Cause |
|---|---|
A marathon file is at most 256 KiB |
File too large |
Not a marathon file |
Not JSON, or format is not pvng-marathon |
A marathon file of version N needs a newer Prism |
version is 0 or above 1 |
A marathon holds 1 to 200 maps |
Empty list or too many |
A marathon map is named by its hashes |
A hash is not 64 lowercase hexadecimal characters |
A marathon needs at least one map |
Composing an empty list |
A marathon needs maps with the same number of keys |
Mixed key counts |
A marathon cannot hold a map without notes |
A map with no note |
Marathon map "<title>": its notes are not the ones the marathon was made with |
The chart found does not match noteHash |
A rate outside 0.5 to 2 is refused with the message of the rate check.
When a map cannot be found, the reason ends in one of: it is missing or has changed, its audio file is missing, its audio is not rendered yet (Settings, Audio: the keysounded charts are prepared in the background), or it has no audio file of its own and the rendering of chart audio is off (Settings, Audio).
Pitfalls
- Both hashes are required, and both must be right. Editing a recipe by hand to point to another difficulty fails the check.
- Playing a map at another rate in a marathon gives another marathon: the rate is part of the recipe.
- Changing
creatordoes not change the marathon: its folder and its identity ignore it.