Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Hello! I don't plan on adding support for automatically grabbing metadata from files directly, as that would likely require a separate Python library as you've mentioned. That said, you can run this loop if you want to get all the files declared in a specific folder:

init python:
    for i in renpy.list_files():
        if i.startswith("audio/music/"):
            print("Audio file", i, "found.")

Instead of print, you can put whatever you like in that loop (e.g. registering it to an extended music room). You might also consider checking for endswith(".ogg") or similar to only get audio files. You can check for multiple subfolders within that same loop too by adding more if/elif/else clauses. Registering a track to the music room will look the same as in all the music room examples, it'd just be inside the loop. Don't forget to set the unlock_condition="True" or else it'll be locked (since the default condition requires players to hear the song in-game for it to unlock).

As for sorting tracks into categories, that's something that the extra description field of the music room files is for. It's flexible so you can, for example, use Python list filtering based on the description field. Alternatively, you could declare one ExtendedMusicRoom instance for each category, depending on your needs, so that music room will only play songs from that category.

Hope that helps!

Thanks very much! It will