Join also our Discord channel! Click here.

Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archive

The Original Forum. Game archives, full of resources. How to open them? Get help here.
SuperflyJohnson
ultra-n00b
Posts: 7
Joined: Thu Feb 04, 2016 12:11 am

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by SuperflyJohnson » Sat Aug 06, 2016 9:27 am

Is there any way to extract audio from fsm files? Ravioli doesn't work on most of them.

YouRePrettyGood
ultra-n00b
Posts: 8
Joined: Fri Jul 22, 2016 9:39 am
Has thanked: 4 times
Been thanked: 3 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by YouRePrettyGood » Sun Aug 07, 2016 5:21 pm

For those interested in .fv2 files, you will find attached:
- a full description of the file structure (as stated, MGO's .fv2 files have a somewhat different SECTION4).
- a .hsl script to easily parse any .fv2 file in Hex Workshop (warning: parsing is really slow for .fv2 files with no entries in SECTION2)

I'll make similar files for .fcnp and .fmdl formats once i'm done studying them

[and of course, thanks to people here who gave me great hints :) ]
You do not have the required permissions to view the files attached to this post.

BobDoleOwndU
advanced
Posts: 68
Joined: Thu Dec 24, 2015 7:45 am
Has thanked: 10 times
Been thanked: 9 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by BobDoleOwndU » Sun Aug 07, 2016 7:51 pm

SuperflyJohnson wrote:Is there any way to extract audio from fsm files? Ravioli doesn't work on most of them.
Can you give a specific fsm?

I can possibly get audio out of them.

Also, on the topic of audio, I did a bit more reversing on the wwise format. I was able to swap a voice clip with no effects in the place of one that had effects. Previously this was impossible. Here's my notes on it:

Code: Select all

Wwise format info:
0x0-0x3: File Type Header
0x4-0x7: Unknown
0x8-0xF: File Type Header
0x1C-0x1D: Unknown
0x28: Sound type indicator? Seems to denote effects from voice clips, etc....
0x2C-0x2E: Unknown
0x30: Unknown, same byte as 0x40
0x34-0x37: File Size Indicator? (Same bytes appear immediately following "data")
0x3A-0x3B: Unknown, same bytes as 0x46-0x47
0x40: Unknown, same byte as 0x30
0x44-0x45: Unknown, but significant
0x46-0x47: Unknown, same bytes as 0x3A-0x3B
0x48-0x4D: Related to sound type indicator. Changing the indicator without changing this will cause a crash.
0x50-0x53: Tone/Pitch Indicator?

Converting between voice and effect:
Change 0x28
Change 0x48-0x4D
Change 0x50-0x53
Swap all of the data AFTER the 4-bytes following the second "data" string (the one that has the file size indicating bytes attached). Copy this same section of data from the file you want to swap in.
If I can figure out exactly how the size indicator works, we can possibly swap in sounds that are larger than the original.

Tex
veteran
Posts: 89
Joined: Sat Aug 20, 2011 4:51 am
Has thanked: 21 times
Been thanked: 11 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by Tex » Mon Aug 08, 2016 2:54 am

YouRePrettyGood wrote:For those interested in .fv2 files...
Nice work. I'm still terribad with file format stuff, so cool to see someone else digging in.

You may have already gathered from perusing the mgsv exe that:
Seems player models can have several fv2s applied, as indicated by
handFv2File
headFv2File
camoFv2File

Ai characters have (soldier/hostages) faceFova, bodyFova, faceDecoFova, hairFova, hairDecoFova
They also have a fovaSeed set to allow variation within one fova

No idea how this affects/is represented in the fv2 files

Updated my Deminified data1 lua files to the Inf heaven files page under miscellaneous
http://www.nexusmods.com/metalgearsolidvtpp/mods/45

Of interest to you YouRePrettyGood in there is Soldier2FaceAndBodyData.lua which I've added notes on the soldier fova body files, also InfFova.lua from the infinite heaven snakebite .mgsv has some notes on what various player packs are.

Edit: You may want to look at Atvaarks tools
https://github.com/Atvaark/
LangTool is probably the simplest tool that also uses a dictionary to check hashes
https://github.com/Atvaark/FoxEngine.TranslationTool

