DLC broken asset references

Hello everybody!

I’m trying to design DLC system for my game project. Seems like “Build DLC” checkbox at Project Launcher window has a strange behavior.
I followed Tom Loomans tutorial and it works. But:

  1. For this DLC system to work DLC content plugin has to be enabled at project build time. I.e. game knows that there is /DLC root path (for example), and loads contents from /DLC when corresponding pak-file is present. I need to ship DLC paks after release, so this method is not suitable;
  2. When I build DLC, then disable plugin and build main project, game doesn’t knows about /DLC root path and can’t find any assets even if DLC pak-file is present at Content/Paks directory.

After reading this question, this thread and many other more or less useful articles I decided to create DLC pak-files manually. So I created paklist.txt:

"C:\svn\ue4_interactive_wall_bp\trunk\Plugins\DLC\Saved\Cooked\WindowsNoEditor\interactive_wall\Plugins\DLC\Content\mymap.umap" "../../../interactive_wall/Content/DLC/MyDlc/mymap.umap" -compress
"C:\svn\ue4_interactive_wall_bp\trunk\Plugins\DLC\Saved\Cooked\WindowsNoEditor\interactive_wall\Plugins\DLC\Content\asdf.uasset" "../../../interactive_wall/Content/DLC/MyDlc/asdf.uasset" -compress

makemod.bat:

@echo off

unrealpak c:\svn\ue4_interactive_wall_bp\trunk\Plugins\DLC\mod.pak -create=c:\svn\ue4_interactive_wall_bp\trunk\Plugins\DLC\paklist.txt

pause

Batch file makemod.bat makes pak-file mod.pak, which I place at Content/Paks directory of built game.
My DLC contains simple map - mymap.umap, and simple blueprint actor - asdf.uasset, which I place on map.
Engine loads additional pak-files on start, and my configuration is Development, so I can just load map from console:

>open mymap

Map loads, but my custom blueprint actor doesn’t. Corresponding log messages are:

[2016.06.06-07.40.30:824][  0]LogWorld: Bringing World /Game/Levels/Default.Default up for play (max tick rate 0) at 2016.06.06-14.40.30
[2016.06.06-07.40.30:824][  0]LogWorld: Bringing up level for play took: 0.002053
[2016.06.06-07.40.30:825][  0]LogSpawn:Warning: SpawnActor failed because no class was specified
[2016.06.06-07.40.30:827][  0]LogPackageName:Error: DoesPackageExist: DoesPackageExist FAILED: '/DLC/asdf' is not a standard unreal filename or a long path name. Reason: Path does not start with a valid root. Path must begin with: '/Engine/', '/Game/', '/Config/', '/Script/', or '/Temp/'
[2016.06.06-07.40.30:827][  0]LogLinker:Warning: Can't find file '/DLC/asdf'
[2016.06.06-07.40.30:827][  0]LogUObjectGlobals:Warning: Failed to load '/DLC/asdf': Can't find file '/DLC/asdf'
[2016.06.06-07.40.30:827][  0]LogPackageName:Error: DoesPackageExist: DoesPackageExist FAILED: '/DLC/asdf' is not a standard unreal filename or a long path name. Reason: Path does not start with a valid root. Path must begin with: '/Engine/', '/Game/', '/Config/', '/Script/', or '/Temp/'
[2016.06.06-07.40.30:827][  0]LogLinker:Warning: Can't find file for asset '/DLC/asdf' while loading NULL.
[2016.06.06-07.40.30:827][  0]LogUObjectGlobals:Warning: Failed to load '/DLC/asdf': Can't find file for asset '/DLC/asdf' while loading NULL.
[2016.06.06-07.40.30:827][  0]LogPackageName:Error: DoesPackageExist: DoesPackageExist FAILED: '/DLC/asdf' is not a standard unreal filename or a long path name. Reason: Path does not start with a valid root. Path must begin with: '/Engine/', '/Game/', '/Config/', '/Script/', or '/Temp/'
[2016.06.06-07.40.30:845][  0]LogLoad: Took 1.872960 seconds to LoadMap(/Game/Levels/Default)
[2016.06.06-07.40.30:845][  0]LogInit:Display: Game Engine Initialized.
[2016.06.06-07.40.31:459][  0]LogLoad: Full Startup: 5.36 seconds (BP compile: 0.00 seconds)
[2016.06.06-07.40.31:459][  0]LogExternalProfiler: Found external profiler: VSPerf
[2016.06.06-07.40.31:459][  0]LogExternalProfiler: Using external profiler: VSPerf
[2016.06.06-07.40.31:477][  0]LoadErrors:Warning: Warning CreateExport: Failed to load Outer for resource 'DefaultSceneRoot': asdf_C /Game/DLC/MyDlc/mymap.mymap:PersistentLevel.asdf_368
[2016.06.06-07.40.31:478][  0]LoadErrors:Warning: Warning CreateExport: Failed to load Outer for resource 'Cube': asdf_C /Game/DLC/MyDlc/mymap.mymap:PersistentLevel.asdf_368

