Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with packing the game with python script #53

Closed
Maj-ew opened this issue Sep 12, 2021 · 6 comments
Closed

Problem with packing the game with python script #53

Maj-ew opened this issue Sep 12, 2021 · 6 comments

Comments

@Maj-ew
Copy link

Maj-ew commented Sep 12, 2021

So I am able to pack the folder again to pak file with and .exe but then the game doesn't work even though I didn't change anything inside pak file; and also maybe important is that file size from original pak file size increases from 1,3GB to 2,8GB (so the folder is 2,8GB) and then I pack these 2,8GB back to .pak file and then it's size is close to 2,8GB. And then I launch game with it but after the game completes loading and it's about to get me to the game menu it crashes with (at least in logs I could find beacuse the game itself doesn't give any information after crashing):

System.InvalidOperationException: Sekwencja nie zawiera elementów.
   w System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   w CrashReportClient.SendReportSettings.CreateSendReportSettingsFromConfigXml(String bugsplatConfigFileContents, String[] args)
   w CrashReportClient.Program.Main(String[] args)

This other language text is Polish and it says "Sequence does not contain elements" and "w" means "in" if this is also translated but I don't know

So I wanted to pak it with .py script but it shows something like this and I completly don't understand it.

D:\Games\originalpak\unpackspacksofmain\3>py u4pak.py pack GlimpseGame-WindowsNoEditor.pak GlimpseGame
Traceback (most recent call last):
  File "D:\Games\originalpak\unpackspacksofmain\3\u4pak.py", line 1578, in <module>
    main(sys.argv[1:])
  File "D:\Games\originalpak\unpackspacksofmain\3\u4pak.py", line 1538, in main
    pack(stream,args.files,args.mount_point,args.archive_version,callback=callback)
  File "D:\Games\originalpak\unpackspacksofmain\3\u4pak.py", line 710, in pack
    files.sort(cmp=strcoll)
TypeError: 'cmp' is an invalid keyword argument for sort()
@panzi
Copy link
Owner

panzi commented Sep 12, 2021

You're using an over 3 years old version of this script. Use the current version: https://raw.githubusercontent.com/panzi/u4pak/master/u4pak.py

@Maj-ew
Copy link
Author

Maj-ew commented Sep 12, 2021

oh okay xD let me try that one then

@Maj-ew
Copy link
Author

Maj-ew commented Sep 12, 2021

I mean this game is 3 years old too, if that matters

@panzi
Copy link
Owner

panzi commented Sep 12, 2021

No that doesn't matter. It's about the Python script and used Python version. You won't have these kind of problems if you use the Rust version, which provides an .exe: https://github.com/panzi/rust-u4pak/releases/tag/v1.3.0 (But you need to read the README and the help messages (u4pak.exe help, u4pak.exe help pack, u4pak.exe help unpack, ...).

@Maj-ew
Copy link
Author

Maj-ew commented Sep 12, 2021

I'm working on some issue that I don't know why appeared just now with both .pak from old version and new version of u4pak.py

I have some detailed informations on what am I supposed to do, will let you know if this is just single issue or a chain that is yet to reveal so there will be no point to continue solving it cause there will be something wrong with unpacking or packing. Maybe something about these features that are in rust version, like encoding and compression

@Maj-ew
Copy link
Author

Maj-ew commented Sep 13, 2021

okay, fuck me. kill me or something. I've literally spent half of the day searching for the problem, but I just deleted by accident one .pak file that I was not modyfing and that's basically why the game crashed I think. XD
Anyway cool thing you made, it's very good, the script or software I dont know how to call it

@Maj-ew Maj-ew closed this as completed Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants