Page 8 of 109

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

Posted: Mon Dec 29, 2014 12:15 am
by volfin
DEElekgolo wrote:
JayK wrote:If you really want to know about the FTEXS Dee, this is how the .1 files work. From the offsets in the FTEX file its basically

{
uint 16 compressedSize
uint 16 uncompressedSize
uint 16 unknown //always seems to be 0x08
uint 16 compressFlag // if its 0x80 its already uncompressed, if it's 0x0 its compressed
}

One thing I never understood is it repeats this block behined it, I don't know why they've made it do it twice. Also the end of the file always contains info for a texture in the next file although the next file has that info as well, that's another thing I found weird. Anyway you should know everything there is to know about tex's after this, hopefully someone else makes a repacker because at this point I can't be bothered :p
The redundant chunk entries are probably so that textures can be continuously streamed in without having to poke into the FTEX file again or something. So when it is done reading one mip map level it immediately knows where to go for the next level mip map and can just chain through until it reaches the null entry(last 8 bytes in the last ftexs file) to know it is done, as if each file was to be appended to the other continously.
Pretty much any file with s at the end of it is structured with some stream-like behavior.

The weird format of the first entry found in the .1.ftexs files is probably some special format lead-in for the complete stream. With that first 0x08 variable being the offset immediately after the Chunkentry itself. I usually found Compressed/Uncompressed Sizes of 0x8 or 0x10. Probably the lowest mip entry. Not sure about the compress flag but that 0x80 seems to only show for the first entry in .1 files so it's probably just a flag to show that it is at the beginning of a stream and zero just lets it know to continue on. When it reaches a zero entry when all 8 bytes are zero then it knows to stop(By possibly checking if CompressedSize and UncompressedSize are Zero).

If that structure is true then it would be something like

Code: Select all

struct BlockMapEntry
{
	unsigned short CompressedSize;
	unsigned short UncompressedSize;
	unsigned short Offset;
	unsigned short StreamFlags;
};
except as I already stated above its:

Code: Select all

struct BlockMapEntry
{
   unsigned short CompressedSize;
   unsigned short UncompressedSize;
   unsigned long  Block_Offset;
};
Whether it's compressed or not is signified by the difference in compressed/uncompressed sizes. if the sizes match, obviously it's not compressed. and if you're not reading that offset as a long, eventually you're going to wrap around your address space and read the wrong data.

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

Posted: Mon Dec 29, 2014 12:17 am
by JayK
the .1 files are different from the .2> files though. I was talking about the .1 files and I thought I made that clear by saying
this is how the .1 files work.

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

Posted: Mon Dec 29, 2014 2:06 am
by Higus

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

Posted: Mon Dec 29, 2014 2:09 am
by JayK
Yeah, I gave him a special version of my maxscript :p

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

Posted: Mon Dec 29, 2014 3:37 am
by stiffy360
JayK wrote:Yeah, I gave him a special version of my maxscript :p
Can you send me a version of it? I'd like to do some more serious model modding. Like sticking Gordon Freeman in there. (if possible dunno how texture location and whatnot are stored though.)

or at least try to get Miller/Kojima's Glasses baked into their meshes.

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

Posted: Mon Dec 29, 2014 4:14 am
by JayK
stiffy360 wrote:
JayK wrote:Yeah, I gave him a special version of my maxscript :p
Can you send me a version of it? I'd like to do some more serious model modding. Like sticking Gordon Freeman in there. (if possible dunno how texture location and whatnot are stored though.)
That wouldn't really be possible at this point it's a pretty barebones script which just imports the faces and verticies only and then writes out changes in existing vertex positions that the user wishes to make, you're honestly better off waiting for cra0s complete importer. I only made it because Shigu said Miller's collar was clipping when he did a model swap and wanted to move it out the way, he's a good friend so I made it for him.

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

Posted: Mon Dec 29, 2014 4:21 am
by stiffy360
JayK wrote:
stiffy360 wrote:
JayK wrote:Yeah, I gave him a special version of my maxscript :p
Can you send me a version of it? I'd like to do some more serious model modding. Like sticking Gordon Freeman in there. (if possible dunno how texture location and whatnot are stored though.)
That wouldn't really be possible at this point it's a pretty barebones script which just imports the faces and verticies only and then writes out changes in existing vertex positions that the user wishes to make, you're honestly better off waiting for cra0s complete importer. I only made it because Shigu said Miller's collar was clipping when he did a model swap and wanted to move it out the way, he's a good friend so I made it for him.
Cra0 said he's working on the model format. He said nothing about making a model importer or exporter. Would it be too much to ask for the script to at least mess with the models? Port to SFM or something.

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

Posted: Mon Dec 29, 2014 1:33 pm
by LinkOFF
line wrote:there's model modding?
Image
https://www.youtube.com/watch?v=whU3f-DZ5zM
dbecb5a22ccd3ae6da40cb2082db895b.fmdl in e20010_d03_fpk
Image

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

Posted: Mon Dec 29, 2014 1:51 pm
by JayK
stiffy360 wrote: Cra0 said he's working on the model format. He said nothing about making a model importer or exporter. Would it be too much to ask for the script to at least mess with the models? Port to SFM or something.
I'm sure he will release an importer, looks like he's making good progress as well and plans on having vertex normals and bones (something I wouldn't be able to do) imported as well, it'll be better than mine.
LinkOFF wrote:dbecb5a22ccd3ae6da40cb2082db895b.fmdl in e20010_d03_fpk
He's talking about editing vertices, not just switching a model

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

Posted: Mon Dec 29, 2014 4:00 pm
by lionheartuk
Will the max importer also import textures? Or will it simply import the models with materials, and we'll have to find the textures and apply them separately?

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

Posted: Mon Dec 29, 2014 6:54 pm
by Sergeanur
FPK Tool is updated. Almost all names were added to fpk_dict.txt and one memory leak was fixed.

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

Posted: Mon Dec 29, 2014 8:52 pm
by michalss
Sergeanur wrote:FPK Tool is updated. Almost all names were added to fpk_dict.txt and one memory leak was fixed.

What files i should provide to get hands on Fonts and TExts pls (X360)?

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

Posted: Mon Dec 29, 2014 9:16 pm
by Sergeanur
Image
Kojima in main menu
michalss wrote:What files i should provide to get hands on Fonts and TExts pls (X360)?
It's obvious that font are in as\tpp\font\ and texts are in as\tpp\pack\ui\subtitles\EngVoice\

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

Posted: Mon Dec 29, 2014 10:30 pm
by michalss
Sergeanur wrote:Image
Kojima in main menu
michalss wrote:What files i should provide to get hands on Fonts and TExts pls (X360)?
It's obvious that font are in as\tpp\font\ and texts are in as\tpp\pack\ui\subtitles\EngVoice\

Done sent you PM, please check... Thx again

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

Posted: Tue Dec 30, 2014 3:02 am
by cra0
Ok working on a model exporter/modder tool for this ty JayK