,

[2016.06.06-07.40.35:919][229]LogNet: Browse: /Game/DLC/MyDlc/mymap
[2016.06.06-07.40.35:920][229]LogLoad: LoadMap: /Game/DLC/MyDlc/mymap

and

[2016.06.06-07.40.35:959][229]LogPackageName:Error: DoesPackageExist: DoesPackageExist FAILED: '/DLC/asdf' is not a standard unreal filename or a long path name. Reason: Path does not start with a valid root. Path must begin with: '/Engine/', '/Game/', '/Config/', '/Script/', or '/Temp/'
[2016.06.06-07.40.35:959][229]LogLinker:Warning: Can't find file '/DLC/asdf'
[2016.06.06-07.40.35:959][229]LogUObjectGlobals:Warning: Failed to load '/DLC/asdf': Can't find file '/DLC/asdf'
[2016.06.06-07.40.35:959][229]LogPackageName:Error: DoesPackageExist: DoesPackageExist FAILED: '/DLC/asdf' is not a standard unreal filename or a long path name. Reason: Path does not start with a valid root. Path must begin with: '/Engine/', '/Game/', '/Config/', '/Script/', or '/Temp/'
[2016.06.06-07.40.35:959][229]LogLinker:Warning: Can't find file for asset '/DLC/asdf' while loading NULL.
[2016.06.06-07.40.35:959][229]LogUObjectGlobals:Warning: Failed to load '/DLC/asdf': Can't find file for asset '/DLC/asdf' while loading NULL.
[2016.06.06-07.40.35:959][229]LogPackageName:Error: DoesPackageExist: DoesPackageExist FAILED: '/DLC/asdf' is not a standard unreal filename or a long path name. Reason: Path does not start with a valid root. Path must begin with: '/Engine/', '/Game/', '/Config/', '/Script/', or '/Temp/'
[2016.06.06-07.40.35:993][229]LogAIModule: Creating AISystem for world mymap
[2016.06.06-07.40.37:766][229]LogWorld: Game class is 'BP_GameMode_C'
[2016.06.06-07.40.37:768][229]LogWorld: Bringing World /Game/DLC/MyDlc/mymap.mymap up for play (max tick rate 0) at 2016.06.06-14.40.37
[2016.06.06-07.40.37:768][229]LogWorld: Bringing up level for play took: 0.000585
[2016.06.06-07.40.37:769][229]LogSpawn:Warning: SpawnActor failed because no class was specified
[2016.06.06-07.40.37:778][229]LogLoad: Took 1.858383 seconds to LoadMap(/Game/DLC/MyDlc/mymap)
[2016.06.06-07.40.37:781][230]LoadErrors:Warning: Warning CreateExport: Failed to load Outer for resource 'DefaultSceneRoot': asdf_C /Game/DLC/MyDlc/mymap.mymap:PersistentLevel.asdf_368
[2016.06.06-07.40.37:781][230]LoadErrors:Warning: Warning CreateExport: Failed to load Outer for resource 'Cube': asdf_C /Game/DLC/MyDlc/mymap.mymap:PersistentLevel.asdf_368

It looks like engine expects assets to exist at path /DLC and can’t load them because pak mounts at /Game/ root directory, so references are broken in this case.

I think i need to fix those references somehow, already had look at FArchiveReplaceObjectRef, but seems like nobody on earth knows right way to use it.
Another way would be mount pak-file to its native mount point, I tried FCoreDelegates::OnMountPak, FPakPlatformFile, etc with no success.

Can anybody help me or at least point in the right direction?

I’m sorry for my bad english, it isn’t my native language.

