diff --git a/CHANGELOG.md b/CHANGELOG.md index 5405256a..8349698d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ ### Changelog +#### Version - 1.1.2.0 - +* We now set VRAM settings for Skyrim LE ENBs +* Fixes for Morrowind Game metadata +* We now provide suggestions for users who try to install modlists for games they don't have installed +* We now warn users if they aren't running a modern version of Windows + #### Version - 1.1.1.0 - 3/9/2020 * Hotfix for Virtual Memory errors while creating BSAs diff --git a/Wabbajack.Common/GameMetaData.cs b/Wabbajack.Common/GameMetaData.cs index 62ce40c7..26412424 100644 --- a/Wabbajack.Common/GameMetaData.cs +++ b/Wabbajack.Common/GameMetaData.cs @@ -18,6 +18,7 @@ namespace Wabbajack.Common Fallout3, [Description("Fallout New Vegas")] FalloutNewVegas, + [Description("Skyrim Legendary Edition")] Skyrim, [Description("Skyrim Special Edition")] SkyrimSpecialEdition, @@ -63,6 +64,9 @@ namespace Wabbajack.Common // Nexus DB id for the game, used in some specific situations public long NexusGameId { get; internal set; } public string MO2Name { get; internal set; } + + public string HumanFriendlyGameName => Game.GetDescription(); + public string GameLocationRegistryKey { get; internal set; } // to get steam ids: https://steamdb.info public List SteamIDs { get; internal set; } @@ -74,6 +78,9 @@ namespace Wabbajack.Common public List RequiredFiles { get; internal set; } public bool Disabled { get; internal set; } + // Games that this game are commonly confused with, for example Skyrim SE vs Skyrim LE + public Game[] CommonlyConfusedWith { get; set; } + public string InstalledVersion { get @@ -103,6 +110,30 @@ namespace Wabbajack.Common { } } + + public static class EnumExtensions + { + public static string GetDescription(this T enumerationValue) + where T : struct + { + var type = enumerationValue.GetType(); + if(!type.IsEnum) + { + throw new ArgumentException($"{nameof(enumerationValue)} must be of Enum type", nameof(enumerationValue)); + } + var memberInfo = type.GetMember(enumerationValue.ToString()); + if(memberInfo.Length > 0) + { + var attrs = memberInfo[0].GetCustomAttributes(typeof(DescriptionAttribute), false); + + if(attrs.Length > 0) + { + return ((DescriptionAttribute)attrs[0]).Description; + } + } + return enumerationValue.ToString(); + } + } public class GameRegistry { @@ -150,12 +181,17 @@ namespace Wabbajack.Common { SupportedModManager = ModManager.MO2, Game = Game.Morrowind, - Disabled = true, - SteamIDs = new List{0}, + Disabled = false, + SteamIDs = new List{22320}, NexusName = "morrowind", NexusGameId = 100, MO2Name = "Morrowind", - MO2ArchiveName = "morrowind" + MO2ArchiveName = "morrowind", + RequiredFiles = new List + { + "Morrowind.exe" + }, + MainExecutable = "Morrowind.exe" } }, { @@ -231,7 +267,8 @@ namespace Wabbajack.Common { "tesv.exe" }, - MainExecutable = "TESV.exe" + MainExecutable = "TESV.exe", + CommonlyConfusedWith = new [] {Game.SkyrimSpecialEdition, Game.SkyrimVR} } }, { @@ -249,7 +286,8 @@ namespace Wabbajack.Common { "SkyrimSE.exe" }, - MainExecutable = "SkyrimSE.exe" + MainExecutable = "SkyrimSE.exe", + CommonlyConfusedWith = new []{Game.Skyrim, Game.SkyrimVR} } }, { @@ -296,7 +334,8 @@ namespace Wabbajack.Common { "SkyrimVR.exe" }, - MainExecutable = "SkyrimVR.exe" + MainExecutable = "SkyrimVR.exe", + CommonlyConfusedWith = new []{Game.Skyrim, Game.SkyrimSpecialEdition} } }, { diff --git a/Wabbajack.Lib/MO2Installer.cs b/Wabbajack.Lib/MO2Installer.cs index a5426975..0f856f46 100644 --- a/Wabbajack.Lib/MO2Installer.cs +++ b/Wabbajack.Lib/MO2Installer.cs @@ -55,10 +55,23 @@ namespace Wabbajack.Lib if (GameFolder == null) { - await Utils.Log(new CriticalFailureIntervention( - $"In order to do a proper install Wabbajack needs to know where your {game.MO2Name} folder resides. We tried looking the " + - "game location up in the Windows Registry but were unable to find it, please make sure you launch the game once before running this installer. ", - "Could not find game location")).Task; + var otherGame = game.CommonlyConfusedWith.Where(g => g.MetaData().IsInstalled).Select(g => g.MetaData()).FirstOrDefault(); + if (otherGame != null) + { + await Utils.Log(new CriticalFailureIntervention( + $"In order to do a proper install Wabbajack needs to know where your {game.HumanFriendlyGameName} folder resides. However this game doesn't seem to be installed, we did however find a installed " + + $"copy of {otherGame.HumanFriendlyGameName}, did you install the wrong game?", + $"Could not locate {game.HumanFriendlyGameName}")) + .Task; + } + else + { + await Utils.Log(new CriticalFailureIntervention( + $"In order to do a proper install Wabbajack needs to know where your {game.HumanFriendlyGameName} folder resides. However this game doesn't seem to be installed", + $"Could not locate {game.HumanFriendlyGameName}")) + .Task; + } + Utils.Log("Exiting because we couldn't find the game folder."); return false; } diff --git a/Wabbajack.Lib/SystemParameters.cs b/Wabbajack.Lib/SystemParameters.cs index 15b6a39e..1964b8c1 100644 --- a/Wabbajack.Lib/SystemParameters.cs +++ b/Wabbajack.Lib/SystemParameters.cs @@ -15,6 +15,8 @@ namespace Wabbajack.Lib public long VideoMemorySize { get; set; } public long SystemMemorySize { get; set; } + public Version WindowsVersion { get; set; } + /// /// Value used in LE ENBs for VideoMemorySizeMb /// diff --git a/Wabbajack/Util/SystemParametersConstructor.cs b/Wabbajack/Util/SystemParametersConstructor.cs index 977c6740..28abeafb 100644 --- a/Wabbajack/Util/SystemParametersConstructor.cs +++ b/Wabbajack/Util/SystemParametersConstructor.cs @@ -55,7 +55,8 @@ namespace Wabbajack.Util ScreenWidth = width, ScreenHeight = height, VideoMemorySize = video_memory, - SystemMemorySize = (long)memory.ullTotalPhys + SystemMemorySize = (long)memory.ullTotalPhys, + WindowsVersion = Environment.OSVersion.Version }; } } diff --git a/Wabbajack/Views/MainWindow.xaml.cs b/Wabbajack/Views/MainWindow.xaml.cs index bfa05634..fa61b542 100644 --- a/Wabbajack/Views/MainWindow.xaml.cs +++ b/Wabbajack/Views/MainWindow.xaml.cs @@ -33,6 +33,13 @@ namespace Wabbajack Utils.Log($"Wabbajack Build - {ThisAssembly.Git.Sha}"); var p = SystemParametersConstructor.Create(); + + Utils.Log($"Detected Windows Version: {p.WindowsVersion}"); + + if (!(p.WindowsVersion.Major >= 6 && p.WindowsVersion.Minor >= 2)) + Utils.Log( + $"You are not running a recent version of Windows (version 10 or greater), Wabbajack is not supported on OS versions older than Windows 10."); + Utils.Log( $"System settings - ({p.SystemMemorySize.ToFileSizeString()} RAM), Display: {p.ScreenWidth} x {p.ScreenHeight} ({p.VideoMemorySize.ToFileSizeString()} VRAM - VideoMemorySizeMb={p.EnbLEVRAMSize})");