Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Song Playlist and Chances System #732

Open
ikabod-kee opened this issue Sep 26, 2024 · 2 comments
Open

Song Playlist and Chances System #732

ikabod-kee opened this issue Sep 26, 2024 · 2 comments
Labels
engine experimental a feature or idea that will require lots of experimentation

Comments

@ikabod-kee
Copy link
Collaborator

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!

@ikabod-kee ikabod-kee added experimental a feature or idea that will require lots of experimentation engine labels Sep 26, 2024
@IntegratedQuantum IntegratedQuantum added this to the Long-Term Goals milestone Sep 27, 2024
@IntegratedQuantum
Copy link
Member

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.

@ikabod-kee
Copy link
Collaborator Author

(I like this idea)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine experimental a feature or idea that will require lots of experimentation
Projects
None yet
Development

No branches or pull requests

2 participants