Hello,

Take a look at this Answerhub post: Disabling plugins forbids dlc packaging - Plugins - Unreal Engine Forums

It’s not exactly the same issue you’re running into, but it is similar enough that the user’s solution may be a good starting point for us to attempt to resolve the issue that you’re having. Have you tried starting over with a clean project that never had that plugin enabled and seeing if you still are seeing the same errors?

Have a great day

Hello, thank you for an answer!
I’ve already took a look at this post. The problem is that issue occurs with every project i tried, even when i try to build Tom Loomans WORKING code sample by myself. Anyway I’ll try to start from scratch using UE 4.9.2, 4.10 and 4.12.1 (4.12 is updating now, would be 4.12.1 I think) and post my results.

P.S. I did small research yesterday, was mistaken about “engine expects assets to exist at path /DLC”. In my case, when I enable plugin, game pak-file contains reference to .uplugin file, pak-file for which I need to ship later. May be there is a way to ship dlc.uplugin with dlc.pak?

At first, steps to reproduce my original problem with DLC:

  1. Create first person template project;

  2. Add content plugin (as in this tutorial);

  3. Add map to plugin’s Content folder;

  4. Create launch profiles (as in this tutorial);

  5. Ensure plugin is enabled;

  6. Launch Game profile;

  7. Launch DLC profile;

  8. Launch game from StagedBuilds folder;

  9. Press ‘~’ and execute ‘open map_name’;

  10. Map loads even if plugin’s pak-file wasn’t copied to game Content/Paks folder;

  11. Disable plugin;

  12. Launch Game profile again;

  13. Rename and copy DLC pak-file to game Content/Paks folder;

  14. Launch game from StagedBuilds folder;

  15. Press ‘~’ and execute ‘open map_name’;

  16. Map doesn’t load.

Here is test project for reproduction (UE 4.12.1, for 4.10.4 result is the same).

After looking at Tom Looman’s DefaultEngine.ini I’ve added these lines:

[AllMaps]
+Map=/Game/FirstPersonCPP/Maps/FirstPersonExampleMap

to my DefaultEngine.ini. For 4.12.1 DLC stopped working in all cases (map doesn’t load). For 4.10.4, if plugin is enabled, it works as expected - map loads with DLC pak-file, doesn’t load without DLC pak-file. Plugin still has to be enabled at build time. If plugin is disabled at build time, map from DLC pak-file doesn’t load.

Am I doing things wrong, or may be I misunderstood whole concept of DLC as content shipped AFTER build?

Anyway I’ll try approach with manually created pak-files and post results later.

So i tried to start over with clean project. I couldn’t test with 4.9.2 because it requires VS 2013. Still the same error with both 4.10.4 and 4.12.1.

  1. Create launch profiles if missing;

  2. Launch game profile;

  3. Launch DLC profile;

  4. Go to Plugins/DLC folder, change paths in makemod.bat and paklist.txt, if necessary;

  5. Run makemod.bat;

  6. Save mod.pak for future use;

  7. Create new first person template C++ project (just wondering why BP projects wouldn’t build from project launcher);

  8. Launch game profile;

  9. Go to StagedBuilds/…/Content/Paks folder of new project and paste mod.pak file here;

  10. Launch game and execute ‘open dlclevel’ command.

  11. Level loads, but my custom actor from dlc wouldn’t be found, take a look at logs.

That’s it. For now I’m trying another approach - creating another project with the same name as main project, stripping unnecessary content, build it and use it’s pak-file. At this moment it is most useful approach I’ve tried (map loads, no broken references etc), but it still has problems with using the same plugins as main project.

Hello,

Sorry for the delay.

By looking at your error, it is possible that we don’t allow /DLC/ as a root, for “DLC” we use /Plugins/ as the root.

Are you trying to make your own Root instead of using GameProject/Plugins?

Another thing that you could be doing is referencing content in /Game/DLC, a folder that may not be part of your base-game cook, but is part of your /Plugin/XX reference list (plugins should only reference any unchanged base-game data OR their own self-contained data in their /Plugins/XX folder.

Let me know if that helps.

Hello, thank you for answer. When I use “dlc” checkbox for FPS template project and simple DLC plugin with only one map, root path for DLC map is “/DLC”. I check this with following piece of code:

for (auto desc : descriptions)
	{
		FStringAssetReference assetRef(desc);
		assetRef.TryLoad();
		if (auto resolved = assetRef.ResolveObject())
		{
			GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Red, TEXT("RESOLVED ") + desc);
		}
		else
		{
			GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Red, TEXT("FAILED TO RESOLVE ") + desc);
		}
	}

