Step-By-Step Tutorial for fixing looping music/sound
Avatar

Well I found some threads how to fix sound loops and make the longer than normal:
http://steamcommunity.com/app/218620/discussions/15/43099721383227159/
http://steamcommunity.com/app/218620/discussions/15/540744299835792525/

But I have no idea about them. What shouldI open? How should I edit it?
Can someone please make a step-by-step tutorial?

Avatar
Okay, got the 3 results, and found the DATA section, but i leave it there. I have no idea about hex editing, and I don't understand the guide that much.
Is there maybe anouther way to edit the lenght and loop?


If you're changing the Nightclub track you don't need to worry about the DATA section. The only time you need to change that is when you get 4 results instead of 3.

Lets say for example I want to swap the Nightclub track with this: http://puu.sh/jYQR5/6740266990.png

First thing I do is open the song in Audacity so we get the milliseconds so I can convert it into hex: http://puu.sh/jYQWh/9e5d3ef413.png

# of minutes * 60 + # of seconds then concatenate number of milliseconds
1* 60 = 60
60 + 47 = 107
Concatenate milliseconds: 107193

1. Open music.bnk in 010 editor and search for your sound ID: http://puu.sh/jYRaB/e924a1dc06.png
2. Starting from the end of the sound ID's, look along until your find a 40 and then drag 8 bytes before it: http://puu.sh/jYRjI/d3d03bc144.png
The double value is 60472 and reversing the calculation we did before that comes out to 1:00:472 which is the length of the Nightclub track.
3. Copy those hex values (CTRL+SHIFT+C) and start up a script file.

Replace : AB AA AA AA 0E 87 ED 40 :

4. Now keep those 8 bytes highlighted and in the double box put in the value we got before for our track (107193): http://puu.sh/jYRw0/0b46250c16.png
5. Copy those bytes and finish the playback length of our script.

Replace : AB AA AA AA 0E 87 ED 40 : 00 00 00 00 90 2B FA 40

For the loop points highlight the HO>>[ thing as shown here: http://puu.sh/jYRE1/9eb6ac6544.png
The 8 bytes right after that and above it are the loop points. There are 3 cases you need to look for now:

1. The playback length bytes are the same as the loop point bytes. If this is the case then your script is done.
2. The loop points are the same but they're different from the playback length. You need to repeat steps 3-5 for one loop point.
3. The loop points are different. You need to repeat steps 3-5 for both loop points.

The Nightclub falls under case 2. Both loop points are the same but they're different from the playback length. So what we're going to do is start the script:

Replace : A6 AA AA AA 0E 87 ED 40 :

And then finish it with the value we used in step 5.

Replace : A6 AA AA AA 0E 87 ED 40 : 00 00 00 00 90 2B FA 40

Final script:

Replace : AB AA AA AA 0E 87 ED 40 : 00 00 00 00 90 2B FA 40
Replace : A6 AA AA AA 0E 87 ED 40 : 00 00 00 00 90 2B FA 40

This script right here changes the length of the Nightclub track to 1:47:193.

If you still can't do it after this I wrote a program to create scripts: https://www.dropbox.com/s/5lhp5c0732r6e7w/Automatic%20Script%20Creator%20GUI.rar?dl=0

There might still be some bugs here or there but for most cases it'll do the hex editing for you.
Thanks for this much help, but how can I now add the music.bnk to the game?
27 244