Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.

Wrong input instructions, raw output #1

Open
ghostlyghastly opened this issue Feb 4, 2024 · 2 comments
Open

Wrong input instructions, raw output #1

ghostlyghastly opened this issue Feb 4, 2024 · 2 comments

Comments

@ghostlyghastly
Copy link

ghostlyghastly commented Feb 4, 2024

Thank you!

The instructions seem wrong. [EDIT: I realize now, the instructions do say "INPUT_KFC_DIR_FILE" but the example is just the DIR, not the FILE] Giving game path as input throws access error.

Unhandled Exception: System.UnauthorizedAccessException: Access to the path 'D:\X\game' is denied.

Instead, the kfc_dir file path must be provided:

./KG.Unpacker.exe "D:/X/game/enshrouded.kfc_dir" "D:/EXTRACT/out"

The output is 102689 files + 11188 files in the '__Unknown' folder + resourceids.txt (every ID = '0') + version.txt

The files seem not converted and have no file ending, just sliced. This is useful but it'd be great if text could be converted to unicode, textures to png, audio to wave or ogg or whatever...

Text for example doesn't have newlines or string separators and I don't know how to handle this. See for example the credits in

46e14df6-fb8f-4f66-9463-e23b9e19e48e_fef918b8_0 / 46e14df6-fb8f-4f66-9463-e23b9e19e48e_fef918b8_0.zip

@Ekey
Copy link
Owner

Ekey commented Feb 5, 2024

Yeah, I just forgot to add the DIR filename to Usage section, fixed anyway, thanks! :)

The output is 102689 files + 11188 files in the '__Unknown' folder + resourceids.txt (every ID = '0') + version.txt

The files seem not converted and have no file ending, just sliced.

Archive doesn't contain filenames only their hashes. The list file contains ~95% of the real names (as far as I remember, there are about 10k unknowns names is left, so they are placed in the Unknown folder and named as hash).
PS: And yes, their real names look like GUIDs and don't have an extension.

This is useful but it'd be great if text could be converted to unicode, textures to png, audio to wave or ogg or whatever...

To convert files, we need to research the CRPF format first (these are files that always end in _0 - the file you attached is one of them) these are something like configurations for data that contain information about them (like width, height, type of textures and etc.) and have different structures for each file type.

@Hypnootika
Copy link

Hypnootika commented Feb 5, 2024

What i can tell at the moment is, that the "_0" files contain a sequence to find the ?file?name.
At the end of the file, there is the filename. 4 bytes before the name is the string_size. 4 bytes before the stringsize is what i call "StringIndicator". Example:
08 00 00 00 -> StringIndicator
1C 00 00 00 -> stringsize
65 6E 65 6D 79 5F 73 6B 65 6C 65 74 6F 6E 5F 76 6F 69 63 65 5F 6C 6F 6E 67 5F 30 36 -> string with length stringsize

And apparently (or i havent found out another solution) the String indicator is only valid if all other bytes of the 4 bytes string_size are 0x00

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants