r/kingdomcomemods • • 5d ago

Help Request [KCD2] Beginner Modding help

Hello everyone, I'm new here, and to modding in general. I'm trying to edit a mod's pak file right now, which I think I have done correctly, but after saving my work I keep getting the "Database sysyem error" and my game crashes. As far as I'm aware, my code looks good, so I'm guessing I'm repaking the file wrong or something. So far, I've just been using 7-zip to unpack and repack the pak files that I'm editing. All I am trying to do is add a new entry into a Tables/item XML. Any and all help would be greatly appreciated!

1 Upvotes

3 comments sorted by

1

u/tkhquang 5d ago

I think this could be that you repacked the .pak file to the wrong format. For more information, I created this a while ago: https://github.com/tkhquang/kcd-pak-action

You don't need to use it tho, just follow this and it will do (given it's the actual root cause):

CryPak rejects the per-file modification-time metadata that 7-Zip / WinRAR / WinZip add by default - the ZIP extra fields 0x000A (NTFS time) and 0x5455 (UT extended timestamp). This action writes paks with Python's zipfile, which adds none of those fields, so they load. Windows Explorer's built-in "Compressed (zipped) folder" works for the same reason.

1

u/Mr_Mopey 4d ago

You were right! It did have something to do with repacking it wrong. I used your tool and it worked perfectly, thank you!

1

u/maro-s 5d ago

If you are getting the error, then your tables are incorrect. Usually it just means a typo somewhere, so try to check the files again.

Also, could always be a mod conflict. This rarely happens with PTF, but sometimes it does.

And as far as repacking incorrectly goes, mod usually just won't work in these cases, no errors or anything like that.