OpenTTD

Tasklist

FS#4776 - Music Playlist handling seems broken

Attached to Project: OpenTTD
Opened by helsinki (helsinki) - Thursday, 15 September 2011, 15:06 GMT
Last edited by Remko Bijker (Rubidium) - Sunday, 16 October 2011, 19:53 GMT
Type Bug
Category Core
Status Closed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version 1.1.2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

There seems to be some problem with the custom playlist handling.

Steps to reproduce:
1) Ingame, fill custom playlist 1 with all the songs (effectively making it a copy of "all")
2) Exit the application
3) Check openttd.cfg
The custom_1 line should now be:
custom_1 = 1,2,3,4,5,6,7,8,9,12,13,14,15,16,17,18,22,23,24,25,26,27,0,0,0,0,0,0,0,0,0,0,0
Notice that the numbers 10, 11, 19, 20, 21 are missing.
4) Start a new game
Notice that the last 5 songs have magically disappeared from the playlist.
5) Exit the application
6) Check openttd.cfg again
The line now reads:
custom_1 = 1,2,3,4,5,6,7,8,9,12,13,14,15,16,17,18,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
The five songs are gone. Notice that their numbers were greater than 22.
7) Profit!!! ;)

I think this behaviour has something to do with the file "orig_win.obm"
Inside, there is a [files] section mapping descriptions (old_0, old_1, ...) to filenames (GM_TT02.GM, GM_TT06.GM, ...)
But 5 keys have no value.
I think it's all connected: 5 numbers were missing (step 3 above), 5 songs vanished, 5 keys have no value

There are 22 songs total, so openttd.cfg doesn't like values higher than 22 in "custom_1".
The method saving the playlist into openttd.cfg seems to use another numbering scheme. It has 27 values, but 5 are not used.

If someone gets around to fix this, could you maybe also fix the default "all" playlist so that it is consistent with the original playlist in TTD? I'm really accustomed to the old ordering of songs ^^
Or should this be a seperate task?
This task depends upon

Closed by  Remko Bijker (Rubidium)
Sunday, 16 October 2011, 19:53 GMT
Reason for closing:  Fixed
Additional comments about closing:  In r23033
Comment by helsinki (helsinki) - Thursday, 15 September 2011, 16:05 GMT
P.S.: Everything seems fine, using OpenMSX
So, openttd.cfg can handle values greater than 22...

Using the original music:
Manually entering the missing numbers (10, 11, 19, 20, 21) results in scrambled playlist entries ingame.
I wonder how the 5 songs could be referenced correctly...
Comment by helsinki (helsinki) - Thursday, 15 September 2011, 16:34 GMT
Ok - I think I figured it out :)

in orig_win.obm in the [files] section I moved the keys in the mapping up so that they form a consistent block

meaning:

[files]
theme = GM_TT00.GM
old_0 = GM_TT02.GM
old_1 = GM_TT03.GM
old_2 = GM_TT17.GM
old_3 = GM_TT07.GM
old_4 = GM_TT09.GM
old_5 = GM_TT04.GM
old_6 = GM_TT19.GM
old_7 = GM_TT06.GM
old_8 = GM_TT12.GM
old_9 = GM_TT05.GM
new_0 = GM_TT01.GM
new_1 = GM_TT18.GM
new_2 = GM_TT10.GM
new_3 = GM_TT08.GM
new_4 = GM_TT13.GM
new_5 = GM_TT21.GM
new_6 = GM_TT15.GM
new_7 = GM_TT16.GM
new_8 = GM_TT14.GM
new_9 = GM_TT20.GM
ezy_0 = GM_TT11.GM
ezy_1 =
ezy_2 =
ezy_3 =
ezy_4 =
ezy_5 =
ezy_6 =
ezy_7 =
ezy_8 =
ezy_9 =

I changed the sequence of the songs to what I think was the original sequence in TTD. Now there's no need for a custom playlist anymore.

Good night and good luck :)

Loading...