I made a build of my project and everything under the .\Content folder was compressed into a pak file under .\Content\Paks
Say I got an asset located under
of course, now that it is built, that asset resides in the pak file.
Is there a way to override that file, eg by placing a plain .uasset file inside the .\Content folder, to match the original filename and location?
Or any other way to do so?
You can make another pak file, containing only the replacement assets, and place it in the same folder. It just needs to have an _p on the end of the name.
See the patching docs for more information:
Thank you for a good link. I had not thought about “patches”
But for the sake of options of how things can be done, I’d like to ask if it’s possible to manually create a *_p.pak file. Just like when you create a new ZIP or RAR file.
Is this possible?
I tried UnrealPak.exe but the .uasset always ended up in the root folder.
Another test with UnrealPak put the .uasset in the right place but included lots of other stuff (eg engine-folder etc) that I didn’t want. I just needed to swap out one texture file.
I think it probably is possible with UnrealPak.exe, but I’m afraid I don’t know how. This is uncharted ( and poorly documented ) territory…
EDIT: Thinking about this a bit more, it may not be possible to make a pak file with a single asset in it. I think you probably have to sling everthing that comes up in the references viewer also…
I finally managed to solve the patching. In short, I made a profile for the main release, then a profile for patching, so that it checks what changed and gives me a _p file.
If we take a different turn from here and talk about modding.
Can you prevent the usage of a _p.pak file?
You would need to edit the engine code to change that, I think…
Althoug, you could remove the pak file from within the game if certain conditions were not met.
I doubt I would need to edit the engine code to be using a patch file or overriding assets inside a pak file with a _p.pak file. Or maybe I misunderstood you?
Removing a pak file isn’t an option either. The main pak file contains the whole game, basically.
If there is no more info to add, I will accept the first answer which in a way is useful info in how to patch something you have access to, and then I will open a new question regarding pure modding, ie have no access to the game project.
I don’t know if there’s a flag to stop the loading of a patch file. Problem is, even if there is, they can just use ‘unrealpak.exe’ to use the patch without your consent.
You can encrypt the pak files. Problem is, someone can just load the engine in the debugger and find the section that does the decryption, which gives them the key.
So, editing the engine code is a good way to stop that, because they can’t possibly have the source code to debug it.
EDIT: You can also do mods as a plugin, which you can provide as DLC ( downloadable content ). Another way to prevent tampering, to some extent.