panzi / rust-u4pak

unpack, pack, list, check and mount Unreal Engine 4 .pak archives
Mozilla Public License 2.0
141 stars 11 forks source link

illegal file magic: 0x0 #32

Open Eleiyas opened 2 years ago

Eleiyas commented 2 years ago

Game: Tower of Fantasy (2022) UE Version: UE4 Release 4.26 CL-0

No matter what I try, I get "illegal file magic: 0x0".

I have tried downloading this Git and building the much newer source, but it failed too much, so I decided to make an issue ticket instead.

panzi commented 2 years ago

Have you tried running it with --ignore-magic?

Eleiyas commented 2 years ago

Have you tried running it with --ignore-magic?

I checked for people having similar errors to me first and I saw there was someone on Linux who was. I did indeed try the ignore-magic command at the end and the program just did nothing.

McCovican commented 1 year ago

I'm having a roundly similar problem. Different game - Project Wingman, UE v4.24. With the --ignore-magic for the unpack operation, it just did nothing. So, I ran u4pak.exe info "ProjectWingman-WindowsNoEditor.pak" --ignore-magic, which just reported "0" in all fields, including pak version. Which made me think to try u4pak.exe info "ProjectWingman-WindowsNoEditor.pak" --ignore-magic --force-version=8 which told me that v8 is... unsupported? But the project info page says 8 is fine for reading? Am I misunderstanding what version scheme the --force-version flag is expecting? I'm at least assuming that the pak isn't encrypted, since the Project Wingman modding wiki actually points folk to u4pak.

Xenira commented 1 year ago

The index should not be encrypted in any case. Pak version is correct for that ue version. My test packages extract without poblem with pak v8.

I assume, you are using the latest version of rust-ue4pak?

I own that game, so I could look into it.

EDIT: I was wrong. Has been too long... Index can of course be encrypted.

McCovican commented 1 year ago

I'm using the latest version of the prebuilt binary from here, yeah ― v1.3.0 (pls don't tell me that's the problem, I don't have the braincells left to start building my own binaries again ;_; ). Latest version of the game from Steam too. Edit: Project Wingman seems to have a fairly lively modding scene, I'd be surprised if they'd gone and encrypted the pak and the modding docs just hadn't been updated. I'm seeing new mods on Nexus from last week even.

Xenira commented 1 year ago

That could actually be the problem. I could provide you with a binary if you are unable to build yourself.

UPDATE: Just checked and that tag is really old. I think this is the most likely problem if it is not encrypted.

@panzi we should provide a new prebuild from current master

Xenira commented 1 year ago

Just tested with current master branch and it works. image

You can get the binary here: https://github.com/panzi/rust-u4pak/releases

McCovican commented 1 year ago

Heroic! Absolutely heroic. Thank you ever so much, that works perfectly!

Xenira commented 1 year ago

Perfect, glad to here that its working. I think this issue can be closed once we have a new build as the original issue is prob the same cause.