├── .gitignore ├── CMakeLists.txt ├── CMakeSettings.json ├── mappings ├── fmodel │ ├── EnumMappings.json │ └── TypeMappings.json ├── jwp │ ├── classes │ │ ├── AthenaBackpackItemDefinition.json │ │ ├── AthenaCharacterItemDefinition.json │ │ ├── AthenaCosmeticMaterialOverride.json │ │ ├── AthenaDanceItemDefinition.json │ │ ├── AthenaGliderItemDefinition.json │ │ ├── AthenaItemWrapDefinition.json │ │ ├── AthenaLoadingScreenItemDefinition.json │ │ ├── AthenaMusicPackItemDefinition.json │ │ ├── AthenaPetCarrierItemDefinition.json │ │ ├── AthenaPickaxeItemDefinition.json │ │ ├── AthenaSkyDiveContrailItemDefinition.json │ │ ├── AttachedParticleComponentDef.json │ │ ├── CosmeticMetaTagContainer.json │ │ ├── CosmeticSetDataRow.json │ │ ├── CurveTableRowHandle.json │ │ ├── DataTable.json │ │ ├── DataTableCategoryHandle.json │ │ ├── DataTableRowHandle.json │ │ ├── DynamicVariantDef.json │ │ ├── EmoteMontageSwap.json │ │ ├── EmoteMontageVariantDef.json │ │ ├── FMaterialTextureVariant.json │ │ ├── FloatParticleParameter.json │ │ ├── FoleySoundVariant.json │ │ ├── FortAttributeInitializationKey.json │ │ ├── FortBannerTokenType.json │ │ ├── FortColorPalette.json │ │ ├── FortCosmeticCharacterPartVariant.json │ │ ├── FortCosmeticDynamicVariant.json │ │ ├── FortCosmeticFloatSliderVariant.json │ │ ├── FortCosmeticItemTexture.json │ │ ├── FortCosmeticMaterialVariant.json │ │ ├── FortCosmeticMeshVariant.json │ │ ├── FortCosmeticNumericalVariant.json │ │ ├── FortCosmeticParticleVariant.json │ │ ├── FortCosmeticProfileBannerVariant.json │ │ ├── FortCosmeticProfileLoadoutVariant.json │ │ ├── FortCosmeticRichColorVariant.json │ │ ├── FortCosmeticVariantPreview.json │ │ ├── FortCosmeticVariantPreviewElement.json │ │ ├── FortEmoteMapping.json │ │ ├── FortHeroType.json │ │ ├── FortItemCategory.json │ │ ├── FortItemQuantityPair.json │ │ ├── FortItemSeriesDefinition.json │ │ ├── FortLootPackageData.json │ │ ├── FortLootTierData.json │ │ ├── FortMtxDetailsAttribute.json │ │ ├── FortMtxGradient.json │ │ ├── FortMtxOfferData.json │ │ ├── FortMultiSizeBrush.json │ │ ├── FortPortableSoftParticles.json │ │ ├── FortRangedWeaponStats.json │ │ ├── FortRarityData.json │ │ ├── FortRarityItemData.json │ │ ├── FortTokenType.json │ │ ├── FortUICameraFrameTargetBounds.json │ │ ├── FortWeaponAdditionalData_SingleWieldState.json │ │ ├── FortWeaponMeleeDualWieldItemDefinition.json │ │ ├── FortWeaponMeleeItemDefinition.json │ │ ├── GameplayTag.json │ │ ├── ItemCategory.json │ │ ├── ItemCategoryMappingData.json │ │ ├── ItemTextureVariant.json │ │ ├── ItemTextureVariantDef.json │ │ ├── LoadoutVariantDef.json │ │ ├── ManagedParticleParamVariant.json │ │ ├── ManagedParticleSwapVariant.json │ │ ├── Margin.json │ │ ├── MarshalledVFXAuthoredData.json │ │ ├── MarshalledVFXData.json │ │ ├── MarshalledVFX_AuthoredDataConfig.json │ │ ├── MarshallerGliderPreset_C.json │ │ ├── Marshaller_CCPM_Preset_C.json │ │ ├── Marshaller_Glider_Preset_C.json │ │ ├── MaterialFloatVariant.json │ │ ├── MaterialInstanceBasePropertyOverrides.json │ │ ├── MaterialInstanceConstant.json │ │ ├── MaterialParameterInfo.json │ │ ├── MaterialParamterDef.json │ │ ├── MaterialTextureVariant.json │ │ ├── MaterialVariantDef.json │ │ ├── MaterialVariants.json │ │ ├── MaterialVectorVariant.json │ │ ├── McpVariantChannelInfo.json │ │ ├── MeshVariant.json │ │ ├── MeshVariantDef.json │ │ ├── MontageItemAccessData.json │ │ ├── MontageVisibilityData.json │ │ ├── PartVariantDef.json │ │ ├── ParticleParamterVariant.json │ │ ├── ParticleVariant.json │ │ ├── ParticleVariantDef.json │ │ ├── RichColorVariant.json │ │ ├── RichColorVariantDef.json │ │ ├── ScalableFloat.json │ │ ├── ScalarParameterValue.json │ │ ├── ScriptedActionVariant.json │ │ ├── SectionNameAndWeight.json │ │ ├── SlateBrush.json │ │ ├── SlateColor.json │ │ ├── SocketTransformVariant.json │ │ ├── SoundVariant.json │ │ ├── SoundWave.json │ │ ├── SoundWaveEnvelopeTimeData.json │ │ ├── SoundWaveSpectralDataEntry.json │ │ ├── SoundWaveSpectralTimeData.json │ │ ├── StaticParameterSet.json │ │ ├── StaticSwitchParameter.json │ │ ├── SubtitleCue.json │ │ ├── Texture2D.json │ │ ├── TextureParameterValue.json │ │ ├── Transform.json │ │ ├── VariantParticleSystemInitializerData.json │ │ ├── VariantSwapMontageData.json │ │ ├── VariantTypeMaterials.json │ │ ├── VariantTypeParticles.json │ │ ├── VariantTypeSounds.json │ │ ├── VectorParamVariant.json │ │ ├── VectorParameterValue.json │ │ └── VectorParticleParameter.json │ └── enums │ │ └── EFortRarity.json └── smart.usmap └── src ├── Enums ├── EAssetType.h ├── EBulkDataFlags.h ├── ECompressionMethod.h ├── ECurveTableMode.h ├── EDateTimeStyle.h ├── EExportFilterFlags.h ├── EFormatArgumentType.h ├── EIoChunkType.h ├── EIoContainerFlags.h ├── EIoStoreTocVersion.h ├── EMappedNameType.h ├── EObjectFlags.h ├── EPixelFormat.h ├── EPropertyType.h ├── ERichCurveInterpMode.h ├── ERichCurveTangentMode.h ├── ERichCurveTangentWeightMode.h ├── ERoundingMode.h ├── EStrippedData.h ├── ETextFlag.h ├── ETextHistoryType.h ├── ETransformType.h ├── EVirtualTextureCodec.h └── FIoStoreTocEntryMetaFlags.h ├── Exceptions └── BaseException.h ├── Exports ├── Serializer.cpp ├── Serializer.h ├── UCurveTable.h ├── UDataTable.h ├── UExport.h ├── UObject.h └── UTexture2D.h ├── Helpers ├── AES.h ├── Align.h ├── Compress.h ├── Decompress.h ├── Format.h ├── Hash.h ├── Stopwatch.h ├── oo2core_8_win64.lib └── oodle2.h ├── Properties ├── Array.h ├── AssetObject.h ├── Base.h ├── Bool.h ├── Byte.h ├── Delegate.h ├── Double.h ├── Enum.h ├── FieldPath.h ├── Float.h ├── Int.h ├── Int16.h ├── Int64.h ├── Int8.h ├── Interface.h ├── LazyObject.h ├── Lookup.h ├── Map.h ├── MulticastDelegate.h ├── Name.h ├── Object.h ├── Serializer.cpp ├── Serializer.h ├── Set.h ├── SoftObject.h ├── Str.h ├── Struct.cpp ├── Struct.h ├── Text.h ├── UInt16.h ├── UInt32.h ├── UInt64.h └── WeakObject.h ├── Providers ├── Base.h ├── Exporter.h ├── FunGames.h └── Smart.h ├── Streams ├── BaseStream.h ├── BufferStream.h ├── BufferedStream.h ├── FileStream.h ├── MemoryStream.h ├── Properties.h └── ZFileStream.h ├── Structs ├── FAESKey.h ├── FArc.h ├── FByteBulkData.h ├── FDateTime.h ├── FExportMapEntry.h ├── FFieldPath.h ├── FFormatArgumentValue.h ├── FFormatNamedArguments.h ├── FGameplayTagContainer.h ├── FGuid.h ├── FIntPoint.h ├── FIoChunkHash.h ├── FIoChunkId.h ├── FIoChunkOffsetAndLength.h ├── FIoContainerId.h ├── FIoDirectoryIndexEntry.h ├── FIoDirectoryIndexResource.h ├── FIoFileIndexEntry.h ├── FIoStoreTocCompressedBlockEntry.h ├── FIoStoreTocEntryMeta.h ├── FIoStoreTocHeader.h ├── FIoStoreTocResource.h ├── FLinearColor.h ├── FMappedName.h ├── FName.h ├── FNameEntryId.h ├── FNameEntrySerialized.h ├── FNumberFormattingOptions.h ├── FPackageId.h ├── FPackageIndex.h ├── FPackageObjectIndex.h ├── FPackageSummary.h ├── FRichCurveKey.h ├── FSHAHash.h ├── FScriptDelegate.h ├── FScriptObjectEntry.h ├── FSerializedNameHeader.h ├── FSimpleCurveKey.h ├── FSoftObjectPath.h ├── FStripDataFlags.h ├── FText.cpp ├── FText.h ├── FTextData.h ├── FTextHistory.h ├── FTexture2DMipMap.h ├── FTexturePlatformData.h ├── FUnversionedHeader.h ├── FVector2D.h ├── FVirtualTextureBuiltData.h └── FVirtualTextureDataChunk.h ├── ZContainer.h ├── ZExport.h ├── ZFile.h ├── ZFileTree.h ├── ZGame.h ├── ZGlobalData.h ├── ZNameMap.h ├── ZPackage.h └── ZSmallMap.h /.gitignore: -------------------------------------------------------------------------------- 1 | out/ 2 | .vs/ 3 | mappings/ 4 | src/main.cpp -------------------------------------------------------------------------------- /CMakeSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "x64-Debug", 5 | "generator": "Ninja", 6 | "configurationType": "Debug", 7 | "inheritEnvironments": [ "clang_cl_x64_x64" ], 8 | "buildRoot": "${projectDir}\\out\\build\\${name}", 9 | "installRoot": "${projectDir}\\out\\install\\${name}", 10 | "cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x64-windows", 11 | "buildCommandArgs": "-v", 12 | "ctestCommandArgs": "", 13 | "variables": [ 14 | { 15 | "name": "USE_BROTLI", 16 | "value": "True", 17 | "type": "BOOL" 18 | }, 19 | { 20 | "name": "USE_BROTLI_STATIC", 21 | "value": "True", 22 | "type": "BOOL" 23 | } 24 | ] 25 | }, 26 | { 27 | "name": "x64-RelDbg", 28 | "generator": "Ninja", 29 | "configurationType": "RelWithDebInfo", 30 | "buildRoot": "${projectDir}\\out\\build\\${name}", 31 | "installRoot": "${projectDir}\\out\\install\\${name}", 32 | "cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x64-windows", 33 | "buildCommandArgs": "-v", 34 | "ctestCommandArgs": "", 35 | "inheritEnvironments": [ "clang_cl_x64_x64" ], 36 | "variables": [] 37 | }, 38 | { 39 | "name": "x64-Release-MSVC", 40 | "generator": "Ninja", 41 | "configurationType": "Release", 42 | "buildRoot": "${projectDir}\\out\\build\\${name}", 43 | "installRoot": "${projectDir}\\out\\install\\${name}", 44 | "cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x64-windows", 45 | "buildCommandArgs": "-v", 46 | "ctestCommandArgs": "", 47 | "inheritEnvironments": [ "msvc_x64_x64" ], 48 | "variables": [] 49 | }, 50 | { 51 | "name": "x64-MinRel", 52 | "generator": "Ninja", 53 | "configurationType": "MinSizeRel", 54 | "buildRoot": "${projectDir}\\out\\build\\${name}", 55 | "installRoot": "${projectDir}\\out\\install\\${name}", 56 | "cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x64-windows", 57 | "buildCommandArgs": "-v", 58 | "ctestCommandArgs": "", 59 | "inheritEnvironments": [ "clang_cl_x64_x64" ], 60 | "variables": [] 61 | }, 62 | { 63 | "name": "x64-Release-Clang", 64 | "generator": "Ninja", 65 | "configurationType": "Release", 66 | "buildRoot": "${projectDir}\\out\\build\\${name}", 67 | "installRoot": "${projectDir}\\out\\install\\${name}", 68 | "cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x64-windows", 69 | "buildCommandArgs": "-v", 70 | "ctestCommandArgs": "", 71 | "inheritEnvironments": [ "clang_cl_x64_x64" ], 72 | "variables": [ 73 | { 74 | "name": "USE_BROTLI", 75 | "value": "True", 76 | "type": "BOOL" 77 | }, 78 | { 79 | "name": "USE_BROTLI_STATIC", 80 | "value": "True", 81 | "type": "BOOL" 82 | }, 83 | { 84 | "name": "USE_JSON", 85 | "value": "False", 86 | "type": "BOOL" 87 | } 88 | ] 89 | } 90 | ] 91 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/AthenaCosmeticMaterialOverride.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AthenaCosmeticMaterialOverride", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "ComponentName", 7 | "mapping_type": { 8 | "type": "NameProperty" 9 | } 10 | }, 11 | { 12 | "index": 1, 13 | "name": "MaterialOverrideIndex", 14 | "mapping_type": { 15 | "type": "IntProperty" 16 | } 17 | }, 18 | { 19 | "index": 2, 20 | "name": "OverrideMaterial", 21 | "mapping_type": { 22 | "type": "SoftObjectProperty" 23 | } 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/AthenaItemWrapDefinition.json: -------------------------------------------------------------------------------- 1 | {"name":"AthenaItemWrapDefinition","properties":[{"index":0,"name":"ItemWrapModifierBlueprint","mapping_type":{"type":"SoftObjectProperty"}},{"index":1,"name":"ItemWrapMaterial","mapping_type":{"type":"SoftObjectProperty"}},{"index":2,"name":"bIsShuffleTile","mapping_type":{"type":"BoolProperty"}},{"index":20,"name":"ObservedPlayerStats","mapping_type":{"type":"StructProperty","struct_type":"GameplayTagContainer"}},{"index":29,"name":"ItemPreviewActorClass","mapping_type":{"type":"SoftObjectProperty"}},{"index":50,"name":"Rarity","mapping_type":{"type":"EnumProperty","enum_type":"EFortRarity"}},{"index":58,"name":"bNeverPersisted","mapping_type":{"type":"BoolProperty"}},{"index":64,"name":"DisplayName","mapping_type":{"type":"TextProperty"}},{"index":65,"name":"ShortDescription","mapping_type":{"type":"TextProperty"}},{"index":66,"name":"Description","mapping_type":{"type":"TextProperty"}},{"index":69,"name":"GameplayTags","mapping_type":{"type":"StructProperty","struct_type":"GameplayTagContainer"}},{"index":80,"name":"SmallPreviewImage","mapping_type":{"type":"SoftObjectProperty"}},{"index":81,"name":"LargePreviewImage","mapping_type":{"type":"SoftObjectProperty"}},{"index":82,"name":"DisplayAssetPath","mapping_type":{"type":"StructProperty","struct_type":"SoftObjectPath"}},{"index":83,"name":"Series","mapping_type":{"type":"ObjectProperty"}},{"index":84,"name":"FrontendPreviewPivotOffset","mapping_type":{"type":"StructProperty","struct_type":"Vector"}},{"index":85,"name":"FrontendPreviewInitialRotation","mapping_type":{"type":"StructProperty","struct_type":"Rotator"}},{"index":86,"name":"FrontendPreviewMeshOverride","mapping_type":{"type":"SoftObjectProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/AthenaLoadingScreenItemDefinition.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AthenaLoadingScreenItemDefinition", 3 | "properties": [{ 4 | "name": "BackgroundImage", 5 | "index": 0, 6 | "mapping_type": { 7 | "type": "StructProperty", 8 | "struct_type": "SoftObjectPath" 9 | } 10 | }, { 11 | "name": "BackgroundColor", 12 | "index": 4, 13 | "mapping_type": { 14 | "type": "StructProperty", 15 | "struct_type": "LinearColor" 16 | } 17 | }, { 18 | "name": "DisplayName", 19 | "index": 67, 20 | "mapping_type": { 21 | "type": "TextProperty" 22 | } 23 | }, { 24 | "name": "ShortDescription", 25 | "index": 68, 26 | "mapping_type": { 27 | "type": "TextProperty" 28 | } 29 | }, { 30 | "name": "Description", 31 | "index": 69, 32 | "mapping_type": { 33 | "type": "TextProperty" 34 | } 35 | }, { 36 | "name": "GameplayTags", 37 | "index": 72, 38 | "mapping_type": { 39 | "type": "StructProperty", 40 | "struct_type": "GameplayTagContainer" 41 | } 42 | }, { 43 | "name": "FrontendPreviewScale", 44 | "index": 78, 45 | "mapping_type": { 46 | "type": "FloatProperty" 47 | } 48 | }, { 49 | "name": "SmallPreviewImage", 50 | "index": 83, 51 | "mapping_type": { 52 | "type": "StructProperty", 53 | "struct_type": "SoftObjectPath" 54 | } 55 | }, { 56 | "name": "LargePreviewImage", 57 | "index": 84, 58 | "mapping_type": { 59 | "type": "StructProperty", 60 | "struct_type": "SoftObjectPath" 61 | } 62 | }, { 63 | "name": "FrontendPreviewPivotOffset", 64 | "index": 87, 65 | "mapping_type": { 66 | "type": "StructProperty", 67 | "struct_type": "Vector" 68 | } 69 | }, { 70 | "name": "FrontendPreviewInitalRotation", 71 | "index": 88, 72 | "mapping_type": { 73 | "type": "StructProperty", 74 | "struct_type": "Rotator" 75 | } 76 | }, { 77 | "name": "Rarity", 78 | "index": 50, 79 | "mapping_type": { 80 | "type": "EnumProperty", 81 | "enum_type": "EFortRarity" 82 | } 83 | }, { 84 | "name": "Series", 85 | "index": 86, 86 | "mapping_type": { 87 | "type": "ObjectProperty" 88 | } 89 | } 90 | ] 91 | } 92 | -------------------------------------------------------------------------------- /mappings/jwp/classes/AthenaSkyDiveContrailItemDefinition.json: -------------------------------------------------------------------------------- 1 | {"name":"AthenaSkyDiveContrailItemDefinition","properties":[{"index":0,"name":"ContrailEffect","mapping_type":{"type":"SoftObjectProperty"}},{"index":1,"name":"FrontEndContrailEffect","mapping_type":{"type":"SoftObjectProperty"}},{"index":2,"name":"NiagaraContrailEffect","mapping_type":{"type":"SoftObjectProperty"}},{"index":6,"name":"VectorParameters","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"VectorParticleParameter"}}},{"index":7,"name":"FloatParameters","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"FloatParticleParameter"}}},{"index":8,"name":"bIsShuffleTile","mapping_type":{"type":"BoolProperty"}},{"index":20,"name":"PreviewPawnRotationOffset","mapping_type":{"type":"StructProperty","struct_type":"Rotator"}},{"index":28,"name":"ItemVariants","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"ObjectProperty"}}},{"index":30,"name":"ItemVariantPreviews","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"FortCosmeticVariantPreview"}}},{"index":35,"name":"ItemPreviewActorClass","mapping_type":{"type":"SoftObjectProperty"}},{"index":39,"name":"ItemPreviewHero","mapping_type":{"type":"SoftObjectProperty"}},{"index":56,"name":"Rarity","mapping_type":{"type":"EnumProperty","enum_type":"EFortRarity"}},{"index":70,"name":"DisplayName","mapping_type":{"type":"TextProperty"}},{"index":71,"name":"ShortDescription","mapping_type":{"type":"TextProperty"}},{"index":72,"name":"Description","mapping_type":{"type":"TextProperty"}},{"index":75,"name":"GameplayTags","mapping_type":{"type":"StructProperty","struct_type":"GameplayTagContainer"}},{"index":86,"name":"SmallPreviewImage","mapping_type":{"type":"SoftObjectProperty"}},{"index":87,"name":"LargePreviewImage","mapping_type":{"type":"SoftObjectProperty"}},{"index":88,"name":"DisplayAssetPath","mapping_type":{"type":"StructProperty","struct_type":"SoftObjectPath"}},{"index":89,"name":"Series","mapping_type":{"type":"ObjectProperty"}},{"index":90,"name":"FrontendPreviewPivotOffset","mapping_type":{"type":"StructProperty","struct_type":"Vector"}},{"index":91,"name":"FrontendPreviewInitialRotation","mapping_type":{"type":"StructProperty","struct_type":"Rotator"}},{"index":92,"name":"FrontendPreviewMeshOverride","mapping_type":{"type":"SoftObjectProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/AttachedParticleComponentDef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AttachedParticleComponentDef", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "Transform", 7 | "mapping_type": { 8 | "type": "StructProperty", 9 | "struct_type": "Transform" 10 | } 11 | }, 12 | { 13 | "index": 1, 14 | "name": "ParentSocket", 15 | "mapping_type": { 16 | "type": "NameProperty" 17 | } 18 | }, 19 | { 20 | "index": 2, 21 | "name": "Template", 22 | "mapping_type": { 23 | "type": "SoftObjectProperty" 24 | } 25 | }, 26 | { 27 | "index": 3, 28 | "name": "DetailMode", 29 | "mapping_type": { 30 | "type": "ByteProperty" 31 | } 32 | } 33 | ] 34 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/CosmeticMetaTagContainer.json: -------------------------------------------------------------------------------- 1 | {"name":"CosmeticMetaTagContainer","properties":[{"index":0,"name":"MetaTagsToApply","mapping_type":{"type":"StructProperty","struct_type":"GameplayTagContainer"}},{"index":1,"name":"MetaTagsToRemove","mapping_type":{"type":"StructProperty","struct_type":"GameplayTagContainer"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/CosmeticSetDataRow.json: -------------------------------------------------------------------------------- 1 | {"name":"CosmeticSetDataRow","properties":[{"index":0,"name":"Tag","mapping_type":{"type":"StructProperty","struct_type":"GameplayTag"}},{"index":1,"name":"DisplayName","mapping_type":{"type":"TextProperty"}},{"index":2,"name":"Description","mapping_type":{"type":"TextProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/CurveTableRowHandle.json: -------------------------------------------------------------------------------- 1 | {"name":"CurveTableRowHandle","properties":[{"index":0,"name":"CurveTable","mapping_type":{"type":"ObjectProperty"}},{"index":1,"name":"RowName","mapping_type":{"type":"NameProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/DataTable.json: -------------------------------------------------------------------------------- 1 | {"name":"DataTable","properties":[{"index":0,"name":"RowStruct","mapping_type":{"type":"ObjectProperty"}},{"index":1,"name":"bStripFromClientBuilds","mapping_type":{"type":"BoolProperty"}},{"index":2,"name":"bIgnoreExtraFields","mapping_type":{"type":"BoolProperty"}},{"index":3,"name":"bIgnoreMissingFields","mapping_type":{"type":"BoolProperty"}},{"index":4,"name":"ImportKeyField","mapping_type":{"type":"StrProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/DataTableCategoryHandle.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DataTableCategoryHandle", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "DataTable", 7 | "mapping_type": { 8 | "type": "ObjectProperty" 9 | } 10 | }, 11 | { 12 | "index": 1, 13 | "name": "ColumnName", 14 | "mapping_type": { 15 | "type": "NameProperty" 16 | } 17 | }, 18 | { 19 | "index": 2, 20 | "name": "RowContents", 21 | "mapping_type": { 22 | "type": "NameProperty" 23 | } 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/DataTableRowHandle.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DataTableRowHandle", 3 | "properties": [{ 4 | "index": 0, 5 | "name": "DataTable", 6 | "mapping_type": { 7 | "type": "ObjectProperty" 8 | } 9 | }, { 10 | "index": 1, 11 | "name": "RowName", 12 | "mapping_type": { 13 | "type": "NameProperty" 14 | } 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /mappings/jwp/classes/DynamicVariantDef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DynamicVariantDef", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "DynamicVariants", 7 | "mapping_type": { 8 | "type": "ArrayProperty", 9 | "sub_type": { 10 | "type": "ObjectProperty" 11 | } 12 | } 13 | }, 14 | { 15 | "index": 1, 16 | "name": "bStartUnlocked", 17 | "mapping_type": { 18 | "type": "BoolProperty" 19 | } 20 | }, 21 | { 22 | "index": 2, 23 | "name": "bIsDefault", 24 | "mapping_type": { 25 | "type": "BoolProperty" 26 | } 27 | }, 28 | { 29 | "index": 3, 30 | "name": "bHideIfNotOwned", 31 | "mapping_type": { 32 | "type": "BoolProperty" 33 | } 34 | }, 35 | { 36 | "index": 4, 37 | "name": "CustomizationVariantTag", 38 | "mapping_type": { 39 | "type": "StructProperty", 40 | "struct_type": "GameplayTag" 41 | } 42 | }, 43 | { 44 | "index": 5, 45 | "name": "VariantName", 46 | "mapping_type": { 47 | "type": "TextProperty" 48 | } 49 | }, 50 | { 51 | "index": 6, 52 | "name": "PreviewImage", 53 | "mapping_type": { 54 | "type": "SoftObjectProperty" 55 | } 56 | }, 57 | { 58 | "index": 7, 59 | "name": "UnlockRequirements", 60 | "mapping_type": { 61 | "type": "TextProperty" 62 | } 63 | }, 64 | { 65 | "index": 8, 66 | "name": "UnlockingItemDef", 67 | "mapping_type": { 68 | "type": "SoftObjectProperty" 69 | } 70 | } 71 | ] 72 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/EmoteMontageSwap.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "EmoteMontageSwap", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "ToSwapFrom", 7 | "mapping_type": { 8 | "type": "SoftObjectProperty" 9 | } 10 | }, 11 | { 12 | "index": 1, 13 | "name": "ToSwapTo", 14 | "mapping_type": { 15 | "type": "SoftObjectProperty" 16 | } 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/EmoteMontageVariantDef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "EmoteMontageVariantDef", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "MontageSwaps", 7 | "mapping_type": { 8 | "type": "ArrayProperty", 9 | "sub_type": { 10 | "type": "StructProperty", 11 | "struct_type": "EmoteMontageSwap" 12 | } 13 | } 14 | }, 15 | { 16 | "index": 1, 17 | "name": "MetaTags", 18 | "mapping_type": { 19 | "type": "StructProperty", 20 | "struct_type": "CosmeticMetaTagContainer" 21 | } 22 | }, 23 | { 24 | "index": 2, 25 | "name": "bStartUnlocked", 26 | "mapping_type": { 27 | "type": "BoolProperty" 28 | } 29 | }, 30 | { 31 | "index": 3, 32 | "name": "bIsDefault", 33 | "mapping_type": { 34 | "type": "BoolProperty" 35 | } 36 | }, 37 | { 38 | "index": 4, 39 | "name": "bHideIfNotOwned", 40 | "mapping_type": { 41 | "type": "BoolProperty" 42 | } 43 | }, 44 | { 45 | "index": 5, 46 | "name": "CustomizationVariantTag", 47 | "mapping_type": { 48 | "type": "StructProperty", 49 | "struct_type": "GameplayTag" 50 | } 51 | }, 52 | { 53 | "index": 6, 54 | "name": "VariantName", 55 | "mapping_type": { 56 | "type": "TextProperty" 57 | } 58 | }, 59 | { 60 | "index": 7, 61 | "name": "PreviewImage", 62 | "mapping_type": { 63 | "type": "SoftObjectProperty" 64 | } 65 | }, 66 | { 67 | "index": 8, 68 | "name": "UnlockRequirements", 69 | "mapping_type": { 70 | "type": "TextProperty" 71 | } 72 | }, 73 | { 74 | "index": 9, 75 | "name": "UnlockingItemDef", 76 | "mapping_type": { 77 | "type": "SoftObjectProperty" 78 | } 79 | } 80 | ] 81 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/FMaterialTextureVariant.json: -------------------------------------------------------------------------------- 1 | {"name":"FMaterialTextureVariant","properties":[{"index":0,"name":"Value","mapping_type":{"type":"SoftObjectProperty"}},{"index":1,"name":"ParamName","mapping_type":{"type":"NameProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/FloatParticleParameter.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FloatParticleParameter", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "Value", 7 | "mapping_type": { 8 | "type": "FloatProperty" 9 | } 10 | }, 11 | { 12 | "index": 1, 13 | "name": "ParameterName", 14 | "mapping_type": { 15 | "type": "NameProperty" 16 | } 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/FoleySoundVariant.json: -------------------------------------------------------------------------------- 1 | {"name":"FoleySoundVariant","properties":[{"index":0,"name":"LibrariesToAdd","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"ObjectProperty"}}},{"index":1,"name":"LibrariesToRemove","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"ObjectProperty"}}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/FortAttributeInitializationKey.json: -------------------------------------------------------------------------------- 1 | {"name":"FortAttributeInitializationKey","properties":[{"index":0,"name":"AttributeInitCategory","mapping_type":{"type":"NameProperty"}},{"index":1,"name":"AttributeInitSubCategory","mapping_type":{"type":"NameProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/FortBannerTokenType.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FortBannerTokenType", 3 | "properties": [ 4 | { 5 | "index": 1, 6 | "name": "BannerIconTemplateName", 7 | "mapping_type": { 8 | "type": "StrProperty" 9 | } 10 | }, 11 | { 12 | "index": 26, 13 | "name": "DisplayName", 14 | "mapping_type": { 15 | "type": "TextProperty" 16 | } 17 | }, 18 | { 19 | "index": 27, 20 | "name": "ShortDescription", 21 | "mapping_type": { 22 | "type": "TextProperty" 23 | } 24 | }, 25 | { 26 | "index": 28, 27 | "name": "Description", 28 | "mapping_type": { 29 | "type": "TextProperty" 30 | } 31 | }, 32 | { 33 | "index": 31, 34 | "name": "GameplayTags", 35 | "mapping_type": { 36 | "type": "StructProperty", 37 | "struct_type": "GameplayTagContainer" 38 | } 39 | }, 40 | { 41 | "index": 42, 42 | "name": "SmallPreviewImage", 43 | "mapping_type": { 44 | "type": "SoftObjectProperty" 45 | } 46 | }, 47 | { 48 | "index": 43, 49 | "name": "LargePreviewImage", 50 | "mapping_type": { 51 | "type": "SoftObjectProperty" 52 | } 53 | }, 54 | { 55 | "index": 44, 56 | "name": "DisplayAssetPath", 57 | "mapping_type": { 58 | "type": "StructProperty", 59 | "struct_type": "SoftObjectPath" 60 | } 61 | }, 62 | { 63 | "index": 45, 64 | "name": "Series", 65 | "mapping_type": { 66 | "type": "ObjectProperty" 67 | } 68 | }, 69 | { 70 | "index": 46, 71 | "name": "FrontendPreviewPivotOffset", 72 | "mapping_type": { 73 | "type": "StructProperty", 74 | "struct_type": "Vector" 75 | } 76 | }, 77 | { 78 | "index": 47, 79 | "name": "FrontendPreviewInitialRotation", 80 | "mapping_type": { 81 | "type": "StructProperty", 82 | "struct_type": "Rotator" 83 | } 84 | }, 85 | { 86 | "index": 48, 87 | "name": "FrontendPreviewMeshOverride", 88 | "mapping_type": { 89 | "type": "SoftObjectProperty" 90 | } 91 | } 92 | ] 93 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/FortColorPalette.json: -------------------------------------------------------------------------------- 1 | {"name":"FortColorPalette","properties":[{"index":0,"name":"Color1","mapping_type":{"type":"StructProperty","struct_type":"LinearColor"}},{"index":1,"name":"Color2","mapping_type":{"type":"StructProperty","struct_type":"LinearColor"}},{"index":2,"name":"Color3","mapping_type":{"type":"StructProperty","struct_type":"LinearColor"}},{"index":3,"name":"Color4","mapping_type":{"type":"StructProperty","struct_type":"LinearColor"}},{"index":4,"name":"Color5","mapping_type":{"type":"StructProperty","struct_type":"LinearColor"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/FortCosmeticCharacterPartVariant.json: -------------------------------------------------------------------------------- 1 | {"name":"FortCosmeticCharacterPartVariant","properties":[{"index":0,"name":"PartOptions","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"PartVariantDef"}}},{"index":1,"name":"VariantChannelTag","mapping_type":{"type":"StructProperty","struct_type":"GameplayTag"}},{"index":2,"name":"VariantChannelName","mapping_type":{"type":"TextProperty"}},{"index":3,"name":"ActiveVariantTag","mapping_type":{"type":"StructProperty","struct_type":"GameplayTag"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/FortCosmeticDynamicVariant.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FortCosmeticDynamicVariant", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "DynamicOptions", 7 | "mapping_type": { 8 | "type": "ArrayProperty", 9 | "sub_type": { 10 | "type": "StructProperty", 11 | "struct_type": "DynamicVariantDef" 12 | } 13 | } 14 | }, 15 | { 16 | "index": 1, 17 | "name": "VariantChannelTag", 18 | "mapping_type": { 19 | "type": "StructProperty", 20 | "struct_type": "GameplayTag" 21 | } 22 | }, 23 | { 24 | "index": 2, 25 | "name": "VariantChannelName", 26 | "mapping_type": { 27 | "type": "TextProperty" 28 | } 29 | } 30 | ] 31 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/FortCosmeticFloatSliderVariant.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FortCosmeticFloatSliderVariant", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "DefaultStartingValue", 7 | "mapping_type": { 8 | "type": "FloatProperty" 9 | } 10 | }, 11 | { 12 | "index": 3, 13 | "name": "MaterialParamName", 14 | "mapping_type": { 15 | "type": "NameProperty" 16 | } 17 | }, 18 | { 19 | "index": 4, 20 | "name": "MaterialsToAlter", 21 | "mapping_type": { 22 | "type": "ArrayProperty", 23 | "sub_type": { 24 | "type": "SoftObjectProperty" 25 | } 26 | } 27 | }, 28 | { 29 | "index": 5, 30 | "name": "VariantChannelTag", 31 | "mapping_type": { 32 | "type": "StructProperty", 33 | "struct_type": "GameplayTag" 34 | } 35 | }, 36 | { 37 | "index": 6, 38 | "name": "VariantChannelName", 39 | "mapping_type": { 40 | "type": "TextProperty" 41 | } 42 | } 43 | ] 44 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/FortCosmeticItemTexture.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FortCosmeticItemTexture", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "ItemTextureVar", 7 | "mapping_type": { 8 | "type": "StructProperty", 9 | "struct_type": "ItemTextureVariantDef" 10 | } 11 | }, 12 | { 13 | "index": 1, 14 | "name": "VariantChannelTag", 15 | "mapping_type": { 16 | "type": "StructProperty", 17 | "struct_type": "GameplayTag" 18 | } 19 | }, 20 | { 21 | "index": 2, 22 | "name": "VariantChannelName", 23 | "mapping_type": { 24 | "type": "TextProperty" 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/FortCosmeticMaterialVariant.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FortCosmeticMaterialVariant", 3 | "properties": [{ 4 | "index": 0, 5 | "name": "MaterialOptions", 6 | "mapping_type": { 7 | "type": "ArrayProperty", 8 | "sub_type": { 9 | "type": "StructProperty", 10 | "struct_type": "MaterialVariantDef" 11 | } 12 | } 13 | }, { 14 | "index": 1, 15 | "name": "VariantChannelTag", 16 | "mapping_type": { 17 | "type": "StructProperty", 18 | "struct_type": "GameplayTag" 19 | } 20 | }, { 21 | "index": 2, 22 | "name": "VariantChannelName", 23 | "mapping_type": { 24 | "type": "TextProperty" 25 | } 26 | }, { 27 | "index": 3, 28 | "name": "ActiveVariantTag", 29 | "mapping_type": { 30 | "type": "StructProperty", 31 | "struct_type": "GameplayTag" 32 | } 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /mappings/jwp/classes/FortCosmeticMeshVariant.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FortCosmeticMeshVariant", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "MeshOptions", 7 | "mapping_type": { 8 | "type": "ArrayProperty", 9 | "sub_type": { 10 | "type": "StructProperty", 11 | "struct_type": "MeshVariantDef" 12 | } 13 | } 14 | }, 15 | { 16 | "index": 1, 17 | "name": "VariantChannelTag", 18 | "mapping_type": { 19 | "type": "StructProperty", 20 | "struct_type": "GameplayTag" 21 | } 22 | }, 23 | { 24 | "index": 2, 25 | "name": "VariantChannelName", 26 | "mapping_type": { 27 | "type": "TextProperty" 28 | } 29 | } 30 | ] 31 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/FortCosmeticNumericalVariant.json: -------------------------------------------------------------------------------- 1 | {"name":"FortCosmeticNumericalVariant","properties":[{"index":0,"name":"DefaultStartingNumeric","mapping_type":{"type":"IntProperty"}},{"index":1,"name":"MinNumericalValue","mapping_type":{"type":"IntProperty"}},{"index":2,"name":"MaxNumbericalValue","mapping_type":{"type":"IntProperty"}},{"index":3,"name":"ZerosDigitParamName","mapping_type":{"type":"NameProperty"}},{"index":4,"name":"TensDigitParamName","mapping_type":{"type":"NameProperty"}},{"index":5,"name":"MaterialsToAlter","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"SoftObjectProperty"}}},{"index":6,"name":"VariantChannelTag","mapping_type":{"type":"StructProperty","struct_type":"GameplayTag"}},{"index":7,"name":"VariantChannelName","mapping_type":{"type":"TextProperty"}},{"index":8,"name":"ActiveVariantTag","mapping_type":{"type":"StructProperty","struct_type":"GameplayTag"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/FortCosmeticParticleVariant.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FortCosmeticParticleVariant", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "ParticleOptions", 7 | "mapping_type": { 8 | "type": "ArrayProperty", 9 | "sub_type": { 10 | "type": "StructProperty", 11 | "struct_type": "ParticleVariantDef" 12 | } 13 | } 14 | }, 15 | { 16 | "index": 1, 17 | "name": "VariantChannelTag", 18 | "mapping_type": { 19 | "type": "StructProperty", 20 | "struct_type": "GameplayTag" 21 | } 22 | }, 23 | { 24 | "index": 2, 25 | "name": "VariantChannelName", 26 | "mapping_type": { 27 | "type": "TextProperty" 28 | } 29 | } 30 | ] 31 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/FortCosmeticProfileBannerVariant.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FortCosmeticProfileBannerVariant", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "MaterialsToAlter", 7 | "mapping_type": { 8 | "type": "ArrayProperty", 9 | "sub_type": { 10 | "type": "SoftObjectProperty" 11 | } 12 | } 13 | }, 14 | { 15 | "index": 6, 16 | "name": "VariantChannelName", 17 | "mapping_type": { 18 | "type": "TextProperty" 19 | } 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/FortCosmeticProfileLoadoutVariant.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FortCosmeticProfileLoadoutVariant", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "LoadoutAugmentations", 7 | "mapping_type": { 8 | "type": "ArrayProperty", 9 | "sub_type": { 10 | "type": "StructProperty", 11 | "struct_type": "LoadoutVariantDef" 12 | } 13 | } 14 | }, 15 | { 16 | "index": 1, 17 | "name": "VariantChannelTag", 18 | "mapping_type": { 19 | "type": "StructProperty", 20 | "struct_type": "GameplayTag" 21 | } 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/FortCosmeticRichColorVariant.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FortCosmeticRichColorVariant", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "InlineVariant", 7 | "mapping_type": { 8 | "type": "StructProperty", 9 | "struct_type": "RichColorVariantDef" 10 | } 11 | }, 12 | { 13 | "index": 1, 14 | "name": "VariantChannelTag", 15 | "mapping_type": { 16 | "type": "StructProperty", 17 | "struct_type": "GameplayTag" 18 | } 19 | }, 20 | { 21 | "index": 2, 22 | "name": "VariantChannelName", 23 | "mapping_type": { 24 | "type": "TextProperty" 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/FortCosmeticVariantPreview.json: -------------------------------------------------------------------------------- 1 | {"name":"FortCosmeticVariantPreview","properties":[{"index":0,"name":"UnlockCondition","mapping_type":{"type":"TextProperty"}},{"index":1,"name":"PreviewTime","mapping_type":{"type":"FloatProperty"}},{"index":2,"name":"VariantOptions","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"McpVariantChannelInfo"}}},{"index":3,"name":"AdditionalItems","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"FortCosmeticVariantPreviewElement"}}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/FortCosmeticVariantPreviewElement.json: -------------------------------------------------------------------------------- 1 | {"name":"FortCosmeticVariantPreviewElement","properties":[{"index":0,"name":"VariantOptions","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"McpVariantChannelInfo"}}},{"index":1,"name":"Item","mapping_type":{"type":"ObjectProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/FortEmoteMapping.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FortEmoteMapping", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "BodyType", 7 | "mapping_type": { 8 | "type": "ByteProperty" 9 | } 10 | }, 11 | { 12 | "index": 1, 13 | "name": "Gender", 14 | "mapping_type": { 15 | "type": "ByteProperty" 16 | } 17 | }, 18 | { 19 | "index": 2, 20 | "name": "EmoteMontage", 21 | "mapping_type": { 22 | "type": "SoftObjectProperty" 23 | } 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/FortItemCategory.json: -------------------------------------------------------------------------------- 1 | {"name":"FortItemCategory","properties":[{"index":0,"name":"PrimaryCategories","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"ItemCategoryMappingData"}}},{"index":1,"name":"SecondaryCategories","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"ItemCategory"}}},{"index":2,"name":"TertiaryCategories","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"ItemCategory"}}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/FortItemQuantityPair.json: -------------------------------------------------------------------------------- 1 | {"name":"FortItemQuantityPair","properties":[{"index":0,"name":"ItemPrimaryAssetId","mapping_type":{"type":"StructProperty","struct_type":"PrimaryAssetId"}},{"index":1,"name":"Quantity","mapping_type":{"type":"IntProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/FortItemSeriesDefinition.json: -------------------------------------------------------------------------------- 1 | {"name":"FortItemSeriesDefinition","properties":[{"index":0,"name":"DisplayName","mapping_type":{"type":"TextProperty"}},{"index":1,"name":"Colors","mapping_type":{"type":"StructProperty","struct_type":"FortColorPalette"}},{"index":2,"name":"BackgroundTexture","mapping_type":{"type":"SoftObjectProperty"}},{"index":3,"name":"ItemCardMaterial","mapping_type":{"type":"SoftObjectProperty"}},{"index":4,"name":"BackgroundMaterial","mapping_type":{"type":"SoftObjectProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/FortLootPackageData.json: -------------------------------------------------------------------------------- 1 | {"name":"FortLootPackageData","properties":[{"index":0,"name":"LootPackageID","mapping_type":{"type":"NameProperty"}},{"index":1,"name":"Weight","mapping_type":{"type":"FloatProperty"}},{"index":2,"name":"NamedWeightMult","mapping_type":{"type":"NameProperty"}},{"index":3,"name":"PotentialNamedWeights","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"NameProperty"}}},{"index":4,"name":"Count","mapping_type":{"type":"IntProperty"}},{"index":5,"name":"LootPackageCategory","mapping_type":{"type":"IntProperty"}},{"index":6,"name":"GameplayTags","mapping_type":{"type":"StructProperty","struct_type":"GameplayTagContainer"}},{"index":7,"name":"RequiredTag","mapping_type":{"type":"NameProperty"}},{"index":8,"name":"LootPackageCall","mapping_type":{"type":"StrProperty"}},{"index":9,"name":"ItemDefinition","mapping_type":{"type":"SoftObjectProperty"}},{"index":10,"name":"PersistentLevel","mapping_type":{"type":"StrProperty"}},{"index":11,"name":"MinWorldLevel","mapping_type":{"type":"IntProperty"}},{"index":12,"name":"MaxWorldLevel","mapping_type":{"type":"IntProperty"}},{"index":13,"name":"bAllowBonusDrops","mapping_type":{"type":"BoolProperty"}},{"index":14,"name":"Annotation","mapping_type":{"type":"StrProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/FortLootTierData.json: -------------------------------------------------------------------------------- 1 | {"name":"FortLootTierData","properties":[{"index":0,"name":"TierGroup","mapping_type":{"type":"NameProperty"}},{"index":1,"name":"Weight","mapping_type":{"type":"FloatProperty"}},{"index":2,"name":"Weight","mapping_type":{"type":"EnumProperty","enum_type":"ELootQuotaLevel"}},{"index":3,"name":"LootTier","mapping_type":{"type":"IntProperty"}},{"index":4,"name":"MinWorldLevel","mapping_type":{"type":"IntProperty"}},{"index":5,"name":"MaxWorldLevel","mapping_type":{"type":"IntProperty"}},{"index":6,"name":"StreakBreakerCurrency","mapping_type":{"type":"StrProperty"}},{"index":7,"name":"StreakBreakerPointsMin","mapping_type":{"type":"IntProperty"}},{"index":8,"name":"StreakBreakerPointsMax","mapping_type":{"type":"IntProperty"}},{"index":9,"name":"StreakBreakerPointsSpend","mapping_type":{"type":"IntProperty"}},{"index":10,"name":"LootPackage","mapping_type":{"type":"NameProperty"}},{"index":11,"name":"LootPreviewPackage","mapping_type":{"type":"NameProperty"}},{"index":12,"name":"NumLootPackageDrops","mapping_type":{"type":"FloatProperty"}},{"index":13,"name":"LootPackageCategoryWeightArray","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"IntProperty"}}},{"index":14,"name":"LootPackageCategoryMinArray","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"IntProperty"}}},{"index":15,"name":"LootPackageCategoryMaxArray","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"IntProperty"}}},{"index":16,"name":"GameplayTags","mapping_type":{"type":"StructProperty","struct_type":"GameplayTagContainer"}},{"index":17,"name":"RequiredGameplayTags","mapping_type":{"type":"StructProperty","struct_type":"GameplayTagContainer"}},{"index":18,"name":"bAllowBonusLootDrops","mapping_type":{"type":"BoolProperty"}},{"index":19,"name":"Annotation","mapping_type":{"type":"StrProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/FortMtxDetailsAttribute.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FortMtxDetailsAttribute", 3 | "properties": [{ 4 | "index": 0, 5 | "name": "Name", 6 | "mapping_type": { 7 | "type": "TextProperty" 8 | } 9 | }, { 10 | "index": 1, 11 | "name": "Value", 12 | "mapping_type": { 13 | "type": "TextProperty" 14 | } 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /mappings/jwp/classes/FortMtxGradient.json: -------------------------------------------------------------------------------- 1 | {"name":"FortMtxGradient","properties":[{"index":0,"name":"Start","mapping_type":{"type":"StructProperty","struct_type":"LinearColor"}},{"index":1,"name":"Stop","mapping_type":{"type":"StructProperty","struct_type":"LinearColor"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/FortMtxOfferData.json: -------------------------------------------------------------------------------- 1 | {"name":"FortMtxOfferData","properties":[{"index":0,"name":"DisplayName","mapping_type":{"type":"TextProperty"}},{"index":1,"name":"ShortDisplayName","mapping_type":{"type":"TextProperty"}},{"index":2,"name":"ShortDescription","mapping_type":{"type":"TextProperty"}},{"index":3,"name":"SubTitleText","mapping_type":{"type":"TextProperty"}},{"index":4,"name":"DisclaimerText","mapping_type":{"type":"TextProperty"}},{"index":5,"name":"GrantOverride","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"FortItemQuantityPair"}}},{"index":6,"name":"TileImage","mapping_type":{"type":"StructProperty","struct_type":"SlateBrush"}},{"index":7,"name":"BadgeImage","mapping_type":{"type":"StructProperty","struct_type":"SlateBrush"}},{"index":8,"name":"DetailsImage","mapping_type":{"type":"StructProperty","struct_type":"SlateBrush"}},{"index":9,"name":"SimpleImage","mapping_type":{"type":"StructProperty","struct_type":"SlateBrush"}},{"index":10,"name":"DetailsBadge","mapping_type":{"type":"ObjectProperty"}},{"index":11,"name":"DetailsAttributes","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"FortMtxDetailsAttribute"}}},{"index":12,"name":"Gradient","mapping_type":{"type":"StructProperty","struct_type":"FortMtxGradient"}},{"index":13,"name":"Background","mapping_type":{"type":"StructProperty","struct_type":"LinearColor"}},{"index":14,"name":"BackgroundImage","mapping_type":{"type":"StructProperty","struct_type":"SlateBrush"}},{"index":15,"name":"BackgroundImage","mapping_type":{"type":"StructProperty","struct_type":"LinearColor"}},{"index":16,"name":"UpsellPrimaryColor","mapping_type":{"type":"StructProperty","struct_type":"LinearColor"}},{"index":17,"name":"UpsellSecondaryColor","mapping_type":{"type":"StructProperty","struct_type":"LinearColor"}},{"index":18,"name":"bUseBaseColors","mapping_type":{"type":"TextProperty"}},{"index":19,"name":"DisplaySize","mapping_type":{"type":"EnumProperty","enum_type":"EFortMtxOfferDisplaySize"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/FortMultiSizeBrush.json: -------------------------------------------------------------------------------- 1 | {"name":"FortMultiSizeBrush","properties":[{"index":0,"name":"Brush_XXS","mapping_type":{"type":"StructProperty","struct_type":"SlateBrush"}},{"index":1,"name":"Brush_XS","mapping_type":{"type":"StructProperty","struct_type":"SlateBrush"}},{"index":2,"name":"Brush_S","mapping_type":{"type":"StructProperty","struct_type":"SlateBrush"}},{"index":3,"name":"Brush_M","mapping_type":{"type":"StructProperty","struct_type":"SlateBrush"}},{"index":4,"name":"Brush_L","mapping_type":{"type":"StructProperty","struct_type":"SlateBrush"}},{"index":5,"name":"Brush_XL","mapping_type":{"type":"StructProperty","struct_type":"SlateBrush"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/FortPortableSoftParticles.json: -------------------------------------------------------------------------------- 1 | {"name":"FortPortableSoftParticles","properties":[{"index":0,"name":"FXType","mapping_type":{"type":"EnumProperty","enum_type":"EFXType"}},{"index":1,"name":"NiagaraVersion","mapping_type":{"type":"SoftObjectProperty"}},{"index":2,"name":"CascadeVersion","mapping_type":{"type":"SoftObjectProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/FortRarityData.json: -------------------------------------------------------------------------------- 1 | {"name":"FortRarityData","properties":[{"index":0,"name":"RarityCollection","mapping_type":{"type":"StructProperty","struct_type":"FortRarityItemData"}},{"index":1,"name":"RarityCollection","mapping_type":{"type":"StructProperty","struct_type":"FortRarityItemData"}},{"index":2,"name":"RarityCollection","mapping_type":{"type":"StructProperty","struct_type":"FortRarityItemData"}},{"index":3,"name":"RarityCollection","mapping_type":{"type":"StructProperty","struct_type":"FortRarityItemData"}},{"index":4,"name":"RarityCollection","mapping_type":{"type":"StructProperty","struct_type":"FortRarityItemData"}},{"index":5,"name":"RarityCollection","mapping_type":{"type":"StructProperty","struct_type":"FortRarityItemData"}},{"index":6,"name":"RarityCollection","mapping_type":{"type":"StructProperty","struct_type":"FortRarityItemData"}},{"index":7,"name":"RarityCollection","mapping_type":{"type":"StructProperty","struct_type":"FortRarityItemData"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/FortRarityItemData.json: -------------------------------------------------------------------------------- 1 | {"name":"FortRarityItemData","properties":[{"index":0,"name":"Name","mapping_type":{"type":"TextProperty"}},{"index":1,"name":"Color1","mapping_type":{"type":"StructProperty","struct_type":"LinearColor"}},{"index":2,"name":"Color2","mapping_type":{"type":"StructProperty","struct_type":"LinearColor"}},{"index":3,"name":"Color3","mapping_type":{"type":"StructProperty","struct_type":"LinearColor"}},{"index":4,"name":"Color4","mapping_type":{"type":"StructProperty","struct_type":"LinearColor"}},{"index":5,"name":"Color5","mapping_type":{"type":"StructProperty","struct_type":"LinearColor"}},{"index":6,"name":"Radius","mapping_type":{"type":"FloatProperty"}},{"index":7,"name":"Falloff","mapping_type":{"type":"FloatProperty"}},{"index":8,"name":"Brightness","mapping_type":{"type":"FloatProperty"}},{"index":9,"name":"Roughness","mapping_type":{"type":"FloatProperty"}},{"index":10,"name":"Glow","mapping_type":{"type":"FloatProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/FortUICameraFrameTargetBounds.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FortUICameraFrameTargetBounds", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "Origin", 7 | "mapping_type": { 8 | "type": "StructProperty", 9 | "struct_type": "Vector" 10 | } 11 | }, 12 | { 13 | "index": 1, 14 | "name": "CylinderHalfHeight", 15 | "mapping_type": { 16 | "type": "FloatProperty" 17 | } 18 | }, 19 | { 20 | "index": 2, 21 | "name": "CylinderRadius", 22 | "mapping_type": { 23 | "type": "FloatProperty" 24 | } 25 | } 26 | ] 27 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/FortWeaponAdditionalData_SingleWieldState.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FortWeaponAdditionalData_SingleWieldState", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "PrimaryFireAbility_InState", 7 | "mapping_type": { 8 | "type": "SoftObjectProperty" 9 | } 10 | }, 11 | { 12 | "index": 1, 13 | "name": "AnimSet_InState", 14 | "mapping_type": { 15 | "type": "SoftObjectProperty" 16 | } 17 | }, 18 | { 19 | "index": 2, 20 | "name": "EquipMontage_InState", 21 | "mapping_type": { 22 | "type": "SoftObjectProperty" 23 | } 24 | }, 25 | { 26 | "index": 4, 27 | "name": "ImpactFxPreviewOffset", 28 | "mapping_type": { 29 | "type": "StructProperty", 30 | "struct_type": "Vector" 31 | } 32 | }, 33 | { 34 | "index": 7, 35 | "name": "InitialPreviewRotation", 36 | "mapping_type": { 37 | "type": "StructProperty", 38 | "struct_type": "Rotator" 39 | } 40 | }, 41 | { 42 | "index": 8, 43 | "name": "FrontendPreviewScale", 44 | "mapping_type": { 45 | "type": "FloatProperty" 46 | } 47 | }, 48 | { 49 | "index": 9, 50 | "name": "CameraFramingBounds", 51 | "mapping_type": { 52 | "type": "StructProperty", 53 | "struct_type": "FortUICameraFrameTargetBounds" 54 | } 55 | } 56 | ] 57 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/GameplayTag.json: -------------------------------------------------------------------------------- 1 | {"name":"GameplayTag","properties":[{"index":0,"name":"TagName","mapping_type":{"type":"NameProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/ItemCategory.json: -------------------------------------------------------------------------------- 1 | {"name":"ItemCategory","properties":[{"index":0,"name":"TagContainer","mapping_type":{"type":"StructProperty","struct_type":"GameplayTagContainer"}},{"index":1,"name":"CategoryName","mapping_type":{"type":"TextProperty"}},{"index":2,"name":"CategoryBrush","mapping_type":{"type":"StructProperty","struct_type":"FortMultiSizeBrush"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/ItemCategoryMappingData.json: -------------------------------------------------------------------------------- 1 | {"name":"ItemCategoryMappingData","properties":[{"index":0,"name":"CategoryType","mapping_type":{"type":"EnumProperty","enum_type":"EFortItemType"}},{"index":1,"name":"CategoryName","mapping_type":{"type":"TextProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/ItemTextureVariant.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ItemTextureVariant", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "MaterialsToAlter", 7 | "mapping_type": { 8 | "type": "ArrayProperty", 9 | "sub_type": { 10 | "type": "SoftObjectProperty" 11 | } 12 | } 13 | }, 14 | { 15 | "index": 1, 16 | "name": "ParamName", 17 | "mapping_type": { 18 | "type": "NameProperty" 19 | } 20 | }, 21 | { 22 | "index": 2, 23 | "name": "DefaultSelectedItem", 24 | "mapping_type": { 25 | "type": "StrProperty" 26 | } 27 | } 28 | ] 29 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/ItemTextureVariantDef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ItemTextureVariantDef", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "InnerDef", 7 | "mapping_type": { 8 | "type": "StructProperty", 9 | "struct_type": "ItemTextureVariant" 10 | } 11 | }, 12 | { 13 | "index": 2, 14 | "name": "FilterOutItemsWithTags", 15 | "mapping_type": { 16 | "type": "StructProperty", 17 | "struct_type": "GameplayTagContainer" 18 | } 19 | }, 20 | { 21 | "index": 5, 22 | "name": "bAllowClear", 23 | "mapping_type": { 24 | "type": "BoolProperty" 25 | } 26 | }, 27 | { 28 | "index": 7, 29 | "name": "bIsDefault", 30 | "mapping_type": { 31 | "type": "BoolProperty" 32 | } 33 | }, 34 | { 35 | "index": 9, 36 | "name": "CustomizationVariantTag", 37 | "mapping_type": { 38 | "type": "StructProperty", 39 | "struct_type": "GameplayTag" 40 | } 41 | }, 42 | { 43 | "index": 10, 44 | "name": "VariantName", 45 | "mapping_type": { 46 | "type": "TextProperty" 47 | } 48 | } 49 | ] 50 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/ManagedParticleParamVariant.json: -------------------------------------------------------------------------------- 1 | {"name":"ManagedParticleParamVariant","properties":[{"index":0,"name":"ParamGroupTag","mapping_type":{"type":"StructProperty","struct_type":"GameplayTag"}},{"index":1,"name":"ColorParams","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"MaterialVectorVariant"}}},{"index":2,"name":"VectorParams","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"VectorParamVariant"}}},{"index":3,"name":"FloatParams","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"MaterialFloatVariant"}}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/ManagedParticleSwapVariant.json: -------------------------------------------------------------------------------- 1 | {"name":"ManagedParticleSwapVariant","properties":[{"index":0,"name":"ParamGroupTag","mapping_type":{"type":"StructProperty","struct_type":"GameplayTag"}},{"index":1,"name":"ParticleToOverride","mapping_type":{"type":"StructProperty","struct_type":"FortPortableSoftParticles"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/Margin.json: -------------------------------------------------------------------------------- 1 | {"name":"Margin","properties":[{"index":0,"name":"Left","mapping_type":{"type":"StructProperty","struct_type":"FloatProperty"}},{"index":1,"name":"Top","mapping_type":{"type":"StructProperty","struct_type":"FloatProperty"}},{"index":2,"name":"Right","mapping_type":{"type":"StructProperty","struct_type":"FloatProperty"}},{"index":3,"name":"Bottom","mapping_type":{"type":"StructProperty","struct_type":"FloatProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/MarshalledVFXAuthoredData.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MarshalledVFXAuthoredData", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "NiagaraVFX", 7 | "mapping_type": { 8 | "type": "ArrayProperty", 9 | "sub_type": { 10 | "type": "StructProperty", 11 | "struct_type": "MarshalledVFXData" 12 | } 13 | } 14 | }, 15 | { 16 | "index": 1, 17 | "name": "Unknown", 18 | "mapping_type": { 19 | "type": "ByteProperty" 20 | } 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/MarshalledVFXData.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MarshalledVFXData", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "ParameterGroups", 7 | "mapping_type": { 8 | "type": "StructProperty", 9 | "struct_type": "GameplayTagContainer" 10 | } 11 | }, 12 | { 13 | "index": 1, 14 | "name": "Type", 15 | "mapping_type": { 16 | "type": "EnumProperty", 17 | "enum_type": "EFXType" 18 | } 19 | }, 20 | { 21 | "index": 2, 22 | "name": "Asset", 23 | "mapping_type": { 24 | "type": "SoftObjectProperty" 25 | } 26 | }, 27 | { 28 | "index": 3, 29 | "name": "AttachAtBone", 30 | "mapping_type": { 31 | "type": "NameProperty" 32 | } 33 | }, 34 | { 35 | "index": 4, 36 | "name": "RelativeOffset", 37 | "mapping_type": { 38 | "type": "StructProperty", 39 | "struct_type": "Transform" 40 | } 41 | }, 42 | { 43 | "index": 5, 44 | "name": "EffectIdTag", 45 | "mapping_type": { 46 | "type": "StructProperty", 47 | "struct_type": "GameplayTag" 48 | } 49 | }, 50 | { 51 | "index": 6, 52 | "name": "bAutoActivate", 53 | "mapping_type": { 54 | "type": "BoolProperty" 55 | } 56 | } 57 | ] 58 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/MarshalledVFX_AuthoredDataConfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MarshalledVFX_AuthoredDataConfig", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "Index0", 7 | "mapping_type": { 8 | "type": "ByteProperty" 9 | } 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/MarshallerGliderPreset_C.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MarshallerGliderPreset_C", 3 | "properties": [ 4 | { 5 | "index": 1, 6 | "name": "Data", 7 | "mapping_type": { 8 | "type": "StructProperty", 9 | "struct_type": "MarshalledVFXAuthoredData" 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/Marshaller_CCPM_Preset_C.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Marshaller_CCPM_Preset_C", 3 | "properties": [ 4 | { 5 | "index": 1, 6 | "name": "Data", 7 | "mapping_type": { 8 | "type": "StructProperty", 9 | "struct_type": "MarshalledVFXAuthoredData" 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/Marshaller_Glider_Preset_C.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Marshaller_Glider_Preset_C", 3 | "properties": [ 4 | { 5 | "index": 1, 6 | "name": "Data", 7 | "mapping_type": { 8 | "type": "StructProperty", 9 | "struct_type": "MarshalledVFXAuthoredData" 10 | } 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/MaterialFloatVariant.json: -------------------------------------------------------------------------------- 1 | {"name":"MaterialFloatVariant","properties":[{"index":0,"name":"Value","mapping_type":{"type":"FloatProperty"}},{"index":1,"name":"ParamName","mapping_type":{"type":"NameProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/MaterialInstanceBasePropertyOverrides.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MaterialInstanceBasePropertyOverrides", 3 | "properties": [ 4 | { 5 | "index": 9, 6 | "name": "BlendMode", 7 | "mapping_type": { 8 | "type": "ByteProperty" 9 | } 10 | }, 11 | { 12 | "index": 10, 13 | "name": "ShadingModel", 14 | "mapping_type": { 15 | "type": "ByteProperty" 16 | } 17 | }, 18 | { 19 | "index": 11, 20 | "name": "OpacityMaskClipValue", 21 | "mapping_type": { 22 | "type": "FloatProperty" 23 | } 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/MaterialInstanceConstant.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MaterialInstanceConstant", 3 | "properties": [ 4 | { 5 | "index": 10, 6 | "name": "Parent", 7 | "mapping_type": { 8 | "type": "ObjectProperty" 9 | } 10 | }, 11 | { 12 | "index": 11, 13 | "name": "bHasStaticPermutationResource", 14 | "mapping_type": { 15 | "type": "BoolProperty" 16 | } 17 | }, 18 | { 19 | "index": 13, 20 | "name": "ScalarParameterValues", 21 | "mapping_type": { 22 | "type": "ArrayProperty", 23 | "sub_type": { 24 | "type": "StructProperty", 25 | "struct_type": "ScalarParameterValue" 26 | } 27 | } 28 | }, 29 | { 30 | "index": 14, 31 | "name": "VectorParameterValues", 32 | "mapping_type": { 33 | "type": "ArrayProperty", 34 | "sub_type": { 35 | "type": "StructProperty", 36 | "struct_type": "VectorParameterValue" 37 | } 38 | } 39 | }, 40 | { 41 | "index": 15, 42 | "name": "TextureParameterValues", 43 | "mapping_type": { 44 | "type": "ArrayProperty", 45 | "sub_type": { 46 | "type": "StructProperty", 47 | "struct_type": "TextureParameterValue" 48 | } 49 | } 50 | }, 51 | { 52 | "index": 18, 53 | "name": "BasePropertyOverrides", 54 | "mapping_type": { 55 | "type": "StructProperty", 56 | "struct_type": "MaterialInstanceBasePropertyOverrides" 57 | } 58 | }, 59 | { 60 | "index": 19, 61 | "name": "StaticParameters", 62 | "mapping_type": { 63 | "type": "StructProperty", 64 | "struct_type": "StaticParameterSet" 65 | } 66 | }, 67 | { 68 | "index": 21, 69 | "name": "CachedReferenceTextures", 70 | "mapping_type": { 71 | "type": "ArrayProperty", 72 | "sub_type": { 73 | "type": "ObjectProperty" 74 | } 75 | } 76 | } 77 | ] 78 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/MaterialParameterInfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MaterialParameterInfo", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "Name", 7 | "mapping_type": { 8 | "type": "NameProperty" 9 | } 10 | }, 11 | { 12 | "index": 1, 13 | "name": "Assocation", 14 | "mapping_type": { 15 | "type": "ByteProperty" 16 | } 17 | }, 18 | { 19 | "index": 2, 20 | "name": "Index", 21 | "mapping_type": { 22 | "type": "IntProperty" 23 | } 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/MaterialParamterDef.json: -------------------------------------------------------------------------------- 1 | {"name":"MaterialParamterDef","properties":[{"index":0,"name":"MaterialToAlter","mapping_type":{"type":"SoftObjectProperty"}},{"index":1,"name":"CascadeMaterialName","mapping_type":{"type":"NameProperty"}},{"index":2,"name":"ColorParams","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"MaterialVectorVariant"}}},{"index":3,"name":"TextureParams","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"MaterialTextureVariant"}}},{"index":4,"name":"FloatParams","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"MaterialFloatVariant"}}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/MaterialTextureVariant.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MaterialTextureVariant", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "Value", 7 | "mapping_type": { 8 | "type": "SoftObjectProperty" 9 | } 10 | }, 11 | { 12 | "index": 1, 13 | "name": "ParamName", 14 | "mapping_type": { 15 | "type": "NameProperty" 16 | } 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/MaterialVariantDef.json: -------------------------------------------------------------------------------- 1 | {"name":"MaterialVariantDef","properties":[{"index":0,"name":"VariantMaterials","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"MaterialVariants"}}},{"index":1,"name":"VariantMaterialParams","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"MaterialParamterDef"}}},{"index":2,"name":"VariantSounds","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"SoundVariant"}}},{"index":3,"name":"VariantFoley","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"FoleySoundVariant"}}},{"index":4,"name":"MetaTags","mapping_type":{"type":"StructProperty","struct_type":"CosmeticMetaTagContainer"}},{"index":5,"name":"bStartUnlocked","mapping_type":{"type":"BoolProperty"}},{"index":6,"name":"bIsDefault","mapping_type":{"type":"BoolProperty"}},{"index":7,"name":"bHideIfNotOwned","mapping_type":{"type":"BoolProperty"}},{"index":8,"name":"CustomizationVariantTag","mapping_type":{"type":"StructProperty","struct_type":"GameplayTag"}},{"index":9,"name":"VariantName","mapping_type":{"type":"TextProperty"}},{"index":10,"name":"PreviewImage","mapping_type":{"type":"SoftObjectProperty"}},{"index":11,"name":"UnlockRequirements","mapping_type":{"type":"TextProperty"}},{"index":12,"name":"UnlockingItemDef","mapping_type":{"type":"SoftObjectProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/MaterialVariants.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MaterialVariants", 3 | "properties": [{ 4 | "index": 0, 5 | "name": "MaterialToSwap", 6 | "mapping_type": { 7 | "type": "SoftObjectProperty" 8 | } 9 | }, { 10 | "index": 1, 11 | "name": "ComponentToOverride", 12 | "mapping_type": { 13 | "type": "NameProperty" 14 | } 15 | }, { 16 | "index": 2, 17 | "name": "CascadeMaterialName", 18 | "mapping_type": { 19 | "type": "NameProperty" 20 | } 21 | }, { 22 | "index": 3, 23 | "name": "MaterialOverrideIndex", 24 | "mapping_type": { 25 | "type": "IntProperty" 26 | } 27 | }, { 28 | "index": 4, 29 | "name": "OverrideMaterial", 30 | "mapping_type": { 31 | "type": "SoftObjectProperty" 32 | } 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /mappings/jwp/classes/MaterialVectorVariant.json: -------------------------------------------------------------------------------- 1 | {"name":"MaterialVectorVariant","properties":[{"index":0,"name":"Value","mapping_type":{"type":"StructProperty","struct_type":"LinearColor"}},{"index":1,"name":"ParamName","mapping_type":{"type":"NameProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/McpVariantChannelInfo.json: -------------------------------------------------------------------------------- 1 | {"name":"McpVariantChannelInfo","properties":[{"index":0,"name":"OwnedVariantTags","mapping_type":{"type":"StructProperty","struct_type":"GameplayTagContainer"}},{"index":1,"name":"ItemVariantIsUsedFor","mapping_type":{"type":"ObjectProperty"}},{"index":2,"name":"CustomData","mapping_type":{"type":"StrProperty"}},{"index":3,"name":"VariantChannelTag","mapping_type":{"type":"StructProperty","struct_type":"GameplayTag"}},{"index":4,"name":"ActiveVariantTag","mapping_type":{"type":"StructProperty","struct_type":"GameplayTag"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/MeshVariant.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MeshVariant", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "MeshToSwap", 7 | "mapping_type": { 8 | "type": "SoftObjectProperty" 9 | } 10 | }, 11 | { 12 | "index": 1, 13 | "name": "ComponentToOverride", 14 | "mapping_type": { 15 | "type": "NameProperty" 16 | } 17 | }, 18 | { 19 | "index": 2, 20 | "name": "OverrideMesh", 21 | "mapping_type": { 22 | "type": "SoftObjectProperty" 23 | } 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/MontageItemAccessData.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MontageItemAccessData", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "AccessTag", 7 | "mapping_type": { 8 | "type": "StructProperty", 9 | "struct_type": "GameplayTag" 10 | } 11 | }, 12 | { 13 | "index": 1, 14 | "name": "AccessToken", 15 | "mapping_type": { 16 | "type": "ObjectProperty" 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/MontageVisibilityData.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MontageVisibilityData", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "Rule", 7 | "mapping_type": { 8 | "type": "EnumProperty", 9 | "enum_type": "EMontageVisibilityRule" 10 | } 11 | }, 12 | { 13 | "index": 1, 14 | "name": "Item", 15 | "mapping_type": { 16 | "type": "ObjectProperty" 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/ParticleParamterVariant.json: -------------------------------------------------------------------------------- 1 | {"name":"ParticleParamterVariant","properties":[{"index":0,"name":"ParticleSystemToAlter","mapping_type":{"type":"SoftObjectProperty"}},{"index":1,"name":"ColorParams","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"MaterialVectorVariant"}}},{"index":2,"name":"VectorParams","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"VectorParamVariant"}}},{"index":3,"name":"FloatParams","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"MaterialFloatVariant"}}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/ParticleVariant.json: -------------------------------------------------------------------------------- 1 | {"name":"ParticleVariant","properties":[{"index":0,"name":"ParticleSystemToAlter","mapping_type":{"type":"SoftObjectProperty"}},{"index":1,"name":"ComponentToOverride","mapping_type":{"type":"NameProperty"}},{"index":2,"name":"OverrideParticleSystem","mapping_type":{"type":"SoftObjectProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/ParticleVariantDef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ParticleVariantDef", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "VariantMaterials", 7 | "mapping_type": { 8 | "type": "ArrayProperty", 9 | "sub_type": { 10 | "type": "StructProperty", 11 | "struct_type": "MaterialVariants" 12 | } 13 | } 14 | }, 15 | { 16 | "index": 1, 17 | "name": "VariantMaterialParams", 18 | "mapping_type": { 19 | "type": "ArrayProperty", 20 | "sub_type": { 21 | "type": "StructProperty", 22 | "struct_type": "MaterialParamterDef" 23 | } 24 | } 25 | }, 26 | { 27 | "index": 2, 28 | "name": "InitialParticleSystemData", 29 | "mapping_type": { 30 | "type": "ArrayProperty", 31 | "sub_type": { 32 | "type": "StructProperty", 33 | "struct_type": "VariantParticleSystemInitializerData" 34 | } 35 | } 36 | }, 37 | { 38 | "index": 3, 39 | "name": "VariantParticles", 40 | "mapping_type": { 41 | "type": "ArrayProperty", 42 | "sub_type": { 43 | "type": "StructProperty", 44 | "struct_type": "ParticleVariant" 45 | } 46 | } 47 | }, 48 | { 49 | "index": 4, 50 | "name": "VariantParticleParams", 51 | "mapping_type": { 52 | "type": "ArrayProperty", 53 | "sub_type": { 54 | "type": "StructProperty", 55 | "struct_type": "ParticleParamterVariant" 56 | } 57 | } 58 | }, 59 | { 60 | "index": 5, 61 | "name": "VariantAlteredParticleParams", 62 | "mapping_type": { 63 | "type": "ArrayProperty", 64 | "sub_type": { 65 | "type": "StructProperty", 66 | "struct_type": "ManagedParticleParamVariant" 67 | } 68 | } 69 | }, 70 | { 71 | "index": 6, 72 | "name": "bIndex7", 73 | "mapping_type": { 74 | "type": "BoolProperty" 75 | } 76 | }, 77 | { 78 | "index": 7, 79 | "name": "MetaTags", 80 | "mapping_type": { 81 | "type": "StructProperty", 82 | "struct_type": "CosmeticMetaTagContainer" 83 | } 84 | }, 85 | { 86 | "index": 8, 87 | "name": "bStartUnlocked", 88 | "mapping_type": { 89 | "type": "BoolProperty" 90 | } 91 | }, 92 | { 93 | "index": 9, 94 | "name": "bIsDefault", 95 | "mapping_type": { 96 | "type": "BoolProperty" 97 | } 98 | }, 99 | { 100 | "index": 10, 101 | "name": "bHideIfNotOwned", 102 | "mapping_type": { 103 | "type": "BoolProperty" 104 | } 105 | }, 106 | { 107 | "index": 11, 108 | "name": "CustomizationVariantTag", 109 | "mapping_type": { 110 | "type": "StructProperty", 111 | "struct_type": "GameplayTag" 112 | } 113 | }, 114 | { 115 | "index": 12, 116 | "name": "VariantName", 117 | "mapping_type": { 118 | "type": "TextProperty" 119 | } 120 | }, 121 | { 122 | "index": 13, 123 | "name": "PreviewImage", 124 | "mapping_type": { 125 | "type": "SoftObjectProperty" 126 | } 127 | }, 128 | { 129 | "index": 14, 130 | "name": "UnlockRequirements", 131 | "mapping_type": { 132 | "type": "TextProperty" 133 | } 134 | }, 135 | { 136 | "index": 15, 137 | "name": "UnlockingItemDef", 138 | "mapping_type": { 139 | "type": "SoftObjectProperty" 140 | } 141 | } 142 | ] 143 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/RichColorVariant.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RichColorVariant", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "DefaultStartingColor", 7 | "mapping_type": { 8 | "type": "StructProperty", 9 | "struct_type": "LinearColor" 10 | } 11 | }, 12 | { 13 | "index": 1, 14 | "name": "ColorSwatchForChoices", 15 | "mapping_type": { 16 | "type": "SoftObjectProperty" 17 | } 18 | }, 19 | { 20 | "index": 3, 21 | "name": "MaterialsToAlter", 22 | "mapping_type": { 23 | "type": "ArrayProperty", 24 | "sub_type": { 25 | "type": "SoftObjectProperty" 26 | } 27 | } 28 | }, 29 | { 30 | "index": 4, 31 | "name": "ParticlesToAlter", 32 | "mapping_type": { 33 | "type": "ArrayProperty", 34 | "sub_type": { 35 | "type": "SoftObjectProperty" 36 | } 37 | } 38 | }, 39 | { 40 | "index": 5, 41 | "name": "ColorParamName", 42 | "mapping_type": { 43 | "type": "NameProperty" 44 | } 45 | } 46 | ] 47 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/RichColorVariantDef.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RichColorVariantDef", 3 | "properties": [ 4 | { 5 | "index": 1, 6 | "name": "RichColorVar", 7 | "mapping_type": { 8 | "type": "StructProperty", 9 | "struct_type": "RichColorVariant" 10 | } 11 | }, 12 | { 13 | "index": 2, 14 | "name": "bStartUnlocked", 15 | "mapping_type": { 16 | "type": "BoolProperty" 17 | } 18 | }, 19 | { 20 | "index": 3, 21 | "name": "bIsDefault", 22 | "mapping_type": { 23 | "type": "BoolProperty" 24 | } 25 | }, 26 | { 27 | "index": 5, 28 | "name": "CustomizationVariantTag", 29 | "mapping_type": { 30 | "type": "StructProperty", 31 | "struct_type": "GameplayTag" 32 | } 33 | }, 34 | { 35 | "index": 6, 36 | "name": "VariantName", 37 | "mapping_type": { 38 | "type": "TextProperty" 39 | } 40 | } 41 | ] 42 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/ScalableFloat.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ScalableFloat", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "Value", 7 | "mapping_type": { 8 | "type": "FloatProperty" 9 | } 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/ScalarParameterValue.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ScalarParameterValue", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "ParameterInfo", 7 | "mapping_type": { 8 | "type": "StructProperty", 9 | "struct_type": "MaterialParameterInfo" 10 | } 11 | }, 12 | { 13 | "index": 1, 14 | "name": "ParameterValue", 15 | "mapping_type": { 16 | "type": "FloatProperty" 17 | } 18 | }, 19 | { 20 | "index": 2, 21 | "name": "ExpressionGUID", 22 | "mapping_type": { 23 | "type": "StructProperty", 24 | "struct_type": "Guid" 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/ScriptedActionVariant.json: -------------------------------------------------------------------------------- 1 | {"name":"ScriptedActionVariant","properties":[{"index":0,"name":"ActionTag","mapping_type":{"type":"StructProperty","struct_type":"GameplayTag"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/SectionNameAndWeight.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SectionNameAndWeight", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "SectionName", 7 | "mapping_type": { 8 | "type": "NameProperty" 9 | } 10 | }, 11 | { 12 | "index": 1, 13 | "name": "SectionWeight", 14 | "mapping_type": { 15 | "type": "FloatProperty" 16 | } 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/SlateBrush.json: -------------------------------------------------------------------------------- 1 | {"name":"SlateBrush","properties":[{"index":0,"name":"ImageSize","mapping_type":{"type":"StructProperty","struct_type":"Vector2D"}},{"index":1,"name":"Margin","mapping_type":{"type":"StructProperty","struct_type":"Margin"}},{"index":2,"name":"TintColor","mapping_type":{"type":"StructProperty","struct_type":"SlateColor"}},{"index":3,"name":"ResourceObject","mapping_type":{"type":"ObjectProperty"}},{"index":4,"name":"ResourceName","mapping_type":{"type":"NameProperty"}},{"index":5,"name":"UVRegion","mapping_type":{"type":"StructProperty","struct_type":"Box2D"}},{"index":6,"name":"DrawAs","mapping_type":{"type":"EnumProperty","enum_type":"ESlateBrushDrawType"}},{"index":7,"name":"Tiling","mapping_type":{"type":"EnumProperty","enum_type":"ESlateBrushTileType"}},{"index":8,"name":"Mirroring","mapping_type":{"type":"EnumProperty","enum_type":"ESlateBrushMirrorType"}},{"index":9,"name":"ImageType","mapping_type":{"type":"EnumProperty","enum_type":"ESlateBrushImageType"}},{"index":10,"name":"bIsDynamicallyLoaded","mapping_type":{"type":"BoolProperty"}},{"index":11,"name":"bHasUObject","mapping_type":{"type":"BoolProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/SlateColor.json: -------------------------------------------------------------------------------- 1 | {"name":"SlateColor","properties":[{"index":0,"name":"SpecifiedColor","mapping_type":{"type":"StructProperty","struct_type":"LinearColor"}},{"index":1,"name":"ColorUseRule","mapping_type":{"type":"EnumProperty","enum_type":"ESlateColorStylingMode"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/SocketTransformVariant.json: -------------------------------------------------------------------------------- 1 | {"name":"SocketTransformVariant","properties":[{"index":0,"name":"SourceSocketName","mapping_type":{"type":"NameProperty"}},{"index":1,"name":"OverridSocketName","mapping_type":{"type":"NameProperty"}},{"index":2,"name":"SourceObjectToModify","mapping_type":{"type":"SoftObjectProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/SoundVariant.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SoundVariant", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "SoundToSwap", 7 | "mapping_type": { 8 | "type": "SoftObjectProperty" 9 | } 10 | }, 11 | { 12 | "index": 1, 13 | "name": "ComponentToOverride", 14 | "mapping_type": { 15 | "type": "NameProperty" 16 | } 17 | }, 18 | { 19 | "index": 2, 20 | "name": "OverrideSound", 21 | "mapping_type": { 22 | "type": "SoftObjectProperty" 23 | } 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/SoundWave.json: -------------------------------------------------------------------------------- 1 | {"name":"SoundWave","properties":[{"index":0,"name":"CompressionQuality","mapping_type":{"type":"IntProperty"}},{"index":1,"name":"StreamingPriority","mapping_type":{"type":"IntProperty"}},{"index":2,"name":"SampleRateQuality","mapping_type":{"type":"EnumProperty","enum_type":"ESoundwaveSampleRateSettings"}},{"index":3,"name":"SoundGroup","mapping_type":{"type":"EnumProperty","enum_type":"ESoundGroup"}},{"index":4,"name":"bLooping","mapping_type":{"type":"BoolProperty"}},{"index":5,"name":"bStreaming","mapping_type":{"type":"BoolProperty"}},{"index":6,"name":"bSeekableStreaming","mapping_type":{"type":"BoolProperty"}},{"index":7,"name":"LoadingBehavior","mapping_type":{"type":"EnumProperty","enum_type":"ESoundWaveLoadingBehavior"}},{"index":8,"name":"bMature","mapping_type":{"type":"BoolProperty"}},{"index":9,"name":"bManualWordWrap","mapping_type":{"type":"BoolProperty"}},{"index":10,"name":"bSingleLine","mapping_type":{"type":"BoolProperty"}},{"index":11,"name":"bIsAmbisonics","mapping_type":{"type":"BoolProperty"}},{"index":12,"name":"FrequenciesToAnalyze","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"FloatProperty"}}},{"index":13,"name":"CookedSpectralTimeData","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"SoundWaveSpectralTimeData"}}},{"index":14,"name":"CookedEnvelopeTimeData","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"SoundWaveEnvelopeTimeData"}}},{"index":15,"name":"InitialChunkSize","mapping_type":{"type":"IntProperty"}},{"index":16,"name":"SpokenText","mapping_type":{"type":"StrProperty"}},{"index":17,"name":"SubtitlePriority","mapping_type":{"type":"FloatProperty"}},{"index":18,"name":"Volume","mapping_type":{"type":"FloatProperty"}},{"index":19,"name":"Pitch","mapping_type":{"type":"FloatProperty"}},{"index":20,"name":"NumChannels","mapping_type":{"type":"IntProperty"}},{"index":21,"name":"SampleRate","mapping_type":{"type":"IntProperty"}},{"index":22,"name":"Subtitles","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"SubtitleCue"}}},{"index":23,"name":"Curves","mapping_type":{"type":"ObjectProperty"}},{"index":24,"name":"InternalCurves","mapping_type":{"type":"ObjectProperty"}},{"index":25,"name":"SoundClassObject","mapping_type":{"type":"ObjectProperty"}},{"index":26,"name":"bDebug","mapping_type":{"type":"BoolProperty"}},{"index":27,"name":"bOverrideConcurrency","mapping_type":{"type":"BoolProperty"}},{"index":28,"name":"bOutputToBusOnly","mapping_type":{"type":"BoolProperty"}},{"index":29,"name":"bHasDelayNode","mapping_type":{"type":"BoolProperty"}},{"index":30,"name":"bHasConcatenatorNode","mapping_type":{"type":"BoolProperty"}},{"index":31,"name":"bBypassVolumeScaleForPriority","mapping_type":{"type":"BoolProperty"}},{"index":32,"name":"VirtualizationMode","mapping_type":{"type":"EnumProperty","enum_type":"EVirtualizationMode"}},{"index":35,"name":"Duration","mapping_type":{"type":"FloatProperty"}},{"index":36,"name":"MaxDistance","mapping_type":{"type":"FloatProperty"}},{"index":37,"name":"TotalSamples","mapping_type":{"type":"FloatProperty"}},{"index":38,"name":"Priority","mapping_type":{"type":"FloatProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/SoundWaveEnvelopeTimeData.json: -------------------------------------------------------------------------------- 1 | {"name":"SoundWaveEnvelopeTimeData","properties":[{"index":0,"name":"Amplitude","mapping_type":{"type":"FloatProperty"}},{"index":1,"name":"TimeSec","mapping_type":{"type":"FloatProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/SoundWaveSpectralDataEntry.json: -------------------------------------------------------------------------------- 1 | {"name":"SoundWaveSpectralDataEntry","properties":[{"index":0,"name":"Magnitude","mapping_type":{"type":"FloatProperty"}},{"index":1,"name":"NormalizedMagnitude","mapping_type":{"type":"FloatProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/SoundWaveSpectralTimeData.json: -------------------------------------------------------------------------------- 1 | {"name":"SoundWaveSpectralTimeData","properties":[{"index":0,"name":"Data","mapping_type":{"type":"ArrayProperty","sub_type":{"type":"StructProperty","struct_type":"SoundWaveSpectralDataEntry"}}},{"index":1,"name":"TimeSec","mapping_type":{"type":"FloatProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/StaticParameterSet.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "StaticParameterSet", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "StaticSwitchParameters", 7 | "mapping_type": { 8 | "type": "ArrayProperty", 9 | "sub_type": { 10 | "type": "StructProperty", 11 | "struct_type": "StaticSwitchParameter" 12 | } 13 | } 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/StaticSwitchParameter.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "StaticSwitchParameter", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "Value", 7 | "mapping_type": { 8 | "type": "BoolProperty" 9 | } 10 | }, 11 | { 12 | "index": 1, 13 | "name": "ParameterInfo", 14 | "mapping_type": { 15 | "type": "StructProperty", 16 | "struct_type": "MaterialParameterInfo" 17 | } 18 | }, 19 | { 20 | "index": 2, 21 | "name": "bOverride", 22 | "mapping_type": { 23 | "type": "BoolProperty" 24 | } 25 | }, 26 | { 27 | "index": 3, 28 | "name": "ExpressionGUID", 29 | "mapping_type": { 30 | "type": "StructProperty", 31 | "struct_type": "Guid" 32 | } 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/SubtitleCue.json: -------------------------------------------------------------------------------- 1 | {"name":"SubtitleCue","properties":[{"index":0,"name":"Text","mapping_type":{"type":"TextProperty"}},{"index":1,"name":"Time","mapping_type":{"type":"FloatProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/Texture2D.json: -------------------------------------------------------------------------------- 1 | {"name":"Texture2D","properties":[{"index":3,"name":"AddressX","mapping_type":{"type":"ByteProperty"}},{"index":4,"name":"AddressY","mapping_type":{"type":"ByteProperty"}},{"index":5,"name":"ImportedSize","mapping_type":{"type":"StructProperty","struct_type":"IntPoint"}},{"index":6,"name":"LightingGuid","mapping_type":{"type":"StructProperty","struct_type":"Guid"}},{"index":7,"name":"LODBias","mapping_type":{"type":"IntProperty"}},{"index":8,"name":"CompressionSettings","mapping_type":{"type":"ByteProperty"}},{"index":10,"name":"MipLoadOptions","mapping_type":{"type":"ByteProperty"}},{"index":11,"name":"LODGroup","mapping_type":{"type":"ByteProperty"}},{"index":14,"name":"SRGB","mapping_type":{"type":"BoolProperty"}},{"index":27,"name":"NeverStream","mapping_type":{"type":"BoolProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/TextureParameterValue.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TextureParameterValue", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "ParameterInfo", 7 | "mapping_type": { 8 | "type": "StructProperty", 9 | "struct_type": "MaterialParameterInfo" 10 | } 11 | }, 12 | { 13 | "index": 1, 14 | "name": "ParameterValue", 15 | "mapping_type": { 16 | "type": "ObjectProperty" 17 | } 18 | }, 19 | { 20 | "index": 2, 21 | "name": "ExpressionGUID", 22 | "mapping_type": { 23 | "type": "StructProperty", 24 | "struct_type": "Guid" 25 | } 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/Transform.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Transform", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "Rotation", 7 | "mapping_type": { 8 | "type": "StructProperty", 9 | "struct_type": "Quat" 10 | } 11 | }, 12 | { 13 | "index": 1, 14 | "name": "Translation", 15 | "mapping_type": { 16 | "type": "StructProperty", 17 | "struct_type": "Vector" 18 | } 19 | }, 20 | { 21 | "index": 2, 22 | "name": "Scale3D", 23 | "mapping_type": { 24 | "type": "StructProperty", 25 | "struct_type": "Vector" 26 | } 27 | } 28 | ] 29 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/VariantParticleSystemInitializerData.json: -------------------------------------------------------------------------------- 1 | {"name":"VariantParticleSystemInitializerData","properties":[{"index":0,"name":"ParticleComponentName","mapping_type":{"type":"NameProperty"}},{"index":1,"name":"ParticleSystem","mapping_type":{"type":"SoftObjectProperty"}},{"index":2,"name":"MeshToBindTO","mapping_type":{"type":"SoftObjectProperty"}},{"index":3,"name":"AttachSocketName","mapping_type":{"type":"NameProperty"}},{"index":4,"name":"LocationRule","mapping_type":{"type":"EnumProperty"}},{"index":5,"name":"RotationRule","mapping_type":{"type":"EnumProperty"}},{"index":6,"name":"ScaleRule","mapping_type":{"type":"EnumProperty"}},{"index":7,"name":"bWeldSimulatedBodies","mapping_type":{"type":"BoolProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/VariantSwapMontageData.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "VariantSwapMontageData", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "VariantMetaTagRequired", 7 | "mapping_type": { 8 | "type": "StructProperty", 9 | "struct_type": "GameplayTag" 10 | } 11 | }, 12 | { 13 | "index": 1, 14 | "name": "MontageSectionName", 15 | "mapping_type": { 16 | "type": "NameProperty" 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/VariantTypeMaterials.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "VariantTypeMaterials", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "VariantMaterials", 7 | "mapping_type": { 8 | "type": "ArrayProperty", 9 | "sub_type": { 10 | "type": "StructProperty", 11 | "struct_type": "MaterialVariants" 12 | } 13 | } 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/VariantTypeParticles.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "VariantTypeParticles", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "VariantMaterials", 7 | "mapping_type": { 8 | "type": "ArrayProperty", 9 | "sub_type": { 10 | "type": "StructProperty", 11 | "struct_type": "ParticleVariant" 12 | } 13 | } 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/VariantTypeSounds.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "VariantTypeSounds", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "VariantSounds", 7 | "mapping_type": { 8 | "type": "ArrayProperty", 9 | "sub_type": { 10 | "type": "StructProperty", 11 | "struct_type": "SoundVariant" 12 | } 13 | } 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/VectorParamVariant.json: -------------------------------------------------------------------------------- 1 | {"name":"VectorParamVariant","properties":[{"index":0,"name":"Value","mapping_type":{"type":"StructProperty","struct_type":"Vector"}},{"index":1,"name":"ParamName","mapping_type":{"type":"NameProperty"}}]} -------------------------------------------------------------------------------- /mappings/jwp/classes/VectorParameterValue.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "VectorParameterValue", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "ParameterInfo", 7 | "mapping_type": { 8 | "type": "StructProperty", 9 | "struct_type": "MaterialParameterInfo" 10 | } 11 | }, 12 | { 13 | "index": 1, 14 | "name": "ParameterValue", 15 | "mapping_type": { 16 | "type": "StructProperty", 17 | "struct_type": "LinearColor" 18 | } 19 | }, 20 | { 21 | "index": 2, 22 | "name": "ExpressionGUID", 23 | "mapping_type": { 24 | "type": "StructProperty", 25 | "struct_type": "Guid" 26 | } 27 | } 28 | ] 29 | } -------------------------------------------------------------------------------- /mappings/jwp/classes/VectorParticleParameter.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "VectorParticleParameter", 3 | "properties": [ 4 | { 5 | "index": 0, 6 | "name": "Value", 7 | "mapping_type": { 8 | "type": "StructProperty", 9 | "struct_type": "Vector" 10 | } 11 | }, 12 | { 13 | "index": 1, 14 | "name": "ParameterName", 15 | "mapping_type": { 16 | "type": "NameProperty" 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /mappings/jwp/enums/EFortRarity.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "EFortRarity", 3 | "values": [ 4 | "Common", 5 | "Uncommon", 6 | "Rare", 7 | "Epic", 8 | "Legendary", 9 | "Mythic", 10 | "Transcendant" 11 | ] 12 | } -------------------------------------------------------------------------------- /mappings/smart.usmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorkingRobot/ZenReader/6093412027ec8930d68d241f9f2cf0158b1db7b4/mappings/smart.usmap -------------------------------------------------------------------------------- /src/Enums/EAssetType.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | enum class EAssetType : uint8_t { 7 | UASSET, // name maps, export/import maps, etc 8 | UEXP, // asset data 9 | UBULK, // images, skins, etc 10 | UMAP, // maps 11 | 12 | UPROJECT, // FortniteGame.uproject, just json 13 | UPLUGINMANIFEST, // FortniteGame.upluginmanifest, just json 14 | UPLUGIN, // just json 15 | 16 | USHADERBYTECODE, // shader bytecode 17 | UPIPELINECACHE, // something? 18 | UDIC, // oodle dictionary network compression 19 | 20 | LOCMETA, // localization 21 | LOCRES, // localization 22 | 23 | PNG, // images 24 | PSD, // photoshop psd 25 | 26 | UFONT, // otf format 27 | TTF, // font 28 | TPS, // font metadata, xml 29 | 30 | ICU, // icudt64l stuff 31 | RES, // icudt64l stuff 32 | CFU, // icudt64l stuff 33 | NRM, // icudt64l stuff 34 | BRK, // icudt64l stuff 35 | DICT, // icudt64l stuff 36 | 37 | BIN, // shader cache, asset registry, PCM audio (Content/VoiceData/player_message_01_24k.bin) 38 | INI, // hotfixes, engine inis, etc 39 | PEM, // cacert.pem 40 | K, // facial animations, they're zip files with stuff in em 41 | 42 | UNKNOWN = 0xFF, // extension is not known 43 | }; 44 | } -------------------------------------------------------------------------------- /src/Enums/EBulkDataFlags.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | enum class EBulkDataFlags : int32_t 7 | { 8 | /** Empty flag set. */ 9 | BULKDATA_None = 0, 10 | /** If set, payload is stored at the end of the file and not inline. */ 11 | BULKDATA_PayloadAtEndOfFile = 1 << 0, 12 | /** If set, payload should be [un]compressed using ZLIB during serialization. */ 13 | BULKDATA_SerializeCompressedZLIB = 1 << 1, 14 | /** Force usage of SerializeElement over bulk serialization. */ 15 | BULKDATA_ForceSingleElementSerialization = 1 << 2, 16 | /** Bulk data is only used once at runtime in the game. */ 17 | BULKDATA_SingleUse = 1 << 3, 18 | /** Bulk data won't be used and doesn't need to be loaded. */ 19 | BULKDATA_Unused = 1 << 5, 20 | /** Forces the payload to be saved inline, regardless of its size. */ 21 | BULKDATA_ForceInlinePayload = 1 << 6, 22 | /** Flag to check if either compression mode is specified. */ 23 | BULKDATA_SerializeCompressed = (BULKDATA_SerializeCompressedZLIB), 24 | /** Forces the payload to be always streamed, regardless of its size. */ 25 | BULKDATA_ForceStreamPayload = 1 << 7, 26 | /** If set, payload is stored in a .upack file alongside the uasset. */ 27 | BULKDATA_PayloadInSeperateFile = 1 << 8, 28 | /** DEPRECATED: If set, payload is compressed using platform specific bit window. */ 29 | BULKDATA_SerializeCompressedBitWindow = 1 << 9, 30 | /** There is a new default to inline unless you opt out. */ 31 | BULKDATA_Force_NOT_InlinePayload = 1 << 10, 32 | /** This payload is optional and may not be on device. */ 33 | BULKDATA_OptionalPayload = 1 << 11, 34 | /** This payload will be memory mapped, this requires alignment, no compression etc. */ 35 | BULKDATA_MemoryMappedPayload = 1 << 12, 36 | /** Bulk data size is 64 bits long. */ 37 | BULKDATA_Size64Bit = 1 << 13, 38 | /** Duplicate non-optional payload in optional bulk data. */ 39 | BULKDATA_DuplicateNonOptionalPayload = 1 << 14, 40 | /** Indicates that an old ID is present in the data, at some point when the DDCs are flushed we can remove this. */ 41 | BULKDATA_BadDataVersion = 1 << 15, 42 | /** BulkData did not have it's offset changed during the cook and does not need the fix up at load time */ 43 | BULKDATA_NoOffsetFixUp = 1 << 16, 44 | 45 | /* Runtime only flags below this point! Note that they take the high bits in reverse order! */ 46 | 47 | /** Assigned at runtime to indicate that the BulkData allocation is a memory mapped region of a file and not raw data. */ 48 | BULKDATA_DataIsMemoryMapped = 1 << 30, 49 | /** Assigned at runtime to indicate that the BulkData object has an async loading request in flight and will need to wait on it. */ 50 | BULKDATA_HasAsyncReadPending = 1 << 29, 51 | /** Assigned at runtime to indicate that the BulkData object should be considered for discard even if it cannot load from disk. */ 52 | BULKDATA_AlwaysAllowDiscard = 1 << 28, 53 | }; 54 | } -------------------------------------------------------------------------------- /src/Enums/ECompressionMethod.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | // Used for usmap 7 | // Oodle is best (leviathan is used) 8 | // Brotli is offered for those who want open source/non-windows 9 | enum class ECompressionMethod : uint8_t { 10 | None, 11 | Oodle, 12 | Brotli, 13 | 14 | Unknown = 0xFF 15 | }; 16 | } -------------------------------------------------------------------------------- /src/Enums/ECurveTableMode.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | enum ECurveTableMode : uint8_t 7 | { 8 | Empty, 9 | SimpleCurves, 10 | RichCurves 11 | }; 12 | } -------------------------------------------------------------------------------- /src/Enums/EDateTimeStyle.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | enum class EDateTimeStyle : int8_t 7 | { 8 | Default, 9 | Short, 10 | Medium, 11 | Long, 12 | 13 | Full 14 | // Add new enum types at the end only! They are serialized by index. 15 | }; 16 | } -------------------------------------------------------------------------------- /src/Enums/EExportFilterFlags.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | enum class EExportFilterFlags : uint8_t 7 | { 8 | None, 9 | NotForClient, 10 | NotForServer 11 | }; 12 | } -------------------------------------------------------------------------------- /src/Enums/EFormatArgumentType.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | enum class EFormatArgumentType : int8_t 7 | { 8 | Int, 9 | UInt, 10 | Float, 11 | Double, 12 | Text, 13 | Gender, 14 | // Add new enum types at the end only! They are serialized by index. 15 | }; 16 | } -------------------------------------------------------------------------------- /src/Enums/EIoChunkType.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | enum class EIoChunkType : uint8_t 7 | { 8 | Invalid, 9 | InstallManifest, 10 | ExportBundleData, 11 | BulkData, 12 | OptionalBulkData, 13 | MemoryMappedBulkData, 14 | LoaderGlobalMeta, 15 | LoaderInitialLoadMeta, 16 | LoaderGlobalNames, 17 | LoaderGlobalNameHashes, 18 | ContainerHeader 19 | }; 20 | } -------------------------------------------------------------------------------- /src/Enums/EIoContainerFlags.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | enum EIoContainerFlags : uint8_t 7 | { 8 | None, 9 | Compressed = (1 << 0), 10 | Encrypted = (1 << 1), 11 | Signed = (1 << 2), 12 | Indexed = (1 << 3) 13 | }; 14 | } -------------------------------------------------------------------------------- /src/Enums/EIoStoreTocVersion.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | enum EIoStoreTocVersion : uint8_t 7 | { 8 | Invalid = 0, 9 | Initial, 10 | DirectoryIndex, 11 | LatestPlusOne, 12 | Latest = LatestPlusOne - 1 13 | }; 14 | } -------------------------------------------------------------------------------- /src/Enums/EMappedNameType.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | // https://github.com/EpicGames/UnrealEngine/blob/ac1f4d53af58d8d00f6e2f7124f384d67bcb53c9/Engine/Source/Runtime/CoreUObject/Public/Serialization/AsyncLoading2.h#L32 7 | enum class EMappedNameType : uint8_t 8 | { 9 | Package, 10 | Container, 11 | Global 12 | }; 13 | } -------------------------------------------------------------------------------- /src/Enums/EPropertyType.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | enum class EPropertyType : uint8_t { 7 | ByteProperty, 8 | BoolProperty, 9 | IntProperty, 10 | FloatProperty, 11 | ObjectProperty, 12 | NameProperty, 13 | DelegateProperty, 14 | DoubleProperty, 15 | ArrayProperty, 16 | StructProperty, 17 | StrProperty, 18 | TextProperty, 19 | InterfaceProperty, 20 | MulticastDelegateProperty, 21 | WeakObjectProperty, // 22 | LazyObjectProperty, // When deserialized, these 3 properties will be SoftObjects 23 | AssetObjectProperty, // 24 | SoftObjectProperty, 25 | UInt64Property, 26 | UInt32Property, 27 | UInt16Property, 28 | Int64Property, 29 | Int16Property, 30 | Int8Property, 31 | MapProperty, 32 | SetProperty, 33 | EnumProperty, 34 | FieldPathProperty, 35 | 36 | Unknown = 0xFF 37 | }; 38 | } -------------------------------------------------------------------------------- /src/Enums/ERichCurveInterpMode.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | enum ERichCurveInterpMode : uint8_t 7 | { 8 | RCIM_Linear, 9 | RCIM_Constant, 10 | RCIM_Cubic, 11 | RCIM_None 12 | }; 13 | } -------------------------------------------------------------------------------- /src/Enums/ERichCurveTangentMode.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | enum ERichCurveTangentMode : uint8_t 7 | { 8 | RCTM_Auto, 9 | RCTM_User, 10 | RCTM_Break, 11 | RCTM_None 12 | }; 13 | } -------------------------------------------------------------------------------- /src/Enums/ERichCurveTangentWeightMode.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | enum ERichCurveTangentWeightMode : uint8_t 7 | { 8 | RCTWM_WeightedNone, 9 | RCTWM_WeightedArrive, 10 | RCTWM_WeightedLeave, 11 | RCTWM_WeightedBoth 12 | }; 13 | } -------------------------------------------------------------------------------- /src/Enums/ERoundingMode.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | enum class ERoundingMode : int8_t 7 | { 8 | // Rounds to the nearest place, equidistant ties go to the value which is closest to an even value: 1.5 becomes 2, 0.5 becomes 0 9 | HalfToEven, 10 | // Rounds to nearest place, equidistant ties go to the value which is further from zero: -0.5 becomes -1.0, 0.5 becomes 1.0 11 | HalfFromZero, 12 | // Rounds to nearest place, equidistant ties go to the value which is closer to zero: -0.5 becomes 0, 0.5 becomes 0. 13 | HalfToZero, 14 | // Rounds to the value which is further from zero, "larger" in absolute value: 0.1 becomes 1, -0.1 becomes -1 15 | FromZero, 16 | // Rounds to the value which is closer to zero, "smaller" in absolute value: 0.1 becomes 0, -0.1 becomes 0 17 | ToZero, 18 | // Rounds to the value which is more negative: 0.1 becomes 0, -0.1 becomes -1 19 | ToNegativeInfinity, 20 | // Rounds to the value which is more positive: 0.1 becomes 1, -0.1 becomes 0 21 | ToPositiveInfinity, 22 | 23 | // Add new enum types at the end only! They are serialized by index. 24 | }; 25 | } -------------------------------------------------------------------------------- /src/Enums/EStrippedData.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | enum class EStrippedData : uint8_t 7 | { 8 | None = 0, 9 | 10 | /* Editor data */ 11 | Editor = 1, 12 | /* All data not required for dedicated server to work correctly (usually includes editor data). */ 13 | Server = 2, 14 | 15 | // Add global flags here (up to 8 including the already defined ones). 16 | 17 | /** All flags */ 18 | All = 0xFF 19 | }; 20 | } -------------------------------------------------------------------------------- /src/Enums/ETextFlag.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | enum class ETextFlag : uint8_t 7 | { 8 | Transient = 1 << 0, 9 | CultureInvariant = 1 << 1, 10 | ConvertedProperty = 1 << 2, 11 | Immutable = 1 << 3, 12 | InitializedFromString = 1 << 4 // this ftext was initialized using FromString 13 | }; 14 | } -------------------------------------------------------------------------------- /src/Enums/ETextHistoryType.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | enum class ETextHistoryType : int8_t 7 | { 8 | None = -1, 9 | Base = 0, 10 | NamedFormat, 11 | OrderedFormat, 12 | ArgumentFormat, 13 | AsNumber, 14 | AsPercent, 15 | AsCurrency, 16 | AsDate, 17 | AsTime, 18 | AsDateTime, 19 | Transform, 20 | StringTableEntry, 21 | TextGenerator 22 | 23 | // Add new enum types at the end only! They are serialized by index. 24 | }; 25 | } -------------------------------------------------------------------------------- /src/Enums/ETransformType.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | enum class ETransformType : uint8_t 7 | { 8 | ToLower = 0, 9 | ToUpper, 10 | 11 | // Add new enum types at the end only! They are serialized by index. 12 | }; 13 | } -------------------------------------------------------------------------------- /src/Enums/EVirtualTextureCodec.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | enum class EVirtualTextureCodec : uint8_t 7 | { 8 | Black, //Special case codec, always outputs black pixels 0,0,0,0 9 | OpaqueBlack, //Special case codec, always outputs opaque black pixels 0,0,0,255 10 | White, //Special case codec, always outputs white pixels 255,255,255,255 11 | Flat, //Special case codec, always outputs 128,125,255,255 (flat normal map) 12 | RawGPU, //Uncompressed data in an GPU-ready format (e.g R8G8B8A8, BC7, ASTC, ...) 13 | ZippedGPU, //Same as RawGPU but with the data zipped 14 | Crunch, //Use the Crunch library to compress data 15 | Max, // Add new codecs before this entry 16 | }; 17 | } -------------------------------------------------------------------------------- /src/Enums/FIoStoreTocEntryMetaFlags.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Enums { 6 | // Why this is prefixed with F and not E, only per larsson will know 7 | // It's not because it's enum class either, EIoChunkType is enum class 8 | // and EIoChunkType is written by per larsson!?!?! we need an explanation man 9 | enum class FIoStoreTocEntryMetaFlags : uint8_t 10 | { 11 | None, 12 | Compressed = (1 << 0), 13 | MemoryMapped = (1 << 1) 14 | }; 15 | } -------------------------------------------------------------------------------- /src/Exceptions/BaseException.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Helpers/Format.h" 4 | 5 | #include 6 | #include 7 | 8 | namespace Zen::Exceptions { 9 | class BaseException : std::exception { 10 | public: 11 | template 12 | BaseException(const char* Format, Args&&... Data) : Description(Helpers::Format(Format, std::forward(Data)...)) {} 13 | 14 | BaseException(std::string&& Description) : Description(std::forward(Description)) {} 15 | 16 | const char* what() const override 17 | { 18 | return Description.c_str(); 19 | } 20 | 21 | private: 22 | std::string Description; 23 | }; 24 | 25 | #define DEFINE_EXCEPTION(ExceptionName) \ 26 | class ExceptionName : BaseException { \ 27 | public: \ 28 | template \ 29 | ExceptionName(const char* Format, Args&&... Data) : BaseException(Format, std::forward(Data)...) {} \ 30 | ExceptionName(std::string&& Description) : BaseException(std::forward(Description)) {} \ 31 | } 32 | 33 | DEFINE_EXCEPTION(InvalidMagicException); 34 | DEFINE_EXCEPTION(InvalidVersionException); 35 | DEFINE_EXCEPTION(InvalidChunkIdException); 36 | DEFINE_EXCEPTION(NameNotFoundException); 37 | DEFINE_EXCEPTION(StreamPropertyNotFoundException); 38 | DEFINE_EXCEPTION(SchemaNotFoundException); 39 | DEFINE_EXCEPTION(EnumNotFoundException); 40 | DEFINE_EXCEPTION(PropertyNotFoundException); 41 | DEFINE_EXCEPTION(PropertyTypeNotFoundException); 42 | DEFINE_EXCEPTION(ScriptObjectNotFoundException); 43 | DEFINE_EXCEPTION(UnsupportedOperationException); 44 | DEFINE_EXCEPTION(CompressionException); 45 | DEFINE_EXCEPTION(DecompressionException); 46 | DEFINE_EXCEPTION(KeyRequiredException); 47 | DEFINE_EXCEPTION(ArchiveCorruptedException); 48 | DEFINE_EXCEPTION(BadExportException); 49 | 50 | #undef DEFINE_EXCEPTION 51 | } -------------------------------------------------------------------------------- /src/Exports/Serializer.cpp: -------------------------------------------------------------------------------- 1 | #include "Serializer.h" 2 | 3 | #include "../Exceptions/BaseException.h" 4 | #include "../Helpers/Hash.h" 5 | #include "../Providers/Base.h" 6 | #include "UObject.h" 7 | #include "UCurveTable.h" 8 | #include "UDataTable.h" 9 | #include "UTexture2D.h" 10 | 11 | namespace Zen::Exports { 12 | using namespace Exceptions; 13 | 14 | std::any Serialize(Streams::BaseStream& InputStream, const std::string& ExportType, Streams::BaseStream* BulkStream, size_t BulkOffset) { 15 | auto Provider = (const Providers::BaseProvider*)InputStream.GetProperty(); 16 | if (!Provider) { 17 | throw StreamPropertyNotFoundException("Exports must be deserialized from ZExport"); 18 | } 19 | auto Schema = Provider->GetSchema(ExportType); 20 | if (!Schema) { 21 | throw SchemaNotFoundException("The schema for the export \"%s\" was not found", ExportType.c_str()); 22 | } 23 | 24 | printf("Exporting %s\n", ExportType.c_str()); 25 | switch (Helpers::Hash::Crc32(ExportType.c_str(), ExportType.size())) 26 | { 27 | case Helpers::Hash::Crc32("Texture2D"): 28 | case Helpers::Hash::Crc32("TextureCube"): 29 | case Helpers::Hash::Crc32("VirtualTexture2D"): 30 | return std::make_shared(InputStream, *Schema, BulkStream, BulkOffset); 31 | case Helpers::Hash::Crc32("CurveTable"): 32 | return std::make_shared(InputStream, *Schema); 33 | case Helpers::Hash::Crc32("DataTable"): 34 | return std::make_shared(InputStream, *Schema); 35 | case Helpers::Hash::Crc32("FontFace"): 36 | throw UnsupportedOperationException("FontFaces aren't parsable yet"); // Not like they have much anyway 37 | case Helpers::Hash::Crc32("SoundWave"): 38 | throw UnsupportedOperationException("SoundWaves aren't parsable yet"); 39 | default: 40 | return std::make_shared(InputStream, *Schema); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /src/Exports/Serializer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | #include 6 | #include 7 | 8 | namespace Zen::Exports { 9 | std::any Serialize(Streams::BaseStream& InputStream, const std::string& ExportType, Streams::BaseStream* BulkStream, size_t BulkOffset); 10 | } -------------------------------------------------------------------------------- /src/Exports/UCurveTable.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Enums/ECurveTableMode.h" 4 | #include "../Structs/FName.h" 5 | #include "UObject.h" 6 | 7 | namespace Zen::Exports { 8 | class UCurveTable : public UExport { 9 | public: 10 | UCurveTable(Streams::BaseStream& InputStream, const Providers::Schema& RowSchema) { 11 | InputStream.seek(6, Streams::BaseStream::Cur); 12 | // u16: 256, u32: 0 13 | 14 | int NumRows; 15 | InputStream >> NumRows; 16 | 17 | uint8_t CurveMode; 18 | InputStream >> CurveMode; 19 | CurveTableMode = (ECurveTableMode)CurveMode; 20 | 21 | RowMap.reserve(NumRows); 22 | for (int i = 0; i < NumRows; ++i) { 23 | FName Key; 24 | InputStream >> Key; 25 | RowMap.emplace_back(std::move(Key), UObject(InputStream, RowSchema, StructFallback)); 26 | } 27 | } 28 | 29 | ECurveTableMode CurveTableMode; 30 | std::vector> RowMap; 31 | }; 32 | } -------------------------------------------------------------------------------- /src/Exports/UDataTable.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Exceptions/BaseException.h" 4 | #include "../Enums/ECurveTableMode.h" 5 | #include "../Structs/FName.h" 6 | #include "../ZExport.h" 7 | #include "UObject.h" 8 | 9 | namespace Zen::Exports { 10 | using namespace Exceptions; 11 | 12 | class UDataTable : public UObject { 13 | public: 14 | UDataTable(Streams::BaseStream& InputStream, const Providers::Schema& Schema) : UObject(InputStream, Schema) { 15 | auto ZExp = (const ZExport*)InputStream.GetProperty(); 16 | auto GlobalData = (const ZGlobalData*)InputStream.GetProperty(); 17 | auto Provider = (const Providers::BaseProvider*)InputStream.GetProperty(); 18 | if (!ZExp || !GlobalData || !Provider) { 19 | throw StreamPropertyNotFoundException("UDataTable must be deserialized from ZExport"); 20 | } 21 | 22 | auto RowStructProp = TryGet("RowStruct"); 23 | if (!RowStructProp) { 24 | throw ArchiveCorruptedException("A RowStruct property is required for the DataTable"); 25 | } 26 | auto& RowStructImport = ZExp->GetImport(RowStructProp->Value); 27 | if (!RowStructImport.IsScriptImport()) { 28 | throw ArchiveCorruptedException("The RowStruct property must be a ScriptImport"); 29 | } 30 | auto& RowStructType = GlobalData->GetEntryName(RowStructImport); 31 | auto RowSchema = Provider->GetSchema(RowStructType); 32 | if (!RowSchema) { 33 | throw SchemaNotFoundException("The schema for the row type \"%s\" was not found", RowStructType.c_str()); 34 | } 35 | 36 | int NumRows; 37 | InputStream >> NumRows; 38 | 39 | RowMap.reserve(NumRows); 40 | for (int i = 0; i < NumRows; ++i) { 41 | FName Key; 42 | InputStream >> Key; 43 | RowMap.emplace_back(std::move(Key), UObject(InputStream, *RowSchema, StructFallback)); 44 | } 45 | } 46 | 47 | ECurveTableMode CurveTableMode; 48 | std::vector> RowMap; 49 | }; 50 | } -------------------------------------------------------------------------------- /src/Exports/UExport.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace Zen::Exports { 4 | class UExport { 5 | 6 | }; 7 | } -------------------------------------------------------------------------------- /src/Exports/UTexture2D.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Exceptions/BaseException.h" 4 | #include "../Structs/FStripDataFlags.h" 5 | #include "../Structs/FTexturePlatformData.h" 6 | #include "../Structs/FName.h" 7 | #include "../ZExport.h" 8 | #include "UObject.h" 9 | 10 | namespace Zen::Exports { 11 | using namespace Exceptions; 12 | 13 | class UTexture2D : public UObject { 14 | public: 15 | UTexture2D(Streams::BaseStream& InputStream, const Providers::Schema& Schema, Streams::BaseStream* BulkStream, size_t BulkOffset) : UObject(InputStream, Schema) { 16 | auto ZExp = (const ZExport*)InputStream.GetProperty(); 17 | if (!ZExp) { 18 | throw StreamPropertyNotFoundException("UDataTable must be deserialized from ZExport"); 19 | } 20 | 21 | FStripDataFlags StripFlag0(InputStream); 22 | FStripDataFlags StripFlag1(InputStream); 23 | 24 | int bIsCooked; 25 | InputStream >> bIsCooked; 26 | if (!bIsCooked) { 27 | return; 28 | } 29 | 30 | FName PixelFormatName; 31 | InputStream >> PixelFormatName; 32 | while (!PixelFormatName.IsNone(ZExp->GetNameMap())) { 33 | int SkipOffset; 34 | InputStream >> SkipOffset; 35 | 36 | // if pak version >= RELATIVE_CHUNK_OFFSETS 37 | int SkipOffsetH; 38 | InputStream >> SkipOffsetH; 39 | 40 | PlatformDatas.emplace_back(InputStream, BulkStream, BulkOffset); 41 | InputStream >> PixelFormatName; 42 | 43 | // if pak version < RELATIVE_CHUNK_OFFSETS: break 44 | } 45 | } 46 | 47 | std::vector PlatformDatas; 48 | }; 49 | } -------------------------------------------------------------------------------- /src/Helpers/AES.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Structs/FAESKey.h" 4 | 5 | #include 6 | 7 | namespace Zen::Helpers { 8 | class AES { 9 | public: 10 | struct KeySchedule { 11 | __m128i Key; 12 | __m128i Steps[14]; 13 | }; 14 | 15 | static __forceinline KeySchedule LoadKey(const Structs::FAESKey& Key) { 16 | __m128i EncStep1 = _mm_loadu_si128((const __m128i*) Key.Key); 17 | __m128i EncStep2 = _mm_loadu_si128((const __m128i*) (Key.Key + 16)); 18 | 19 | KeySchedule Schedule; 20 | 21 | #define KEYEXP128_H(K1, K2, I, S) _mm_xor_si128(aes128_keyexpand(K1), _mm_shuffle_epi32(_mm_aeskeygenassist_si128(K2, I), S)) 22 | #define KEYEXP256(K1, K2, I) KEYEXP128_H(K1, K2, I, 0xFF) 23 | #define KEYEXP256_2(K1, K2) KEYEXP128_H(K1, K2, 0x00, 0xAA) 24 | 25 | #define RUN_STEP(I, TopInd) \ 26 | EncStep1 = KEYEXP256(EncStep1, EncStep2, I); \ 27 | EncStep2 = KEYEXP256_2(EncStep2, EncStep1); \ 28 | Schedule.Steps[TopInd] = _mm_aesimc_si128(EncStep1); \ 29 | Schedule.Steps[TopInd - 1] = _mm_aesimc_si128(EncStep2); 30 | 31 | Schedule.Key = EncStep1; 32 | Schedule.Steps[13] = _mm_aesimc_si128(EncStep2); 33 | RUN_STEP(0x01, 12); 34 | RUN_STEP(0x02, 10); 35 | RUN_STEP(0x04, 8); 36 | RUN_STEP(0x08, 6); 37 | RUN_STEP(0x10, 4); 38 | RUN_STEP(0x20, 2); 39 | Schedule.Steps[0] = KEYEXP256(EncStep1, EncStep2, 0x40); 40 | 41 | #undef RUN_STEP 42 | #undef KEYEXP256 43 | #undef KEYEXP256_2 44 | #undef KEYEXP128_H 45 | 46 | return Schedule; 47 | } 48 | 49 | static __forceinline void Decode(const KeySchedule& Schedule, const char Input[16], char Output[16]) { 50 | __m128i m = _mm_loadu_si128((__m128i*) Input); 51 | 52 | m = _mm_xor_si128(m, Schedule.Steps[0]); 53 | m = _mm_aesdec_si128(m, Schedule.Steps[1]); 54 | m = _mm_aesdec_si128(m, Schedule.Steps[2]); 55 | m = _mm_aesdec_si128(m, Schedule.Steps[3]); 56 | m = _mm_aesdec_si128(m, Schedule.Steps[4]); 57 | m = _mm_aesdec_si128(m, Schedule.Steps[5]); 58 | m = _mm_aesdec_si128(m, Schedule.Steps[6]); 59 | m = _mm_aesdec_si128(m, Schedule.Steps[7]); 60 | m = _mm_aesdec_si128(m, Schedule.Steps[8]); 61 | m = _mm_aesdec_si128(m, Schedule.Steps[9]); 62 | m = _mm_aesdec_si128(m, Schedule.Steps[10]); 63 | m = _mm_aesdec_si128(m, Schedule.Steps[11]); 64 | m = _mm_aesdec_si128(m, Schedule.Steps[12]); 65 | m = _mm_aesdec_si128(m, Schedule.Steps[13]); 66 | 67 | m = _mm_aesdeclast_si128(m, Schedule.Key); 68 | 69 | _mm_storeu_si128((__m128i*) Output, m); 70 | } 71 | 72 | static __forceinline void DecodeInPlace(const Structs::FAESKey& Key, char* Buffer, size_t BufferSize) { 73 | KeySchedule Schedule = LoadKey(Key); 74 | 75 | for (; BufferSize >= 16; BufferSize -= 16, Buffer += 16) { 76 | Decode(Schedule, Buffer, Buffer); 77 | } 78 | 79 | if (BufferSize) { 80 | char Data[16]; 81 | memcpy(Data, Buffer, BufferSize); 82 | memset(Data + BufferSize, 0, 16 - BufferSize); 83 | Decode(Schedule, Data, Data); 84 | memcpy(Buffer, Data, BufferSize); 85 | } 86 | } 87 | 88 | private: 89 | static __forceinline __m128i aes128_keyexpand(__m128i key) 90 | { 91 | key = _mm_xor_si128(key, _mm_slli_si128(key, 4)); 92 | key = _mm_xor_si128(key, _mm_slli_si128(key, 4)); 93 | return _mm_xor_si128(key, _mm_slli_si128(key, 4)); 94 | } 95 | }; 96 | } -------------------------------------------------------------------------------- /src/Helpers/Align.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace Zen::Helpers { 4 | template 5 | static constexpr N Align(N Value, N Alignment) { 6 | return Value + (-Value & (Alignment - 1)); 7 | } 8 | 9 | template 10 | static constexpr N Align(N Value) { 11 | return Value + (-Value & (Alignment - 1)); 12 | } 13 | } -------------------------------------------------------------------------------- /src/Helpers/Compress.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Exceptions/BaseException.h" 4 | #include "oodle2.h" 5 | 6 | #ifdef USE_BROTLI 7 | #include 8 | #endif 9 | 10 | namespace Zen::Helpers { 11 | static std::unique_ptr CompressOodle(const char* Src, size_t SrcSize, OodleLZ_Compressor CompMethod, OodleLZ_CompressionLevel CompLevel, SINTa& DstSize) { 12 | auto CompMaxSize = OodleLZ_GetCompressedBufferSizeNeeded(CompMethod, SrcSize); 13 | if (CompMaxSize == OODLELZ_FAILED) { 14 | throw Exceptions::CompressionException("Oodle compression method is invalid"); 15 | } 16 | auto Dst = std::make_unique(CompMaxSize); 17 | DstSize = OodleLZ_Compress(CompMethod, Src, SrcSize, Dst.get(), CompLevel, NULL, NULL, NULL, NULL, 0); 18 | if (DstSize == OODLELZ_FAILED) { 19 | throw Exceptions::CompressionException("Oodle failed to compress data"); 20 | } 21 | return Dst; 22 | } 23 | 24 | #ifdef USE_BROTLI 25 | 26 | static std::unique_ptr CompressBrotli(const char* Src, size_t SrcSize, BrotliEncoderMode CompMode, int CompLevel, size_t& DstSize) { 27 | DstSize = BrotliEncoderMaxCompressedSize(SrcSize); 28 | if (DstSize == 0) { 29 | throw Exceptions::CompressionException("Brotli compressed size is too large"); 30 | } 31 | 32 | auto Dst = std::make_unique(DstSize); 33 | auto Result = BrotliEncoderCompress(CompLevel, BROTLI_MAX_WINDOW_BITS, CompMode, SrcSize, (uint8_t*)Src, &DstSize, (uint8_t*)Dst.get()); 34 | if (Result == BROTLI_FALSE || DstSize == 0) { 35 | throw Exceptions::CompressionException("Brotli failed to compress data"); 36 | } 37 | 38 | return Dst; 39 | } 40 | 41 | #endif 42 | } -------------------------------------------------------------------------------- /src/Helpers/Decompress.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Exceptions/BaseException.h" 4 | #include "Hash.h" 5 | #include "oodle2.h" 6 | 7 | #ifdef USE_BROTLI 8 | #include 9 | #endif 10 | 11 | #include 12 | 13 | namespace Zen::Helpers { 14 | static void DecompressOodle(char* Dst, size_t DstSize, const char* Src, size_t SrcSize) { 15 | // Good suggestion if necessary: 16 | // https://github.com/WorkingRobot/EGL2/blob/6f750679da8b71a82f5d271ca1d98f8957488668/storage/compression.cpp#L229 17 | auto DecompSize = OodleLZ_Decompress(Src, SrcSize, Dst, DstSize, OodleLZ_FuzzSafe_No, OodleLZ_CheckCRC_No, OodleLZ_Verbosity_None, NULL, 0, NULL, NULL, NULL, 0, OodleLZ_Decode_Unthreaded); 18 | if (DecompSize == OODLELZ_FAILED) { 19 | throw Exceptions::DecompressionException("Oodle failed to decompress data"); 20 | } 21 | } 22 | 23 | #ifdef USE_BROTLI 24 | 25 | static void DecompressBrotli(char* Dst, size_t DstSize, const char* Src, size_t SrcSize) { 26 | auto Result = BrotliDecoderDecompress(SrcSize, (uint8_t*)Src, &DstSize, (uint8_t*)Dst); 27 | if (Result != BROTLI_DECODER_RESULT_SUCCESS) { 28 | throw Exceptions::DecompressionException("Brotli failed to decompress data"); 29 | } 30 | } 31 | 32 | #endif 33 | 34 | static void Decompress(char* Dst, size_t DstSize, const char* Src, size_t SrcSize, const std::string& Method) { 35 | switch (Hash::Crc32(Method.c_str(), Method.size())) 36 | { 37 | //case Hash::Crc32("Zlib"): 38 | // break; 39 | //case Hash::Crc32("Gzip"): 40 | // break; 41 | case Hash::Crc32("Oodle"): 42 | DecompressOodle(Dst, DstSize, Src, SrcSize); 43 | break; 44 | default: 45 | throw Exceptions::DecompressionException("Unknown decompression method: %s", Method.c_str()); 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /src/Helpers/Format.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace Zen::Helpers { 7 | template 8 | static std::string Format(const char* Format, Args&&... Data) { 9 | auto size = snprintf(nullptr, 0, Format, Data...) + 1; 10 | if (size <= 0) { 11 | return ""; 12 | } 13 | auto buf = std::make_unique(size); 14 | snprintf(buf.get(), size, Format, Data...); 15 | return std::string(buf.get(), buf.get() + size - 1); 16 | } 17 | } -------------------------------------------------------------------------------- /src/Helpers/Hash.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Helpers { 6 | class Hash { 7 | public: 8 | template 9 | static __forceinline uint32_t Crc32(const std::string& str) { 10 | return Crc32(str, str.size()); 11 | } 12 | 13 | template 14 | static constexpr __forceinline uint32_t Crc32(const char(&str)[size]) { 15 | return Crc32(str, size - 1); 16 | } 17 | 18 | template 19 | static constexpr __forceinline uint32_t Crc32(const char* str, size_t size) { 20 | return ~crc32_impl(str, size, ~0); 21 | } 22 | private: 23 | // https://stackoverflow.com/a/28801005 24 | template 25 | struct f : f<((c & 1) ? 0xedb88320 : 0) ^ (c >> 1), k - 1> {}; 26 | template struct f { enum : uint32_t { value = c }; }; 27 | 28 | #define A(x) B(x) B(x + 128) 29 | #define B(x) C(x) C(x + 64) 30 | #define C(x) D(x) D(x + 32) 31 | #define D(x) E(x) E(x + 16) 32 | #define E(x) F(x) F(x + 8) 33 | #define F(x) G(x) G(x + 4) 34 | #define G(x) H(x) H(x + 2) 35 | #define H(x) I(x) I(x + 1) 36 | #define I(x) f::value, 37 | 38 | static constexpr uint32_t crc_table[] = { A(0) }; 39 | 40 | #undef A 41 | #undef B 42 | #undef C 43 | #undef D 44 | #undef E 45 | #undef F 46 | #undef G 47 | #undef H 48 | #undef I 49 | 50 | template 51 | static constexpr uint32_t crc32_impl(const char* p, size_t len, uint32_t crc) { 52 | return len ? 53 | crc32_impl(p + 1, len - 1, (crc >> 8) ^ crc_table[(crc & 0xFF) ^ (!insensitive ? *p : (*p >= 'a' && *p <= 'z' ? *p - 0x20 : *p))]) 54 | : crc; 55 | } 56 | }; 57 | } -------------------------------------------------------------------------------- /src/Helpers/Stopwatch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Helpers { 6 | class Stopwatch { 7 | public: 8 | Stopwatch(const char* Name) : 9 | Name(Name), 10 | Ended(false), 11 | StartTime(std::chrono::steady_clock::now()) 12 | {} 13 | 14 | void End() { 15 | if (Ended) return; 16 | auto EndTime = std::chrono::steady_clock::now(); 17 | printf("%s: %.2f ms\n", Name, (EndTime - StartTime).count() / 1000000.f); 18 | Ended = true; 19 | } 20 | 21 | ~Stopwatch() { 22 | End(); 23 | } 24 | 25 | private: 26 | const char* Name; 27 | bool Ended; 28 | std::chrono::steady_clock::time_point StartTime; 29 | }; 30 | } -------------------------------------------------------------------------------- /src/Helpers/oo2core_8_win64.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WorkingRobot/ZenReader/6093412027ec8930d68d241f9f2cf0158b1db7b4/src/Helpers/oo2core_8_win64.lib -------------------------------------------------------------------------------- /src/Properties/Array.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Base.h" 4 | #include "Serializer.h" 5 | 6 | namespace Zen::Properties { 7 | class ArrayProperty : public BaseProperty { 8 | public: 9 | std::vector> Value; 10 | 11 | ArrayProperty(Streams::BaseStream& InputStream, const Providers::PropertyData& PropData) { 12 | int SerializeNum; 13 | InputStream >> SerializeNum; 14 | Value.reserve(SerializeNum); 15 | 16 | // More code is run here when it's a StructProperty if it's a normal (not unversioned) reader 17 | // https://github.com/iAmAsval/FModel/blob/e256486b98551c467fa835c0518a00e9f9d97462/FModel/PakReader/Parsers/PropertyTagData/ArrayProperty.cs#L20 18 | 19 | for (int i = 0; i < SerializeNum; ++i) { 20 | Value.emplace_back(Serialize(InputStream, *PropData.GetData().Array.InnerType)); 21 | } 22 | } 23 | 24 | ArrayProperty(Streams::BaseStream& InputStream, const Providers::PropertyData& PropData, EReadArray) : ArrayProperty(InputStream, PropData) {} 25 | 26 | ArrayProperty(Streams::BaseStream& InputStream, const Providers::PropertyData& PropData, EReadMap) : ArrayProperty(InputStream, PropData) {} 27 | 28 | ArrayProperty(Streams::BaseStream& InputStream, const Providers::PropertyData& PropData, EReadZero) : Value() {} 29 | 30 | EPropertyType GetType() const override { 31 | return EPropertyType::ArrayProperty; 32 | } 33 | }; 34 | } -------------------------------------------------------------------------------- /src/Properties/AssetObject.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "SoftObject.h" 4 | 5 | namespace Zen::Properties { 6 | using AssetObjectProperty = SoftObjectProperty; 7 | } -------------------------------------------------------------------------------- /src/Properties/Base.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Enums/EPropertyType.h" 4 | #include "../Providers/Base.h" 5 | #include "../Streams/BaseStream.h" 6 | 7 | namespace Zen::Properties { 8 | using namespace Enums; 9 | 10 | enum class EReadType : uint8_t { 11 | NORMAL, 12 | ARRAY, 13 | MAP, 14 | ZERO 15 | }; 16 | 17 | namespace { 18 | struct EReadArray { 19 | explicit EReadArray() = default; 20 | }; 21 | struct EReadMap { 22 | explicit EReadMap() = default; 23 | }; 24 | struct EReadZero { 25 | explicit EReadZero() = default; 26 | }; 27 | 28 | inline constexpr EReadArray ReadArray{}; 29 | inline constexpr EReadMap ReadMap{}; 30 | inline constexpr EReadZero ReadZero{}; 31 | } 32 | 33 | class BaseProperty { 34 | public: 35 | virtual EPropertyType GetType() const = 0; 36 | }; 37 | } -------------------------------------------------------------------------------- /src/Properties/Bool.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Base.h" 4 | 5 | namespace Zen::Properties { 6 | class BoolProperty : public BaseProperty { 7 | public: 8 | bool Value; 9 | 10 | BoolProperty(Streams::BaseStream& InputStream) { 11 | // If it's a normal (not unversioned) reader, use BoolVal 12 | InputStream >> Value; 13 | } 14 | 15 | BoolProperty(Streams::BaseStream& InputStream, EReadArray) { 16 | InputStream >> Value; 17 | } 18 | 19 | BoolProperty(Streams::BaseStream& InputStream, EReadMap) { 20 | InputStream >> Value; 21 | } 22 | 23 | BoolProperty(Streams::BaseStream& InputStream, EReadZero) : Value(false) {} 24 | 25 | EPropertyType GetType() const override { 26 | return EPropertyType::BoolProperty; 27 | } 28 | }; 29 | } -------------------------------------------------------------------------------- /src/Properties/Byte.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Base.h" 4 | 5 | namespace Zen::Properties { 6 | using namespace Exceptions; 7 | 8 | class ByteProperty : public BaseProperty { 9 | public: 10 | uint8_t Value; 11 | 12 | ByteProperty(Streams::BaseStream& InputStream) { 13 | InputStream >> Value; 14 | } 15 | 16 | ByteProperty(Streams::BaseStream& InputStream, EReadArray) { 17 | InputStream >> Value; 18 | } 19 | 20 | ByteProperty(Streams::BaseStream& InputStream, EReadMap) { 21 | uint32_t Val; 22 | InputStream >> Val; 23 | Value = Val; 24 | } 25 | 26 | ByteProperty(Streams::BaseStream& InputStream, EReadZero) : Value(0) {} 27 | 28 | EPropertyType GetType() const override { 29 | return EPropertyType::ByteProperty; 30 | } 31 | }; 32 | } -------------------------------------------------------------------------------- /src/Properties/Delegate.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Structs/FScriptDelegate.h" 4 | #include "Base.h" 5 | 6 | namespace Zen::Properties { 7 | class DelegateProperty : public BaseProperty { 8 | public: 9 | FScriptDelegate Value; 10 | 11 | DelegateProperty(Streams::BaseStream& InputStream) { 12 | InputStream >> Value; 13 | } 14 | 15 | DelegateProperty(Streams::BaseStream& InputStream, EReadArray) : DelegateProperty(InputStream) {} 16 | 17 | DelegateProperty(Streams::BaseStream& InputStream, EReadMap) : DelegateProperty(InputStream) {} 18 | 19 | DelegateProperty(Streams::BaseStream& InputStream, EReadZero) : Value() {} 20 | 21 | EPropertyType GetType() const override { 22 | return EPropertyType::DelegateProperty; 23 | } 24 | }; 25 | } -------------------------------------------------------------------------------- /src/Properties/Double.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Base.h" 4 | 5 | namespace Zen::Properties { 6 | class DoubleProperty : public BaseProperty { 7 | public: 8 | double Value; 9 | 10 | DoubleProperty(Streams::BaseStream& InputStream) { 11 | InputStream >> Value; 12 | } 13 | 14 | DoubleProperty(Streams::BaseStream& InputStream, EReadArray) : DoubleProperty(InputStream) {} 15 | 16 | DoubleProperty(Streams::BaseStream& InputStream, EReadMap) : DoubleProperty(InputStream) {} 17 | 18 | DoubleProperty(Streams::BaseStream& InputStream, EReadZero) : Value() {} 19 | 20 | EPropertyType GetType() const override { 21 | return EPropertyType::DoubleProperty; 22 | } 23 | }; 24 | } -------------------------------------------------------------------------------- /src/Properties/Enum.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Exceptions/BaseException.h" 4 | #include "Base.h" 5 | 6 | namespace Zen::Properties { 7 | using namespace Exceptions; 8 | 9 | class EnumProperty : public BaseProperty { 10 | public: 11 | std::string Value; 12 | 13 | // https://github.com/EpicGames/UnrealEngine/blob/bf95c2cbc703123e08ab54e3ceccdd47e48d224a/Engine/Source/Runtime/CoreUObject/Private/UObject/PropertySet.cpp#L216 14 | EnumProperty(Streams::BaseStream& InputStream, const Providers::PropertyData& PropData) { 15 | int EnumIdx; 16 | switch (PropData.GetData().Enum.InnerType->GetType()) 17 | { 18 | case EPropertyType::ByteProperty: 19 | { 20 | uint8_t Val; 21 | InputStream >> Val; 22 | EnumIdx = Val; 23 | break; 24 | } 25 | case EPropertyType::IntProperty: 26 | InputStream >> EnumIdx; 27 | break; 28 | default: 29 | throw PropertyTypeNotFoundException("Enum properties only support Byte or Int enum types"); 30 | } 31 | 32 | // If a normal (not unversioned) reader, read it a as FName instead 33 | auto Provider = (const Providers::BaseProvider*)InputStream.GetProperty(); 34 | if (!Provider) { 35 | throw StreamPropertyNotFoundException("EnumProperty must be deserialized from ZExport"); 36 | } 37 | auto& EnumName = PropData.GetData().Enum.EnumName.get(); 38 | auto Enum = Provider->GetEnum(EnumName); 39 | if (!Enum) { 40 | throw EnumNotFoundException("The enum \"%s\" was not found", EnumName.c_str()); 41 | } 42 | if (EnumIdx < Enum->GetNameCount()) { 43 | this->Value = EnumName.string() + "::" + Enum->GetName(EnumIdx).string(); 44 | } 45 | else { 46 | this->Value = EnumName.string() + "::" + std::to_string(EnumIdx); 47 | } 48 | } 49 | 50 | EnumProperty(Streams::BaseStream& InputStream, const Providers::PropertyData& PropData, EReadArray) : EnumProperty(InputStream, PropData) {} 51 | 52 | EnumProperty(Streams::BaseStream& InputStream, const Providers::PropertyData& PropData, EReadMap) : EnumProperty(InputStream, PropData) {} 53 | 54 | EnumProperty(Streams::BaseStream& InputStream, const Providers::PropertyData& PropData, EReadZero) : Value() {} 55 | 56 | EPropertyType GetType() const override { 57 | return EPropertyType::EnumProperty; 58 | } 59 | }; 60 | } -------------------------------------------------------------------------------- /src/Properties/FieldPath.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Structs/FFieldPath.h" 4 | #include "Base.h" 5 | 6 | namespace Zen::Properties { 7 | class FieldPathProperty : public BaseProperty { 8 | public: 9 | FFieldPath Value; 10 | 11 | FieldPathProperty(Streams::BaseStream& InputStream) { 12 | InputStream >> Value; 13 | } 14 | 15 | FieldPathProperty(Streams::BaseStream& InputStream, EReadArray) : FieldPathProperty(InputStream) {} 16 | 17 | FieldPathProperty(Streams::BaseStream& InputStream, EReadMap) : FieldPathProperty(InputStream) {} 18 | 19 | FieldPathProperty(Streams::BaseStream& InputStream, EReadZero) : Value() {} 20 | 21 | EPropertyType GetType() const override { 22 | return EPropertyType::FieldPathProperty; 23 | } 24 | }; 25 | } -------------------------------------------------------------------------------- /src/Properties/Float.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Base.h" 4 | 5 | namespace Zen::Properties { 6 | class FloatProperty : public BaseProperty { 7 | public: 8 | float Value; 9 | 10 | FloatProperty(Streams::BaseStream& InputStream) { 11 | InputStream >> Value; 12 | } 13 | 14 | FloatProperty(Streams::BaseStream& InputStream, EReadArray) : FloatProperty(InputStream) {} 15 | 16 | FloatProperty(Streams::BaseStream& InputStream, EReadMap) : FloatProperty(InputStream) {} 17 | 18 | FloatProperty(Streams::BaseStream& InputStream, EReadZero) : Value() {} 19 | 20 | EPropertyType GetType() const override { 21 | return EPropertyType::FloatProperty; 22 | } 23 | }; 24 | } -------------------------------------------------------------------------------- /src/Properties/Int.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Base.h" 4 | 5 | namespace Zen::Properties { 6 | class IntProperty : public BaseProperty { 7 | public: 8 | int Value; 9 | 10 | IntProperty(Streams::BaseStream& InputStream) { 11 | InputStream >> Value; 12 | } 13 | 14 | IntProperty(Streams::BaseStream& InputStream, EReadArray) : IntProperty(InputStream) {} 15 | 16 | IntProperty(Streams::BaseStream& InputStream, EReadMap) : IntProperty(InputStream) {} 17 | 18 | IntProperty(Streams::BaseStream& InputStream, EReadZero) : Value() {} 19 | 20 | EPropertyType GetType() const override { 21 | return EPropertyType::IntProperty; 22 | } 23 | }; 24 | } -------------------------------------------------------------------------------- /src/Properties/Int16.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Base.h" 4 | 5 | namespace Zen::Properties { 6 | class Int16Property : public BaseProperty { 7 | public: 8 | int16_t Value; 9 | 10 | Int16Property(Streams::BaseStream& InputStream) { 11 | InputStream >> Value; 12 | } 13 | 14 | Int16Property(Streams::BaseStream& InputStream, EReadArray) : Int16Property(InputStream) {} 15 | 16 | Int16Property(Streams::BaseStream& InputStream, EReadMap) : Int16Property(InputStream) {} 17 | 18 | Int16Property(Streams::BaseStream& InputStream, EReadZero) : Value() {} 19 | 20 | EPropertyType GetType() const override { 21 | return EPropertyType::Int16Property; 22 | } 23 | }; 24 | } -------------------------------------------------------------------------------- /src/Properties/Int64.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Base.h" 4 | 5 | namespace Zen::Properties { 6 | class Int64Property : public BaseProperty { 7 | public: 8 | int64_t Value; 9 | 10 | Int64Property(Streams::BaseStream& InputStream) { 11 | InputStream >> Value; 12 | } 13 | 14 | Int64Property(Streams::BaseStream& InputStream, EReadArray) : Int64Property(InputStream) {} 15 | 16 | Int64Property(Streams::BaseStream& InputStream, EReadMap) : Int64Property(InputStream) {} 17 | 18 | Int64Property(Streams::BaseStream& InputStream, EReadZero) : Value() {} 19 | 20 | EPropertyType GetType() const override { 21 | return EPropertyType::Int64Property; 22 | } 23 | }; 24 | } -------------------------------------------------------------------------------- /src/Properties/Int8.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Base.h" 4 | 5 | namespace Zen::Properties { 6 | class Int8Property : public BaseProperty { 7 | public: 8 | int8_t Value; 9 | 10 | Int8Property(Streams::BaseStream& InputStream) { 11 | InputStream >> Value; 12 | } 13 | 14 | Int8Property(Streams::BaseStream& InputStream, EReadArray) : Int8Property(InputStream) {} 15 | 16 | Int8Property(Streams::BaseStream& InputStream, EReadMap) : Int8Property(InputStream) {} 17 | 18 | Int8Property(Streams::BaseStream& InputStream, EReadZero) : Value() {} 19 | 20 | EPropertyType GetType() const override { 21 | return EPropertyType::Int8Property; 22 | } 23 | }; 24 | } -------------------------------------------------------------------------------- /src/Properties/Interface.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Base.h" 4 | 5 | namespace Zen::Properties { 6 | class InterfaceProperty : public BaseProperty { 7 | public: 8 | uint32_t ObjectRef; 9 | 10 | InterfaceProperty(Streams::BaseStream& InputStream) { 11 | InputStream >> ObjectRef; 12 | } 13 | 14 | InterfaceProperty(Streams::BaseStream& InputStream, EReadArray) : InterfaceProperty(InputStream) {} 15 | 16 | InterfaceProperty(Streams::BaseStream& InputStream, EReadMap) : InterfaceProperty(InputStream) {} 17 | 18 | InterfaceProperty(Streams::BaseStream& InputStream, EReadZero) : ObjectRef() {} 19 | 20 | EPropertyType GetType() const override { 21 | return EPropertyType::InterfaceProperty; 22 | } 23 | }; 24 | } -------------------------------------------------------------------------------- /src/Properties/LazyObject.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "SoftObject.h" 4 | 5 | namespace Zen::Properties { 6 | using LazyObjectProperty = SoftObjectProperty; 7 | } -------------------------------------------------------------------------------- /src/Properties/Lookup.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Enums/EPropertyType.h" 4 | #include "Byte.h" 5 | #include "Bool.h" 6 | #include "Int.h" 7 | #include "Float.h" 8 | #include "Object.h" 9 | #include "Name.h" 10 | #include "Delegate.h" 11 | #include "Double.h" 12 | #include "Array.h" 13 | #include "Struct.h" 14 | #include "Str.h" 15 | #include "Text.h" 16 | #include "Interface.h" 17 | #include "MulticastDelegate.h" 18 | #include "WeakObject.h" 19 | #include "LazyObject.h" 20 | #include "AssetObject.h" 21 | #include "SoftObject.h" 22 | #include "UInt64.h" 23 | #include "UInt32.h" 24 | #include "UInt16.h" 25 | #include "Int64.h" 26 | #include "Int16.h" 27 | #include "Int8.h" 28 | #include "Map.h" 29 | #include "Set.h" 30 | #include "Enum.h" 31 | #include "FieldPath.h" 32 | 33 | namespace Zen::Properties { 34 | using namespace Enums; 35 | 36 | template 37 | static constexpr EPropertyType GetType() { return EPropertyType::Unknown; }; 38 | 39 | #define CASE(Type) template<> static constexpr EPropertyType GetType() { return EPropertyType::Type; } 40 | 41 | CASE(ByteProperty); 42 | CASE(BoolProperty); 43 | CASE(IntProperty); 44 | CASE(FloatProperty); 45 | CASE(ObjectProperty); 46 | CASE(NameProperty); 47 | CASE(DelegateProperty); 48 | CASE(DoubleProperty); 49 | CASE(ArrayProperty); 50 | CASE(StructProperty); 51 | CASE(StrProperty); 52 | CASE(TextProperty); 53 | CASE(InterfaceProperty); 54 | CASE(MulticastDelegateProperty); 55 | // CASE(WeakObjectProperty); 56 | // CASE(LazyObjectProperty); (Alias of SoftObjectProperty) 57 | // CASE(AssetObjectProperty); 58 | CASE(SoftObjectProperty); 59 | CASE(UInt64Property); 60 | CASE(UInt32Property); 61 | CASE(UInt16Property); 62 | CASE(Int64Property); 63 | CASE(Int16Property); 64 | CASE(Int8Property); 65 | CASE(MapProperty); 66 | CASE(SetProperty); 67 | CASE(EnumProperty); 68 | CASE(FieldPathProperty); 69 | 70 | #undef CASE 71 | 72 | static constexpr const char* GetString(EPropertyType Type) { 73 | switch (Type) 74 | { 75 | #define CASE(Type) case EPropertyType::Type: return #Type; 76 | 77 | CASE(ByteProperty); 78 | CASE(BoolProperty); 79 | CASE(IntProperty); 80 | CASE(FloatProperty); 81 | CASE(ObjectProperty); 82 | CASE(NameProperty); 83 | CASE(DelegateProperty); 84 | CASE(DoubleProperty); 85 | CASE(ArrayProperty); 86 | CASE(StructProperty); 87 | CASE(StrProperty); 88 | CASE(TextProperty); 89 | CASE(InterfaceProperty); 90 | CASE(MulticastDelegateProperty); 91 | CASE(WeakObjectProperty); 92 | CASE(LazyObjectProperty); 93 | CASE(AssetObjectProperty); 94 | CASE(SoftObjectProperty); 95 | CASE(UInt64Property); 96 | CASE(UInt32Property); 97 | CASE(UInt16Property); 98 | CASE(Int64Property); 99 | CASE(Int16Property); 100 | CASE(Int8Property); 101 | CASE(MapProperty); 102 | CASE(SetProperty); 103 | CASE(EnumProperty); 104 | CASE(FieldPathProperty); 105 | 106 | #undef CASE 107 | default: 108 | return "Unknown"; 109 | } 110 | } 111 | } -------------------------------------------------------------------------------- /src/Properties/Map.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Base.h" 4 | #include "Serializer.h" 5 | 6 | namespace Zen::Properties { 7 | class MapProperty : public BaseProperty { 8 | public: 9 | std::vector, std::unique_ptr>> Value; 10 | 11 | MapProperty(Streams::BaseStream& InputStream, const Providers::PropertyData& PropData) { 12 | int NumKeysToRemove; 13 | InputStream >> NumKeysToRemove; 14 | for (int i = 0; i < NumKeysToRemove; ++i) { 15 | Serialize(InputStream, *PropData.GetData().Map.InnerType); 16 | } 17 | 18 | int NumEntries; 19 | InputStream >> NumEntries; 20 | Value.reserve(NumEntries); 21 | for (int i = 0; i < NumEntries; ++i) { 22 | Value.emplace_back(Serialize(InputStream, *PropData.GetData().Map.InnerType), Serialize(InputStream, *PropData.GetData().Map.ValueType)); 23 | } 24 | } 25 | 26 | MapProperty(Streams::BaseStream& InputStream, const Providers::PropertyData& PropData, EReadArray) : MapProperty(InputStream, PropData) {} 27 | 28 | MapProperty(Streams::BaseStream& InputStream, const Providers::PropertyData& PropData, EReadMap) : MapProperty(InputStream, PropData) {} 29 | 30 | MapProperty(Streams::BaseStream& InputStream, const Providers::PropertyData& PropData, EReadZero) : Value() {} 31 | 32 | EPropertyType GetType() const override { 33 | return EPropertyType::MapProperty; 34 | } 35 | }; 36 | } -------------------------------------------------------------------------------- /src/Properties/MulticastDelegate.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Structs/FScriptDelegate.h" 4 | #include "Base.h" 5 | 6 | namespace Zen::Properties { 7 | class MulticastDelegateProperty : public BaseProperty { 8 | public: 9 | std::vector Value; 10 | 11 | MulticastDelegateProperty(Streams::BaseStream& InputStream) { 12 | InputStream >> Value; 13 | } 14 | 15 | MulticastDelegateProperty(Streams::BaseStream& InputStream, EReadArray) : MulticastDelegateProperty(InputStream) {} 16 | 17 | MulticastDelegateProperty(Streams::BaseStream& InputStream, EReadMap) : MulticastDelegateProperty(InputStream) {} 18 | 19 | MulticastDelegateProperty(Streams::BaseStream& InputStream, EReadZero) : Value() {} 20 | 21 | EPropertyType GetType() const override { 22 | return EPropertyType::MulticastDelegateProperty; 23 | } 24 | }; 25 | } -------------------------------------------------------------------------------- /src/Properties/Name.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Structs/FName.h" 4 | #include "Base.h" 5 | 6 | namespace Zen::Properties { 7 | class NameProperty : public BaseProperty { 8 | public: 9 | Structs::FName Value; 10 | 11 | NameProperty(Streams::BaseStream& InputStream) { 12 | InputStream >> Value; 13 | } 14 | 15 | NameProperty(Streams::BaseStream& InputStream, EReadArray) : NameProperty(InputStream) {} 16 | 17 | NameProperty(Streams::BaseStream& InputStream, EReadMap) : NameProperty(InputStream) {} 18 | 19 | NameProperty(Streams::BaseStream& InputStream, EReadZero) : Value() {} 20 | 21 | EPropertyType GetType() const override { 22 | return EPropertyType::NameProperty; 23 | } 24 | }; 25 | } -------------------------------------------------------------------------------- /src/Properties/Object.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Structs/FPackageIndex.h" 4 | #include "Base.h" 5 | 6 | namespace Zen::Properties { 7 | class ObjectProperty : public BaseProperty { 8 | public: 9 | Structs::FPackageIndex Value; 10 | 11 | ObjectProperty(Streams::BaseStream& InputStream) { 12 | InputStream >> Value; 13 | } 14 | 15 | ObjectProperty(Streams::BaseStream& InputStream, EReadArray) : ObjectProperty(InputStream) {} 16 | 17 | ObjectProperty(Streams::BaseStream& InputStream, EReadMap) : ObjectProperty(InputStream) {} 18 | 19 | ObjectProperty(Streams::BaseStream& InputStream, EReadZero) : Value{0} {} 20 | 21 | EPropertyType GetType() const override { 22 | return EPropertyType::ObjectProperty; 23 | } 24 | }; 25 | } -------------------------------------------------------------------------------- /src/Properties/Serializer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Enums/EPropertyType.h" 4 | #include "../Providers/Base.h" 5 | #include "../Streams/BaseStream.h" 6 | #include "Base.h" 7 | 8 | #include 9 | 10 | namespace Zen::Properties { 11 | using namespace Enums; 12 | 13 | template 14 | std::unique_ptr Serialize(Streams::BaseStream& InputStream, const Providers::PropertyData& PropData); 15 | } -------------------------------------------------------------------------------- /src/Properties/Set.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Base.h" 4 | #include "Serializer.h" 5 | 6 | namespace Zen::Properties { 7 | class SetProperty : public BaseProperty { 8 | public: 9 | std::vector> Value; 10 | 11 | // https://github.com/EpicGames/UnrealEngine/blob/bf95c2cbc703123e08ab54e3ceccdd47e48d224a/Engine/Source/Runtime/CoreUObject/Private/UObject/PropertySet.cpp#L216 12 | SetProperty(Streams::BaseStream& InputStream, const Providers::PropertyData& PropData) { 13 | int NumKeysToRemove; 14 | InputStream >> NumKeysToRemove; 15 | for (int i = 0; i < NumKeysToRemove; ++i) { 16 | Serialize(InputStream, *PropData.GetData().Array.InnerType); 17 | } 18 | 19 | int NumEntries; 20 | InputStream >> NumEntries; 21 | Value.reserve(NumEntries); 22 | 23 | for (int i = 0; i < NumEntries; ++i) { 24 | Value.emplace_back(Serialize(InputStream, *PropData.GetData().Array.InnerType)); 25 | } 26 | } 27 | 28 | SetProperty(Streams::BaseStream& InputStream, const Providers::PropertyData& PropData, EReadArray) : SetProperty(InputStream, PropData) {} 29 | 30 | SetProperty(Streams::BaseStream& InputStream, const Providers::PropertyData& PropData, EReadMap) : SetProperty(InputStream, PropData) {} 31 | 32 | SetProperty(Streams::BaseStream& InputStream, const Providers::PropertyData& PropData, EReadZero) : Value() {} 33 | 34 | EPropertyType GetType() const override { 35 | return EPropertyType::SetProperty; 36 | } 37 | }; 38 | } -------------------------------------------------------------------------------- /src/Properties/SoftObject.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Structs/FSoftObjectPath.h" 4 | #include "Base.h" 5 | 6 | namespace Zen::Properties { 7 | class SoftObjectProperty : public BaseProperty { 8 | public: 9 | Structs::FSoftObjectPath Value; 10 | 11 | SoftObjectProperty(Streams::BaseStream& InputStream) { 12 | InputStream >> Value; 13 | } 14 | 15 | SoftObjectProperty(Streams::BaseStream& InputStream, EReadArray) : SoftObjectProperty(InputStream) {} 16 | 17 | // Always read exactly 16 bytes 18 | SoftObjectProperty(Streams::BaseStream& InputStream, EReadMap) { 19 | auto StartPos = InputStream.tell(); 20 | InputStream >> Value; 21 | InputStream.seek(StartPos + 16, Streams::BaseStream::Beg); 22 | } 23 | 24 | SoftObjectProperty(Streams::BaseStream& InputStream, EReadZero) : Value() {} 25 | 26 | EPropertyType GetType() const override { 27 | return EPropertyType::SoftObjectProperty; 28 | } 29 | }; 30 | } -------------------------------------------------------------------------------- /src/Properties/Str.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Base.h" 4 | 5 | namespace Zen::Properties { 6 | class StrProperty : public BaseProperty { 7 | public: 8 | std::string Value; 9 | 10 | StrProperty(Streams::BaseStream& InputStream) { 11 | InputStream >> Value; 12 | } 13 | 14 | StrProperty(Streams::BaseStream& InputStream, EReadArray) : StrProperty(InputStream) {} 15 | 16 | StrProperty(Streams::BaseStream& InputStream, EReadMap) : StrProperty(InputStream) {} 17 | 18 | StrProperty(Streams::BaseStream& InputStream, EReadZero) : Value() {} 19 | 20 | EPropertyType GetType() const override { 21 | return EPropertyType::StrProperty; 22 | } 23 | }; 24 | } -------------------------------------------------------------------------------- /src/Properties/Struct.cpp: -------------------------------------------------------------------------------- 1 | #include "Struct.h" 2 | 3 | #include "../Exports/UObject.h" 4 | 5 | namespace Zen::Properties { 6 | void StructProperty::EmplaceUObject(Streams::BaseStream& InputStream, const Providers::Schema& Schema) { 7 | this->Value.emplace>(std::make_shared(InputStream, Schema, Exports::StructFallback)); 8 | } 9 | } -------------------------------------------------------------------------------- /src/Properties/Text.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Structs/FText.h" 4 | #include "Base.h" 5 | 6 | namespace Zen::Properties { 7 | class TextProperty : public BaseProperty { 8 | public: 9 | Structs::FText Value; 10 | 11 | TextProperty(Streams::BaseStream& InputStream) { 12 | InputStream >> Value; 13 | } 14 | 15 | TextProperty(Streams::BaseStream& InputStream, EReadArray) : TextProperty(InputStream) {} 16 | 17 | TextProperty(Streams::BaseStream& InputStream, EReadMap) : TextProperty(InputStream) {} 18 | 19 | TextProperty(Streams::BaseStream& InputStream, EReadZero) : Value{ nullptr, ETextFlag::Immutable } {} 20 | 21 | EPropertyType GetType() const override { 22 | return EPropertyType::TextProperty; 23 | } 24 | }; 25 | } -------------------------------------------------------------------------------- /src/Properties/UInt16.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Base.h" 4 | 5 | namespace Zen::Properties { 6 | class UInt16Property : public BaseProperty { 7 | public: 8 | uint16_t Value; 9 | 10 | UInt16Property(Streams::BaseStream& InputStream) { 11 | InputStream >> Value; 12 | } 13 | 14 | UInt16Property(Streams::BaseStream& InputStream, EReadArray) : UInt16Property(InputStream) {} 15 | 16 | UInt16Property(Streams::BaseStream& InputStream, EReadMap) : UInt16Property(InputStream) {} 17 | 18 | UInt16Property(Streams::BaseStream& InputStream, EReadZero) : Value() {} 19 | 20 | EPropertyType GetType() const override { 21 | return EPropertyType::UInt16Property; 22 | } 23 | }; 24 | } -------------------------------------------------------------------------------- /src/Properties/UInt32.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Base.h" 4 | 5 | namespace Zen::Properties { 6 | class UInt32Property : public BaseProperty { 7 | public: 8 | uint32_t Value; 9 | 10 | UInt32Property(Streams::BaseStream& InputStream) { 11 | InputStream >> Value; 12 | } 13 | 14 | UInt32Property(Streams::BaseStream& InputStream, EReadArray) : UInt32Property(InputStream) {} 15 | 16 | UInt32Property(Streams::BaseStream& InputStream, EReadMap) : UInt32Property(InputStream) {} 17 | 18 | UInt32Property(Streams::BaseStream& InputStream, EReadZero) : Value() {} 19 | 20 | EPropertyType GetType() const override { 21 | return EPropertyType::UInt32Property; 22 | } 23 | }; 24 | } -------------------------------------------------------------------------------- /src/Properties/UInt64.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Base.h" 4 | 5 | namespace Zen::Properties { 6 | class UInt64Property : public BaseProperty { 7 | public: 8 | uint64_t Value; 9 | 10 | UInt64Property(Streams::BaseStream& InputStream) { 11 | InputStream >> Value; 12 | } 13 | 14 | UInt64Property(Streams::BaseStream& InputStream, EReadArray) : UInt64Property(InputStream) {} 15 | 16 | UInt64Property(Streams::BaseStream& InputStream, EReadMap) : UInt64Property(InputStream) {} 17 | 18 | UInt64Property(Streams::BaseStream& InputStream, EReadZero) : Value() {} 19 | 20 | EPropertyType GetType() const override { 21 | return EPropertyType::UInt64Property; 22 | } 23 | }; 24 | } -------------------------------------------------------------------------------- /src/Properties/WeakObject.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "SoftObject.h" 4 | 5 | namespace Zen::Properties { 6 | using WeakObjectProperty = SoftObjectProperty; 7 | } -------------------------------------------------------------------------------- /src/Streams/BufferStream.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "BaseStream.h" 4 | 5 | namespace Zen::Streams { 6 | class BufferStream : public BaseStream { 7 | public: 8 | BufferStream(char* Start, size_t Size) : 9 | Buffer(Start), 10 | Position(0), 11 | Size(Size) 12 | {} 13 | 14 | BaseStream& write(const char* Buf, size_t BufCount) override { 15 | if (Position + BufCount > Size) { 16 | BufCount = Size - Position; 17 | } 18 | memcpy(Buffer + Position, Buf, BufCount); 19 | Position += BufCount; 20 | return *this; 21 | } 22 | 23 | BaseStream& read(char* Buf, size_t BufCount) override { 24 | if (Position + BufCount > Size) { 25 | BufCount = Size - Position; 26 | } 27 | memcpy(Buf, Buffer + Position, BufCount); 28 | Position += BufCount; 29 | return *this; 30 | } 31 | 32 | BaseStream& seek(size_t Position, SeekPosition SeekFrom) override { 33 | switch (SeekFrom) 34 | { 35 | case BaseStream::Beg: 36 | this->Position = Position; 37 | break; 38 | case BaseStream::Cur: 39 | this->Position += Position; 40 | break; 41 | case BaseStream::End: 42 | this->Position = Size + Position; 43 | } 44 | return *this; 45 | } 46 | 47 | size_t tell() override { 48 | return Position; 49 | } 50 | 51 | size_t size() override { 52 | return Size; 53 | } 54 | 55 | private: 56 | char* Buffer; 57 | size_t Position; 58 | size_t Size; 59 | }; 60 | } 61 | -------------------------------------------------------------------------------- /src/Streams/FileStream.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "BaseStream.h" 4 | 5 | #include 6 | #include 7 | 8 | namespace Zen::Streams { 9 | class FileStream : public BaseStream { 10 | public: 11 | FileStream(const std::filesystem::path& FilePath) : 12 | BaseStream(FilePath, std::ios::in | std::ios::binary), 13 | Filename(FilePath.string()), 14 | FileSize(std::filesystem::file_size(FilePath)) 15 | {} 16 | 17 | FileStream(FileStream&&) = default; 18 | FileStream& operator=(FileStream&&) = default; 19 | FileStream(const FileStream&) = delete; 20 | FileStream& operator=(const FileStream&) = delete; 21 | 22 | BaseStream& write(const char* Buf, size_t BufCount) override { 23 | throw Exceptions::UnsupportedOperationException("Write operations aren't supported for FileStreams"); 24 | } 25 | 26 | BaseStream& read(char* Buf, size_t BufCount) override { 27 | BaseStream.read(Buf, BufCount); 28 | return *this; 29 | } 30 | 31 | BaseStream& seek(size_t Position, SeekPosition SeekFrom) override { 32 | switch (SeekFrom) 33 | { 34 | case BaseStream::Beg: 35 | BaseStream.seekg(Position, std::ios::beg); 36 | break; 37 | case BaseStream::Cur: 38 | BaseStream.seekg(Position, std::ios::cur); 39 | break; 40 | case BaseStream::End: 41 | BaseStream.seekg(Position, std::ios::end); 42 | break; 43 | } 44 | 45 | return *this; 46 | } 47 | 48 | size_t tell() override { 49 | return std::streamoff(BaseStream.tellg()); 50 | } 51 | 52 | size_t size() override { 53 | return FileSize; 54 | } 55 | 56 | private: 57 | std::ifstream BaseStream; 58 | std::string Filename; 59 | size_t FileSize; 60 | }; 61 | } 62 | -------------------------------------------------------------------------------- /src/Streams/MemoryStream.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "BaseStream.h" 4 | 5 | namespace Zen::Streams { 6 | class MemoryStream : public BaseStream { 7 | public: 8 | MemoryStream() { 9 | Buffer.resize(1024); 10 | Size = 0; 11 | Position = 0; 12 | } 13 | 14 | MemoryStream(size_t Capacity) { 15 | Buffer.resize(Capacity); 16 | Size = 0; 17 | Position = 0; 18 | } 19 | 20 | BaseStream& write(const char* Buf, size_t BufCount) override { 21 | while (Buffer.size() < BufCount + Position) { 22 | Buffer.resize(Buffer.size() * 2); 23 | } 24 | memcpy(Buffer.data() + Position, Buf, BufCount); 25 | Position += BufCount; 26 | if (Position > Size) { 27 | Size = Position; 28 | } 29 | return *this; 30 | } 31 | 32 | BaseStream& read(char* Buf, size_t BufCount) override { 33 | if (Position + BufCount < Size) { 34 | BufCount = Size - Position; 35 | } 36 | memcpy(Buf, Buffer.data() + Position, BufCount); 37 | Position += BufCount; 38 | return *this; 39 | } 40 | 41 | BaseStream& seek(size_t Position, SeekPosition SeekFrom) override { 42 | switch (SeekFrom) 43 | { 44 | case BaseStream::Beg: 45 | this->Position = Position; 46 | break; 47 | case BaseStream::Cur: 48 | this->Position += Position; 49 | break; 50 | case BaseStream::End: 51 | this->Position = Size + Position; 52 | } 53 | return *this; 54 | } 55 | 56 | size_t tell() override { 57 | return Position; 58 | } 59 | 60 | size_t size() override { 61 | return Size; 62 | } 63 | 64 | const char* get() const { 65 | return Buffer.data(); 66 | } 67 | 68 | private: 69 | std::vector Buffer; 70 | size_t Position; 71 | size_t Size; 72 | }; 73 | } 74 | -------------------------------------------------------------------------------- /src/Streams/Properties.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Zen::Streams { 6 | enum class PropId : uint8_t { 7 | Provider, 8 | ZExport, 9 | GlobalData, 10 | 11 | Count 12 | }; 13 | } -------------------------------------------------------------------------------- /src/Structs/FAESKey.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | namespace Zen::Structs { 6 | class FAESKey { 7 | public: 8 | char Key[32]; 9 | 10 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FAESKey& Value) { 11 | InputStream >> Value.Key; 12 | 13 | return InputStream; 14 | } 15 | 16 | constexpr static FAESKey FromHex(const char HexBlob[64]) { 17 | FAESKey Key; 18 | for (int i = 0, j = 0; j < 32; i += 2, j++) { 19 | Key.Key[j] = (HexBlob[i] % 32 + 9) % 25 * 16 + (HexBlob[i + 1] % 32 + 9) % 25; 20 | } 21 | return Key; 22 | } 23 | }; 24 | } -------------------------------------------------------------------------------- /src/Structs/FArc.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | namespace Zen::Structs { 6 | class FArc { 7 | public: 8 | uint32_t FromNodeIndex; 9 | uint32_t ToNodeIndex; 10 | 11 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FArc& Value) { 12 | InputStream >> Value.FromNodeIndex; 13 | InputStream >> Value.ToNodeIndex; 14 | 15 | return InputStream; 16 | } 17 | }; 18 | } -------------------------------------------------------------------------------- /src/Structs/FByteBulkData.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Exceptions/BaseException.h" 4 | #include "../Enums/EBulkDataFlags.h" 5 | #include "../Streams/BaseStream.h" 6 | 7 | namespace Zen::Structs { 8 | using namespace Enums; 9 | using namespace Exceptions; 10 | 11 | class FByteBulkData { 12 | public: 13 | std::unique_ptr Data; 14 | int DataSize; 15 | 16 | FByteBulkData() = default; 17 | 18 | // This doesn't provide a >> operator since it needs a bulk stream 19 | FByteBulkData(Streams::BaseStream& InputStream, Streams::BaseStream* BulkStream, size_t BulkOffset) { 20 | int BulkDataFlags; 21 | InputStream >> BulkDataFlags; 22 | 23 | InputStream >> DataSize; // called ElementCount, but we're saving this value publicly 24 | int BulkDataOnDisk; // unused 25 | InputStream >> BulkDataOnDisk; 26 | 27 | int64_t BulkDataOffsetInFile; 28 | InputStream >> BulkDataOffsetInFile; 29 | 30 | if (!(BulkDataFlags & (int)EBulkDataFlags::BULKDATA_NoOffsetFixUp)) { 31 | BulkDataOffsetInFile += BulkOffset; 32 | } 33 | 34 | if (BulkDataFlags & (int)EBulkDataFlags::BULKDATA_Unused || BulkDataFlags & (int)EBulkDataFlags::BULKDATA_OptionalPayload /* uptnl */ || !DataSize) { 35 | return; 36 | } 37 | 38 | Data = std::make_unique(DataSize); 39 | 40 | if (BulkDataFlags & (int)EBulkDataFlags::BULKDATA_PayloadAtEndOfFile && BulkDataOffsetInFile + DataSize <= InputStream.size()) { // ".uasset" (not sure how this would make sense, especially on non-unversioned readers) 41 | auto Pos = InputStream.tell(); 42 | InputStream.seek(BulkDataOffsetInFile, Streams::BaseStream::Beg); 43 | InputStream.read(Data.get(), DataSize); 44 | InputStream.seek(Pos, Streams::BaseStream::Beg); 45 | } 46 | else if (BulkDataFlags & (int)EBulkDataFlags::BULKDATA_ForceInlinePayload) { 47 | InputStream.read(Data.get(), DataSize); 48 | } 49 | else if (BulkDataFlags & (int)EBulkDataFlags::BULKDATA_PayloadInSeperateFile && BulkStream) { 50 | BulkStream->seek(BulkDataOffsetInFile, Streams::BaseStream::Beg); 51 | BulkStream->read(Data.get(), DataSize); 52 | } 53 | else { 54 | Data.reset(); 55 | throw ArchiveCorruptedException("Could not read FByteBulkData"); 56 | } 57 | } 58 | }; 59 | } -------------------------------------------------------------------------------- /src/Structs/FDateTime.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | namespace Zen::Structs { 6 | class FDateTime { 7 | public: 8 | // Holds the ticks in 100 nanoseconds resolution since January 1, 0001 A.D. 9 | int64_t Ticks; 10 | 11 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FDateTime& Value) { 12 | InputStream >> Value.Ticks; 13 | 14 | return InputStream; 15 | } 16 | }; 17 | } -------------------------------------------------------------------------------- /src/Structs/FExportMapEntry.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Enums/EObjectFlags.h" 4 | #include "../Enums/EExportFilterFlags.h" 5 | #include "../Streams/BaseStream.h" 6 | #include "FMappedName.h" 7 | #include "FPackageObjectIndex.h" 8 | 9 | namespace Zen::Structs { 10 | // https://github.com/EpicGames/UnrealEngine/blob/5b0cfe38e0faf3c2f9938d8f6a1cb5805802a180/Engine/Source/Runtime/CoreUObject/Public/Serialization/AsyncLoading2.h#L328 11 | class FExportMapEntry { 12 | public: 13 | uint64_t CookedSerialOffset; 14 | uint64_t CookedSerialSize; 15 | FMappedName ObjectName; 16 | FPackageObjectIndex OuterIndex; 17 | FPackageObjectIndex ClassIndex; 18 | FPackageObjectIndex SuperIndex; 19 | FPackageObjectIndex TemplateIndex; 20 | FPackageObjectIndex GlobalImportIndex; 21 | Enums::EObjectFlags ObjectFlags; 22 | Enums::EExportFilterFlags FilterFlags; 23 | 24 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FExportMapEntry& Value) { 25 | InputStream >> Value.CookedSerialOffset; 26 | InputStream >> Value.CookedSerialSize; 27 | InputStream >> Value.ObjectName; 28 | InputStream >> Value.OuterIndex; 29 | InputStream >> Value.ClassIndex; 30 | InputStream >> Value.SuperIndex; 31 | InputStream >> Value.TemplateIndex; 32 | InputStream >> Value.GlobalImportIndex; 33 | uint32_t ObjectFlags; 34 | InputStream >> ObjectFlags; 35 | Value.ObjectFlags = (Enums::EObjectFlags)ObjectFlags; 36 | uint8_t FilterFlags; 37 | InputStream >> FilterFlags; 38 | Value.FilterFlags = (Enums::EExportFilterFlags)FilterFlags; 39 | InputStream.seek(3, BaseStream::Cur); 40 | 41 | return InputStream; 42 | } 43 | }; 44 | } -------------------------------------------------------------------------------- /src/Structs/FFieldPath.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | namespace Zen::Structs { 6 | class FFieldPath { 7 | public: 8 | std::vector Names; 9 | 10 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FFieldPath& Value) { 11 | InputStream >> Value.Names; 12 | 13 | return InputStream; 14 | } 15 | }; 16 | } -------------------------------------------------------------------------------- /src/Structs/FFormatArgumentValue.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Enums/EFormatArgumentType.h" 4 | #include "../Streams/BaseStream.h" 5 | #include "FText.h" 6 | 7 | #include 8 | 9 | namespace Zen::Structs { 10 | using namespace Enums; 11 | class FFormatArgumentValue { 12 | public: 13 | std::variant Value; 14 | 15 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FFormatArgumentValue& Value) { 16 | int8_t TypeAsInt8; 17 | InputStream >> TypeAsInt8; 18 | 19 | // https://github.com/EpicGames/UnrealEngine/blob/master/Engine/Source/Runtime/Core/Private/Internationalization/Text.cpp#L1210 20 | // EFormatArgumentType has a gender type, but it's not serializable? Yet, it has a GetGenderValue function?? 21 | switch ((EFormatArgumentType)TypeAsInt8) 22 | { 23 | case EFormatArgumentType::Int: 24 | InputStream >> Value.Value.emplace(); 25 | break; 26 | case EFormatArgumentType::UInt: 27 | InputStream >> Value.Value.emplace(); 28 | break; 29 | case EFormatArgumentType::Float: 30 | InputStream >> Value.Value.emplace(); 31 | break; 32 | case EFormatArgumentType::Double: 33 | InputStream >> Value.Value.emplace(); 34 | break; 35 | case EFormatArgumentType::Text: 36 | InputStream >> Value.Value.emplace(); 37 | break; 38 | } 39 | 40 | return InputStream; 41 | } 42 | }; 43 | } -------------------------------------------------------------------------------- /src/Structs/FFormatNamedArguments.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | #include "FFormatArgumentValue.h" 5 | 6 | namespace Zen::Structs { 7 | // UE4 defines this as a TMap 8 | // Maps take a lot of memory, so a vector of pairs will do 9 | class FFormatNamedArguments { 10 | public: 11 | std::vector> Value; 12 | 13 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FFormatNamedArguments& Value) { 14 | InputStream >> Value.Value; 15 | 16 | return InputStream; 17 | } 18 | }; 19 | } -------------------------------------------------------------------------------- /src/Structs/FGameplayTagContainer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | #include "FName.h" 5 | 6 | namespace Zen::Structs { 7 | class FGameplayTagContainer { 8 | public: 9 | // It's technically a TArray but FGameplayTag is just a fancy wrapper around an FName 10 | std::vector GameplayTags; 11 | 12 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FGameplayTagContainer& Value) { 13 | InputStream >> Value.GameplayTags; 14 | 15 | return InputStream; 16 | } 17 | }; 18 | } -------------------------------------------------------------------------------- /src/Structs/FGuid.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | namespace Zen::Structs { 6 | class FGuid { 7 | public: 8 | uint32_t A; 9 | uint32_t B; 10 | uint32_t C; 11 | uint32_t D; 12 | 13 | constexpr FGuid() : FGuid(0, 0, 0, 0) {} 14 | constexpr FGuid(uint32_t A, uint32_t B, uint32_t C, uint32_t D) : A(A), B(B), C(C), D(D) {} 15 | 16 | void Invalidate() { 17 | A = 0; 18 | B = 0; 19 | C = 0; 20 | D = 0; 21 | } 22 | 23 | auto operator<=>(const FGuid&) const = default; 24 | 25 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FGuid& Value) { 26 | InputStream >> Value.A; 27 | InputStream >> Value.B; 28 | InputStream >> Value.C; 29 | InputStream >> Value.D; 30 | 31 | return InputStream; 32 | } 33 | 34 | static constexpr FGuid Zero() { 35 | return {}; 36 | } 37 | }; 38 | } -------------------------------------------------------------------------------- /src/Structs/FIntPoint.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | namespace Zen::Structs { 6 | class FIntPoint { 7 | public: 8 | int X; 9 | int Y; 10 | 11 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FIntPoint& Value) { 12 | InputStream >> Value.X; 13 | InputStream >> Value.Y; 14 | 15 | return InputStream; 16 | } 17 | }; 18 | } -------------------------------------------------------------------------------- /src/Structs/FIoChunkHash.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | namespace Zen::Structs { 6 | class FIoChunkHash { 7 | public: 8 | uint8_t Hash[32]; 9 | 10 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FIoChunkHash& Value) { 11 | InputStream >> Value.Hash; 12 | 13 | return InputStream; 14 | } 15 | }; 16 | } -------------------------------------------------------------------------------- /src/Structs/FIoChunkId.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | #include "../Enums/EIoChunkType.h" 5 | 6 | namespace Zen::Structs { 7 | using namespace Enums; 8 | class FIoChunkId { 9 | public: 10 | uint8_t Id[12] = { 0 }; 11 | 12 | constexpr FIoChunkId() {} 13 | 14 | constexpr FIoChunkId(uint64_t GlobalPackageId, uint16_t ChunkIndex, EIoChunkType IoChunkType) { 15 | *(uint32_t*)(Id + 0) = GlobalPackageId; 16 | *(uint16_t*)(Id + 4) = ChunkIndex; 17 | *(uint8_t*)(Id + 11) = (uint8_t)IoChunkType; 18 | } 19 | 20 | bool operator==(const FIoChunkId&) const = default; 21 | 22 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FIoChunkId& Value) { 23 | InputStream >> Value.Id; 24 | 25 | return InputStream; 26 | } 27 | }; 28 | } -------------------------------------------------------------------------------- /src/Structs/FIoChunkOffsetAndLength.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | namespace Zen::Structs { 6 | class FIoChunkOffsetAndLength { 7 | public: 8 | uint8_t Data[10]; 9 | 10 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FIoChunkOffsetAndLength& Value) { 11 | InputStream >> Value.Data; 12 | 13 | return InputStream; 14 | } 15 | 16 | uint64_t GetOffset() const { 17 | return Data[4] 18 | | (uint64_t(Data[3]) << 8) 19 | | (uint64_t(Data[2]) << 16) 20 | | (uint64_t(Data[1]) << 24) 21 | | (uint64_t(Data[0]) << 32); 22 | } 23 | 24 | uint64_t GetLength() const { 25 | return Data[9] 26 | | (uint64_t(Data[8]) << 8) 27 | | (uint64_t(Data[7]) << 16) 28 | | (uint64_t(Data[6]) << 24) 29 | | (uint64_t(Data[5]) << 32); 30 | } 31 | }; 32 | } -------------------------------------------------------------------------------- /src/Structs/FIoContainerId.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | #include 6 | 7 | namespace Zen::Structs { 8 | class FIoContainerId { 9 | public: 10 | uint64_t Id; 11 | 12 | constexpr FIoContainerId() : FIoContainerId(-1) {} 13 | constexpr FIoContainerId(uint64_t Id) : Id(Id) {} 14 | 15 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FIoContainerId& Value) { 16 | InputStream >> Value.Id; 17 | 18 | return InputStream; 19 | } 20 | 21 | static constexpr FIoContainerId InvalidId() { 22 | return {}; 23 | } 24 | }; 25 | } -------------------------------------------------------------------------------- /src/Structs/FIoDirectoryIndexEntry.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | namespace Zen::Structs { 6 | class FIoDirectoryIndexEntry { 7 | public: 8 | uint32_t Name; 9 | uint32_t FirstChildEntry; 10 | uint32_t NextSiblingEntry; 11 | uint32_t FirstFileEntry; 12 | 13 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FIoDirectoryIndexEntry& Value) { 14 | InputStream >> Value.Name; 15 | InputStream >> Value.FirstChildEntry; 16 | InputStream >> Value.NextSiblingEntry; 17 | InputStream >> Value.FirstFileEntry; 18 | 19 | return InputStream; 20 | } 21 | }; 22 | } -------------------------------------------------------------------------------- /src/Structs/FIoDirectoryIndexResource.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | #include "FIoDirectoryIndexEntry.h" 5 | #include "FIoFileIndexEntry.h" 6 | 7 | #include 8 | 9 | namespace Zen::Structs { 10 | class FIoDirectoryIndexResource { 11 | public: 12 | std::string MountPoint; 13 | std::vector DirectoryEntries; 14 | std::vector FileEntries; 15 | std::vector StringTable; 16 | 17 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FIoDirectoryIndexResource& Value) { 18 | InputStream >> Value.MountPoint; 19 | if (Value.MountPoint.starts_with("../../..")) { 20 | Value.MountPoint = Value.MountPoint.substr(9); 21 | } 22 | InputStream >> Value.DirectoryEntries; 23 | InputStream >> Value.FileEntries; 24 | InputStream >> Value.StringTable; 25 | 26 | return InputStream; 27 | } 28 | 29 | // Sorry in advance for all the std::forward, it's done to ensure rvalue refs stay as rvalue refs 30 | // The std::make_unique does that, for example 31 | template 32 | void ReadIndex(FileTree& Tree, Args&&... FileArgs) { 33 | ReadIndex(Tree.template AddFolders(MountPoint.c_str()), DirectoryEntries[0].FirstChildEntry, std::forward(FileArgs)...); 34 | } 35 | 36 | template 37 | void ReadIndex(FileTree& Tree, uint32_t DirIdx, Args&&... FileArgs) { 38 | while (DirIdx != UINT32_MAX) { 39 | auto& Dir = DirectoryEntries[DirIdx]; 40 | auto& DirName = GetString(Dir.Name); 41 | auto& DirTree = Tree.template AddFolder(DirName.c_str(), DirName.size()); 42 | 43 | uint32_t FileIdx = Dir.FirstFileEntry; 44 | while (FileIdx != UINT32_MAX) { 45 | auto& File = FileEntries[FileIdx]; 46 | auto& FileName = GetString(File.Name); 47 | auto Dot = FileName.rfind('.'); 48 | if (Dot != std::string::npos) { 49 | auto& Pkg = DirTree.template AddPackage(FileName.c_str(), Dot); 50 | Pkg.template AddFile(FileName.c_str() + Dot + 1, FileName.size() - Dot - 1, File.UserData, std::forward(FileArgs)...); 51 | } 52 | else { 53 | auto& Pkg = DirTree.template AddPackage(FileName.c_str(), FileName.size()); 54 | Pkg.template AddFile(NULL, 0, File.UserData, std::forward(FileArgs)...); 55 | } 56 | 57 | FileIdx = File.NextFileEntry; 58 | } 59 | 60 | ReadIndex(DirTree, Dir.FirstChildEntry, std::forward(FileArgs)...); 61 | 62 | DirIdx = Dir.NextSiblingEntry; 63 | } 64 | } 65 | 66 | private: 67 | const std::string& GetString(uint32_t StringIdx) const { 68 | return StringTable[StringIdx]; 69 | } 70 | }; 71 | } -------------------------------------------------------------------------------- /src/Structs/FIoFileIndexEntry.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | namespace Zen::Structs { 6 | class FIoFileIndexEntry { 7 | public: 8 | uint32_t Name; 9 | uint32_t NextFileEntry; 10 | uint32_t UserData; 11 | 12 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FIoFileIndexEntry& Value) { 13 | InputStream >> Value.Name; 14 | InputStream >> Value.NextFileEntry; 15 | InputStream >> Value.UserData; 16 | 17 | return InputStream; 18 | } 19 | }; 20 | } -------------------------------------------------------------------------------- /src/Structs/FIoStoreTocCompressedBlockEntry.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | namespace Zen::Structs { 6 | class FIoStoreTocCompressedBlockEntry { 7 | public: 8 | uint8_t Data[12]; 9 | 10 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FIoStoreTocCompressedBlockEntry& Value) { 11 | InputStream >> Value.Data; 12 | 13 | return InputStream; 14 | } 15 | 16 | uint64_t GetOffset() const { 17 | return *((uint64_t*)Data) & 0xFFFFFFFFFF; 18 | } 19 | 20 | uint32_t GetCompressedSize() const { 21 | return (*((uint32_t*)Data + 1) >> 8) & 0xFFFFFF; 22 | } 23 | 24 | uint32_t GetUncompressedSize() const { 25 | return *((uint32_t*)Data + 2) & 0xFFFFFF; 26 | } 27 | 28 | uint8_t GetCompressionMethodIndex() const { 29 | return *((uint32_t*)Data + 2) >> 24; 30 | } 31 | }; 32 | } -------------------------------------------------------------------------------- /src/Structs/FIoStoreTocEntryMeta.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Enums/FIoStoreTocEntryMetaFlags.h" 4 | #include "../Streams/BaseStream.h" 5 | #include "../Structs/FIoChunkHash.h" 6 | 7 | namespace Zen::Structs { 8 | class FIoStoreTocEntryMeta { 9 | public: 10 | FIoChunkHash ChunkHash; 11 | FIoStoreTocEntryMetaFlags Flags; 12 | 13 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FIoStoreTocEntryMeta& Value) { 14 | InputStream >> Value.ChunkHash; 15 | uint8_t Flags; 16 | InputStream >> Flags; 17 | Value.Flags = (FIoStoreTocEntryMetaFlags)Flags; 18 | 19 | return InputStream; 20 | } 21 | }; 22 | } -------------------------------------------------------------------------------- /src/Structs/FIoStoreTocHeader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | #include "../Exceptions/BaseException.h" 5 | #include "../Enums/EIoStoreTocVersion.h" 6 | #include "../Enums/EIoContainerFlags.h" 7 | #include "FGuid.h" 8 | #include "FIoContainerId.h" 9 | 10 | namespace Zen::Structs { 11 | using namespace Enums; 12 | using namespace Exceptions; 13 | using namespace Streams; 14 | 15 | class FIoStoreTocHeader { 16 | public: 17 | static constexpr char TocMagicImg[] = "-==--==--==--==-"; 18 | 19 | uint8_t TocMagic[16]; 20 | EIoStoreTocVersion Version; 21 | uint32_t TocHeaderSize; 22 | uint32_t TocEntryCount; 23 | uint32_t TocCompressedBlockEntryCount; 24 | uint32_t TocCompressedBlockEntrySize; 25 | uint32_t CompressionMethodNameCount; 26 | uint32_t CompressionMethodNameLength; 27 | uint32_t CompressionBlockSize; 28 | uint32_t DirectoryIndexSize; 29 | FIoContainerId ContainerId; 30 | FGuid EncryptionKeyGuid; 31 | EIoContainerFlags ContainerFlags; 32 | 33 | // I still don't see any reason why you made this code in UE4 not portable at all 34 | // I thought we moved on from reading and writing to direct pointers 35 | friend BaseStream& operator>>(BaseStream& InputStream, FIoStoreTocHeader& Value) { 36 | InputStream >> Value.TocMagic; 37 | if (memcmp(Value.TocMagic, FIoStoreTocHeader::TocMagicImg, 16)) { 38 | throw InvalidMagicException("UToc file has an invalid magic constant"); 39 | } 40 | int32_t Version; // The 1 byte enums are 32 bit because of alignement 41 | InputStream >> Version; 42 | Value.Version = (EIoStoreTocVersion)Version; 43 | InputStream >> Value.TocHeaderSize; 44 | InputStream >> Value.TocEntryCount; 45 | InputStream >> Value.TocCompressedBlockEntryCount; 46 | InputStream >> Value.TocCompressedBlockEntrySize; 47 | InputStream >> Value.CompressionMethodNameCount; 48 | InputStream >> Value.CompressionMethodNameLength; 49 | InputStream >> Value.CompressionBlockSize; 50 | InputStream >> Value.DirectoryIndexSize; 51 | InputStream.seek(4, BaseStream::Cur); // ContinerId is 8 byte aligned 52 | InputStream >> Value.ContainerId; 53 | InputStream >> Value.EncryptionKeyGuid; 54 | int32_t ContainerFlags; 55 | InputStream >> ContainerFlags; 56 | Value.ContainerFlags = (EIoContainerFlags)ContainerFlags; 57 | InputStream.seek(60, BaseStream::Cur); 58 | 59 | return InputStream; 60 | } 61 | }; 62 | } -------------------------------------------------------------------------------- /src/Structs/FLinearColor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | namespace Zen::Structs { 6 | class FLinearColor { 7 | public: 8 | float R; 9 | float G; 10 | float B; 11 | float A; 12 | 13 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FLinearColor& Value) { 14 | InputStream >> Value.R; 15 | InputStream >> Value.G; 16 | InputStream >> Value.B; 17 | InputStream >> Value.A; 18 | 19 | return InputStream; 20 | } 21 | }; 22 | } -------------------------------------------------------------------------------- /src/Structs/FMappedName.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Enums/EMappedNameType.h" 4 | #include "../Streams/BaseStream.h" 5 | 6 | namespace Zen::Structs { 7 | using namespace Enums; 8 | // This is based off of FMinimalName which is identical to FName, except it doesn't have the DisplayIndex (therefore only non-case preserving is allowed) 9 | class FMappedName { 10 | public: 11 | uint32_t Index; 12 | uint32_t Number; 13 | 14 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FMappedName& Value) { 15 | InputStream >> Value.Index; 16 | InputStream >> Value.Number; 17 | 18 | return InputStream; 19 | } 20 | 21 | bool IsValid() const { 22 | return Index == -1 && Number == -1; 23 | } 24 | 25 | EMappedNameType GetType() const { 26 | return (EMappedNameType)((Index & 0xC0000000) >> 30); 27 | } 28 | 29 | // Why this isn't just == EMappedNameType::Global (or 2 in UE4's case), who knows 30 | // Here, a name in the container itself and not in the package is also technically global 31 | // https://github.com/EpicGames/UnrealEngine/blob/ac1f4d53af58d8d00f6e2f7124f384d67bcb53c9/Engine/Source/Runtime/CoreUObject/Public/Serialization/AsyncLoading2.h#L81 32 | bool IsGlobal() const { 33 | return GetType() != EMappedNameType::Package; 34 | } 35 | 36 | uint32_t GetIndex() const { 37 | return Index & 0x3FFFFFFF; 38 | } 39 | 40 | uint32_t GetNumber() const { 41 | return Number; 42 | } 43 | }; 44 | } -------------------------------------------------------------------------------- /src/Structs/FName.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Enums/EMappedNameType.h" 4 | #include "../Streams/BaseStream.h" 5 | #include "../ZNameMap.h" 6 | 7 | namespace Zen::Structs { 8 | class FName { 9 | public: 10 | // Technically FNameEntryId, but who cares 11 | uint32_t Index; 12 | uint32_t Number; 13 | 14 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FName& Value) { 15 | InputStream >> Value.Index; 16 | InputStream >> Value.Number; 17 | 18 | return InputStream; 19 | } 20 | 21 | const std::string& Get(const ZNameMap& NameMap) const { 22 | return NameMap[Index]; 23 | } 24 | 25 | // TODO: use a hash lookup or something, that would be better 26 | bool IsNone(const ZNameMap& NameMap) const { 27 | return Get(NameMap) == "None"; 28 | } 29 | }; 30 | } -------------------------------------------------------------------------------- /src/Structs/FNameEntryId.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | namespace Zen::Structs { 6 | class FNameEntryId { 7 | public: 8 | // Internally, it's a single uint32_t value, but this is because it's attached to a name pool. 9 | // We don't have that, so we'll just directly store the string and its hashes 10 | std::string Name; 11 | uint64_t Hash; 12 | }; 13 | } -------------------------------------------------------------------------------- /src/Structs/FNameEntrySerialized.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | namespace Zen::Structs { 6 | class FNameEntrySerialized { 7 | public: 8 | std::string Name; 9 | uint16_t NonCasePreservingHash; 10 | uint16_t CasePreservingHash; 11 | 12 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FNameEntrySerialized& Value) { 13 | InputStream >> Value.Name; 14 | InputStream >> Value.NonCasePreservingHash; 15 | InputStream >> Value.CasePreservingHash; 16 | 17 | return InputStream; 18 | } 19 | }; 20 | } -------------------------------------------------------------------------------- /src/Structs/FNumberFormattingOptions.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Enums/ERoundingMode.h" 4 | #include "../Streams/BaseStream.h" 5 | 6 | namespace Zen::Structs { 7 | using namespace Enums; 8 | class FNumberFormattingOptions { 9 | public: 10 | bool AlwaysSign; 11 | bool UseGrouping; 12 | ERoundingMode RoundingMode; 13 | int MinimumIntegralDigits; 14 | int MaximumIntegralDigits; 15 | int MinimumFractionalDigits; 16 | int MaximumFractionalDigits; 17 | 18 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FNumberFormattingOptions& Value) { 19 | InputStream >> Value.AlwaysSign; 20 | InputStream >> Value.UseGrouping; 21 | 22 | int8_t RoundingModeInt8; 23 | InputStream >> RoundingModeInt8; 24 | Value.RoundingMode = (ERoundingMode)RoundingModeInt8; 25 | 26 | InputStream >> Value.MinimumIntegralDigits; 27 | InputStream >> Value.MaximumIntegralDigits; 28 | InputStream >> Value.MinimumFractionalDigits; 29 | InputStream >> Value.MaximumFractionalDigits; 30 | 31 | return InputStream; 32 | } 33 | }; 34 | } -------------------------------------------------------------------------------- /src/Structs/FPackageId.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | namespace Zen::Structs { 6 | class FPackageId { 7 | public: 8 | uint64_t Id; 9 | 10 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FPackageId& Value) { 11 | InputStream >> Value.Id; 12 | 13 | return InputStream; 14 | } 15 | }; 16 | } -------------------------------------------------------------------------------- /src/Structs/FPackageIndex.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | namespace Zen::Structs { 6 | class FPackageIndex { 7 | public: 8 | int32_t Index; 9 | 10 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FPackageIndex& Value) { 11 | InputStream >> Value.Index; 12 | 13 | return InputStream; 14 | } 15 | 16 | bool IsNull() const { 17 | return Index == 0; 18 | } 19 | 20 | bool IsImport() const { 21 | return Index < 0; 22 | } 23 | 24 | bool IsExport() const { 25 | return Index > 0; 26 | } 27 | 28 | int32_t ToImport() const { 29 | return -Index - 1; 30 | } 31 | 32 | int32_t ToExport() const { 33 | return Index - 1; 34 | } 35 | }; 36 | } -------------------------------------------------------------------------------- /src/Structs/FPackageObjectIndex.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | namespace Zen::Structs { 6 | // https://github.com/EpicGames/UnrealEngine/blob/5b0cfe38e0faf3c2f9938d8f6a1cb5805802a180/Engine/Source/Runtime/CoreUObject/Public/Serialization/AsyncLoading2.h#L124 7 | class FPackageObjectIndex { 8 | public: 9 | uint64_t TypeAndId; 10 | 11 | enum EType : uint8_t { 12 | Export, 13 | ScriptImport, 14 | PackageImport, 15 | Null, 16 | 17 | TypeCountPlusOne, 18 | TypeCount = TypeCountPlusOne - 1 19 | }; 20 | 21 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FPackageObjectIndex& Value) { 22 | InputStream >> Value.TypeAndId; 23 | 24 | return InputStream; 25 | } 26 | 27 | auto operator<=>(const FPackageObjectIndex&) const = default; 28 | 29 | EType GetType() const { 30 | return EType(TypeAndId >> 62); 31 | } 32 | 33 | bool IsNull() const { 34 | return TypeAndId == -1; 35 | } 36 | 37 | bool IsExport() const { 38 | return GetType() == Export; 39 | } 40 | 41 | bool IsImport() const { 42 | return IsScriptImport() || IsPackageImport(); 43 | } 44 | 45 | bool IsScriptImport() const { 46 | return GetType() == ScriptImport; 47 | } 48 | 49 | bool IsPackageImport() const { 50 | return GetType() == PackageImport; 51 | } 52 | 53 | uint32_t ToExport() const { 54 | return TypeAndId; 55 | } 56 | 57 | uint64_t Value() const { 58 | return TypeAndId & ((1ull << 62) - 1); 59 | } 60 | }; 61 | } -------------------------------------------------------------------------------- /src/Structs/FPackageSummary.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | #include "FMappedName.h" 5 | 6 | namespace Zen::Structs { 7 | class FPackageSummary { 8 | public: 9 | FMappedName Name; 10 | FMappedName SourceName; 11 | uint32_t PackageFlags; 12 | uint32_t CookedHeaderSize; 13 | int32_t NameMapNamesOffset; 14 | int32_t NameMapNamesSize; 15 | int32_t NameMapHashesOffset; 16 | int32_t NameMapHashesSize; 17 | int32_t ImportMapOffset; 18 | int32_t ExportMapOffset; 19 | int32_t ExportBundlesOffset; 20 | int32_t GraphDataOffset; 21 | int32_t GraphDataSize; 22 | 23 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FPackageSummary& Value) 24 | { 25 | InputStream >> Value.Name; 26 | InputStream >> Value.SourceName; 27 | InputStream >> Value.PackageFlags; 28 | InputStream >> Value.CookedHeaderSize; 29 | InputStream >> Value.NameMapNamesOffset; 30 | InputStream >> Value.NameMapNamesSize; 31 | InputStream >> Value.NameMapHashesOffset; 32 | InputStream >> Value.NameMapHashesSize; 33 | InputStream >> Value.ImportMapOffset; 34 | InputStream >> Value.ExportMapOffset; 35 | InputStream >> Value.ExportBundlesOffset; 36 | InputStream >> Value.GraphDataOffset; 37 | InputStream >> Value.GraphDataSize; 38 | // Literal padding value: https://github.com/EpicGames/UnrealEngine/blob/2511e56b6a38db820b96361c1961f5c32d1f11b4/Engine/Source/Runtime/CoreUObject/Public/Serialization/AsyncLoading2.h#L252 39 | InputStream.seek(4, Streams::BaseStream::Cur); 40 | 41 | return InputStream; 42 | } 43 | }; 44 | } -------------------------------------------------------------------------------- /src/Structs/FRichCurveKey.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Enums/ERichCurveInterpMode.h" 4 | #include "../Enums/ERichCurveTangentMode.h" 5 | #include "../Enums/ERichCurveTangentWeightMode.h" 6 | #include "../Streams/BaseStream.h" 7 | 8 | namespace Zen::Structs { 9 | using namespace Enums; 10 | 11 | class FRichCurveKey { 12 | public: 13 | ERichCurveInterpMode InterpMode; 14 | ERichCurveTangentMode TangentMode; 15 | ERichCurveTangentWeightMode TangentWeightMode; 16 | float Time; 17 | float Value; 18 | float ArriveTangent; 19 | float ArriveTangentWeight; 20 | float LeaveTangent; 21 | float LeaveTangentWeight; 22 | 23 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FRichCurveKey& Value) { 24 | uint8_t InterpMode; 25 | InputStream >> InterpMode; 26 | Value.InterpMode = (ERichCurveInterpMode)InterpMode; 27 | 28 | uint8_t TangentMode; 29 | InputStream >> TangentMode; 30 | Value.TangentMode = (ERichCurveTangentMode)TangentMode; 31 | 32 | uint8_t TangentWeightMode; 33 | InputStream >> TangentWeightMode; 34 | Value.TangentWeightMode = (ERichCurveTangentWeightMode)TangentWeightMode; 35 | 36 | InputStream >> Value.Time; 37 | InputStream >> Value.Value; 38 | InputStream >> Value.ArriveTangent; 39 | InputStream >> Value.ArriveTangentWeight; 40 | InputStream >> Value.LeaveTangent; 41 | InputStream >> Value.LeaveTangentWeight; 42 | 43 | return InputStream; 44 | } 45 | }; 46 | } -------------------------------------------------------------------------------- /src/Structs/FSHAHash.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | namespace Zen::Structs { 6 | class FSHAHash { 7 | public: 8 | char Hash[20]; 9 | 10 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FSHAHash& Value) { 11 | InputStream >> Value.Hash; 12 | 13 | return InputStream; 14 | } 15 | }; 16 | } -------------------------------------------------------------------------------- /src/Structs/FScriptDelegate.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | #include "../Structs/FName.h" 5 | 6 | namespace Zen::Structs { 7 | class FScriptDelegate { 8 | public: 9 | int Object; 10 | FName Name; 11 | 12 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FScriptDelegate& Value) { 13 | InputStream >> Value.Object; 14 | InputStream >> Value.Name; 15 | 16 | return InputStream; 17 | } 18 | }; 19 | } -------------------------------------------------------------------------------- /src/Structs/FScriptObjectEntry.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | #include "FMappedName.h" 5 | #include "FPackageObjectIndex.h" 6 | 7 | namespace Zen::Structs { 8 | class FScriptObjectEntry { 9 | public: 10 | // FMappedName <=> FMinimalName 11 | // https://github.com/EpicGames/UnrealEngine/blob/405a4f6316f68655bcf48cf7eadd7796e74a5242/Engine/Source/Runtime/CoreUObject/Private/Serialization/AsyncLoading2.cpp#L105 12 | // https://github.com/EpicGames/UnrealEngine/blob/ac1f4d53af58d8d00f6e2f7124f384d67bcb53c9/Engine/Source/Runtime/CoreUObject/Public/Serialization/AsyncLoading2.h#L47 13 | FMappedName ObjectName; 14 | FPackageObjectIndex GlobalIndex; 15 | FPackageObjectIndex OuterIndex; 16 | FPackageObjectIndex CDOClassIndex; 17 | 18 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FScriptObjectEntry& Value) { 19 | InputStream >> Value.ObjectName; 20 | InputStream >> Value.GlobalIndex; 21 | InputStream >> Value.OuterIndex; 22 | InputStream >> Value.CDOClassIndex; 23 | 24 | return InputStream; 25 | } 26 | }; 27 | } -------------------------------------------------------------------------------- /src/Structs/FSerializedNameHeader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | namespace Zen::Structs { 6 | class FSerializedNameHeader { 7 | public: 8 | uint8_t Data[2]; 9 | 10 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FSerializedNameHeader& Value) { 11 | InputStream >> Value.Data; 12 | 13 | return InputStream; 14 | } 15 | 16 | bool IsUtf16() const { 17 | return Data[0] & 0x80; 18 | } 19 | 20 | uint16_t GetLength() const { 21 | return ((Data[0] & 0x7Fu) << 8) + Data[1]; 22 | } 23 | }; 24 | } -------------------------------------------------------------------------------- /src/Structs/FSimpleCurveKey.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | namespace Zen::Structs { 6 | // https://github.com/EpicGames/UnrealEngine/blob/152d20bb0a4b87f09d256e04b32a4753d46a27fe/Engine/Source/Runtime/Engine/Classes/Curves/SimpleCurve.h#L11 7 | class FSimpleCurveKey { 8 | public: 9 | float Time; 10 | float Value; 11 | 12 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FSimpleCurveKey& Value) { 13 | InputStream >> Value.Time; 14 | InputStream >> Value.Value; 15 | 16 | return InputStream; 17 | } 18 | }; 19 | } -------------------------------------------------------------------------------- /src/Structs/FSoftObjectPath.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | #include "FName.h" 5 | 6 | namespace Zen::Structs { 7 | class FSoftObjectPath { 8 | public: 9 | FName AssetPathName; 10 | std::string SubPathString; 11 | 12 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FSoftObjectPath& Value) { 13 | InputStream >> Value.AssetPathName; 14 | 15 | // SubPathString is only set if EPakVersion is at least RELATIVE_CHUNK_OFFSETS 16 | InputStream >> Value.SubPathString; 17 | 18 | return InputStream; 19 | } 20 | }; 21 | } -------------------------------------------------------------------------------- /src/Structs/FStripDataFlags.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | #include "../Enums/EStrippedData.h" 5 | 6 | namespace Zen::Structs { 7 | using namespace Enums; 8 | 9 | // https://github.com/EpicGames/UnrealEngine/blob/c8b97592b9adbe93d85199937120645655fe3651/Engine/Source/Runtime/Engine/Public/EngineUtils.h#L809 10 | class FStripDataFlags { 11 | public: 12 | uint8_t GlobalStripFlags; 13 | uint8_t ClassStripFlags; 14 | 15 | FStripDataFlags() = default; 16 | 17 | FStripDataFlags(Streams::BaseStream& InputStream) { 18 | InputStream >> *this; 19 | } 20 | 21 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FStripDataFlags& Value) { 22 | InputStream >> Value.GlobalStripFlags; 23 | InputStream >> Value.ClassStripFlags; 24 | 25 | return InputStream; 26 | } 27 | 28 | bool IsEditorDataStripped() const { 29 | return (GlobalStripFlags & (uint8_t)EStrippedData::Editor) != 0; 30 | } 31 | 32 | bool IsDataStrippedForServer() const { 33 | return (GlobalStripFlags & (uint8_t)EStrippedData::Server) != 0; 34 | } 35 | 36 | bool IsClassDataStripped(uint8_t InFlags) const { 37 | return (ClassStripFlags & InFlags) != 0; 38 | } 39 | }; 40 | } -------------------------------------------------------------------------------- /src/Structs/FText.cpp: -------------------------------------------------------------------------------- 1 | #include "FText.h" 2 | 3 | #include "FTextHistory.h" 4 | 5 | namespace Zen::Structs { 6 | Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FText& Value) 7 | { 8 | uint32_t Flags; 9 | InputStream >> Flags; 10 | 11 | // "Assuming" the reader/archive is persistent 12 | Flags &= (uint8_t)ETextFlag::ConvertedProperty | (uint8_t)ETextFlag::InitializedFromString; 13 | 14 | Value.Flags = (ETextFlag)Flags; 15 | 16 | // Execute if UE4 version is at least VER_UE4_FTEXT_HISTORY 17 | 18 | // The type is serialized during the serialization of the history, during deserialization we need to deserialize it and create the correct history 19 | int8_t HistoryType; 20 | InputStream >> HistoryType; 21 | 22 | // https://github.com/EpicGames/UnrealEngine/blob/bf95c2cbc703123e08ab54e3ceccdd47e48d224a/Engine/Source/Runtime/Core/Private/Internationalization/TextHistory.cpp 23 | // https://github.com/EpicGames/UnrealEngine/blob/bf95c2cbc703123e08ab54e3ceccdd47e48d224a/Engine/Source/Runtime/Core/Private/Internationalization/TextData.h 24 | switch ((ETextHistoryType)HistoryType) 25 | { 26 | #define CASE(Type) case ETextHistoryType::Type: { Value.TextData = std::shared_ptr((FTextData*)new FTextHistoryData()); InputStream >> *(FTextHistoryData*)Value.TextData.get(); break; } 27 | 28 | CASE(None); 29 | CASE(Base); 30 | CASE(NamedFormat); 31 | CASE(OrderedFormat); 32 | CASE(ArgumentFormat); 33 | CASE(AsNumber); 34 | CASE(AsPercent); 35 | CASE(AsCurrency); 36 | CASE(AsDate); 37 | CASE(AsTime); 38 | CASE(AsDateTime); 39 | CASE(Transform); 40 | CASE(StringTableEntry); 41 | CASE(TextGenerator); 42 | 43 | #undef CASE 44 | } 45 | 46 | return InputStream; 47 | } 48 | 49 | void FText::Dump() 50 | { 51 | if (!TextData) { 52 | printf("Empty Text\n"); 53 | return; 54 | } 55 | 56 | switch (TextData->Type) 57 | { 58 | case ETextHistoryType::None: 59 | { 60 | auto Data = (FTextHistoryData*)TextData.get(); 61 | printf("ETextHistoryType::None - %s\n", Data->CultureInvariantString.c_str()); 62 | break; 63 | } 64 | case ETextHistoryType::Base: 65 | { 66 | auto Data = (FTextHistoryData*)TextData.get(); 67 | printf("ETextHistoryType::Base - %s::%s - %s\n", Data->Key.c_str(), Data->Namespace.c_str(), Data->SourceString.c_str()); 68 | break; 69 | } 70 | default: 71 | printf("Unknown Type: %d\n", (int)TextData->Type); 72 | break; 73 | } 74 | } 75 | } -------------------------------------------------------------------------------- /src/Structs/FText.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Enums/ETextHistoryType.h" 4 | #include "../Enums/ETextFlag.h" 5 | #include "../Streams/BaseStream.h" 6 | #include "FTextData.h" 7 | 8 | namespace Zen::Structs { 9 | class FText { 10 | public: 11 | std::shared_ptr TextData; 12 | ETextFlag Flags; 13 | 14 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FText& Value); 15 | 16 | // For debugging 17 | void Dump(); 18 | }; 19 | } -------------------------------------------------------------------------------- /src/Structs/FTextData.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Enums/ETextHistoryType.h" 4 | #include "../Streams/BaseStream.h" 5 | 6 | namespace Zen::Structs { 7 | using namespace Enums; 8 | 9 | struct FTextData { 10 | ETextHistoryType Type; 11 | 12 | FTextData(ETextHistoryType Type) : Type(Type) {} 13 | }; 14 | } -------------------------------------------------------------------------------- /src/Structs/FTexture2DMipMap.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | #include "FByteBulkData.h" 5 | 6 | namespace Zen::Structs { 7 | class FTexture2DMipMap { 8 | public: 9 | FByteBulkData BulkData; 10 | int SizeX; 11 | int SizeY; 12 | int SizeZ; 13 | 14 | // This doesn't provide a >> operator since it needs a bulk stream 15 | FTexture2DMipMap(Streams::BaseStream& InputStream, Streams::BaseStream* BulkStream, size_t BulkOffset) { 16 | int bCooked; 17 | InputStream >> bCooked; 18 | BulkData = FByteBulkData(InputStream, BulkStream, BulkOffset); 19 | InputStream >> SizeX; 20 | InputStream >> SizeY; 21 | InputStream >> SizeZ; 22 | } 23 | }; 24 | } -------------------------------------------------------------------------------- /src/Structs/FTexturePlatformData.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Enums/EPixelFormat.h" 4 | #include "../Streams/BaseStream.h" 5 | #include "FTexture2DMipMap.h" 6 | #include "FVirtualTextureBuiltData.h" 7 | 8 | namespace Zen::Structs { 9 | using namespace Enums; 10 | 11 | class FTexturePlatformData { 12 | public: 13 | int SizeX; 14 | int SizeY; 15 | int NumSlices; 16 | EPixelFormat PixelFormat; 17 | std::vector Mips; 18 | std::optional VTData; 19 | 20 | // This doesn't provide a >> operator since it needs a bulk stream 21 | FTexturePlatformData(Streams::BaseStream& InputStream, Streams::BaseStream* BulkStream, size_t BulkOffset) { 22 | InputStream >> SizeX; 23 | InputStream >> SizeY; 24 | InputStream >> NumSlices; 25 | std::string PixFormat; 26 | InputStream >> PixFormat; 27 | PixelFormat = GetPixelFormat(PixFormat); 28 | 29 | int FirstMipToSerialize; 30 | InputStream >> FirstMipToSerialize; 31 | // Unused, but set to 0 later anyway for some reason 32 | 33 | { 34 | int SerializeNum; 35 | InputStream >> SerializeNum; 36 | Mips.reserve(SerializeNum); 37 | for (int i = 0; i < SerializeNum; ++i) { 38 | Mips.emplace_back(InputStream, BulkStream, BulkOffset); 39 | } 40 | } 41 | 42 | // if pak version > FNAME_BASED_COMPRESSION_METHOD (for fortnite anyway) 43 | // https://github.com/iAmAsval/FModel/blob/e256486b98551c467fa835c0518a00e9f9d97462/FModel/PakReader/Parsers/Objects/FTexturePlatformData.cs#L30 44 | int bIsVirtual; 45 | InputStream >> bIsVirtual; 46 | if (bIsVirtual) { 47 | VTData.emplace(InputStream, BulkStream, BulkOffset); 48 | } 49 | } 50 | }; 51 | } -------------------------------------------------------------------------------- /src/Structs/FVector2D.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Streams/BaseStream.h" 4 | 5 | namespace Zen::Structs { 6 | class FVector2D { 7 | public: 8 | float X; 9 | float Y; 10 | 11 | friend Streams::BaseStream& operator>>(Streams::BaseStream& InputStream, FVector2D& Value) { 12 | InputStream >> Value.X; 13 | InputStream >> Value.Y; 14 | 15 | return InputStream; 16 | } 17 | }; 18 | } -------------------------------------------------------------------------------- /src/Structs/FVirtualTextureBuiltData.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Enums/EPixelFormat.h" 4 | #include "../Streams/BaseStream.h" 5 | #include "FVirtualTextureDataChunk.h" 6 | 7 | namespace Zen::Structs { 8 | using namespace Enums; 9 | 10 | class FVirtualTextureBuiltData { 11 | public: 12 | uint32_t NumLayers; 13 | uint32_t WidthInBlocks; 14 | uint32_t HeightInBlocks; 15 | uint32_t TileSize; 16 | uint32_t TileBorderSize; 17 | 18 | uint32_t NumMips; 19 | int Width; 20 | int Height; 21 | std::vector TileIndexPerChunk; 22 | std::vector TileIndexPerMip; 23 | std::vector TileOffsetInChunk; 24 | 25 | std::vector LayerTypes; 26 | std::vector Chunks; 27 | 28 | 29 | // This doesn't provide a >> operator since it needs a bulk stream 30 | FVirtualTextureBuiltData(Streams::BaseStream& InputStream, Streams::BaseStream* BulkStream, size_t BulkOffset) { 31 | int bCooked; 32 | InputStream >> bCooked; 33 | InputStream >> NumLayers; 34 | InputStream >> WidthInBlocks; 35 | InputStream >> HeightInBlocks; 36 | InputStream >> TileSize; 37 | InputStream >> TileBorderSize; 38 | 39 | InputStream >> NumMips; 40 | InputStream >> Width; 41 | InputStream >> Height; 42 | InputStream >> TileIndexPerChunk; 43 | InputStream >> TileIndexPerMip; 44 | InputStream >> TileOffsetInChunk; 45 | 46 | LayerTypes.resize(NumLayers); 47 | for (int i = 0; i < NumLayers; ++i) { 48 | std::string PixFormat; 49 | InputStream >> PixFormat; 50 | LayerTypes.emplace_back(GetPixelFormat(PixFormat)); 51 | } 52 | 53 | { 54 | int SerializeNum; 55 | InputStream >> SerializeNum; 56 | Chunks.reserve(SerializeNum); 57 | for (int i = 0; i < SerializeNum; ++i) { 58 | Chunks.emplace_back(InputStream, BulkStream, BulkOffset, NumLayers); 59 | } 60 | } 61 | } 62 | }; 63 | } -------------------------------------------------------------------------------- /src/Structs/FVirtualTextureDataChunk.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Enums/EVirtualTextureCodec.h" 4 | #include "../Streams/BaseStream.h" 5 | #include "FByteBulkData.h" 6 | 7 | namespace Zen::Structs { 8 | using namespace Enums; 9 | 10 | class FVirtualTextureDataChunk { 11 | public: 12 | uint32_t SizeInBytes; 13 | uint32_t CodecPayloadSize; 14 | std::vector CodecType; 15 | std::vector CodecPayloadOffset; 16 | FByteBulkData BulkData; 17 | 18 | // This doesn't provide a >> operator since it needs a bulk stream and NumLayers from FVirtualTextureBuiltData 19 | FVirtualTextureDataChunk(Streams::BaseStream& InputStream, Streams::BaseStream* BulkStream, size_t BulkOffset, uint32_t NumLayers) { 20 | InputStream >> SizeInBytes; 21 | InputStream >> CodecPayloadSize; 22 | 23 | CodecType.reserve(NumLayers); 24 | CodecPayloadOffset.reserve(NumLayers); 25 | for (int i = 0; i < NumLayers; ++i) { 26 | uint8_t CodecTypeAsByte; 27 | InputStream >> CodecTypeAsByte; 28 | CodecType.emplace_back((EVirtualTextureCodec)CodecTypeAsByte); 29 | InputStream >> CodecPayloadOffset.emplace_back(); 30 | } 31 | 32 | BulkData = FByteBulkData(InputStream, BulkStream, BulkOffset); 33 | } 34 | }; 35 | } -------------------------------------------------------------------------------- /src/ZContainer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Helpers/AES.h" 4 | #include "Structs/FGuid.h" 5 | #include "Structs/FIoStoreTocResource.h" 6 | #include "Streams/BufferStream.h" 7 | 8 | #include 9 | #include 10 | 11 | namespace Zen { 12 | using namespace Exceptions; 13 | using namespace Streams; 14 | using namespace Structs; 15 | 16 | class BaseContainer { 17 | public: 18 | BaseContainer(BaseStream& Toc, BaseStream& Cas) : 19 | TocStream(Toc), 20 | CasStream(Cas) 21 | {} 22 | 23 | BaseStream& TocStream; 24 | BaseStream& CasStream; 25 | FIoStoreTocResource Toc; 26 | std::optional Key; 27 | }; 28 | 29 | template 30 | class ZContainer : public BaseContainer { 31 | public: 32 | // KeyDelegate is of type bool(const FGuid&, FAESKey&) 33 | template 34 | ZContainer(TocStreamType&& _TocStream, CasStreamType&& _CasStream, const KeyDelegateCall& KeyDelegate, FileTree& Tree) : 35 | BaseContainer(TocStreamHolder, CasStreamHolder), 36 | TocStreamHolder(std::forward(_TocStream)), 37 | CasStreamHolder(std::forward(_CasStream)) 38 | { 39 | TocStream >> Toc; 40 | 41 | if (Toc.DirectoryBuffer) { 42 | bool BufferValid = true; 43 | if (Toc.Header.ContainerFlags & Enums::EIoContainerFlags::Encrypted) { 44 | if (KeyDelegate(Toc.Header.EncryptionKeyGuid, Key.emplace())) { 45 | Helpers::AES::DecodeInPlace(*Key, Toc.DirectoryBuffer.get(), Toc.Header.DirectoryIndexSize); 46 | } 47 | else { 48 | BufferValid = false; 49 | } 50 | } 51 | 52 | if (BufferValid) { 53 | BufferStream DirectoryStream(Toc.DirectoryBuffer.get(), Toc.Header.DirectoryIndexSize); 54 | 55 | FIoDirectoryIndexResource DirectoryIndex; 56 | DirectoryStream >> DirectoryIndex; 57 | 58 | // The *this gets passed to the ZFile constructor after the UserData field 59 | DirectoryIndex.ReadIndex(Tree, *this); 60 | } 61 | } 62 | 63 | Toc.InvalidateBuffers(); 64 | } 65 | 66 | ~ZContainer() 67 | { 68 | 69 | } 70 | 71 | ZContainer(ZContainer&&) = default; 72 | 73 | private: 74 | TocStreamType TocStreamHolder; 75 | CasStreamType CasStreamHolder; 76 | 77 | friend class ZFile; 78 | }; 79 | } -------------------------------------------------------------------------------- /src/ZFile.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ZContainer.h" 4 | #include "Helpers/Align.h" 5 | #include "Helpers/AES.h" 6 | #include "Helpers/Decompress.h" 7 | #include "Streams/ZFileStream.h" 8 | 9 | namespace Zen { 10 | class ZFile { 11 | public: 12 | ZFile(uint32_t ChunkIdIdx, const BaseContainer& Container) : 13 | ChunkIdIdx(ChunkIdIdx), 14 | Container(Container) 15 | { 16 | 17 | } 18 | 19 | ZFileStream GetStream() const { 20 | return ZFileStream(ChunkIdIdx, Container); 21 | } 22 | 23 | private: 24 | uint32_t ChunkIdIdx; 25 | const BaseContainer& Container; 26 | }; 27 | } -------------------------------------------------------------------------------- /src/ZFileTree.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ZPackage.h" 4 | #include "ZSmallMap.h" 5 | #include "Helpers/Hash.h" 6 | 7 | namespace Zen { 8 | // This is a super memory-optimized tree to help lower RAM usage while still keeping some level of speed 9 | // uint8_t is best, but might be unsafe (if your game's developer is really bad at naming things). StrlenKey is faster for some reason though? 10 | template> 11 | class ZFileTree { 12 | public: 13 | ZFileTree() 14 | { 15 | 16 | } 17 | 18 | ~ZFileTree() 19 | { 20 | 21 | } 22 | 23 | ZFileTree(ZFileTree&&) = default; 24 | 25 | template 26 | ZFileTree& AddFolders(const char* MountPoint) { 27 | if (!*MountPoint) { 28 | return *this; 29 | } 30 | auto NextSeparator = strchr(MountPoint, '/'); 31 | return AddFolder(MountPoint, NextSeparator - MountPoint).template AddFolders(NextSeparator + 1); 32 | } 33 | 34 | template 35 | ZFileTree& AddFolder(const char* FolderName, typename Key::KeySize NameSize) { 36 | if constexpr (CheckIfAlreadyExists) { 37 | auto ChildIter = Folders.SearchValues(FolderName, NameSize); 38 | if (ChildIter != Folders.end()) { 39 | return ChildIter->second; 40 | } 41 | } 42 | 43 | return Folders.emplace_back(FolderName, NameSize, ZFileTree()); 44 | } 45 | 46 | template 47 | ZPackage& AddPackage(const char* PackageName, typename Key::KeySize NameSize) { 48 | if constexpr (CheckIfAlreadyExists) { 49 | auto ChildIter = Files.SearchValues(PackageName, NameSize); 50 | if (ChildIter != Files.end()) { 51 | return ChildIter->second; 52 | } 53 | } 54 | 55 | return Files.emplace_back(PackageName, NameSize, ZPackage()); 56 | } 57 | 58 | const ZPackage* TryGetPackage(const char* Path) const { 59 | const char* Separator = strchr(Path, '/'); 60 | if (Separator) { 61 | auto ChildIter = Folders.SearchValues(Path, Separator - Path); 62 | if (ChildIter != Folders.end()) { 63 | return ChildIter->second.TryGetPackage(Separator + 1); 64 | } 65 | } 66 | else { 67 | auto ChildIter = Files.SearchValues(Path, strlen(Path)); 68 | if (ChildIter != Files.end()) { 69 | return &ChildIter->second; 70 | } 71 | } 72 | return nullptr; 73 | } 74 | 75 | private: 76 | ZSmallMap Folders; 77 | ZSmallMap> Files; 78 | }; 79 | } -------------------------------------------------------------------------------- /src/ZGame.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Providers/Base.h" 4 | #include "Streams/BufferedStream.h" 5 | #include "Streams/FileStream.h" 6 | #include "ZFileTree.h" 7 | #include "ZContainer.h" 8 | #include "ZGlobalData.h" 9 | 10 | #include 11 | 12 | namespace Zen { 13 | class ZGame { 14 | public: 15 | // KeyDelegateCall is a callable 16 | template 17 | ZGame(const std::filesystem::path& DataFolder, const KeyDelegateCall& KeyDelegate) 18 | { 19 | for (auto& file : std::filesystem::directory_iterator(DataFolder)) { 20 | if (file.path().string().ends_with(".utoc")) { 21 | auto UcasPath = file.path(); 22 | auto& Container = Containers.emplace_back( 23 | Streams::BufferedStream(Streams::FileStream(file.path())), 24 | Streams::FileStream(UcasPath.replace_extension(".ucas")), 25 | KeyDelegate, 26 | Tree 27 | ); 28 | if (file.path().stem() == "global") { 29 | GlobalData = ZGlobalData(Container); 30 | } 31 | } 32 | } 33 | } 34 | 35 | ZGame(const std::filesystem::path& DataFolder) : ZGame(DataFolder, [](const FGuid&, FAESKey&) { return false; }) {} 36 | 37 | decltype(auto) TryGetPackage(const char* Path) const { 38 | return Tree.TryGetPackage(Path); 39 | } 40 | 41 | decltype(auto) GetPackage(const char* Path) const { 42 | return *Tree.TryGetPackage(Path); 43 | } 44 | 45 | const ZGlobalData& GetGlobalData() const { 46 | return GlobalData; 47 | } 48 | 49 | private: 50 | // Moves screw up ZFile's BaseContainer reference, deque is required 51 | std::deque, Streams::FileStream>> Containers; 52 | 53 | ZGlobalData GlobalData; 54 | 55 | ZFileTree<> Tree; 56 | }; 57 | } -------------------------------------------------------------------------------- /src/ZGlobalData.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Exceptions/BaseException.h" 4 | #include "Structs/FScriptObjectEntry.h" 5 | #include "ZContainer.h" 6 | #include "Streams/ZFileStream.h" 7 | #include "ZNameMap.h" 8 | 9 | namespace Zen { 10 | using namespace Structs; 11 | using namespace Streams; 12 | 13 | class ZGlobalData { 14 | public: 15 | ZGlobalData() = default; 16 | 17 | // TODO: https://github.com/EpicGames/UnrealEngine/blob/5c904997491e4f504c4cd3d7548540685016fbf9/Engine/Source/Runtime/CoreUObject/Private/Serialization/AsyncLoading2.cpp#L858 18 | // https://github.com/EpicGames/UnrealEngine/blob/5c904997491e4f504c4cd3d7548540685016fbf9/Engine/Source/Runtime/CoreUObject/Private/Serialization/AsyncLoading2.cpp#L454 19 | ZGlobalData(const BaseContainer& Container) { 20 | { 21 | ZFileStream NamesStream(FIoChunkId(0, 0, EIoChunkType::LoaderGlobalNames), Container); 22 | ZFileStream HashesStream(FIoChunkId(0, 0, EIoChunkType::LoaderGlobalNameHashes), Container); 23 | 24 | auto NamesBuffer = std::make_unique(NamesStream.size()); 25 | auto HashesBuffer = std::make_unique(HashesStream.size()); 26 | 27 | NamesStream.read(NamesBuffer.get(), NamesStream.size()); 28 | HashesStream.read(HashesBuffer.get(), HashesStream.size()); 29 | 30 | NameMap = ZNameMap(NamesBuffer.get(), NamesStream.size(), HashesBuffer.get(), HashesStream.size()); 31 | } 32 | 33 | { 34 | ZFileStream InitialLoadStream(FIoChunkId(0, 0, EIoChunkType::LoaderInitialLoadMeta), Container); 35 | int32_t EntrySize; 36 | InitialLoadStream >> EntrySize; 37 | ScriptObjectEntries.resize(EntrySize); 38 | // This should be safe, done for performance :) 39 | InitialLoadStream.read((char*)ScriptObjectEntries.data(), sizeof(FScriptObjectEntry) * EntrySize); 40 | } 41 | } 42 | 43 | const FScriptObjectEntry& GetEntry(const FPackageObjectIndex& Idx) const { 44 | for (auto& Entry : ScriptObjectEntries) { 45 | if (Entry.GlobalIndex == Idx) { 46 | return Entry; 47 | } 48 | } 49 | throw Exceptions::ScriptObjectNotFoundException("A matching ScriptObjectEntry was not found for a FPackageObjectIndex (%lld)", Idx.TypeAndId); 50 | } 51 | 52 | const std::string& GetEntryName(const FPackageObjectIndex& Idx) const { 53 | // GetEntry is always global (in the global utoc), so it's safe to ask the global namemap directly 54 | return NameMap.GetName(GetEntry(Idx).ObjectName).Name; 55 | } 56 | 57 | private: 58 | ZNameMap NameMap; 59 | // maybe make this some other type to be faster? 60 | std::vector ScriptObjectEntries; 61 | }; 62 | } -------------------------------------------------------------------------------- /src/ZNameMap.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Streams/BufferStream.h" 4 | #include "Structs/FMappedName.h" 5 | #include "Structs/FNameEntryId.h" 6 | #include "Structs/FSerializedNameHeader.h" 7 | 8 | namespace Zen { 9 | using namespace Streams; 10 | using namespace Structs; 11 | 12 | class ZNameMap { 13 | public: 14 | ZNameMap() = default; 15 | 16 | // https://github.com/EpicGames/UnrealEngine/blob/c7c6766c2fe5278024139d9330d872bd139633c8/Engine/Source/Runtime/Core/Private/UObject/UnrealNames.cpp#L2888 17 | ZNameMap(const char* NameData, size_t NameDataSize, const char* HashData, size_t HashDataSize) { 18 | BufferStream NameStream((char*)NameData, NameDataSize); 19 | BufferStream HashStream((char*)HashData, HashDataSize); 20 | 21 | NameMap.resize(HashDataSize / 8 - 1); 22 | 23 | for (auto& Entry : NameMap) { 24 | // https://github.com/EpicGames/UnrealEngine/blob/34d9401ee50bf67206af9e21217966de5f997ba9/Engine/Source/Runtime/Core/Private/UObject/UnrealNames.cpp#L2709 25 | FSerializedNameHeader NameHeader; 26 | NameStream >> NameHeader; 27 | if (NameHeader.IsUtf16()) { 28 | std::unique_ptr StringData = std::make_unique(NameHeader.GetLength()); 29 | // NameStream should be aligned to sizeof(char16_t) here actually, but that sounds like an unnecessary hassle 30 | NameStream.read((char*)StringData.get(), NameHeader.GetLength() * sizeof(char16_t)); 31 | Entry.Name = { StringData.get(), StringData.get() + NameHeader.GetLength() }; 32 | } 33 | else { 34 | Entry.Name.resize(NameHeader.GetLength()); 35 | NameStream.read(Entry.Name.data(), NameHeader.GetLength()); 36 | } 37 | } 38 | 39 | uint64_t AlgorithmId; 40 | HashStream >> AlgorithmId; 41 | // https://github.com/EpicGames/UnrealEngine/blob/c7c6766c2fe5278024139d9330d872bd139633c8/Engine/Source/Runtime/Core/Private/UObject/UnrealNames.cpp#L478 42 | if (AlgorithmId == 0xC1640000) { // Load with hash if AlgorithmId matches 43 | for (auto& Entry : NameMap) { 44 | HashStream >> Entry.Hash; 45 | } 46 | } 47 | else { 48 | // Technically you should actually calculate the hashes here if they're not given 49 | // But honestly, I don't think we're going to be using them at all, so I might skip and remove the fields 50 | // altogether to save ram and compute time if it's reasonable to do so 51 | } 52 | } 53 | 54 | const std::string& operator[](int i) const { 55 | return NameMap[i].Name; 56 | } 57 | 58 | const FNameEntryId& GetName(const FMappedName& Name) const { 59 | return NameMap[Name.GetIndex()]; 60 | } 61 | 62 | private: 63 | std::vector NameMap; 64 | }; 65 | } --------------------------------------------------------------------------------