I'm mainly experienced with code-like formats, and haven't had a great deal of experience dealing with 3D formats. Has anyone ever seen these formats before? I suspect that they are once-off formats specifically for this game (as is the case with a lot of game formats), but I thought I might ask around first
There's also about 4 different archive systems used here (FARC, TARC, WDPK, UPAK), and several of the formats contain subfiles as part of their structure (e.g. MODL files contain M3DT subfiles, which in turn contain P2OD sub-subfiles). Luckily, nothing's compressed or encrypted, and most of the formats were pretty straightforward to extract from.
Anyway, attached is a sample P2OD file, which seems to describe vertices. The format is as follows:
Code: Select all
Header:
byte[4] signature = 'P2OD'
byte[4] version = '\x80\0\0\0'
int32 numobjs
byte[20] null = '\0'*20
Object Header (immediately follows regular header):
byte[8] unk (ffff0100ffff0000, 0000ffff02000000, 0000ffffffff0000 have been seen here)
int32 fileoffset [First object header refers to the P2OD itself, so it has an offset of 0; the rest refer to actual objects]
float32[17] unk = {0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0}
Object (starts at fileoffset):
int32 blockcount
int32 unk[3] = {8, 0, 0}
float32 minx, miny, minz, unk, maxx, maxy, maxz, unk
Block blocks[blockcount]
Block:
int32 groupcount
int32 type
int32 unk [A small integer; might be related to an external resource like a texture?]
float32[2] unk = {0.0, 1.0}
byte[76] unk = '\0'*76
Group groups[groupcount]
Group if type == 0x18006:
int32 count
int32 unk[3] = {124, 0, 0}
(float32 row1[4])[count]
(float32 row2[4])[count]
(float32 row3[4])[count]
Group if type == 0x18007:
int32 count
int32 unk[3] = {124, 0, 0}
(float32 row1[4])[count]
(float32 row2[4])[count]
(float32 row3[4])[count]
(float32 row4[4])[count]
Code: Select all
Object header 1 count 22
values (-1300.0, -300.0, -2300.0, 1.0, 1300.0, 156.06452941894531, 1700.0, 1.0)
block 0
unk 0
array 0 count 15 type 124
entry 0
1300.0000, -100.0000, -208.1415, 0.0000
47.0000, 47.0000, 47.0000, 128.0000
1.0000, 0.4770, 1.0000, 0.0000
entry 1
1300.0000, 50.0000, -208.1400, 0.0000
47.0000, 47.0000, 47.0000, 128.0000
1.0000, 0.4770, 1.0000, 0.0000
entry 2
1300.0000, -100.0000, -400.0000, 0.0000
47.0000, 47.0000, 47.0000, 128.0000
1.0000, 0.5250, 1.0000, 0.0000
entry 3
1300.0000, 0.0000, -400.0000, 0.0000
47.0000, 47.0000, 47.0000, 128.0000
1.0000, 0.5250, 1.0000, 0.0000
entry 4
1300.0000, -100.0000, -600.0000, 0.0000
47.0000, 47.0000, 47.0000, 128.0000
1.0000, 0.5750, 1.0000, 0.0000
entry 5
1300.0000, 0.0000, -600.0000, 0.0000
47.0000, 47.0000, 47.0000, 128.0000
1.0000, 0.5750, 1.0000, 0.0000
entry 6
1300.0000, -100.0000, -800.0000, 0.0000
47.0000, 47.0000, 47.0000, 128.0000
1.0000, 0.6250, 1.0000, 0.0000
entry 7
1300.0000, 0.0000, -800.0000, 0.0000
47.0000, 47.0000, 47.0000, 128.0000
1.0000, 0.6250, 1.0000, 0.0000
entry 8
1300.0000, -100.0000,-1000.0000, 0.0000
47.0000, 47.0000, 47.0000, 128.0000
1.0000, 0.6750, 1.0000, 0.0000
entry 9
1300.0000, 0.0000,-1000.0000, 0.0000
47.0000, 47.0000, 47.0000, 128.0000
1.0000, 0.6750, 1.0000, 0.0000
entry 10
1300.0000, -100.0000,-1200.0000, 0.0000
47.0000, 47.0000, 47.0000, 128.0000
1.0000, 0.7250, 1.0000, 0.0000
entry 11
1300.0000, 0.0000,-1200.0000, 0.0000
47.0000, 47.0000, 47.0000, 128.0000
1.0000, 0.7250, 1.0000, 0.0000
entry 12
1300.0000, 0.0000,-1400.1083, 0.0000
47.0000, 47.0000, 47.0000, 128.0000
1.0000, 0.7750, 1.0000, 0.0000
entry 13
1300.0000, 300.0000,-1200.0000, 0.0000
47.0000, 47.0000, 47.0000, 128.0000
1.0000, 0.7250, 1.0000, 0.0000
entry 14
1300.0000, 300.0000,-1400.0000, 0.0000
47.0000, 47.0000, 47.0000, 128.0000
1.0000, 0.7750, 1.0000, 0.0000Thoughts?

