diff --git a/FModel/Creator/Bases/FN/BaseIcon.cs b/FModel/Creator/Bases/FN/BaseIcon.cs
index b47109e8..5b1e3f42 100644
--- a/FModel/Creator/Bases/FN/BaseIcon.cs
+++ b/FModel/Creator/Bases/FN/BaseIcon.cs
@@ -200,6 +200,7 @@ protected string GetCosmeticSet(string setName)
1 => 10,
2 => 8,
3 => 4,
+ 4 => 5,
_ => 10
};
diff --git a/FModel/Creator/Bases/FN/BaseMtxOffer.cs b/FModel/Creator/Bases/FN/BaseMtxOffer.cs
index 68e64762..7f62c89e 100644
--- a/FModel/Creator/Bases/FN/BaseMtxOffer.cs
+++ b/FModel/Creator/Bases/FN/BaseMtxOffer.cs
@@ -17,10 +17,9 @@ public BaseMtxOffer(UObject uObject, EIconStyle style) : base(uObject, style)
public override void ParseForInfo()
{
- if (Object.TryGetValue(out FStructFallback typeImage, "DetailsImage", "TileImage") &&
- typeImage.TryGetValue(out FPackageIndex resource, "ResourceObject"))
+ if (Object.TryGetValue(out FSoftObjectPath image, "SoftDetailsImage", "SoftTileImage"))
{
- Preview = Utils.GetBitmap(resource);
+ Preview = Utils.GetBitmap(image);
}
if (Object.TryGetValue(out FStructFallback gradient, "Gradient") &&
@@ -81,4 +80,4 @@ public override SKBitmap[] Draw()
return new[] { ret };
}
-}
\ No newline at end of file
+}
diff --git a/FModel/Creator/Bases/FN/BaseOfferDisplayData.cs b/FModel/Creator/Bases/FN/BaseOfferDisplayData.cs
index b1a1808e..250a6ab3 100644
--- a/FModel/Creator/Bases/FN/BaseOfferDisplayData.cs
+++ b/FModel/Creator/Bases/FN/BaseOfferDisplayData.cs
@@ -1,5 +1,7 @@
using CUE4Parse.UE4.Assets.Exports;
using CUE4Parse.UE4.Assets.Exports.Material;
+using CUE4Parse.UE4.Assets.Objects;
+using CUE4Parse.UE4.Objects.UObject;
using SkiaSharp;
namespace FModel.Creator.Bases.FN;
@@ -14,13 +16,16 @@ public BaseOfferDisplayData(UObject uObject, EIconStyle style) : base(uObject, s
public override void ParseForInfo()
{
- if (!Object.TryGetValue(out UMaterialInterface[] presentations, "Presentations"))
+ if (!Object.TryGetValue(out FStructFallback[] contextualPresentations, "ContextualPresentations"))
return;
- _offerImages = new BaseMaterialInstance[presentations.Length];
+ _offerImages = new BaseMaterialInstance[contextualPresentations.Length];
for (var i = 0; i < _offerImages.Length; i++)
{
- var offerImage = new BaseMaterialInstance(presentations[i], Style);
+ if (!contextualPresentations[i].TryGetValue(out FSoftObjectPath material, "Material") ||
+ !material.TryLoad(out UMaterialInterface presentation)) continue;
+
+ var offerImage = new BaseMaterialInstance(presentation, Style);
offerImage.ParseForInfo();
_offerImages[i] = offerImage;
}
@@ -36,4 +41,4 @@ public override SKBitmap[] Draw()
return ret;
}
-}
\ No newline at end of file
+}
diff --git a/FModel/Creator/CreatorPackage.cs b/FModel/Creator/CreatorPackage.cs
index 1ff20af0..fd2cea3f 100644
--- a/FModel/Creator/CreatorPackage.cs
+++ b/FModel/Creator/CreatorPackage.cs
@@ -64,13 +64,18 @@ public bool TryConstructCreator(out UCreator creator)
case "FortAmmoItemDefinition":
case "FortEmoteItemDefinition":
case "FortBadgeItemDefinition":
+ case "SparksMicItemDefinition":
case "FortAwardItemDefinition":
+ case "SparksAuraItemDefinition":
+ case "SparksDrumItemDefinition":
+ case "SparksBassItemDefinition":
case "FortGadgetItemDefinition":
case "AthenaCharmItemDefinition":
case "FortPlaysetItemDefinition":
case "FortGiftBoxItemDefinition":
case "FortOutpostItemDefinition":
case "FortVehicleItemDefinition":
+ case "SparksGuitarItemDefinition":
case "FortCardPackItemDefinition":
case "FortDefenderItemDefinition":
case "FortCurrencyItemDefinition":
@@ -80,27 +85,36 @@ public bool TryConstructCreator(out UCreator creator)
case "FortWeaponModItemDefinition":
case "FortCodeTokenItemDefinition":
case "FortSchematicItemDefinition":
+ case "SparksKeyboardItemDefinition":
case "FortWorldMultiItemDefinition":
case "FortAlterationItemDefinition":
case "FortExpeditionItemDefinition":
case "FortIngredientItemDefinition":
+ case "StWFortAccoladeItemDefinition":
case "FortAccountBuffItemDefinition":
case "FortWeaponMeleeItemDefinition":
case "FortPlayerPerksItemDefinition":
case "FortPlaysetPropItemDefinition":
+ case "JunoRecipeBundleItemDefinition":
case "FortHomebaseNodeItemDefinition":
case "FortNeverPersistItemDefinition":
case "FortPlayerAugmentItemDefinition":
+ case "FortSmartBuildingItemDefinition":
+ case "FortWeaponModItemDefinitionOptic":
case "RadioContentSourceItemDefinition":
case "FortPlaysetGrenadeItemDefinition":
+ case "JunoWeaponCreatureItemDefinition":
case "FortPersonalVehicleItemDefinition":
case "FortGameplayModifierItemDefinition":
case "FortHardcoreModifierItemDefinition":
+ case "FortWeaponModItemDefinitionMagazine":
case "FortConsumableAccountItemDefinition":
case "FortConversionControlItemDefinition":
case "FortAccountBuffCreditItemDefinition":
+ case "JunoBuildInstructionsItemDefinition":
case "FortEventCurrencyItemDefinitionRedir":
case "FortPersistentResourceItemDefinition":
+ case "FortWeaponMeleeOffhandItemDefinition":
case "FortHomebaseBannerIconItemDefinition":
case "FortCampaignHeroLoadoutItemDefinition":
case "FortConditionalResourceItemDefinition":
@@ -108,10 +122,14 @@ public bool TryConstructCreator(out UCreator creator)
case "FortWeaponMeleeDualWieldItemDefinition":
case "FortDailyRewardScheduleTokenDefinition":
case "FortCreativeWeaponRangedItemDefinition":
+ case "FortVehicleCosmeticsItemDefinition_Body":
+ case "FortVehicleCosmeticsItemDefinition_Skin":
+ case "FortVehicleCosmeticsItemDefinition_Wheel":
case "FortCreativeRealEstatePlotItemDefinition":
+ case "FortVehicleCosmeticsItemDefinition_Booster":
case "AthenaDanceItemDefinition_AdHocSquadsJoin_C":
- case "StWFortAccoladeItemDefinition":
- case "FortSmartBuildingItemDefinition":
+ case "FortVehicleCosmeticsItemDefinition_DriftSmoke":
+ case "FortVehicleCosmeticsItemDefinition_EngineAudio":
creator = _style switch
{
EIconStyle.Cataba => new BaseCommunity(_object, _style, "Cataba"),
@@ -134,7 +152,7 @@ public bool TryConstructCreator(out UCreator creator)
return true;
case "MaterialInstanceConstant"
when _object.Owner != null &&
- (_object.Owner.Name.EndsWith($"/MI_OfferImages/{_object.Name}", StringComparison.OrdinalIgnoreCase) ||
+ (_object.Owner.Name.Contains("/MI_OfferImages/", StringComparison.OrdinalIgnoreCase) ||
_object.Owner.Name.EndsWith($"/RenderSwitch_Materials/{_object.Name}", StringComparison.OrdinalIgnoreCase) ||
_object.Owner.Name.EndsWith($"/MI_BPTile/{_object.Name}", StringComparison.OrdinalIgnoreCase)):
creator = new BaseMaterialInstance(_object, _style);
diff --git a/FModel/FModel.csproj b/FModel/FModel.csproj
index 9fcc3f7c..3ba25ad9 100644
--- a/FModel/FModel.csproj
+++ b/FModel/FModel.csproj
@@ -148,7 +148,6 @@
-
diff --git a/FModel/MainWindow.xaml.cs b/FModel/MainWindow.xaml.cs
index 0d0ccca8..86212096 100644
--- a/FModel/MainWindow.xaml.cs
+++ b/FModel/MainWindow.xaml.cs
@@ -71,9 +71,8 @@ await Task.WhenAll(
_applicationView.CUE4Parse.VerifyConsoleVariables(),
_applicationView.CUE4Parse.VerifyOnDemandArchives(),
_applicationView.CUE4Parse.InitMappings(),
- _applicationView.InitImGuiSettings(newOrUpdated),
_applicationView.InitVgmStream(),
- _applicationView.InitOodle(),
+ _applicationView.InitImGuiSettings(newOrUpdated),
Task.Run(() =>
{
if (UserSettings.Default.DiscordRpc == EDiscordRpc.Always)
diff --git a/FModel/ViewModels/ApplicationViewModel.cs b/FModel/ViewModels/ApplicationViewModel.cs
index 9ef32ce0..6398f37a 100644
--- a/FModel/ViewModels/ApplicationViewModel.cs
+++ b/FModel/ViewModels/ApplicationViewModel.cs
@@ -6,7 +6,6 @@
using FModel.Views;
using FModel.Views.Resources.Controls;
using Ionic.Zip;
-using Oodle.NET;
using System;
using System.Diagnostics;
using System.IO;
@@ -15,7 +14,6 @@
using MessageBox = AdonisUI.Controls.MessageBox;
using MessageBoxButton = AdonisUI.Controls.MessageBoxButton;
using MessageBoxImage = AdonisUI.Controls.MessageBoxImage;
-using OodleCUE4 = CUE4Parse.Compression.Oodle;
namespace FModel.ViewModels;
@@ -56,7 +54,6 @@ public FStatus Status
public SettingsViewModel SettingsView { get; }
public AesManagerViewModel AesManager { get; }
public AudioPlayerViewModel AudioPlayer { get; }
- private OodleCompressor _oodle;
public ApplicationViewModel()
{
@@ -181,34 +178,6 @@ public async Task InitVgmStream()
}
}
- public async Task InitOodle()
- {
- var dataDir = Directory.CreateDirectory(Path.Combine(UserSettings.Default.OutputDirectory, ".data"));
- var oodlePath = Path.Combine(dataDir.FullName, OodleCUE4.OODLE_DLL_NAME);
-
- if (File.Exists(OodleCUE4.OODLE_DLL_NAME))
- {
- File.Move(OodleCUE4.OODLE_DLL_NAME, oodlePath, true);
- }
- else if (!File.Exists(oodlePath))
- {
- var result = await OodleCUE4.DownloadOodleDll(oodlePath);
- if (!result) return;
- }
-
- if (File.Exists("oo2core_8_win64.dll"))
- File.Delete("oo2core_8_win64.dll");
-
- _oodle = new OodleCompressor(oodlePath);
-
- unsafe
- {
- OodleCUE4.DecompressFunc = (bufferPtr, bufferSize, outputPtr, outputSize, a, b, c, d, e, f, g, h, i, threadModule) =>
- _oodle.Decompress(new IntPtr(bufferPtr), bufferSize, new IntPtr(outputPtr), outputSize,
- (OodleLZ_FuzzSafe) a, (OodleLZ_CheckCRC) b, (OodleLZ_Verbosity) c, d, e, f, g, h, i, (OodleLZ_Decode_ThreadPhase) threadModule);
- }
- }
-
public async Task InitImGuiSettings(bool forceDownload)
{
var imgui = Path.Combine(/*UserSettings.Default.OutputDirectory, ".data", */"imgui.ini");
diff --git a/FModel/ViewModels/CUE4ParseViewModel.cs b/FModel/ViewModels/CUE4ParseViewModel.cs
index 5e2a6551..3ef1204e 100644
--- a/FModel/ViewModels/CUE4ParseViewModel.cs
+++ b/FModel/ViewModels/CUE4ParseViewModel.cs
@@ -462,7 +462,8 @@ public Task VerifyOnDemandArchives()
{
ChunkBaseUri = new Uri("https://download.epicgames.com/ias/fortnite/", UriKind.Absolute),
ChunkCacheDirectory = Directory.CreateDirectory(Path.Combine(UserSettings.Default.OutputDirectory, ".data")),
- Authorization = new AuthenticationHeaderValue("Bearer", UserSettings.Default.LastAuthResponse.AccessToken)
+ Authorization = new AuthenticationHeaderValue("Bearer", UserSettings.Default.LastAuthResponse.AccessToken),
+ Timeout = TimeSpan.FromSeconds(15)
});
var onDemandCount = await Provider.MountAsync();
FLogger.Append(ELog.Information, () =>
@@ -849,7 +850,7 @@ public void ExtractAndScroll(CancellationToken cancellationToken, string fullPat
case USkeleton when isNone && UserSettings.Default.SaveSkeletonAsMesh:
case UMaterialInstance when isNone && UserSettings.Default.PreviewMaterials && !ModelIsOverwritingMaterial &&
!(Provider.InternalGameName.Equals("FortniteGame", StringComparison.OrdinalIgnoreCase) && export.Owner != null &&
- (export.Owner.Name.EndsWith($"/MI_OfferImages/{export.Name}", StringComparison.OrdinalIgnoreCase) ||
+ (export.Owner.Name.Contains("/MI_OfferImages/", StringComparison.OrdinalIgnoreCase) ||
export.Owner.Name.EndsWith($"/RenderSwitch_Materials/{export.Name}", StringComparison.OrdinalIgnoreCase) ||
export.Owner.Name.EndsWith($"/MI_BPTile/{export.Name}", StringComparison.OrdinalIgnoreCase))):
{
diff --git a/FModel/Views/Snooper/Models/Section.cs b/FModel/Views/Snooper/Models/Section.cs
index 4a4ced53..6720e167 100644
--- a/FModel/Views/Snooper/Models/Section.cs
+++ b/FModel/Views/Snooper/Models/Section.cs
@@ -21,7 +21,6 @@ public Section(int index, int facesCount, int firstFaceIndex)
FirstFaceIndex = firstFaceIndex;
FirstFaceIndexPtr = new IntPtr(FirstFaceIndex * sizeof(uint));
Color = Constants.COLOR_PALETTE[MaterialIndex % Constants.PALETTE_LENGTH];
- Show = true;
}
public void SetupMaterial(Material material)