PTCL (File Format)

From Deep Sea Knowledge
Revision as of 18:16, 31 December 2018 by KillzXGaming (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A Particle file contains data for particle effects.

All offsets are relative to the start of the containing (sub-)section.

Header

Offset Type Description
0x0 String "VFXB[space][space][space][space]" (0x5646584220202020) magic number
0x8 UInt8 Zero?
0x9 UInt8 Graphics API version
0xA UInt16 VFX API version
0xC UInt16 Endianness (0xFFFE for little, 0xFEFF for big)
0xE UInt16 Unknown
0x10 UInt32 Offset to zero-terminated name string
0x14 UInt16 Zero?
0x16 UInt16 Offset to first section
0x18 UInt32 Zero?
0x1C UInt32 File size

GRTF section

GRTF stands for Graphics Res Texture File.

Offset Type Description
0x0 String "GRTF" (0x47525446) magic number
0x4 UInt32 BNTX Size
0x8 UInt32 Offset to GTNT sub-section
0xC UInt32 Offset to next section (0xFFFFFFFF if this is the last)
0x10 UInt32 Always 0xFFFFFFFF?
0x14 UInt32 Offset to BNTX file

GTNT sub-section

It is unknown what GTNT stands for.

Offset Type Description
0x0 String "GTNT" (0x47544E54) magic number
0x4 UInt32 Unknown (section size?)
0x8 UInt32 Always 0xFFFFFFFF
0xC UInt32 Offset to BNTX file
0x10 UInt32 Always 0xFFFFFFFF?
0x14 UInt32 Offset to first texture descriptor

Texture descriptor

Offset Type Description
0x0 UInt64 Texture ID?
0x8 UInt32 Offset to next texture descriptor (0 if non-existent)
0xC UInt32 Length of name string (including NULL terminator)
0x10 String NULL-terminated name string

PRMA section

PRMA stands for PRiMitive Array. Details TODO.

G3PR section

It is unknown what G3PR stands for. It contains a G3NT sub-section. Details TODO, though this section has an offset to an embedded BFRES file.

Offset Type Description
0x0 String "G3PR" (0x47335052) magic number
0x4 UInt32 Bfres Size
0x8 UInt32 Offset to G3TNT sub-section
0xC UInt32 Offset to GRSB sub-section
0x10 UInt32 Always 0xFFFFFFFF?
0x14 UInt32 Offset to BFRES file
0x18 UInt32 Unknown. Always 0?
0x1C UInt32 Unknown. Always 1?


GRSN section

GRSN stands for Graphics Res Shader Normal. (Normal as in "regular".)

Offset Type Description
0x0 String "GRSN" (0x4E535247) magic number
0x4 UInt32 Shader size
0x8 UInt32 Offset to GSRC sub-section (0xFFFFFFFF if non-existent)
0xC UInt32 Offset to next section (0xFFFFFFFF if this is the last)
0x10 UInt32 Always 0xFFFFFFFF?
0x14 UInt32 Offset to shader archive

GRSC sub-section

GRSC stands for Graphics Res Shader Compute.

Offset Type Description
0x0 String "GRSC" (0x43535247) magic number
0x4 UInt32 File size?
0x8 UInt32 Always 0xFFFFFFFF
0xC UInt32 Always 0xFFFFFFFF
0x10 UInt32 Always 0xFFFFFFFF
0x14 UInt32 Offset to compute shader archive

ESTA section

ESTA stands for Emitter SeT Array.

Offset Type Description
0x0 String "ESTA" (0x43535441) magic number
0x4 UInt32 Total section size (Including all ESET sub sections)
0x8 UInt32 ESTA Section Size (Usually 32)
0xC UInt32 Next Section Offset
0x10 UInt32 Always 0xFFFFFFFF
0x14 UInt32 Always 32?
0x18 UInt32 Always 0?
0x1C UInt32 ESET Count

ESET section

ESET stands for Emitter SET.

Offset Type Description
0x0 String "ESET" (0x45535441) magic number
0x4 UInt32 Total section size
0x8 UInt32 EMTR Offset
0xC UInt32 Next Section Offset
0x10 UInt32 Always 0xFFFFFFFF?
0x14 UInt32 Always 32?
0x18 UInt32 Always 0?
0x1C UInt32 EMTR Count
0x20 Byte[16] padding
0x30 String Name of emitter (zero terminated string)