Announcement
Collapse
No announcement yet.
Pak File Loader Plugin
Collapse
X
-
Pangolin806 repliedHello,
I'm trying to load a simple level with the plugin but It does not work and I can't figured why. I've downloaded the sample project and It works well, however when I tried to reproduce it step by step (and building with the instructions described in the documentation) in my project in order to load a level, it seems like the loading failed but I have no error reported by the plugin (I've checked the output of "IsValidPakFile", "MountPakFile" and "IsPackagedBuild" and all of the of them returns true). Does anyone have a solution or an idea to help ?Last edited by Pangolin806; 12-09-2019, 12:39 PM.
Leave a comment:
-
UnrealEngine_熊大 repliedOriginally posted by BlueMountainsIO View PostNo idea what went wrong there. The message says there are invalid characters ":"?
Leave a comment:
-
BlueMountainsIO repliedNo idea what went wrong there. The message says there are invalid characters ":"?
Leave a comment:
-
UnrealEngine_熊大 repliedD:\test\PAKTEST\Plugins\TestDLC\Saved\StagedBuilds\WindowsNoEditor\PAKTEST\Plugins\TestDLC\Content\Paks\WindowsNoEditor
this is too long,what can i do ?
Leave a comment:
-
MagicBots repliedOriginally posted by BlueMountainsIO View PostMagicBots
Sorry for the late reply. I can look into making the logging available to packaged development builds as well.
Glad that you have it got working. Good question to what happens when there you mount paks that have files that already exist. I think that the last mounted pak would win. Maybe a rescan of the ModPlugin/ path would work.
I'd rather scan by root path as it seems more efficient.. Would you know how to solve the unknown root for plugin root paths packaged outside of where the main game is packaged problem? Not sure how to properly register root in this case. I guess maybe that ModSkeleton setup is doing it but I couldn't get it working.Last edited by MagicBots; 10-01-2019, 02:33 AM.
Leave a comment:
-
BlueMountainsIO repliedMagicBots
Sorry for the late reply. I can look into making the logging available to packaged development builds as well.
Glad that you have it got working. Good question to what happens when there you mount paks that have files that already exist. I think that the last mounted pak would win. Maybe a rescan of the ModPlugin/ path would work.
Leave a comment:
-
MagicBots repliedBlueMountainsIO I was wondering if it's a necessary requirement to package for shipping for this to work, and if so why? Past experiments I'd done with paks, had them working fine when packaging for development. I know there is the loghelper you've provided for logging when packaging in shipping mode, but for other reasons i was wanting to have it work packaged for development as well. I've tested PakLoader with development mode and it all seems to work the same for me as i can tell so wanted to check.
Also mounting and registering are both working for me at Engine level ../../../ as was suggested, however I'm mounting multiple paks into the same mount root /ModPlugin/, and the AssetRegistry.bin that I'm reading won't update registry since the AssetRegistry.bin file always has the same path. Is there a way to have the AssetRegistry.bin append to the existing registry at the mountroot?
Essentially I have a whole bunch of small paks with a few files in them that I want to mount and register beneath the same root each time.. But the AssetRegistry.bin won't register because there was already an existing one at the path for that mount root ( it seems ). Not sure how to solve this. If I don't read in AssetRegistry.bin then I have to spawn them with your getpakfilestaticmesh in order for the registry to know about them. What I'm seeing currently is the first AssetRegisty.bin I read updates the registry and the rest don't update so i'm stuck with the registry only knowing about the first one..
My asset AssetRegistry.bin in all of my small paks is always at:
Pod/Plugins/ModPlugin/AssetRegistry.bin
Is there a way I can manually add the object paths mounted from the pak to the registry object by object instead of serializing the AssetRegistry.bin?
EDIT:
Nevermind I got it registering!Last edited by MagicBots; 09-26-2019, 07:45 PM.
Leave a comment:
-
Rareden repliedMagicBots
Need a extra / at the end there,
The code line is simply this
Code:// Add the base path to the file list array so the mount point is correct and assets can be accessed through /Game/ FileList.Add(TEXT(".. / .. / .. /"));
Leave a comment:
-
Rareden repliedOriginally posted by BlueMountainsIO View PostSnip
I had to Append the" ../../../" into the response file array as a individual index to get the unrealPak to have the mount point as "../../../" in case anyone else runs into the problem too
Leave a comment:
-
MagicBots repliedOriginally posted by BlueMountainsIO View PostRareden
@MagicBots
I would assemble the pak so it looks like this.
Mount point: ../../../
"Pod/Plugins/ModPlugin/Content/Cube.uasset"
"Pod/Plugins/ModPlugin/Content/M_Cube.uasset"
etc.
Then your RootPath is "/ModPlugin/" and your ContentPath is "../../../Pod/Plugins/ModPlugin/Content"
Pod\Plugins\ModPlugin\Content\Paks\WindowsNoEditor\ModPluginPod-WindowsNoEditor.pak" -List
LogPakFile: Display: Using command line for crypto configuration
LogPakFile: Display: Added 0 entries to add to pak file.
LogPakFile: Display: Mount point ../../../Pod/Plugins/ModPlugin/
LogPakFile: Display: "AssetRegistry.bin" offset: 0, size: 44 bytes, sha1: CC66D83CB38DE2F3A30822A68EB38A3865471816, compression: None.
LogPakFile: Display: "Metadata/DevelopmentAssetRegistry.bin" offset: 2048, size: 143066 bytes, sha1: A9820C94D2CDF676DD30655C61BBBC57E5E560DF, compression: None.
LogPakFile: Display: 2 files (143110 bytes), (0 filtered bytes).
LogPakFile: Display: Unreal pak executed in 0.003891 seconds
If i want to read the AssetRegistery with the .pak I create for my cube, do i add it with the same approach as content
(same mount points etc) or is there a different procedure?
For some reason I cannot get my packaging approach
for my mod plugin to include the content both the asset registry and the content.. So i'm having to manually pak the
content. Not sure why.
I suppose I can also manually pak the registry in with the content but maybe it's better to keep
them separate if the registry needs a different rootPath and contentPath generally..?Last edited by MagicBots; 09-14-2019, 01:40 AM.
Leave a comment:
-
BlueMountainsIO repliedRareden
That's a really strange pak layout. If you want the assets to be available in /Game then this will work (Tested and it works):
Pak File layout:
"ModProject": Name of the Unreal project. All content is from /Game
Mount point must be ../../../
Mount with the Pak Loader plugin:
MountPakFile("D:\MyGamePak.pak", "")<- Leave the mount point parmeter empty (mount point from the pak will be used which is ../../../)
RegisterMountPoint("/Game/", "../../../ModProject/Content/") <- RootPath and ContentPath.
(Optional) LoadPakAssetRegistryFile("../../../ModProject/AssetRegistry.bin")
Now you can load assets like this: GetPakFileStaticMesh("/Game/Tents/Meshes/SM_Tent")
@MagicBots
I would assemble the pak so it looks like this.
Mount point: ../../../
"Pod/Plugins/ModPlugin/Content/Cube.uasset"
"Pod/Plugins/ModPlugin/Content/M_Cube.uasset"
etc.
Then your RootPath is "/ModPlugin/" and your ContentPath is "../../../Pod/Plugins/ModPlugin/Content"
Leave a comment:
-
MagicBots repliedOriginally posted by Cytokinetik View PostI need to fork/update repo the correct way still, but here is ModSkeleton for 4.22:
https://drive.google.com/open?id=1Fx...Pwv5oOP0cQx7t2
If you setup the 2 package profiles correctly it should work, I changed the .bat file because it did not have the correct filename to copy the .pak properly.
Cooking should not fail, only gives warnings because it thinks it needs those references but it does not. You should also be able to access the AssetRegistry from within the modpak at runtime with the PakLoader plugin...
Leave a comment:
Leave a comment: