He has provided documention on the format though that I am hoping someone here could use to make a simple converter. Perhaps to something like .obj or something else easy to import.
You can find the documentation on the format here: http://llref.emutalk.net/v2/docs.php?or ... d=bmd0.xml
Information on animations that he has so far is also provided here: http://llref.emutalk.net/v2/docs.php?or ... d=bca0.xml Though animations are not my goal as I'm trying to get to the stationary models used as the playing area of the game. Though eventually player models and such would be nice as well. Though I would assume if stationary buildings could be converted characters wouldn't be too hard in addition to it.
You can get the raw models here (Note: The models I'm am interested in are in the Mi>Wd folder): http://www.propl.nl/random/KH3582_Models.zip
Can anyone please help me out? I would be very grateful. This same information may be applicable to other DS game models as well.
Thank you for any help you can provide me.
Edit: I have more progress on the files of Days and Re:coded thanks to Barubary. I'll post quotes of what he told me about it. I hope this can help you guys figure out this format even further.
And how he actually decompressed them with his tools:Barubary wrote: - .z files are LZ-compressed files
- .p2 files have the following format:- .pak files have the following format:Code: Select all
char[2] magicHeader; // 'P2' WORD nFiles; // maybe longer/shorter. MSB flags filenames QWORD padding; DWORD dataStart; WORD offsets[nFiles]; // to get real offset: << 9 + dataStart WORD padding; // only if nFiles % 2 = 1 DWORD sizesAndFlags[nFiles]; // MSB flags compression char filenames[8][nFiles]; // length 0 if nFiles & 0x8000 != 0 byte* data; // possibly preceded by padding, so that start matches dataStart- .p2d / .pobj files have the following format:Code: Select all
char[4] magicHeader; // 'KAPH' DWORD padding; // ? // if any of the offsets below are FFFFFFFF, it is not present DWORD BCAdataOffset; DWORD BVAdataOffset; DWORD BMAdataOffset; DWORD BTPdataOffset; DWORD BTAdataOffset; DWORD unknownOffset1; DWORD unknownOffset2; DWORD BMDdataOffset; each offsets points to data formatted as such: DWORD one; // always 1? (maybe number of files with this format? never seen something else though) DWORD fileStart; DWORD fileLength;Code: Select all
char[4] magicHeader; // 'D2KP' DWORD padding; DWORD* FATFolderEntryOffsets; // continues up to first offset. some offsets may be 0xFFFFFFFF // each FAT Folder entry is formatted as follows: DWORD numFiles; DWORD[numFiles] offsets; DWORD[numFiles] sizes; // the data follows, possibly preceded by padding.
Barubary wrote:For 358/2 Days (and for my R:c rips) I used an unpacker that could only decompress one specific file or folder at a time, and thus quite unusable for anybody who didn't create the program in the first place. I've now ported it to my more generic unpacker, NinUnpack, which should now be able to unpack all packages in both KH DS games. Drag a folder or a (set of) files on the executable (or use the command line) to unpack the given files. (providing a folder will only unpack the files directly in that folder; it is not recursive)
The game has three pack formats: P2, PK2D an HPAK. The first is just a generic archive file, like NARC but without folders. It has extension .p2 (or sometimes .p2f), but sometimes there is no extension at all for these files. PK2D (extension .D2KP, possibly others as well) only packs 2D graphic files. HPAK (extension .KAPH or .pak) only packs 3D graphic files.
Note that some files are compressed as well (in the normal filesystem, in packs, and I believe also in packs in packs). DSDecmp (or any other decompressor for DS formats) should work on those files (they usually have a .z extension, but sometimes none).



