Page 79 of 109
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
Posted: Tue Jul 05, 2016 4:03 pm
by BobDoleOwndU
I'm back with more info on MGSV's audio files.
While digging through the various .sbp files of MGSV, I noticed that there's a ton of seemingly useless .wav files. They are all marked with JUNK, and cannot be played by any normal audio player. Using the Ravioli conversion method on these files doesn't work either. I originally thought that this meant these .wav files are completely useless, and that all of the data was junk, essentially just serving as padding for the wwise files. I also thought this seemed very strange considering the mass amount of wav files compared to the few wwise files in most .sbps. As it turns out, the wav files aren't useless!
The JUNK is actually a chunk marker used on wav files which just means that the data within the chunk is padding and should be skipped when playing the audio file. Apparently the JUNK chunk is used to align audio files for CDs, or other storage devices. If a single file has the JUNK chunk though, it cannot be played by a standard audio player. However, there is still a way to play them. Audacity automatically strips the JUNK chunk from the file if the file is imported as raw data, and this results in a playable audio file. Now I know where all of the audio files I couldn't find are. XD
I haven't tried swapping any of these files yet, so I don't know how this would work out, but at least they're playable now! With this info, I believe all of the sounds in MGSV should now be accessible.
Generate hashed values to actual names...
Posted: Fri Jul 15, 2016 2:03 pm
by Paul44
On pg 1, #Sergeanur posted the algorithm that is used to (de)hash the filenames.
I can't do much with that so: anyone knows of a little tool that can do that; meaning giving a name based on hash-value, and vice versa (commandline would be great as I could easily write a batchfile).
Reason why I'd like such a tool: I've been experimenting with filename identification. And while doing so, I could find new names based on 'similarity'. Unfortunately, the success rate depends on whether the file actually resides within that particular .dat-file. Plus it is pure guess-work of course.
So if I would have the actual names, it would be much easier to "link" them with existing/identified files...
ps: what is the reason why only identified names are 'categorised', while unknown files receive a 'hash' name & reside in the root folder?
ps2: I read sofar that FMDLs contain the hash-values for related texture files (I assume they reference to TextureX.dat files). Besides identifying those files (see #BobDoleOwndU above), is there any logic on identifying those filenames (incl path)?
@BobDoleOwndU: that is what I thought at first too. I should have added an example though, on which I based my assumption...
ps: regarding FMDLs, does it just contain the hash-values, or does it contain path/name info as well?
-EDIT-
Not sure what happened here (prev edit got removed), but - again - I confirm that the hash-value is based on both path- and filename (see attached)
Re: Generate hashed values to actual names...
Posted: Fri Jul 15, 2016 11:08 pm
by BobDoleOwndU
Paul44 wrote:On pg 1, #Sergeanur posted the algorithm that is used to (de)hash the filenames.
I can't do much with that so: anyone knows of a little tool that can do that; meaning giving a name based on hash-value, and vice versa (commandline would be great as I could easily write a batchfile).
Reason why I'd like such a tool: I've been experimenting with filename identification. And while doing so, I could find new names based on 'similarity'. Unfortunately, the success rate depends on whether the file actually resides within that particular .dat-file. Plus it is pure guess-work of course.
So if I would have the actual names, it would be much easier to "link" them with existing/identified files...
ps: what is the reason why only identified names are 'categorised', while unknown files receive a 'hash' name & reside in the root folder?
ps2: I read sofar that FMDLs contain the hash-values for related texture files (I assume they reference to TextureX.dat files). Besides identifying those files (see #BobDoleOwndU above), is there any logic on identifying those filenames (incl path)?
If I understand correctly, you're looking for a tool that can directly unhash a file name? If so, I don't think that's possible. I don't know exactly how the QAR Tool/GzsTool unhash the names, but I know they require the filename and filepath to do so.
The reason identified files are categorized is because the hashed name doesn't only include the filename itself, it also includes the filepath. Take for example, plparts_battledress. When the name is hashed, it's not hashing the string "plparts_battledress" it's hashing the string "/Assets/tpp/pack/player/parts/battledress". So when the name is unhashed, the filepath is as well. This is also why unnamed files sit it the root folder. Their filepath is unknown. This also applies to the hashed filenames found inside the fmdl files.
Paul44 wrote:@BobDoleOwndU: that is what I thought at first too. I should have added an example though, on which I based my assumption... (see attached)
ps: regarding FMDLs, does it just contain the hash-values, or does it contain path/name info as well?
I believe those are hashing constants. I have no idea how they work though. I know they're hashed using CityHash, but I don't know much else. Maybe look at GzsTool on GitHub? All of its source code is available there, including what it does to unhash the names.
Only the hashed names/paths are stored in the FMDLs. The game can use the hashed values to locate files, which is why all of the names are hashed in the first-place. The game's supposed to be able to find the files, we're not.

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
Posted: Sat Jul 23, 2016 4:39 am
by HeartlessSeph
Forgot to drop this here in forever so here it is, a vertex repositioning tool for MGSV:
https://www.dropbox.com/s/qs9gpa8isqocq ... rt.ms?dl=0
Used in a similar way to the faces script, except since you're just moving verts you only need one script. Problem with it is that you can't edit UV Maps and reweigh the verts (mostly because no import tool for MGSV supports bone weights).
I can add a UV Editing function if someone could show me how to convert float values to half float in Maxscript but I haven't seen anywhere online how to do that in Maxscript.
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
Posted: Sat Jul 23, 2016 11:08 pm
by YouRePrettyGood
Hi all, i'm completely new to model/texture modding, but this thread (especially BobDoleOwndU and HeartlessSeph) was of incredible help.
In short: i am trying to replace the female soldier fatigues with Quiet's Sniper Wolf outfit, with automatic skin color adaptation.
To do so, i dug into the FOVA .fv2 files for The Boss's and EVA's outfits (they both have skin color adjustment).
Here are my findings (for an explanation on how i deduced the textures from hex, read BobDoleOwndU's trick a few posts above):
Comparison of both .fv2 files:
Relation between the .fv2 file and the skin color textures:
Cross-reference between .fv2 and .fmdl files ("red" reference - dunno what it stands for exactly)
Cross-reference between .fv2 and .fmdl files (1st skin texture for the related object)
So, from all that, i am almost able to make it work for my mod: i just have to create 5 versions of Sniper Wolf's skin texture, then insert/replace their hashed names in the .fv2 file. Only problem is: how do i know which reference (red in the pictures) to use ? Or rather, how can i pinpoint it exactly in the .fmdl file ??? Does someone here happen to have a detailed description of this part of the .fmdl file structure, so we could identify exactly where the red part will appear in any .fmdl ?
Thanks !
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
Posted: Sun Jul 24, 2016 11:47 pm
by paulscottttt
does anyone know the location of the avatars beard models?
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
Posted: Mon Jul 25, 2016 12:45 am
by HeartlessSeph
paulscottttt wrote:does anyone know the location of the avatars beard models?
It's part of the Avatar's face model.
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
Posted: Mon Jul 25, 2016 6:36 pm
by paulscottttt
HeartlessSeph wrote:paulscottttt wrote:does anyone know the location of the avatars beard models?
It's part of the Avatar's face model.
damn, i'm guessing you cant replace avatar face ?
DLC suit
Posted: Tue Jul 26, 2016 10:19 am
by Paul44
I'm trying to collect all DLC suit info (Tuxedo, etc), but can't seem to collect everything from 'D-Horse Western & Parade Tack'.
I still seem to be missing some files here (like the "horns" on 'D-Horse Western').
Anyone has experience with this particular DLC?
PS: I made some batchfiles to collect all appropriate info (textures & INF entries). If you're interested, just mail me.
MGSV_QAR_Tool ~ PS3
Posted: Tue Jul 26, 2016 1:09 pm
by Paul44
I've downloaded a PS3 vs (Duplex) to see if I could unpack the DLC files (like Shields, Suits, some weapons), but the tool returned an
error:
[MGSV_ QAR_Tool "<game_path>\master\7b9"\3dc8acbf53e78f06.dat -u -r -e2]
MGS V QAR Tool v1.3.2
Made by Sergeanur
ERROR: Unsupported QAR version = 0x826042ae
Checked and this seems to be latest version?!
-EDIT-
Nevermind, I figured it out [
https://github.com/Atvaark/TPP.FileForm ... les_ps3.md ] (only Qar dat-files can be extracted)
That said: I'm now trying to unpack some fpk & pftxs files; and Gzstool returns with an error. (attached: DLC Shield)
-EDIT 2-
Nevermind... again. I was using v0.5.2, but apparently, v0.4.1b (only) seems to support these ps3 files?!
-EDIT3-
When I use the original/ps3 files, the games crashes as soon as one tries to equip a shield. What I've tried since:
a. extract fpk, fpkd, pftxs with v0.4.1b; then packed again with v0.5.2
b. convert ftex-files to DDS, then back to DDS
(except for 1 dds file, which only produced 2 files, all other DDS files returned analogue ftex files)
c. extract standard shield fpk, fpkd, pftxs; copied corresponding PS3 files, packed and renamed "properly".
Anyone has experience in converting these type of files to PC environment? I was kinda hoping that the Gzstool/Ftextool would convert these files to PC versions, but probably not...?
ps: there seems definitely to be differences in PS3 vs PC files. Did some 'fc' between 'identically_named' files, which gives differences... And the game definitely tries to load those files: when they are not present, the equipment viewer would show/load "nothing"...
(added some "Trial & error importing ps3 file" findings as well)
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
Posted: Tue Aug 02, 2016 12:01 am
by paulscottttt
is it possable to repostion parts of a mesh?
for example if i null everything what what i want off and use whats left on on "arms" how would i repostion it?
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
Posted: Wed Aug 03, 2016 5:53 am
by BobDoleOwndU
paulscottttt wrote:is it possable to repostion parts of a mesh?
for example if i null everything what what i want off and use whats left on on "arms" how would i repostion it?
Yes, via HeartlessSeph's vertex Maxscript.
Open up 3DS Max and run the fmdl script to import the fmdl you're editing. Select the object you want to reposition and run the vertex script to output a .vert file. Name it Unedited, or something similar.
Now, select the vertices of the object you are editing. Reposition them to where you want them positioned. Run the vertex script again and this time, save it as Edited.vert.
Open up the fmdl, Unedited.vert and Edited.vert in HxD. Go to Unedited.vert and press ctrl+a to select everything then press ctrl+c to copy.
Go to the fmdl and press ctrl+f to find. In the Search for textbox press ctrl+v to paste. Change the datatype to Hex-values. Press enter and it should highlight a bunch of text. Go to Edited.vert and press ctrl+a then ctrl+c to copy everything. Go back to the fmdl and press ctrl+v to overwrite the hex values you had selected. Save the file. Repeat for each object you need to move.
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
Posted: Wed Aug 03, 2016 10:15 am
by morbidslinky
Sound-swapping was difficult, but I cured Flaming Buffalo's asthma. Thanks Bob for the tutorial!
This will be useful, thanks!
Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
Posted: Wed Aug 03, 2016 6:05 pm
by YouRePrettyGood
Hi, still working on MGSV files (see previous page), i made a lot of progress in identifying FMDL, FCNP and FV2 file structures, will post it soon, but for now i need your help.
As you know, FMDL files in GZ contained clear names, whereas FMDLs in TPP contain only hashes (the full name list can be found in sub-section with id 0x16 in section 1 of the FMDL file, but i'll present it better when posting my findings).
Good thing is: GZ and TPP have model files in common

. So i've studied a few such files (sna2_main0_def, chi1_main0_def, dds0_main0_def, dds1_main0_def, kaz1_main0_def, nin0_main0_def, paz0_main0_def, rai0_main0_def, wsp0_main0_def) and i've identified the most common name hashes found in FMDL files, here's the result:
http://txt.do/5e3xo
(you can save as txt and import in Excel/Calc as fixed-length or .prn)
In the mod i'm working on, i will need to insert hashes in said sub-section 0x16. So, in order to use correct hashes for each corresponding filename, i would need to hash the names in the same manner.
I've read that names are hashed using CityHash64-with-Seed, so i've downloaded the CityHash master from github, installed Dev-C++, but as i'm not a progammer at all, i'm a little stuck, hence my n00b question:
Could someone please explain to me how to use these tools to input the example string "SKL_000_WAIST" and output the generated hash ? I'll figure out the rest.
Thanks

Re: Metal Gear Solid 5 Ground Zeroes/Phantom Pain g0s archiv
Posted: Thu Aug 04, 2016 11:26 am
by pewposterous
Does anyone know the location of the female skull snipers file names and texture names? would be much appreciated