hhyyrylainen / GodotPckTool

Standalone tool for extracting and creating Godot .pck files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR: Invalid magic number ?

Patoufo opened this issue · comments

Everytime i try to extract a .pck file it gives me that error.

Kind of sounds like you do not have a valid Godot engine .pck file. If you can share the file you are trying to use I can take a look at it.

Same issue, and unfortunately github doesn't support .pck files, so I can't drop them here.

You can put the file into a .zip file and upload that to Github as a comment attachment.

Thanks for providing a file. Looking at that file, it is completely different format, it doesn't look like a Godot .pck file at all. The .pck extension is not exclusive to Godot so it might be a file from a completely random program. As such I'll close this issue.

For reference here's how a hex dump of a proper Godot pck file looks like:

00000000  47 44 50 43 01 00 00 00  03 00 00 00 05 00 00 00  |GDPC............|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000050  00 00 00 00 89 09 00 00  44 00 00 00 72 65 73 3a  |........D...res:|
00000060  2f 2f 2e 69 6d 70 6f 72  74 2f 30 5f 4b 65 79 5f  |//.import/0_Key_|
00000070  44 61 72 6b 2e 70 6e 67  2d 39 34 35 33 35 63 63  |Dark.png-94535cc|
00000080  32 31 63 66 64 33 64 63  30 66 39 35 39 61 64 34  |21cfd3dc0f959ad4|
00000090  61 63 30 62 62 37 62 35  31 2e 73 74 65 78 00 00  |ac0bb7b51.stex..|
000000a0  70 5e 20 13 00 00 00 00  54 03 00 00 00 00 00 00  |p^ .....T.......|
000000b0  fe f3 77 be e9 81 bd 85  b6 fb f7 3d b9 69 36 2d  |..w........=.i6-|
000000c0  44 00 00 00 72 65 73 3a  2f 2f 2e 69 6d 70 6f 72  |D...res://.impor|
000000d0  74 2f 30 5f 4b 65 79 5f  4c 69 67 68 74 2e 70 6e  |t/0_Key_Light.pn|
000000e0  67 2d 64 66 38 63 32 38  32 36 62 64 37 38 31 37  |g-df8c2826bd7817|
000000f0  63 65 62 37 66 33 38 66  39 65 36 38 32 36 32 64  |ceb7f38f9e68262d|
00000100

Notice how the file starts with GoDot PCk (GDPC) magic, and how the contained file paths start with res://.

In contrast here's the start of the dump of that Script.pck file:

00000000  45 56 42 00 40 00 00 00  f0 10 77 e3 34 05 e5 40  |EVB.@.....w.4..@|
00000010  01 00 00 00 01 00 00 00  40 00 00 00 00 00 00 00  |........@.......|
00000020  f2 5c aa 01 00 00 00 00  01 00 00 00 00 00 00 00  |.\..............|
00000030  32 5d aa 01 00 00 00 00  e6 00 00 00 00 00 00 00  |2]..............|
00000040  0f 00 00 00 00 00 00 00  00 00 00 00 01 00 00 00  |................|
00000050  00 00 00 4c 00 00 00 01  00 00 00 01 00 00 00 01  |...L............|
00000060  00 00 00 25 00 44 00 45  00 46 00 41 00 55 00 4c  |...%.D.E.F.A.U.L|
00000070  00 54 00 20 00 46 00 4f  00 4c 00 44 00 45 00 52  |.T. .F.O.L.D.E.R|
00000080  00 25 00 00 00 03 00 f0  10 77 e3 34 05 e5 40 f0  |.%.......w.4..@.|
00000090  10 77 e3 34 05 e5 40 f0  10 77 e3 34 05 e5 40 00  |.w.4..@..w.4..@.|
000000a0  00 00 00 40 00 00 00 02  00 00 00 02 00 00 00 0d  |...@............|
000000b0  00 00 00 50 00 72 00 6f  00 6a 00 65 00 63 00 74  |...P.r.o.j.e.c.t|
000000c0  00 50 00 72 00 65 00 00  00 03 00 27 17 77 e3 34  |.P.r.e.....'.w.4|
000000d0  05 e5 40 27 17 77 e3 34  05 e5 40 27 17 77 e3 34  |..@'.w.4..@'.w.4|
000000e0  05 e5 40 00 00 00 00 52  00 00 00 03 00 00 00 03  |..@....R........|
000000f0  00 00 00 00 00 00 00 63  00 75 00 73 00 74 00 6f  |.......c.u.s.t.o|
00000100

Notice how the magic here is EVB (from a quick google I can't find what program uses that format), and the paths of the items inside the file are formatted completely differently. So in conclusion there's no way that a Godot pck extracting tool could understand that file.