FINAL FANTASY XIII

FINAL FANTASY XIII

View Stats:
Any idea where the music files are located?
Alright so basically with this tool
http://www.tzarsectus.com/tools/ff13tool.rar
i can extract the .bin files located in "x":\Program Files (x86)\Steam\SteamApps\common\FINAL FANTASY XIII\white_data\sys

Now the question which one of these contains the music files?
All i want to do is replace the fanfare and the normal battle theme.
Any ideas?
< >
Showing 31-45 of 64 comments
Well in theory, couldn't you? Just rename the file you want to inject as the file you're replacing.
I did that but it doesn't work.It doesn't play in the game.
.scd files are oggs encoded in a certain way
Oh, I see. I haven't done this before either, so now rereading I get where your problem lies. You probably had ff13tool from the start. ;;

Opening one of the SCDs (fanfare, actually), I did find this in the header with a hex editor:

.vorbis....Xiph.Org libVorbis I 20090709........LoopStart=327040....LoopEnd=769062

Which matches up with what TGE is saying. It has a bunch of other junk in there too inbetween that's indecipherable (to me, at least) but I wonder if I just copied all that and inserted it at the beginning of a replacement file if that would work.
Well, that didn't work... I got silence.
Originally posted by Scarlet Crusade:
I'm not quite certain what TGE is on about, there, but Serah Is Love posted this in another thread, and I'm about to try it myself, see what I can get done.

They did this:
http://www.youtube.com/watch?v=wrJOEU41A8I

Originally posted by Serah Is Love:
I used this

http://www.tzarsectus.com/tools/ff13tool.rar

This tool will allow you to extract and repack files. From the XIII directory, you need filelistu.win32 and white_imgu.win32 to extract sound files.

Rename the file you want to use to the same name as the file you're replacing. Then repack the files.
That's just a file swap.
http://puu.sh/cm6oO.zip
Proof of concept, loop isn't right because the values act funny and they don't do what I want them to.
Tested with that file, and it works, and that's great, but that's still not opening the black box to show how you got that end result. Perhaps if Big Boss and I (and others) helped, we could crack the mystery and find out how to work with the loop values. It doesn't do the community any good if you keep things to yourself.
Okay so when I said it works, it worked overwriting the fanfare file, because that's what I was personally trying to change on my end and so I renamed it incorrectly as music_fanfare.win32.scd. When I did it for the battle theme, it didn't work. Still plays the normal battle music. Unsure why. I then replaced the background music for Archelyte Steppe (music_167choro.win32.scd) and then sure enough, I have FFX Battle Theme running around, but then in a battle, normal battle music.

music_bat_short.win32.scd, under the 8000 folder, that's the right one, right? Because for sure from my side, changing that one doesn't modify the battle music. Triple-checked. It just plays Blinded by Light, though the individual file I'm compiling is the FFX Battle Theme for music_bat_short.win32.scd and definitely plays that when I make it an .ogg.
there are two normal battle themes
one is called "music_white_e3.win32.scd"
and the other "music_bat_short.win32.scd"
music_bat_short.win32.scd and music_white_e3.win32.scd are the 2 battle themes.
The game actually alternates between the short and extended version of the battle theme.
I don't know if you realized, but earlier I posted my findings on the format.
Originally posted by TGE:
I don't know if you realized, but earlier I posted my findings on the format.
You posted the data, but not how to actually modify that data or set it up for any one particular file. That's not as helpful as it could be.

Originally posted by Big Boss:
there are two normal battle themes
one is called "music_white_e3.win32.scd"
and the other "music_bat_short.win32.scd"
Hm, that's odd. music_white_e3.win32.scd doesn't play for me if I make it .ogg.
Originally posted by Scarlet Crusade:
Originally posted by TGE:
I don't know if you realized, but earlier I posted my findings on the format.
You posted the data, but not how to actually modify that data or set it up for any one particular file. That's not as helpful as it could be.

