Klonoa 2 tools, docs, and other stuff.
This repository uses Kaitai Struct to parse binary formats. To test and compile them to Python, use the Kaitai Web IDE or download the compiler.
- Pre-compiled parsers are provided in this repository.
- KLDATA.BIN Archive Extraction
- The current method "sniffs" for offsets to check if a file is an archive/folder, which can be seen in the __is_archive function in kldata_archive.py. This will most likely be replaced with a proper hierarchy scanner in the future.
- Models
- Mesh
- Textures
- Klonoa's model requires a manual texture fix when extracted, but other than that, it works 95% of the time
- UVs
- UVs are nearly perfect when using glTF files in Blender because it supports nearest mipmapping. Using .obj files or linear mipmapping causes noticable bleeding in some models.
- Rig/Bones
- Animations
- Visions (Stages)
- Layout/Geometry
- Textures
- Animations (.vtipu/.ipu files)
- ...basically everything else
- Sounds
- Voice Files (PPT)
- Music (BGM)
- QuickBMS can do this
- Sound Effects (Soundbanks)
File type names are arbitrary unless it is a standard PS2 format.
klf[abxyz]
: Model dataklfa
: Animation data (keyframes, translations, rotations, name [8 bytes])klfb
: Bone/joint data (local positions, global/world positions, parent joints)klfx
: Mesh data (vertices, normals, UVs, weights, joint influences, indices, mesh parts)klfy
: Texture data (pixels, palettes)klfz
: Morph data (target, vertices, normals)
klname
: Model name (3 bytes)hd
: PS2 soundbank headerbd
: PS2 soundbank datavtipu
: Similar to PS2 .ipu (movie) file, used for stuff like water animationsgim
: Texture datappt
: Cutscene voice stored as Playstation 4-bit ADPCM (mono, 22050 Hz, 16bps)kl0
: 16 bytes of0x00
klnull
: Starts withnull
string, 16 bytes longklpad
: 4 bytes of0xFF
, 12 bytes of0x00