Ok my friend....
I found the missing entries for WGSD.
Code: Select all
P Type Desc
0 uint32 ? - always 0 so far
4 16 * float32 decal matrix
20 uint32 key referencing BWST - diffuse map
24 uint32 key referencing BWST - normal map
28 uint32 key referencing BWST - ?
? ? rest is unknwon, altrought it seems to be static
BTW.. I think your P offsets are incorrect in that table?
I got the structure from looking at a old .chunk file I still have.
Here is my structure for the data in the order it appears in the data.
Code: Select all
Public Structure WGSD_entries_
Public unknown_1 As UInt32
Public matrix() As Single '16 floats
Public diffuseMapKey As UInt32
Public normalMapKey As UInt32
Public u_key As UInt32
Public unknown_2 As UInt32
'
Public Flags As UInt32
'
Public off_x As Single
Public off_y As Single
Public off_z As Single
Public off_w As Single
'
Public uv_wrapping_u As Single
Public uv_wrapping_v As Single
Public visibilityMask As UInt32
'---------------------------
'The strings below is not in the data.
Public diffuseMap As String
Public normalMap As String
Public extraMap As String
End Structure
This does indeed pull the correct decal DDS files.
It how ever does not for the extreMap.. I think this might be a key to the grid this decal is on.
It would make sense as this has to be blended with the textures on a specific map grid.
BWT2 might need to be decoded next. I'm sure its the info on the map's grid layout.
EDIT: I can't find that 3rd u_key in the BWT2 data.. It's has to be some where else.
A Single is the same as a Float.. It occupies 4 bytes of data.
I'd love to change the world but I can't get my hands on the code.