Steam Deck

Steam Deck

Tellic Jun 30, 2023 @ 3:42am
Mods and '.pak' Files on SteamDeck
I can manually install mods for Dying Light 2 - so I have explored the file system and no where to put modified .pak files I downloaded.

But I'd like to actually edit the files myself - on the steamdeck desktop - let's assume I don't have access to a Windows PC at the moment.

I have tried using PeaZip - but it doesn't want to allow me to edit files in 'pak' archives directly - only 'zip' files. It can explore, and extract 'pak' files, but can not edit, or create, or convert to them.

I looked at an online ezyzip website, but the conversion of zip to pak does not work.

I can't find any info about opening/creating/converting with the 'tar' command line option.

Does anyone have a way of editing game 'pak' files in the Steamdeck linux system?

Am I missing something obvious? :steamfacepalm:
< >
Showing 1-8 of 8 comments
ReBoot Jun 30, 2023 @ 7:52am 
What program would you use on Windows?
Tellic Jun 30, 2023 @ 9:00am 
Tricky, as I don't have access to my old PC - but I know I edited this particular mod/hack myself last year, rather than downloading it. I think I either used 7Zip, or maybe WinRAR.

I know I can get command line 7Zip for Linux - maybe I'll try and explore it's command line options a bit more... (I don't think there is a 7Zip gui for Linux?)

I tried just creating a standard archive with the 'tar -cvf ...' command. The game warned me about mods, but it didn't actually work.

Still - any other suggestions are welcome :steamhappy:
RSebire Jun 30, 2023 @ 10:41am 
WinRar for Linux

Installing WinRAR CLI, or rar on Linux is pretty straightforward. It's available in most Linux distro's official repositories and you can install it using the default package manager. On Ubuntu and other Debian-based distros, run: sudo apt install rar To install rar on Arch Linux: sudo pacman -S rar
Tellic Jun 30, 2023 @ 11:05am 
I figured out a method - which is a little long winded, but works.

Tools required - you can probably do this all with 7zip if you explore the command line options, but I used PeaZip for parts as it is a GUI and easier:

1.) 7zip command line tool - google how to install it or check link here:
Reddit Discussion

2.) PeaZip - a GUI archive tool that can be installed from the Operating System's Discover application

I created a folder in my /Home/Documents/ directory, called DL2 - so most of the copying and editing and renaming was inside my /Home/Documents/DL2/ folder. This was my working folder.

I copied the data0.pak file from the game directory '.../Dying Light 2/ph/source/' in to my working directory.

I used PeaZip to open the data0.pak file in my working directory and extract 4 files from it, as detailed below.

For this example, I wanted to modify the following 4 files inside the archive '.../Dying Light 2/ph/source/data0.pak' :
- scripts/player/player_variables.scr
- scripts/player/player_variables_easy.scr
- scripts/player/player_variables_hard.scr
- scripts/player/player_variables_nightmare.scr

Once I had these 4 files extracted - I put them inside a folder structure that was similar to the .pak file archive structure.

So I had the 4 following files:
Home/Documents/DL2/scripts/player/player_variables.scr
Home/Documents/DL2/scripts/player/player_variables_easy.scr
Home/Documents/DL2/scripts/player/player_variables_hard.scr
Home/Documents/DL2/scripts/player/player_variables_nightmare.scr

I edited all 4 files in a text editor - changing the value for 'MeleeWpnDurabilityMulReduce' to 0.0 in all 4 cases.

I also had the original data0.pak file inside Home/Documents/DL2/.

I renamed the data0.pak in my working directory to data2.pak.

I opened the renamed data2.pak file in PeaZip once again - PeaZip allowed me to navigate to the 4 files above inside the archive and DELETE them from the .pak file. So the data2.pak file was now identical to the games data0.pak file but missing these 4 files.

I then opened a command line inside the working directory Home/Documents/DL2/ where the data2.pak file was and the 4 files under the scripts/player/ folder.

I then executed the following command:

7z u data2.pak scripts/player/*.scr

This successfully reported that it had kept a lot of the original data in the archive, and added 4 new files to it.

Checking inside data2.pak with PeaZip - the 4 files were now back inside the archive - but with versions I had edited.

Using the 'u' update method of 7Zip didn't seem to overwrite the files with 'updates' unless I deleted them from the archive first, and then allowed 7Zip to add them back in again - maybe there is another flag to force 7Zip to overwrite existing archive files - but this method works OK.

Then I copied the data2.pak file back in to the game directory and ran the game.

It warned me that game data had been modified - and my weapons are nice and durable again.


Anyway, this works - but if there's a much simpler method, or nice GUI app that lets you do it all in one place, then please let me know.
Tellic Jun 30, 2023 @ 11:15am 
Originally posted by RSebire:
WinRar for Linux

Installing WinRAR CLI, or rar on Linux is pretty straightforward. It's available in most Linux distro's official repositories and you can install it using the default package manager. On Ubuntu and other Debian-based distros, run: sudo apt install rar To install rar on Arch Linux: sudo pacman -S rar

Thanks for the suggestion, but 'target not found: rar' - I guess I'd have to add the distro as a precursor step or something...

Anyway, as a CLI solution, I think 7Zip could probably do all the steps I mentioned above. But GUI's make it easier for thicko gamers like me!
RSebire Jul 1, 2023 @ 8:45am 
Good on you for sharing.

Rar list's a flat pack on their website.
I would assume you add it to "other sources" in dolphin file manager so you are not just limited to the discover app source.

Kudos on you for getting it done.
Peace
The Steam Deck is legitimately a hand held Linux Computer. You can mod anything you like so long as there is a modding community for any given title you wish to mod.
Aawesom Aug 3, 2024 @ 3:34pm 
Wasn't able to extract .pak from Steam Workshop with rar, unrar, 7z, p7zip and unzip.
< >
Showing 1-8 of 8 comments
Per page: 1530 50

Date Posted: Jun 30, 2023 @ 3:42am
Posts: 8