Hi,
I'm currently working on a project for the game "Squad" (UE4) that requires me to extract the tree shown in the "World Outliner" in the Editor. Unfortunately, the directory tree generated by the exporter tool does not match the World Outliner, as shown below:
World Outliner:

Directory tree generated by the exporter tool.
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 00-GBMain_4062
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 01-BP_CaptureZoneCluster
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 01-BP_CaptureZoneCluster.BP_CaptureZoneCluster_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 01-Hill24
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 01-Hill24.BP_CaptureZone_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02C-BP_CaptureZoneCluster
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02C-BP_CaptureZoneCluster.BP_CaptureZoneCluster_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02C-MineEntrance_8
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02C-MineEntrance_8.BP_CaptureZone_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02C-OPFortress
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02C-OPFortress.BP_CaptureZone_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02E-BP_CaptureZoneCluster
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02E-BP_CaptureZoneCluster.BP_CaptureZoneCluster_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02E-Hill13
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02E-Hill13.BP_CaptureZone_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02E-MineEntrance
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02E-MineEntrance.BP_CaptureZone_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02W-BP_CaptureZoneCluster
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02W-BP_CaptureZoneCluster.BP_CaptureZoneCluster_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02W-OPFortress
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02W-OPFortress.BP_CaptureZone_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02W-Ridgeline
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 02W-Ridgeline.BP_CaptureZone_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 03C-AmmoHill
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 03C-AmmoHill.BP_CaptureZone_C
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 03C-BP_CaptureZoneCluster
Fools_Road_RAAS_v1/Fools_Road_RAAS_v1/PersistentLevel/ 03C-BP_CaptureZoneCluster.BP_CaptureZoneCluster_C
...
I've been searching around the UEViewer source code for quite a while and tried to use the existing functions but I wasn't able to find out, e.g., that "01-Hill24" has parent "01-BP_CaptureZoneCluster".
UPackage::GetFullExportName generates the same structure:
char buf[2000] = {0};
pkg->GetFullExportName(Exp, buf, 2000, true, false);
appPrintf("- %s: %s\n",
*Exp.ObjectName,
buf);
...
- 01-Hill24: Fools_Road_RAAS_v1.PersistentLevel.01-Hill24
It seems that for these objects, "PackageIndex" refers not to the parent object in the World Outliner hierarchy but to the top-level element. I'm not too familiar with the internals of UE4 so I don't know why this is. I suspect that the World Outliner hierarchy is actually saved in a different place and does not reside with the actual objects. Unfortunately, I didn't have much luck sifting through the binary files and trying to find out which bytes meant what.
Am I missing an already implemented feature here or can anyone give me pointers as to where I could try my luck?
On a side-note: Is there up-to-date documentation on the file formats apart from the source code of UEViewer and UE4?
Best Regards
w4rum