Open ikabod-kee opened 1 month ago
Instead of simple playlists I would propose a more complex system. I think the main problem with playlists is that you end up looking for a lot of playlists for many different combinations of biome type + day/night + hostility. Additionally it seems more difficult to add new music to an existing biome.
That's why I instead propose a system based on keywords (tell me what you think about this):
Each music track gets a list of keywords associated with it. These keywords could be for example "day", "night", "danger", "building", "grass", "sun", "desert", "water", "cave", ... You can add new keywords in each addon as well.
Each biome also gets a list of keyword + weight (can be negative) pairs associated with it. Music is then selected as follows:
For each music track the biome weight is determined by adding all the biome weights of the keywords that it has together. From the music tracks above a certain threshold (maybe the threshold would be biome specific as well?) a song is chosen randomly, maybe also based on a parametrisable chance.
Some of these keywords can be tied to game functions. For example during the night, all songs that have the "day" keyword, but not the "night" keyword are automatically disabled (unless of course the given biome specifies the day keyword in which case it would always play day music).
Addons could also easily define new keywords, to make sure that their music only plays in certain biomes.
(I like this idea)
Instead of biomes having one looping song, reference a .json file that has a collection of music. These playlists can be referenced during events such as biome music, boss music, raid music, etc. Each song in the playlist has a specified chance of playing.
If specified, the chance for a song to play can be set to zero if it's already been played. This resets after each consecutive song or the chance increases based on how many songs are in the playlist.
Optionally, you can choose what song plays after another, called a "sub-song." These could be used as a nuanced way to bridge the different musical styles the game has. Again, optional!