Hey everyone,
TLDR – How can I get the asset registry to recognize data assets added by DLC or UGC? And, more broadly, how does Unreal Engine expect DLC, patches, UGC (User generated content), and additional content to be organized?
How can I make data assets work correctly such that data assets implemented in DLC, patches, or UGC are correctly referenced by the asset registry?
This is a problem I seem to be having with data assets primarily but also maps and other assets.(And apparently I can open DLC only levels without the DLC even being present. IDK how that even happened.)
What I’ve done to set up:
• Create a fresh FirstPerson project. • Create custom launch profiles for the base game, patching, and DLCs. (I believe UGC can be treated the exact same as plugin DLC.) • Create a test PrimaryDataAsset called “TestPrimaryAsset” that only has a “Name” variable. • Create a few data assets in the base game using “TestPrimaryAsset” and give them unique names. • Build the project and, from the ProjectLauncher, run a custom launch profile for the base game and make it version 1.0 • Create a new plugin called “TestDlc” that only contains a map and a data asset of type “TestPrimaryAsset” with the variable name, “TestDlcAsset”. • Run a custom launch profile for the Dlc from the ProjectLauncher. • Placed the created DLC .pak file into the \content\paks folder of the base game build. • At this point the game will successfully detect the .pak file and mount it but the content will not be in game (neither the data asset nor the map).
To test in the built project I use a console command to open the map added by the DLC. To test the data assets added by the DLC, I did a quick and dirty Ui that simply gets all the “TestPrimaryAsset_C” data assets the asset registry detects, runs the “Get Asset” node, and adds the “Name” variable to a Ui on the screen. Here is the quick and dirty test in BP:
This is how the built project SHOULD look. There are two data assets in the base game and one test data asset in the DLC.
However, in the built project, I only detect base game content. (Notice “TestDlcAsset” is missing from the screen.)
Checking the logs confirms that the Dlc .pak file was mounted properly.
I feel as if there is an assumption about the division and organization of the project I am missing in regards to cooking and building.
Eventually, I was able to get DLC paks working but that, in turn, DISABLED MAIN GAME CONTENT! To do this I:
1. Created a fresh project build WITHOUT the DLC plugins. 2. Restarted the editor and enabled the DLC plugins. 3. Ran a custom Launch profile for the base game – cooking version 1.0 4. Ran a custom launch profile for the DLC – cooking TestDlc using version 1.0 as a base 5. Replaced the base game .pak file in the \Content\Paks folder of the build. 6. Added the “TestDlc” .pak file to the same directory.
Notice that the base game assets are now missing. This is not the DLC method I’ve seen outlined elsewhere (methods that have not worked for me as of yet) but it was the only way I was able to get the base project build to even register the DLC-only data assets and maps.
Notes:
• I am testing this in 4.27. Are there any changes to the profiles in 5.0 as that is the version I am currently working from? I understand there are the new modular game features but I still need to know how the engine expects the files and profiles to be configured.
• I am testing this on a completely fresh FirstPerson project.
• I am trying to extend and work with base game functionality so that anyone with the editor can author content. (Data Assets, Uobjects, Actors, Systems).
• I’ve also been told it is impossible to stream in (not open) levels added through plugins – which doesn’t seem right. But I haven’t been able to stream a DLC-only map without the current map I’m in completely closing down.
• The log file for the built project confirms that the .pak file for the DLC has been found and successfully mounted – even when the content of the DLC is not available. In other words, I have never had a problem with the base game finding the .pak file for the DLC.
• I am using “Shipping” for build config. But I’ve noticed there is no difference in the game reading the .pak files between the configs I’ve tested.
• I have read the documentation on the asset registry, the asset manager, and read tutorials on this topic.
• This test was done with BP but the main project this test is for is mainly C++.
Here is the base game custom launch profile:
And here is the DLC custom launch profile:
Potential game design use examples of the DLC/UGC concept:
• Adding additional potions in DLC or a mod that can be referenced and appear in chests in the game world. (Potion_of_Might_Data_Asset added by MightDLC.) Or (Potion_of_Flying_Data_Asset added by CustomFlyingMod) • Adding weather types whose data is contained within a data asset. (Patching StormDataAsset for art direction reasons) (Adding Magic_Hurricane_Data_Asset in ExtendedWeathersMod) • Adding 100 weapon data assets added by BlacksmithDLC to Bandit inventories in the world.
All these use cases are very easy to implement even using the modular content features of 5.0. The difficulty is getting a build or asset manager to read and acknowledge the .pak files they are stored in.
Sorry for the novel, I just wanted to properly outline the issue.