diff --git a/FModel/Enums.cs b/FModel/Enums.cs
index 1de81d57..6e2099aa 100644
--- a/FModel/Enums.cs
+++ b/FModel/Enums.cs
@@ -8,7 +8,8 @@
DeadByDaylight,
Borderlands3,
MinecraftDungeons,
- BattleBreakers
+ BattleBreakers,
+ Spellbreak
}
public enum EFModel
diff --git a/FModel/FModel.csproj b/FModel/FModel.csproj
index 49c73731..85bdb8db 100644
--- a/FModel/FModel.csproj
+++ b/FModel/FModel.csproj
@@ -95,6 +95,7 @@
+
@@ -200,6 +201,7 @@
+
diff --git a/FModel/Globals.cs b/FModel/Globals.cs
index d14034e7..f463900d 100644
--- a/FModel/Globals.cs
+++ b/FModel/Globals.cs
@@ -56,6 +56,7 @@ namespace FModel
EGame.Borderlands3 => "Borderlands 3",
EGame.MinecraftDungeons => "Minecraft Dungeons",
EGame.BattleBreakers => "Battle Breakers",
+ EGame.Spellbreak => "Spellbreak",
EGame.Unknown => "Unknown",
_ => "Unknown",
};
diff --git a/FModel/Resources/spellbreak.ico b/FModel/Resources/spellbreak.ico
new file mode 100644
index 00000000..fddc27e5
Binary files /dev/null and b/FModel/Resources/spellbreak.ico differ
diff --git a/FModel/Utils/Folders.cs b/FModel/Utils/Folders.cs
index 2713a554..e5af374f 100644
--- a/FModel/Utils/Folders.cs
+++ b/FModel/Utils/Folders.cs
@@ -30,6 +30,7 @@ namespace FModel.Utils
"OakGame" => EGame.Borderlands3,
"Dungeons" => EGame.MinecraftDungeons,
"WorldExplorers" => EGame.BattleBreakers,
+ "g3" => EGame.Spellbreak,
_ => EGame.Unknown,
};
}
@@ -46,6 +47,7 @@ namespace FModel.Utils
EGame.Borderlands3 => "OakGame",
EGame.MinecraftDungeons => "Dungeons",
EGame.BattleBreakers => "WorldExplorers",
+ EGame.Spellbreak => "g3",
_ => string.Empty,
};
diff --git a/FModel/Utils/Localizations.cs b/FModel/Utils/Localizations.cs
index dbba7a51..50c58b48 100644
--- a/FModel/Utils/Localizations.cs
+++ b/FModel/Utils/Localizations.cs
@@ -55,6 +55,8 @@ namespace FModel.Utils
m = Regex.Match(mount + KvP.Value.Name, $"{gameName}/Content/Localization/Game/{langCode}/Game.locres", RegexOptions.IgnoreCase);
else if (Globals.Game.ActualGame == EGame.BattleBreakers)
m = Regex.Match(mount + KvP.Value.Name, $"{gameName}/Content/Localization/Game/{langCode}/Game.locres", RegexOptions.IgnoreCase);
+ else if (Globals.Game.ActualGame == EGame.Spellbreak)
+ m = Regex.Match(mount + KvP.Value.Name, $"{gameName}/Content/Localization/Game/{langCode}/Game.locres", RegexOptions.IgnoreCase);
if (m != null && m.Success)
{
@@ -215,6 +217,20 @@ namespace FModel.Utils
ELanguage.Chinese => "zh-Hans",
_ => "en"
};
+ else if (Globals.Game.ActualGame == EGame.Spellbreak)
+ return lang switch
+ {
+ ELanguage.English => "en",
+ ELanguage.Russian => "ru",
+ ELanguage.French => "fr",
+ ELanguage.German => "de",
+ ELanguage.Spanish => "es",
+ ELanguage.Italian => "it",
+ ELanguage.Japanese => "ja",
+ ELanguage.PortugueseBrazil => "pt-BR",
+ ELanguage.Chinese => "zh-Hans",
+ _ => "en"
+ };
else
return "en";
}
diff --git a/FModel/Utils/Paks.cs b/FModel/Utils/Paks.cs
index 0d98b2b6..a732d1fd 100644
--- a/FModel/Utils/Paks.cs
+++ b/FModel/Utils/Paks.cs
@@ -111,6 +111,15 @@ namespace FModel.Utils
return string.Empty;
}
+ public static string GetSpellbreakPakFilesPath()
+ {
+ (_, string _, string spellbreakFilesPath) = GetUEGameFilesPath("Newt");
+ if (!string.IsNullOrEmpty(spellbreakFilesPath))
+ return $"{spellbreakFilesPath}\\g3\\Content\\Paks";
+ else
+ return string.Empty;
+ }
+
public static void Merge(Dictionary tempFiles, out Dictionary files, string mount)
{
files = new Dictionary();
diff --git a/FModel/Windows/Launcher/FLauncher.xaml.cs b/FModel/Windows/Launcher/FLauncher.xaml.cs
index 1828e3b9..7075534f 100644
--- a/FModel/Windows/Launcher/FLauncher.xaml.cs
+++ b/FModel/Windows/Launcher/FLauncher.xaml.cs
@@ -79,6 +79,13 @@ namespace FModel.Windows.Launcher
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = "Battle Breakers", Property = battlebreakersFilesPath });
}
+ string spellbreakerFilesPath = Paks.GetSpellbreakPakFilesPath();
+ if (!string.IsNullOrEmpty(battlebreakersFilesPath))
+ {
+ DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[LauncherInstalled.dat]", $"Spellbreak found at {spellbreakerFilesPath}");
+ Globals.gNotifier.ShowCustomMessage("Spellbreak", Properties.Resources.PathAutoDetected, "/FModel;component/Resources/spellbreak.ico");
+ ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = "Spellbreak", Property = spellbreakerFilesPath });
+ }
Games_CbBox.SelectedItem = ComboBoxVm.gamesCbViewModel.Where(x => x.Property.ToString() == Properties.Settings.Default.PakPath).FirstOrDefault();
}