S3maphore treats music as a collection of contextual playlists. A playlist describes tracks and playback behavior; its isValidCallback describes when it is eligible; its priority decides what happens when several playlists are eligible at once.
This is the central design reduction: the resolver does not need to understand every reason a playlist might apply. See Cod3x's S3maphore Playlist Eligibility design study for the problem, the tempting escalation, and the smaller contract that survived.
When selection is reevaluated, S3maphore considers eligible playlists in priority order and may stop after finding a valid choice. Callback frequency is not a timing contract. Write callbacks as cheap queries of the current playback state, not as update loops.
The three pieces
- Playlist — the tracks and playback policy.
- Priority — the ordering used to resolve eligible playlists.
- Validity callback — a function that returns whether the playlist applies to the current state.
The built-in rules handle common cases such as cells, regions, combat, weather, and journal values. Custom Lua logic is available when your mod needs something more specific.