FINAL FANTASY TYPE-0 HD PC
Posted: Thu Aug 20, 2015 10:51 pm
Here is a quikbms script for this game
Yes I know but still some files like "alb03_05.bin", "alb07_01.bin", "ale01_02.bin" etc.. inside "JP\bg\bin" folder are extracted as 0 bytes and during extraction there's no option for replace or rename for those files.chrrox wrote:Its a bug in quickbms.
hit r to rename files instead of skipping them.
Code: Select all
//--------------------------------------
// File: Final Fantasy Type-0 HD Model Binary Template
// Author: Echelo
// Revision: 0.06 info only
//--------------------------------------
local int i;
local int j;
LittleEndian();
struct MODEL_FILE
{
struct MODEL_HEADER
{
uint unknown01 <bgcolor=0x0000FF>;
uint unknown02 <bgcolor=0x0000FF>;
uint vertexInfoPointer1 <bgcolor=0x00FF00>;
uint unknown04 <bgcolor=0x0000FF>;
ushort count02 <bgcolor=0xFFCC00>;
ushort count01 <bgcolor=0xFFCC00>;
ushort materialCount <bgcolor=0xFFCC00>;
ushort textureCount <bgcolor=0xFFCC00>;
ushort count06 <bgcolor=0xFFCC00>;
ushort count05 <bgcolor=0xFFCC00>;
ushort count07 <bgcolor=0xFFCC00>;
ushort count08 <bgcolor=0xFFCC00>;
uint64 address01 <bgcolor=0xFF8800>;
uint64 materialInfoAddress <bgcolor=0xFF8800>;
uint64 textureInfoAddress <bgcolor=0xFF8800>;
uint64 address04 <bgcolor=0xFF8800>;
uint64 address05 <bgcolor=0xFF8800>;
uint64 address06 <bgcolor=0xFF8800>;
uint64 address07 <bgcolor=0xFF8800>;
uint64 vertexInfoPointer2 <bgcolor=0x00FF00>;
uint64 address09 <bgcolor=0xFF8800>;
uint64 address10 <bgcolor=0xFF8800>;
uint64 address11 <bgcolor=0xFF8800>;
uint64 address12 <bgcolor=0xFF8800>;
uint64 address13 <bgcolor=0xFF8800>;
uint64 address14 <bgcolor=0xFF8800>;
uint64 address15 <bgcolor=0xFF8800>;
uint64 address16 <bgcolor=0xFF8800>;
uint unknown05 <bgcolor=0x0000FF>;
ushort modelCount <bgcolor=0x00FF00>;
ushort unknown06 <bgcolor=0x0099FF>;
uint unknown07 <bgcolor=0x0000FF>;
ushort unknown08 <bgcolor=0x0000FF>;
ushort unknown09 <bgcolor=0x0000FF>;
} modelHeader;
if (modelHeader.count01 != 0)
{
FSeek(modelHeader.address01);
struct TABLE_01
{
for (i = 0; i < modelHeader.count01; i++)
{
struct TABLE_01_ENTRY
{
uint unknown01;
uint unknown02;
uint unknown03;
uint unknown04;
} table01Entry;
}
} table01 <bgcolor=0x0099FF>;
}
if (modelHeader.materialCount != 0)
{
FSeek(modelHeader.materialInfoAddress);
struct MATERIAL_INFO_TABLE
{
for (i = 0; i < modelHeader.materialCount; i++)
{
struct MATERIAL_INFO_ENTRY
{
ushort diffuseMapIndex;
ushort normalMapIndex;
ushort specularMapIndex;
ushort unknown04;
ushort unknown05;
ushort unknown06;
ushort unknown07;
ushort unknown08;
ushort unknown09;
ushort unknown10;
ushort unknown11;
ushort unknown12;
ushort unknown13;
ushort unknown14;
ushort unknown15;
ushort unknown16;
ushort unknown17;
ushort specularLevelMapIndex; //not sure what kind of map this is ??
ushort unknown19;
ushort unknown20;
ushort unknown21;
} materialInfoEntry;
}
} materialInfoTable <bgcolor=0x00FF00>;
}
if (modelHeader.textureCount != 0)
{
FSeek(modelHeader.textureInfoAddress);
struct TEXTURE_INFO_TABLE
{
for (i = 0; i < modelHeader.textureCount; i++)
{
struct TEXTURE_INFO_ENTRY
{
ushort textureWidth;
ushort textureHeight;
uint textureSize;
uint textureAddress;
uint unknown04;
} textureInfoEntry;
}
} textureInfoTable <bgcolor=0x00FF00>;
}
if (modelHeader.count05 != 0)
{
FSeek(modelHeader.address05);
struct TABLE_05
{
for (i = 0; i < modelHeader.count05; i++)
{
struct TABLE_05_ENTRY
{
float unknown01;
float unknown02;
float unknown03; //?? not sure if float as only seen null here
byte unknown04;
byte unknown05;
byte unknown06;
byte unknown07;
} table05Entry;
}
} table05 <bgcolor=0x0099FF, comment="fvf table?">;
}
if (modelHeader.address06 != 0)
{
FSeek(modelHeader.address06);
struct TABLE_06
{
uint unknown01;
float unknown02;
float unknown03;
float unknown04;
ushort unknown05;
ushort unknown06;
uint unknown07;
uint unknown08;
uint unknown09;
uint unknown10;
uint unknown11;
float boundingBoxCornerA_xPosition;
float boundingBoxCornerA_yPosition;
float boundingBoxCornerA_zPosition;
float boundingBoxCornerB_xPosition;
float boundingBoxCornerB_yPosition;
float boundingBoxCornerB_zPosition;
uint unknown12;
uint unknown13;
uint unknown14;
uint unknown15;
} table06 <bgcolor=0x0099FF>;
}
if (modelHeader.address07 != 0)
{
FSeek(modelHeader.address07);
struct TABLE_07
{
uint unknown01;
uint unknown02;
uint unknown03;
uint unknown04;
uint unknown05;
uint unknown06;
uint unknown07;
ushort unknown08;
} table07 <bgcolor=0x0000FF>;
}
if (modelHeader.address13 != 0)
{
FSeek(modelHeader.address13);
ushort unknownA;
ushort table13_count;
struct TABLE_13
{
for (i = 0; i < table13_count; i++)
{
struct TABLE_13_ENTRY
{
ushort index;
} table13Entry;
}
} table13 <bgcolor=0x00FFFF>;
}
if (modelHeader.vertexInfoPointer1 != 0)
{
FSeek(modelHeader.vertexInfoPointer1);
if (modelHeader.modelCount == 0)
{
uint vertexInfoAddress;
uint vertexInfoCount;
ushort vertexInfoStride;
ushort unknown01;
uint unknown02;
uint unknown03;
uint unknown04;
uint unknown05;
uint unknown06;
uint unknown07;
uint unknown08;
uint unknown09;
uint unknown10;
uint meshPartCount;
/*for (i = 0; i < meshPartCount; i++)
{
struct FACE_GROUP_INFO
{
uint faceIndexCountA <bgcolor=0xFFCC00>;
uint faceIndexCountB <bgcolor=0xFFCC00>;
byte unknownF01 <bgcolor=0x0000FF>;
byte unknownF02 <bgcolor=0x0000FF>;
byte materialIndex <bgcolor=0xFF00AA>;
byte unknownF03 <bgcolor=0x0000FF>;
struct FACE_GROUP
{
for (j = 0; j < (faceIndexCountA / 3); j++)
{
struct FACE_ENTRY
{
uint triangleIndex0;
uint triangleIndex1;
uint triangleIndex2;
} faceEntry;
}
} faceGroup;
} faceGroupInfo <bgcolor=0x879E2B>;
}
FSeek(vertexInfoAddress);
struct VERTEX_INFO_ENTRYS
{
for (i = 0; i < vertexInfoCount; i++)
{
struct VERTEX_INFO_ENTRY
{
if (vertexInfoStride == 0x44)
{
float xPosition;
float yPosition;
float zPosition;
byte unknown01;
byte unknown02;
byte unknown03;
byte unknown04;
byte unknown05;
byte unknown06;
byte unknown07;
byte unknown08;
uint unknown09;
uint unknown10;
uint unknown11;
uint unknown12;
uint unknown13;
uint unknown14;
byte unknown15;
byte unknown16;
byte unknown17;
byte unknown18;
float tu;
float tv;
float tu1;
float tv1;
float tu2;
float tv2;
}
} vertexInfoEntry;
}
} vertexInfoEntrys <bgcolor=0xFF3300>;*/
}
else
{
struct MODEL_INFO_ADDRESSES
{
for (i = 0; i < modelHeader.modelCount; i++)
{
struct MODEL_ADDRESS
{
uint64 address;
} modelAddress;
}
} modelInfoAddresses <bgcolor=0x33FF00>;
struct MODEL_INFO_ENTRYS
{
for (i = 0; i < modelHeader.modelCount; i++)
{
FSeek(modelInfoAddresses.modelAddress[i].address);
struct MODEL_INFO_ENTRY
{
uint vertexInfoAddress;
uint vertexInfoCount;
ushort vertexInfoStride;
ushort unknown01;
uint unknown02;
uint unknown03;
uint unknown04;
uint unknown05;
uint unknown06;
uint unknown07;
uint unknown08;
uint unknown09;
uint unknown10;
uint meshPartCount;
} modelInfoEntry;
}
} modelInfoEntrys <bgcolor=0xCC8800>;
}
}
} modelFile;
It will extract all files within the .pac file you chose.It will take a long time depending on your computer.Aegrus wrote:Unless I'm seriously misunderstanding (I apologize, I'm new to this) this is a script for extracting models. (people are probably looking at me and saying 'derp' right now, sorry again). Is there any way I can extract textures? I'm not able to find many non-corrupted ones when I extract with this script.
Forget about that. It doesn't store screen resolution height/width in the option file.aagems wrote:Is there any way to decrypt option file?I think the *.bin file is encrypted and it's not using usual *.ini or *.cfg to change custom resolution manually