panzi / u4pak

unpack, pack, list, check and mount Unreal Engine 4 .pak archives
510 stars 143 forks source link

Unable to Pack a file #40

Closed CoIyn closed 3 years ago

CoIyn commented 3 years ago

I have attempted to find a fix for this issue but maybe I am overlooking something. I am at the last part of (packing the file to be a .pak) the error I am currently unable to get around is; **C:\Python2713>python.exe u4pak.py pack BGM_CHARA_003.pak MVCI File "u4pak.py", line 419 filename: str ^ SyntaxError: invalid syntax

C:\Python2713>pause** I have tried many different ways to ensure that I am at the path of python then I added the MVCI path (which I ensured is the same as the unpacked files) I always end up with the same syntax error at line 419. I have both python 2.7 and 3.9 installed (reinstalled to ensure). any tips are much appreciated!

panzi commented 3 years ago

You're using an outdated Python version. You need to update to Python 3.7 or newer. If you say you have 3.9 installed, then your python.exe is probably version 2.7. Maybe there's a python3.exe in your %PATH%? Otherwise you need to give the full path to your Python 3.9 binary. Something like C:\Python39\python.exe or something. I don't use Windows.

CoIyn commented 3 years ago

omg man I spent so many days on this. thank you for answering me and I apologize for double posting I wasn't sure if it would send a notification on the other tab. it turned out to be that I did not realize python39 was installed in some super random location I had searched for it but couldn't find it oddly. Anyways massive thank you again for your help

CoIyn commented 3 years ago

hey there, so I was able to get 1 song to pack and work. but I have done the same process on about 5 other songs and process went smoothly and produces a pak file. Unfortunately when I place the .pak file into the ~mods folder it doesn't seem to play the new songs(it plays the default). any tips on why it may do that? I screenshot my steps in a word doc to attempt to show what I've done possibly I am making some sorta mistake? MusicFilesTests.docx

panzi commented 3 years ago

I haven't actually done any modding with this. Just wrote this for fun to poke around game archives and play the game music outside of the game.

You unpacked the game pak, replaced a song, packed it again and replaced the pak in the game installation folder?

CoIyn commented 3 years ago

gotcha, and yes.

panzi commented 3 years ago

Are you sure you replaced all occurrences of the song? I don't know anything more.