How do CPK files work? In this case, its structure, pointers, etc... With that in mind, I wanted to make an extractor for Fate/extra, an extractor capable of working on different devices, like for example on android phones, Linux, etc...
But I don't know anything about this file... The most I know is that at the beginning of the file header there is a String "CPK" not all CPK files contain this header
First I tried parsing the quickbms script used to extract the CPK files
bms script link: http://aluigi.altervista.org/papers/bms/cpk.bms
Even so, I still couldn't understand very well how CPK files work, after looking at the first lines of the script I was able to come to a conclusion.
Code: Select all
endian big
// this endian big is "wrong" because the first values are actually little endian
comtype cpk
idstring "CPK "
// here it checks if the header starts with "CPK"
set query->offset long 0
// here it takes 4 bytes and uses it as a pointer
set query->index long 0
set query->name string "TocOffset"
// these two lines above are used to get 4 bytes each but I don't know for which server
callfunction query_utf 1
// Here it seems to call a function
set toc_offset long UTF_VALUE
CPK: https://drive.google.com/file/d/1Y2P4dF ... p=drivesdk
Right above I left the CPK link that I mentioned at the beginning of the text
I know it's a lot to ask for a detailed explanation of these CPK files since there are several formats and different structures but I still want to ask for help for you more experienced ones
Yeah I tried parsing the codes from the CriPakTools But as I never used C# I couldn't understand much
CriPakTools: https://github.com/esperknight/CriPakTo ... kTools.exe