YouRePrettyGood
ultra-n00b
Posts: 8
Joined: Fri Jul 22, 2016 9:39 am
Has thanked: 4 times
Been thanked: 3 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by YouRePrettyGood » Mon Aug 08, 2016 7:00 am

That's great, i had downloaded your deminification files but i had kept them aside until now, i thought they didn't have any connection with FOVA settings and would only be useful later in the process (in future steps, i'd like to have a look at how we can add outfits rather than swap them, but i'm not there yet). I'll have a careful look at it this week :)

Tex
veteran
Posts: 89
Joined: Sat Aug 20, 2011 4:51 am
Has thanked: 21 times
Been thanked: 11 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by Tex » Mon Aug 08, 2016 8:32 am

It's the ai characters fova setup in the scripts, player stuff doesn't seem to be there unfortunately.

Here was my first post on that:
viewtopic.php?f=10&t=12407&p=116912#p116912

SuperflyJohnson
ultra-n00b
Posts: 7
Joined: Thu Feb 04, 2016 12:11 am

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by SuperflyJohnson » Mon Aug 08, 2016 10:18 am

BobDoleOwndU wrote:Can you give a specific fsm?

I can possibly get audio out of them.
I was trying to get the audio from p31_050060_000_final.fsm in chunk2.

User avatar
cra0
ultra-veteran
ultra-veteran
Posts: 432
Joined: Fri Apr 27, 2012 9:37 am
Has thanked: 29 times
Been thanked: 184 times
Contact:

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by cra0 » Mon Aug 08, 2016 3:32 pm

i post fmdl specs on github soon when I have time with all my/our research.

BobDoleOwndU
advanced
Posts: 68
Joined: Thu Dec 24, 2015 7:45 am
Has thanked: 10 times
Been thanked: 9 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by BobDoleOwndU » Mon Aug 08, 2016 8:34 pm

SuperflyJohnson wrote:I was trying to get the audio from p31_050060_000_final.fsm in chunk2.
From what I can gather, this specific audio file only contains part of the audio data, which is why it's failing to convert. I was able to get the first few seconds to play, using ww2ogg. It sounds like a helicopter (possibly the ACC). After the first few seconds it breaks though, because the audio data is gone.

This quote from hcs explains it well:
A hybrid approach is sometimes used, and I think this is the difficulty you are encountering here: The in-memory sound bank contains the beginning of the audio file, the header data and a second or so of audio data, and the rest is located in another file elsewhere on disc to be streamed in. The resident beginning of the file can be played immediately as it is already in memory, and ideally this will give enough time for the streaming to get going.

This is a fine engineering solution but it makes things a mess for us trying to read the audio! In the sound bank we can find the very beginning of the sound file but the rest may be somewhere entirely different on the disc. For systems like wwise where everything is numbered with hash codes it is hard to figure this out with inspection. What you are seeing here is that the RIFF is actually truncated, the rest of it lives somewhere else, and there is something else stuffed in the sound bank next.

In particular this is frustrating because the rest of the audio data may be stuck somewhere with no header! If we knew more about how the whole wwise bank system works it might be easier to locate this headless data.

YouRePrettyGood
ultra-n00b
Posts: 8
Joined: Fri Jul 22, 2016 9:39 am
Has thanked: 4 times
Been thanked: 3 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by YouRePrettyGood » Tue Aug 09, 2016 7:41 am

For those interested: attached is a slightly modified version i made of HeartlessSeph's great 3dsmax import script for FMDLs (i post it with his agreement of course).

In the faces buffer for each FMDL, there are 2 sets of faces for each object. HeartlessSeph's original script imports the 1st set (high-polygon faces), this modified script imports the 2nd set (lower-polygon faces) instead.
According to HeartlessSeph they are LODfaces, so i guess if you remove them along with the other faces, the related objects won't appear even at far distance. I'm also curious about whether it makes the white-glowing silhouette of marked soldiers disappear. I haven't had time to test it out, though.
You do not have the required permissions to view the files attached to this post.

HeartlessSeph
advanced
Posts: 72
Joined: Tue Sep 15, 2015 2:13 am
Has thanked: 2 times
Been thanked: 6 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by HeartlessSeph » Tue Aug 09, 2016 10:11 pm