Originally posted by Big Boss:
there are two normal battle themes
one is called "music_white_e3.win32.scd"
and the other "music_bat_short.win32.scd"
Hm, that's odd. music_white_e3.win32.scd doesn't play for me if I make it .ogg.
It's pretty self explanatory IMO, I only listed the variables and someone with even the slightest bit of knowledge of file formats would understand what has to be changed.
I don't really know what you want.
Renaming SCD files to OGG is not a good idea, if you cut off the first 0x540 bytes you'll get the original OGG.
Originally posted by TGE:
It's pretty self explanatory IMO, I only listed the variables and someone with even the slightest bit of knowledge of file formats would understand what has to be changed.
I'd say I do have a bit of knowledge in this area, and it's not completely obvious, no.

Originally posted by TGE:
I don't really know what you want.
Well for instance:

Originally posted by TGE:
Renaming SCD files to OGG is not a good idea, if you cut off the first 0x540 bytes you'll get the original OGG.
This is good information.

SCD is some sort of proprietary format that isn't common knowledge, knowing that the first 0x540 bytes of data is what's different is very good information. Wouldn't have been my first guess.

For some of them, renaming SCD to OGG works, and some of them don't. It's arbitrary and you could make the assumption (I did) that they just made the different file extension to throw people off (and it worked, in my case) because a file will run if it has a file type that isn't what it truly is (like if I rename a .mp3 to .jpg and then open the '.jpg' in an audio player, it will still play).

Now that you've let me know about the first 0x540 bytes of data thing, I might can get it to work. But I wouldn't say that hex editing is a common skillset of "someone with even the slightest bit of knowledge of file formats", I'd call that more intermediate level.
And even with this information, no, it still didn't work. I manually added the 0x540 bytes of information to the top of the OGG file, saved it as SCD, compiled it, and no audio in-game. So clearly, there's more to this process than you're letting on.
SCD files are Square Enix proprietary Sound Container Data, they can contain any form of audio (OGG, WAV, ADPCM, DSP, etc).
They are indentifiable by their ID string 'SEDBSSCF'
You could basically take an SCD 'header', the first 0x540 bytes, from any SCD file, and paste it on an audio format.
FFXIII uses OGG, so you use OGG.

The OGG streams need to have their serial number set to 0, otherwise the game won't find your audio stream.

But don't worry about that, I made a useful batch script.

http://www.mediafire.com/download/065x5yy35ozg3sb/oggenc2.87-1.3.4-generic.7z

Drag a wav file into the batch script to convert it to a suitable OGG with a template SCD header slapped on it.
You can change the looping points in the batch script if you so desire, but the game doesn't use them so it doesn't really make a difference.
You can also change the other encoding settings, like the quality and other things.
If you want a list of commands, run oggenc2.exe -h in CMD

Offset 0x10 has a 4 byte unsigned integer value; the size of the entire SCD file. Simply take the hex size of the entire file, and write it in reversed order since PC is in Little Endian.
(eg 11 A0 F0 BA in Little Endian is BA F0 A0 11)

Offset 0xA8 has a 4 byte IEEE 754 Floating Point for the volume level, you can use a hex to float converter if you want to change it.
For example, 3F 33 33 33 == 0.7 while 3F 80 00 00 == 1.0

Offset 0x1B0 has a 4 byte unsigned integer value; the size of the entire OGG file. Since the OGG is embedded in the SCD, OGG size == SCD size - 0x540

Offset 0x1B4 has a 4 byte unsigned integer value for the channel count, stereo is 2, mono 1.

Offset 0x1B8 has a 4 byte unsigned integer value for the sample rate, default is 44100hz (0xAC44)

Offset 0x1C0 has a 4 byte unsigned integer value for the loop starting point, it's notation is in bytes. I've tried (filesize/amount of samples)*sample position for loop start but it's not 100% accurate.

Offset 0x1C4 has a 4 byte unsigned integer value for the loop end point, it's usually the same as the size of the entire OGG file.

Get the loop start/end values wrong, and it's likely your file won't play correctly ingame.

Offset 0x300 has a duplicate of the 'metadata' in the OGG. (Metadata = extra info like comments, encoder used, etc) Has no real use ingame, so there's no need to change it.

Offset 0x540 end of SCD header, start of OGG data. (OGG data is identifiable by the string 'OggS', stands for OGG Segment

That is the best I can do to explain what I know.


< >
Showing 31-45 of 64 comments
Per page: 1530 50

Date Posted: Oct 19, 2014 @ 8:14am
Posts: 64