Pak Files as Patches

I’ve read a few posts on here talking about using .pak files as patches and I’d like a little more light shed on that.

  1. I’ve tried placing a pak file, with the same directory structure as the original pak, into the paks folder with an updated file and it doesn’t seem to affect the game as intended. This is a Blueprint that I’m testing with.
  2. Where are custom plugin dlls stored in packaged games? Are they part of the executable?
  3. Trying to plan a launcher/updater for our game. Is it possible to write such a thing using the engine source, much like a lot of the tools are?
  4. If we don’t want to expand the install size of the game by having multiple copies of files over multiple pak files is it possible to include UnrealPak or something like it to extract, copy the new files on top of the old ones, and repackage the pak file?

First of all, patched .pak files is something we are definitely planning on supporting, but haven’t gotten to it yet. In fact, I just put it in my Trello column yesterday (this is not in the public one yet).

  1. The patch file would need to come first, so try making patch file first alphabetically.

  2. Depends on the platform/configuration. Win64 editor builds, they are DLLs in the plugins directory. For basically everything else, they are static libs that get compiled into the executable.

  3. You could make a launcher in Slate

  4. UnrealPak doesn’t currently unpak back into source files. I don’t know of any plans to add that, but it shouldn’t be too hard, I’d imagine!

Josh

  1. Naming the patch so it came first alphabetically didn’t work either. I’ve made sure that the patch exists on both the server and the client as well.
  2. Perfect, so patching any plugins will happen when patching the executable. One less thing to worry about!
  3. I’ll have to take a look at Slate then. I’d rather have an all in one solution. It’s this or nodejs-webkit since we’ll be building our UI using Coherent.
  4. What about the blueprints? When I extract a pak I do see .uasset files, are those different than the ones found in the Content folder of my project?
  1. Do you see it at least mounting multiple .pak files? May want to log something out.
  2. Have you run SlateViewer? It gives an idea of a standalone Slate app.
  3. Blueprints are just uassets like textures, etc. Nothing special.

Hi overlawled ,
We did not hear back from you in response to this issue, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.

Heya, has there been anu update in this regard?

If you look in IPlatformFilePak.cpp it shows you the order that the pak files will be in.

// hardcode default load ordering of game main pak -> game content -> engine content -> saved dir
			// would be better to make this config but not even the config system is initialized here so we can't do that
			uint32 PakOrder = 0;
			if (PakFilename.StartsWith(FString::Printf(TEXT("%sPaks/%s-"), *FPaths::GameContentDir(), FApp::GetGameName())))

Which basically means that the .pak file in the content/paks folder that starts with the name of your project (i.e. the main pak file for the game) will be first. You can get around that by making sure your new .pak starts with the name of your game, but still comes first alphabetically (if that makes sense), or alternatively, make sure your new .pak ends with “_P.pak”, which is what it checks for when loading patches.

(This is looking at 4.8)