S3maphoreDocs
api

Playlist

The data structure registered with S3maphore.

S3maphorePlaylist

S3maphorePlaylist -> table

A playlist is a table containing an id, a priority, and an isValidCallback. A playlist file returns an array of these tables. See the complete Playlist Specification for every supported field.

Cod3x's S3maphore Playlist Eligibility Design Study explains why the callback is the small policy boundary behind the resolver.

Required fields

id is the playlist's stable identifier. It is also used as a folder name when tracks is not provided.

priority is the playlist's place in resolution. Use the exported PlaylistPriority values instead of scattering magic numbers through a music pack.

Validation

isValidCallback is required and returns true when the playlist applies. Playlist files use the Playback binding from the PlaylistEnvironment; programmatically registered playlists can use the callback argument. The callback should not mutate game state or act as a timer. See Playback for its state and rules.