I checked /Plugins/DLC/, /DLC, /Plugins/DLC/Content etc. Only /DLC is working.

When I make game with DLC plugin enabled (UE 4.10.4), game pak file already contains DLC level (i.e. no need to make DLC separately - you can simply type “open dlc_level” and it will be open) at /DLC root path (where DLC is plugin name). When I disable plugin at game build time, then enable plugin and build it, then copy dlc pak-file to game Content/Paks directory - map cannot be loaded with “open dlc_level”, and when I try load asset manually logs says that /DLC is incorrect root folder.
This is the reason that I started making pak-files by hand changing their root folder to /Game/DLC in order to be able to load them.

Anyway I moved away from this approach, more interesting thing is how to make standard UE DLC system work, because for UE 4.12.3 it is not working at all, whether I enable or disable plugin at game build time map does not load.

May be it will be better to ask another question? Problem with broken asset references no longer matters for me.

To prove my words for /DLC root path I provide part of plugin’s CookedAssetRegistry.json:

{
	"SourcePackageName": "/DLC/dlc_level",
	"CookedPackageName": "C:/dlc_test/dlc_test/Plugins/DLC/Saved/Cooked/WindowsNoEditor/dlc_test/Plugins/DLC/Content/dlc_level.umap",
	"CookedPackageTimeStamp": "2016.06.22-06.10.26",
	"FileSize": "73463",
	"AssetData": [
		{
			"ObjectPath": "/DLC/dlc_level.dlc_level",
			"PackageName": "/DLC/dlc_level",
			"PackagePath": "/DLC",
			"GroupNames": "None",
			"AssetName": "dlc_level",
			"AssetClass": "World",
			"TagsAndValues":
			{
				"FiB": "",
				"DateModified": "6/7/16",
				"MapFileSize": "40.709 kB"
			}
		}
	]
},

Hello,

Based on your previous comment, it appears that you are no longer having the issue with the broken asset references. If you are experiencing a new issue, please create a new Answerhub thread so we can assist you separately.

If this is the same issue, please let us know how we can reproduce it on our end, as we have been unable to do so at this time.

Have a great day

Hi alexbereznikov,I found the same question with you , but I couldn’t see the makemod.bat and paklist.txt file in the Plugins/DLC folder as your said.I test with 4.12.5.

Hello! Unfortunately, I can’t help you - seems like file hosting removed my file, and I am working with other project now. Here is sample paklist.txt file:

"C:\svn\ue4_interactive_wall_bp\trunk\Plugins\DLC\Saved\Cooked\WindowsNoEditor\interactive_wall\Plugins\DLC\Content\mymap.umap" "../../../interactive_wall/Content/DLC/MyDlc/mymap.umap" -compress
"C:\svn\ue4_interactive_wall_bp\trunk\Plugins\DLC\Saved\Cooked\WindowsNoEditor\interactive_wall\Plugins\DLC\Content\asdf.uasset" "../../../interactive_wall/Content/DLC/MyDlc/asdf.uasset" -compress

and makemod.bat file:

 @echo off
 
 unrealpak c:\svn\ue4_interactive_wall_bp\trunk\Plugins\DLC\mod.pak -create=c:\svn\ue4_interactive_wall_bp\trunk\Plugins\DLC\paklist.txt
 
 pause

I’ve posted them in original question. I don’t know issue you’re facing, we have downgraded our project to 4.10.4 version, where dlc works (a little). You can have, for example, 10 empty dlc plugins enabled (dlc_1, dlc_2, etc) at the build time. Then, when you need to ship a dlc, put your content to next empty dlc plugin (dlc_2, for example), and build it against release version, then ship - for me it works ONLY this way and ONLY for 4.10.4 - seems like something went bad in later versions.

Good luck, have fun :slight_smile:

Hello,
I having the issue with the broken asset references. Do you have some demo,or experience help me? I willl very grateful to you!

Could you describe in more detail what the issue is that you are experiencing, and provide any related code?

Are you getting specific error messages? If so please provide these as well.