YouRePrettyGood wrote:For those interested: attached is a slightly modified version i made of HeartlessSeph's great 3dsmax import script for FMDLs (i post it with his agreement of course).

In the faces buffer for each FMDL, there are 2 sets of faces for each object. HeartlessSeph's original script imports the 1st set (high-polygon faces), this modified script imports the 2nd set (lower-polygon faces) instead.
According to HeartlessSeph they are LODfaces, so i guess if you remove them along with the other faces, the related objects won't appear even at far distance. I'm also curious about whether it makes the white-glowing silhouette of marked soldiers disappear. I haven't had time to test it out, though.
Woah just to clarify I didn't make the import script. It was made by Jayveerk I believe. Sorry for confusion regarding that. It is a github script though so there shouldn't be any problem with posting an edited one.

But yeah they are indeed LOD faces. Test it out by nulling out a soldier's high poly set and then running away from one and watch them magically appear again.

morbidslinky
beginner
Posts: 27
Joined: Wed Oct 21, 2015 2:26 am
Has thanked: 1 time
Been thanked: 1 time

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by morbidslinky » Wed Aug 10, 2016 1:56 am

BobDoleOwndU wrote:
SuperflyJohnson wrote:I was trying to get the audio from p31_050060_000_final.fsm in chunk2.
From what I can gather, this specific audio file only contains part of the audio data, which is why it's failing to convert. I was able to get the first few seconds to play, using ww2ogg. It sounds like a helicopter (possibly the ACC). After the first few seconds it breaks though, because the audio data is gone.
It sounds like the beginning of a cutscene, when the helicopter is beginning to land. For reference, the ACC's sound effect is File0036 in chunk2's env_mtbs_common.stp.

On a similar, audio-related note, I can't find the Sortie Prep music anywhere. I'll keep mulling over the .sbp files, but if anyone's got some suggestions about where it might be hiding, please help me out. I'm going crazy.

BobDoleOwndU
advanced
Posts: 68
Joined: Thu Dec 24, 2015 7:45 am
Has thanked: 10 times
Been thanked: 9 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by BobDoleOwndU » Wed Aug 10, 2016 3:14 am

morbidslinky wrote:On a similar, audio-related note, I can't find the Sortie Prep music anywhere. I'll keep mulling over the .sbp files, but if anyone's got some suggestions about where it might be hiding, please help me out. I'm going crazy.
chunk1\Assets\tpp\sound\external\tape\tp_bgm_02_03.wem.
chunk3\Assets\tpp\sound\asset\env_mtbs_common.sbp - File 390 (pretty sure this is the radio version).

Other than those two places, check any sbps marked with bgm.

morbidslinky
beginner
Posts: 27
Joined: Wed Oct 21, 2015 2:26 am
Has thanked: 1 time
Been thanked: 1 time

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by morbidslinky » Wed Aug 10, 2016 3:38 am

BobDoleOwndU wrote: chunk1\Assets\tpp\sound\external\tape\tp_bgm_02_03.wem.
chunk3\Assets\tpp\sound\asset\env_mtbs_common.sbp - File 390 (pretty sure this is the radio version).

Other than those two places, check any sbps marked with bgm.
Unfortunately the external tape 02_03 is a remnant of Ground Zeroes and external tape 11_31 is the cassette tape file, which is different from the sortie prep file (really frustrating).
I'll keep looking in the bgm's. In any case, thanks for the input.

Update: I've listened through every single file with a file size greater than a few kilobytes, I still can't find it. Can it be stored in the .exe or something?

YouRePrettyGood
ultra-n00b
Posts: 8
Joined: Fri Jul 22, 2016 9:39 am
Has thanked: 4 times
Been thanked: 3 times

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv

Post by YouRePrettyGood » Wed Aug 10, 2016 1:43 pm

HeartlessSeph wrote:Woah just to clarify I didn't make the import script. It was made by Jayveerk I believe. Sorry for confusion regarding that. It is a github script though so there shouldn't be any problem with posting an edited one.

But yeah they are indeed LOD faces. Test it out by nulling out a soldier's high poly set and then running away from one and watch them magically appear again.
Oops, my bad

Post Reply