Music info sort priority

Got a cool idea that should be in R'n'D? Let's hear it!

Moderators: Flumminator, Zomis

Post Reply
User avatar
Eizzoux
Posts: 567
Joined: Wed Oct 30, 2013 5:32 am
Location: Russia
Contact:

Music info sort priority

Post by Eizzoux »

I feel like there should be a way to manually order the songs in music info, because it seems to be strangely unpredictable. And I mean it, because it's not even being in alphabetical order, nor the musicinfo.conf kind of info. Perhaps, we could add 'sort_priority' line into each song txt?
Merry Christmas and Happy New Year, everyone!

Image
User avatar
Holger
Site Admin
Posts: 4071
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Music info sort priority

Post by Holger »

When checking this issue, I was shocked to find out that not only all music files on the "Music Info" page are in completely unpredictable order, but that this is also true for the game itself (where music files not hard-coded to a certain level in file "musicinfo.conf" are played in unpredictable order, too)! :shock:

In fact, while the order of in-game default music is always the same on my development Linux box, it is also always the same on my Mac test system -- but a completely different order! :(

The reason for this (I hardly dare to write it) is that I take the music files in the order I read them from the music directory, and keep it that way -- not sorting, no nothing, so everybody may get a different order of in-game music. :cry:

That is fixed now -- unconfigured in-game music is now alphabetically sorted, and the program now also makes sure that the first music file in the list is always played in the first level of a level set, regardless of this level set starting with level 000, level 001 or level 042, which also was not the case before. :roll:

In any case, you can still hard-code certain music files (all, some or even only a single one, just as you like) by using the "background.PLAYING.xxx" directive in "musicinfo.conf" (where "xxx" is the level number), to force playing this music file in this level. All unconfigured music files are then played for those levels which do not have a hard-coded music file.

On the "Music Info" screen, in-game music files are now listed in the same order in which they appear when playing the level set. (This was also not the case before, as can easily be seen with the many in-game music files of the level set "BD2K3", which were completely shuffled on the "Music Info" screen before.) For all music files configured to be played in certain levels, the first level for which a song was configured is also displayed on the "Music Info" page for this music now.

All other music files (that are configured to be played at a different place than playing a level), like the music for the "level set info" music in Mirror Magic's level set "Mindbender", are listed after the in-game music files, and unfortunately still in no predictable order. Therefore, your idea of adding support for a "sort_priority" line in the song text files is really very good and should be implemented to solve this remaining problem of music file sort order (or to just be able to freely define the order in which music files should be listed, regardless of any other logic to play these music files in the game).
User avatar
Eizzoux
Posts: 567
Joined: Wed Oct 30, 2013 5:32 am
Location: Russia
Contact:

Re: Music info sort priority

Post by Eizzoux »

So, how is the music priority managed nowadays? At least it's not the "sort_priority" for sure, since it ignores the priority I set in the txt's. It even still surpasses the musicinfo order and still lists the level songs before the menu music despite the menu one being listed first. Also, I feel like the new "Played in Level 00X" is... well, not specifically "unnecessary", but I think could be somewhat customizable. Or at least toggleable.
Merry Christmas and Happy New Year, everyone!

Image
User avatar
Holger
Site Admin
Posts: 4071
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Music info sort priority

Post by Holger »

Well, it's exactly done as described in my last post -- sorry for not having further improved this.

That is, in-game music is listed first, then all other music tracks, and no, "sort_priority" is still not supported. :-(

At least it's not that complete mess anymore as it was before. :-/

To do things like having certain menu music tracks listed first, I really should implement support for sort priorities, so the game designer can decide which songs are listed in which order...
User avatar
Eizzoux
Posts: 567
Joined: Wed Oct 30, 2013 5:32 am
Location: Russia
Contact:

Re: Music info sort priority

Post by Eizzoux »

Oh yeah, and I asked about the ability to work around the "played in level 00X" lines because I have already manually applied the song usage in the title headers, but since the new ones just add up below, that just kind of... breaks, yeah...

asd1.png
asd1.png (30.44 KiB) Viewed 2655 times

asd2.png
asd2.png (30.31 KiB) Viewed 2655 times

asd3.png
asd3.png (29.81 KiB) Viewed 2655 times

asd4.png
asd4.png (29.77 KiB) Viewed 2655 times



Merry Christmas and Happy New Year, everyone!

Image
User avatar
Holger
Site Admin
Posts: 4071
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: Music info sort priority

Post by Holger »

Just added two new options "played_header" (default: "played in") and "played" (default: level number in which this song will be played first, if any). (If both options are not specified, the text is only displayed if a level number could be detected for this sone, just as before.)

To get rid of the default text without replacing it with some static other text, just specify a character that is not part of the font used for this text to suppress it completely. (Yes, that's a little bit dirty workaround, but should do it here. :wink: )
Post Reply