2020-01-03 17:00:57 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2019-11-17 00:41:59 +00:00
|
|
|
|
using System.ComponentModel;
|
2020-01-03 17:00:57 +00:00
|
|
|
|
using System.Diagnostics;
|
2020-04-12 19:47:28 +00:00
|
|
|
|
using System.Diagnostics.CodeAnalysis;
|
2019-09-29 00:22:25 +00:00
|
|
|
|
using System.Linq;
|
2020-12-16 21:41:28 +00:00
|
|
|
|
using System.Net.Http.Headers;
|
2020-09-11 12:54:24 +00:00
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using Newtonsoft.Json.Converters;
|
2020-01-03 17:22:50 +00:00
|
|
|
|
using Wabbajack.Common.StoreHandlers;
|
2019-09-29 00:22:25 +00:00
|
|
|
|
|
|
|
|
|
namespace Wabbajack.Common
|
|
|
|
|
{
|
2020-09-11 12:54:24 +00:00
|
|
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
2019-11-17 00:41:59 +00:00
|
|
|
|
public enum Game
|
|
|
|
|
{
|
2019-11-05 13:03:56 +00:00
|
|
|
|
//MO2 GAMES
|
2019-11-18 19:31:55 +00:00
|
|
|
|
Morrowind,
|
2019-09-29 00:22:25 +00:00
|
|
|
|
Oblivion,
|
2019-11-17 00:41:59 +00:00
|
|
|
|
[Description("Fallout 3")]
|
2019-09-29 00:22:25 +00:00
|
|
|
|
Fallout3,
|
2019-11-17 00:41:59 +00:00
|
|
|
|
[Description("Fallout New Vegas")]
|
2019-09-29 00:22:25 +00:00
|
|
|
|
FalloutNewVegas,
|
2020-03-19 02:10:55 +00:00
|
|
|
|
[Description("Skyrim Legendary Edition")]
|
2019-09-29 00:22:25 +00:00
|
|
|
|
Skyrim,
|
2020-04-13 17:58:08 +00:00
|
|
|
|
Enderal,
|
2019-11-17 00:41:59 +00:00
|
|
|
|
[Description("Skyrim Special Edition")]
|
2019-09-29 00:22:25 +00:00
|
|
|
|
SkyrimSpecialEdition,
|
2019-11-17 00:41:59 +00:00
|
|
|
|
[Description("Fallout 4")]
|
2019-10-01 22:39:25 +00:00
|
|
|
|
Fallout4,
|
2019-11-17 00:41:59 +00:00
|
|
|
|
[Description("Skyrim VR")]
|
2019-11-05 13:03:56 +00:00
|
|
|
|
SkyrimVR,
|
2020-06-05 20:53:44 +00:00
|
|
|
|
[Description("Fallout 4 VR")]
|
2020-06-11 15:45:26 +00:00
|
|
|
|
Fallout4VR,
|
|
|
|
|
//MO2 Non-BGS Games
|
|
|
|
|
[Description("Darkest Dungeon")]
|
2020-07-02 00:19:24 +00:00
|
|
|
|
DarkestDungeon,
|
2020-10-25 22:05:14 +00:00
|
|
|
|
Dishonored,
|
2020-07-31 05:46:30 +00:00
|
|
|
|
Witcher3,
|
|
|
|
|
[Description("Stardew Valley")]
|
2020-11-24 22:14:09 +00:00
|
|
|
|
StardewValley,
|
2020-12-16 21:41:28 +00:00
|
|
|
|
KingdomComeDeliverance,
|
2020-12-30 00:01:06 +00:00
|
|
|
|
MechWarrior5Mercenaries,
|
2021-01-05 05:07:06 +00:00
|
|
|
|
NoMansSky,
|
2021-01-08 13:42:58 +00:00
|
|
|
|
DragonAgeOrigins,
|
|
|
|
|
DragonAge2,
|
2021-02-07 23:36:11 +00:00
|
|
|
|
DragonAgeInquisition,
|
2021-02-08 00:06:06 +00:00
|
|
|
|
[Description("Kerbal Space Program")]
|
2021-02-07 23:36:11 +00:00
|
|
|
|
KerbalSpaceProgram
|
2019-09-29 00:22:25 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-04-22 12:33:07 +00:00
|
|
|
|
public static class GameExtensions
|
2019-11-22 22:00:34 +00:00
|
|
|
|
{
|
|
|
|
|
public static GameMetaData MetaData(this Game game)
|
|
|
|
|
{
|
|
|
|
|
return GameRegistry.Games[game];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-09-29 00:22:25 +00:00
|
|
|
|
public class GameMetaData
|
|
|
|
|
{
|
2020-04-22 12:33:07 +00:00
|
|
|
|
public Game Game { get; internal set; }
|
2019-11-05 13:03:56 +00:00
|
|
|
|
public ModManager SupportedModManager { get; internal set; }
|
2020-04-22 12:33:07 +00:00
|
|
|
|
|
2020-06-11 15:45:26 +00:00
|
|
|
|
public bool IsGenericMO2Plugin { get; internal set; }
|
|
|
|
|
|
2020-04-03 23:23:13 +00:00
|
|
|
|
public string? MO2ArchiveName { get; internal set; }
|
|
|
|
|
public string? NexusName { get; internal set; }
|
2020-02-06 05:30:31 +00:00
|
|
|
|
// Nexus DB id for the game, used in some specific situations
|
|
|
|
|
public long NexusGameId { get; internal set; }
|
2020-04-03 23:23:13 +00:00
|
|
|
|
public string? MO2Name { get; internal set; }
|
2020-03-19 02:10:55 +00:00
|
|
|
|
|
2019-11-14 19:02:08 +00:00
|
|
|
|
// to get steam ids: https://steamdb.info
|
2020-04-03 23:23:13 +00:00
|
|
|
|
public List<int>? SteamIDs { get; internal set; }
|
2020-04-22 12:33:07 +00:00
|
|
|
|
|
2019-11-14 19:02:08 +00:00
|
|
|
|
// to get gog ids: https://www.gogdb.org
|
2020-04-03 23:23:13 +00:00
|
|
|
|
public List<int>? GOGIDs { get; internal set; }
|
2021-01-05 05:07:06 +00:00
|
|
|
|
|
|
|
|
|
// to get these ids, split the numbers from the letters in file names found in
|
|
|
|
|
// C:\ProgramData\Origin\LocalContent\{game name)\*.mfst
|
|
|
|
|
// So for DA:O this is "DR208591800.mfst" -> "DR:208591800"
|
|
|
|
|
public List<string> OriginIDs { get; set; } = new();
|
2020-12-16 21:41:28 +00:00
|
|
|
|
|
|
|
|
|
public List<string> EpicGameStoreIDs { get; internal set; } = new List<string>();
|
2020-04-22 12:33:07 +00:00
|
|
|
|
|
|
|
|
|
// to get BethNet IDs: check the registry
|
2020-04-22 12:02:58 +00:00
|
|
|
|
public int BethNetID { get; internal set; }
|
|
|
|
|
//for BethNet games only!
|
|
|
|
|
public string RegString { get; internal set; } = string.Empty;
|
2020-04-22 12:33:07 +00:00
|
|
|
|
|
2019-11-17 13:35:02 +00:00
|
|
|
|
// file to check if the game is present, useful when steamIds and gogIds dont help
|
2020-04-03 23:23:13 +00:00
|
|
|
|
public List<string>? RequiredFiles { get; internal set; }
|
2020-04-22 12:33:07 +00:00
|
|
|
|
|
|
|
|
|
public string? MainExecutable { get; internal set; }
|
2020-04-03 23:23:13 +00:00
|
|
|
|
|
2020-03-19 02:10:55 +00:00
|
|
|
|
// Games that this game are commonly confused with, for example Skyrim SE vs Skyrim LE
|
2020-04-03 23:23:13 +00:00
|
|
|
|
public Game[] CommonlyConfusedWith { get; set; } = Array.Empty<Game>();
|
2020-04-22 12:33:07 +00:00
|
|
|
|
|
2020-06-20 22:51:47 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Other games this game can pull source files from (if the game is installed on the user's machine)
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Game[] CanSourceFrom { get; set; } = Array.Empty<Game>();
|
|
|
|
|
|
2020-04-22 12:33:07 +00:00
|
|
|
|
public string HumanFriendlyGameName => Game.GetDescription();
|
|
|
|
|
|
2020-06-20 22:51:47 +00:00
|
|
|
|
private AbsolutePath _cachedPath = default;
|
|
|
|
|
|
2020-01-03 17:00:57 +00:00
|
|
|
|
public string InstalledVersion
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2020-04-12 19:47:28 +00:00
|
|
|
|
if (!TryGetGameLocation(out var gameLoc))
|
2020-01-03 17:00:57 +00:00
|
|
|
|
throw new GameNotInstalledException(this);
|
|
|
|
|
if (MainExecutable == null)
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
|
2020-12-16 21:41:28 +00:00
|
|
|
|
var info = FileVersionInfo.GetVersionInfo((string)gameLoc.Combine(MainExecutable));
|
|
|
|
|
var version = info.ProductVersion;
|
|
|
|
|
if (string.IsNullOrWhiteSpace(version))
|
|
|
|
|
{
|
|
|
|
|
version =
|
|
|
|
|
$"{info.ProductMajorPart}.{info.ProductMinorPart}.{info.ProductBuildPart}.{info.ProductPrivatePart}";
|
|
|
|
|
return version;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return version;
|
2020-01-03 17:00:57 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2020-02-07 13:26:58 +00:00
|
|
|
|
|
2020-04-12 19:35:17 +00:00
|
|
|
|
public bool IsInstalled => TryGetGameLocation() != null;
|
2020-02-07 13:26:58 +00:00
|
|
|
|
|
2020-04-09 18:57:02 +00:00
|
|
|
|
public AbsolutePath? TryGetGameLocation()
|
2019-10-03 03:23:11 +00:00
|
|
|
|
{
|
2020-05-02 21:09:29 +00:00
|
|
|
|
return StoreHandler.Instance.TryGetGamePath(Game);
|
2020-04-09 18:57:02 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-04-12 19:47:28 +00:00
|
|
|
|
public bool TryGetGameLocation(out AbsolutePath path)
|
|
|
|
|
{
|
2020-06-20 22:51:47 +00:00
|
|
|
|
if (_cachedPath != default)
|
|
|
|
|
{
|
|
|
|
|
path = _cachedPath;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-12 19:47:28 +00:00
|
|
|
|
var ret = TryGetGameLocation();
|
|
|
|
|
if (ret != null)
|
|
|
|
|
{
|
2020-06-20 22:51:47 +00:00
|
|
|
|
_cachedPath = ret.Value;
|
2020-04-12 19:47:28 +00:00
|
|
|
|
path = ret.Value;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2020-04-22 12:33:07 +00:00
|
|
|
|
|
|
|
|
|
path = default;
|
|
|
|
|
return false;
|
2020-04-12 19:47:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-04-09 18:57:02 +00:00
|
|
|
|
public AbsolutePath GameLocation()
|
|
|
|
|
{
|
|
|
|
|
var ret = TryGetGameLocation();
|
|
|
|
|
if (ret == null) throw new ArgumentNullException();
|
|
|
|
|
return ret.Value;
|
2019-10-03 03:23:11 +00:00
|
|
|
|
}
|
2019-09-29 00:22:25 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-01-03 17:00:57 +00:00
|
|
|
|
public class GameNotInstalledException : Exception
|
|
|
|
|
{
|
|
|
|
|
public GameNotInstalledException(GameMetaData gameMetaData) : base($"Game {gameMetaData.Game} does not appear to be installed.")
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-03-19 02:10:55 +00:00
|
|
|
|
|
|
|
|
|
public static class EnumExtensions
|
|
|
|
|
{
|
|
|
|
|
public static string GetDescription<T>(this T enumerationValue)
|
2020-04-03 23:23:13 +00:00
|
|
|
|
where T : Enum
|
2020-03-19 02:10:55 +00:00
|
|
|
|
{
|
|
|
|
|
var type = enumerationValue.GetType();
|
|
|
|
|
if(!type.IsEnum)
|
|
|
|
|
{
|
|
|
|
|
throw new ArgumentException($"{nameof(enumerationValue)} must be of Enum type", nameof(enumerationValue));
|
|
|
|
|
}
|
2020-04-03 23:23:13 +00:00
|
|
|
|
var memberInfo = type.GetMember(enumerationValue.ToString()!);
|
2020-04-22 12:33:07 +00:00
|
|
|
|
if (memberInfo.Length <= 0)
|
|
|
|
|
return enumerationValue.ToString()!;
|
2020-03-19 02:10:55 +00:00
|
|
|
|
|
2020-04-22 12:33:07 +00:00
|
|
|
|
var attrs = memberInfo[0].GetCustomAttributes(typeof(DescriptionAttribute), false);
|
|
|
|
|
|
|
|
|
|
return attrs.Length > 0 ? ((DescriptionAttribute)attrs[0]).Description : enumerationValue.ToString();
|
2020-03-19 02:10:55 +00:00
|
|
|
|
}
|
2020-05-07 21:04:55 +00:00
|
|
|
|
|
|
|
|
|
public static IEnumerable<T> GetAllItems<T>() where T : struct
|
|
|
|
|
{
|
|
|
|
|
return Enum.GetValues(typeof(T)).Cast<T>();
|
|
|
|
|
}
|
2020-03-19 02:10:55 +00:00
|
|
|
|
}
|
2020-01-03 17:00:57 +00:00
|
|
|
|
|
2019-09-29 00:22:25 +00:00
|
|
|
|
public class GameRegistry
|
|
|
|
|
{
|
2020-12-31 23:39:18 +00:00
|
|
|
|
public static GameMetaData? GetByMO2ArchiveName(string gameName)
|
2019-09-29 00:22:25 +00:00
|
|
|
|
{
|
2020-04-22 12:33:07 +00:00
|
|
|
|
gameName = gameName.ToLower();
|
|
|
|
|
return Games.Values.FirstOrDefault(g => g.MO2ArchiveName?.ToLower() == gameName);
|
2019-09-29 00:22:25 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-12-31 23:39:18 +00:00
|
|
|
|
public static GameMetaData? GetByNexusName(string gameName)
|
2019-11-09 14:10:28 +00:00
|
|
|
|
{
|
|
|
|
|
return Games.Values.FirstOrDefault(g => g.NexusName == gameName.ToLower());
|
|
|
|
|
}
|
|
|
|
|
|
2020-12-31 23:39:18 +00:00
|
|
|
|
public static GameMetaData? GetBySteamID(int id)
|
2019-12-02 16:43:05 +00:00
|
|
|
|
{
|
|
|
|
|
return Games.Values
|
|
|
|
|
.FirstOrDefault(g => g.SteamIDs != null && g.SteamIDs.Count > 0 && g.SteamIDs.Any(i => i == id));
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-11 00:30:38 +00:00
|
|
|
|
/// <summary>
|
2020-04-09 19:21:28 +00:00
|
|
|
|
/// Parse game data from an arbitrary string. Tries first via parsing as a game Enum, then by Nexus name.
|
|
|
|
|
/// <param nambe="someName">Name to query</param>
|
|
|
|
|
/// <returns>GameMetaData found</returns>
|
|
|
|
|
/// <exception cref="ArgumentNullException">If string could not be translated to a game</exception>
|
2020-04-22 12:33:07 +00:00
|
|
|
|
/// </summary>
|
2020-04-09 19:21:28 +00:00
|
|
|
|
public static GameMetaData GetByFuzzyName(string someName)
|
2020-02-11 00:30:38 +00:00
|
|
|
|
{
|
2020-07-06 06:58:13 +00:00
|
|
|
|
return TryGetByFuzzyName(someName) ?? throw new ArgumentNullException(nameof(someName), $"\"{someName}\" could not be translated to a game!");
|
2020-04-09 19:21:28 +00:00
|
|
|
|
}
|
2020-02-11 00:30:38 +00:00
|
|
|
|
|
2020-04-09 19:21:28 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Tries to parse game data from an arbitrary string. Tries first via parsing as a game Enum, then by Nexus name.
|
|
|
|
|
/// <param nambe="someName">Name to query</param>
|
|
|
|
|
/// <returns>GameMetaData if found, otherwise null</returns>
|
2020-04-22 12:33:07 +00:00
|
|
|
|
/// </summary>
|
2020-04-09 19:21:28 +00:00
|
|
|
|
public static GameMetaData? TryGetByFuzzyName(string someName)
|
|
|
|
|
{
|
|
|
|
|
if (Enum.TryParse(typeof(Game), someName, true, out var metadata)) return ((Game)metadata!).MetaData();
|
2020-02-11 00:30:38 +00:00
|
|
|
|
|
2020-04-09 19:21:28 +00:00
|
|
|
|
GameMetaData? result = GetByNexusName(someName);
|
2020-02-11 00:30:38 +00:00
|
|
|
|
if (result != null) return result;
|
|
|
|
|
|
|
|
|
|
result = GetByMO2ArchiveName(someName);
|
|
|
|
|
if (result != null) return result;
|
2020-05-04 12:11:53 +00:00
|
|
|
|
|
|
|
|
|
result = GetByMO2Name(someName);
|
|
|
|
|
if (result != null) return result;
|
|
|
|
|
|
2020-02-11 00:30:38 +00:00
|
|
|
|
|
|
|
|
|
return int.TryParse(someName, out int id) ? GetBySteamID(id) : null;
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-04 12:11:53 +00:00
|
|
|
|
private static GameMetaData? GetByMO2Name(string gameName)
|
|
|
|
|
{
|
|
|
|
|
gameName = gameName.ToLower();
|
|
|
|
|
return Games.Values.FirstOrDefault(g => g.MO2Name?.ToLower() == gameName);
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-12 19:47:28 +00:00
|
|
|
|
public static bool TryGetByFuzzyName(string someName, [MaybeNullWhen(false)] out GameMetaData gameMetaData)
|
|
|
|
|
{
|
2020-04-15 12:05:05 +00:00
|
|
|
|
var result = TryGetByFuzzyName(someName);
|
|
|
|
|
if (result == null)
|
|
|
|
|
{
|
|
|
|
|
gameMetaData = Games.Values.First();
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gameMetaData = result;
|
|
|
|
|
return true;
|
2020-04-12 19:47:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
2019-11-15 05:43:58 +00:00
|
|
|
|
public static IReadOnlyDictionary<Game, GameMetaData> Games = new Dictionary<Game, GameMetaData>
|
2019-09-29 00:22:25 +00:00
|
|
|
|
{
|
2019-11-18 19:31:55 +00:00
|
|
|
|
{
|
|
|
|
|
Game.Morrowind, new GameMetaData
|
|
|
|
|
{
|
|
|
|
|
SupportedModManager = ModManager.MO2,
|
|
|
|
|
Game = Game.Morrowind,
|
2020-03-19 02:10:55 +00:00
|
|
|
|
SteamIDs = new List<int>{22320},
|
2020-03-25 13:22:55 +00:00
|
|
|
|
GOGIDs = new List<int>{1440163901, 1435828767},
|
2019-11-18 19:31:55 +00:00
|
|
|
|
NexusName = "morrowind",
|
2020-02-06 21:43:30 +00:00
|
|
|
|
NexusGameId = 100,
|
2019-11-18 19:31:55 +00:00
|
|
|
|
MO2Name = "Morrowind",
|
2020-03-19 02:10:55 +00:00
|
|
|
|
MO2ArchiveName = "morrowind",
|
2020-04-22 12:02:58 +00:00
|
|
|
|
BethNetID = 31,
|
|
|
|
|
RegString = @"SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\The Elder Scrolls III: Morrowind Game of the Year Edition",
|
2020-03-19 02:10:55 +00:00
|
|
|
|
RequiredFiles = new List<string>
|
|
|
|
|
{
|
|
|
|
|
"Morrowind.exe"
|
|
|
|
|
},
|
|
|
|
|
MainExecutable = "Morrowind.exe"
|
2019-11-18 19:31:55 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
2019-09-29 00:22:25 +00:00
|
|
|
|
{
|
|
|
|
|
Game.Oblivion, new GameMetaData
|
|
|
|
|
{
|
2019-11-05 13:03:56 +00:00
|
|
|
|
SupportedModManager = ModManager.MO2,
|
2019-09-29 00:22:25 +00:00
|
|
|
|
Game = Game.Oblivion,
|
|
|
|
|
NexusName = "oblivion",
|
2020-02-06 21:43:30 +00:00
|
|
|
|
NexusGameId = 101,
|
2019-10-02 22:45:42 +00:00
|
|
|
|
MO2Name = "Oblivion",
|
2019-11-09 14:21:31 +00:00
|
|
|
|
MO2ArchiveName = "oblivion",
|
2019-11-17 13:35:02 +00:00
|
|
|
|
SteamIDs = new List<int> {22330},
|
2020-01-08 16:25:19 +00:00
|
|
|
|
GOGIDs = new List<int>{1458058109},
|
2019-11-17 13:35:02 +00:00
|
|
|
|
RequiredFiles = new List<string>
|
|
|
|
|
{
|
|
|
|
|
"oblivion.exe"
|
2020-01-03 17:00:57 +00:00
|
|
|
|
},
|
|
|
|
|
MainExecutable = "Oblivion.exe"
|
2019-09-29 00:22:25 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
Game.Fallout3, new GameMetaData
|
|
|
|
|
{
|
2019-11-05 13:03:56 +00:00
|
|
|
|
SupportedModManager = ModManager.MO2,
|
2019-09-29 00:22:25 +00:00
|
|
|
|
Game = Game.Fallout3,
|
|
|
|
|
NexusName = "fallout3",
|
2020-02-06 21:43:30 +00:00
|
|
|
|
NexusGameId = 120,
|
2020-05-09 18:02:49 +00:00
|
|
|
|
MO2Name = "Fallout 3",
|
2019-09-29 00:22:25 +00:00
|
|
|
|
MO2ArchiveName = "fallout3",
|
2019-11-17 13:35:02 +00:00
|
|
|
|
SteamIDs = new List<int> {22300, 22370}, // base game and GotY
|
2020-05-08 22:44:28 +00:00
|
|
|
|
GOGIDs = new List<int>{1454315831}, // GotY edition
|
2019-11-17 13:35:02 +00:00
|
|
|
|
RequiredFiles = new List<string>
|
|
|
|
|
{
|
2020-05-09 18:02:49 +00:00
|
|
|
|
"Fallout3.exe"
|
2020-01-03 17:00:57 +00:00
|
|
|
|
},
|
|
|
|
|
MainExecutable = "Fallout3.exe"
|
2019-09-29 00:22:25 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Game.FalloutNewVegas, new GameMetaData
|
|
|
|
|
{
|
2019-11-05 13:03:56 +00:00
|
|
|
|
SupportedModManager = ModManager.MO2,
|
2019-09-29 00:22:25 +00:00
|
|
|
|
Game = Game.FalloutNewVegas,
|
|
|
|
|
NexusName = "newvegas",
|
2020-02-06 21:43:30 +00:00
|
|
|
|
NexusGameId = 130,
|
2019-09-29 00:22:25 +00:00
|
|
|
|
MO2Name = "New Vegas",
|
|
|
|
|
MO2ArchiveName = "falloutnv",
|
2020-01-07 10:20:34 +00:00
|
|
|
|
SteamIDs = new List<int> {22380, 22490}, // normal and RU version
|
2020-01-08 16:25:19 +00:00
|
|
|
|
GOGIDs = new List<int>{1454587428},
|
2019-11-17 13:35:02 +00:00
|
|
|
|
RequiredFiles = new List<string>
|
|
|
|
|
{
|
|
|
|
|
"FalloutNV.exe"
|
2020-01-03 17:00:57 +00:00
|
|
|
|
},
|
|
|
|
|
MainExecutable = "FalloutNV.exe"
|
2019-09-29 00:22:25 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Game.Skyrim, new GameMetaData
|
|
|
|
|
{
|
2019-11-05 13:03:56 +00:00
|
|
|
|
SupportedModManager = ModManager.MO2,
|
2019-09-29 00:22:25 +00:00
|
|
|
|
Game = Game.Skyrim,
|
|
|
|
|
NexusName = "skyrim",
|
2020-02-06 21:43:30 +00:00
|
|
|
|
NexusGameId = 110,
|
2019-09-29 00:22:25 +00:00
|
|
|
|
MO2Name = "Skyrim",
|
|
|
|
|
MO2ArchiveName = "skyrim",
|
2019-11-17 13:35:02 +00:00
|
|
|
|
SteamIDs = new List<int> {72850},
|
|
|
|
|
RequiredFiles = new List<string>
|
|
|
|
|
{
|
|
|
|
|
"tesv.exe"
|
2020-01-03 17:00:57 +00:00
|
|
|
|
},
|
2020-03-19 02:10:55 +00:00
|
|
|
|
MainExecutable = "TESV.exe",
|
|
|
|
|
CommonlyConfusedWith = new [] {Game.SkyrimSpecialEdition, Game.SkyrimVR}
|
2019-09-29 00:22:25 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Game.SkyrimSpecialEdition, new GameMetaData
|
|
|
|
|
{
|
2019-11-05 13:03:56 +00:00
|
|
|
|
SupportedModManager = ModManager.MO2,
|
2019-09-29 00:22:25 +00:00
|
|
|
|
Game = Game.SkyrimSpecialEdition,
|
|
|
|
|
NexusName = "skyrimspecialedition",
|
2020-02-06 05:30:31 +00:00
|
|
|
|
NexusGameId = 1704,
|
2019-09-29 00:22:25 +00:00
|
|
|
|
MO2Name = "Skyrim Special Edition",
|
|
|
|
|
MO2ArchiveName = "skyrimse",
|
2019-11-17 13:35:02 +00:00
|
|
|
|
SteamIDs = new List<int> {489830},
|
|
|
|
|
RequiredFiles = new List<string>
|
|
|
|
|
{
|
|
|
|
|
"SkyrimSE.exe"
|
2020-01-03 17:00:57 +00:00
|
|
|
|
},
|
2020-03-19 02:10:55 +00:00
|
|
|
|
MainExecutable = "SkyrimSE.exe",
|
2020-06-20 22:51:47 +00:00
|
|
|
|
CommonlyConfusedWith = new []{Game.Skyrim, Game.SkyrimVR},
|
2019-09-29 00:22:25 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Game.Fallout4, new GameMetaData
|
|
|
|
|
{
|
2019-11-05 13:03:56 +00:00
|
|
|
|
SupportedModManager = ModManager.MO2,
|
2019-09-29 00:22:25 +00:00
|
|
|
|
Game = Game.Fallout4,
|
|
|
|
|
NexusName = "fallout4",
|
2020-02-06 21:43:30 +00:00
|
|
|
|
NexusGameId = 1151,
|
2019-09-29 00:22:25 +00:00
|
|
|
|
MO2Name = "Fallout 4",
|
|
|
|
|
MO2ArchiveName = "fallout4",
|
2019-11-17 13:35:02 +00:00
|
|
|
|
SteamIDs = new List<int> {377160},
|
|
|
|
|
RequiredFiles = new List<string>
|
|
|
|
|
{
|
|
|
|
|
"Fallout4.exe"
|
2020-01-03 17:00:57 +00:00
|
|
|
|
},
|
2020-06-05 20:53:44 +00:00
|
|
|
|
MainExecutable = "Fallout4.exe",
|
2020-06-20 22:51:47 +00:00
|
|
|
|
CommonlyConfusedWith = new [] {Game.Fallout4VR},
|
2019-09-29 00:22:25 +00:00
|
|
|
|
}
|
2019-10-01 22:39:25 +00:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Game.SkyrimVR, new GameMetaData
|
|
|
|
|
{
|
2019-11-05 13:03:56 +00:00
|
|
|
|
SupportedModManager = ModManager.MO2,
|
2019-10-01 22:39:25 +00:00
|
|
|
|
Game = Game.SkyrimVR,
|
|
|
|
|
NexusName = "skyrimspecialedition",
|
2020-02-06 21:43:30 +00:00
|
|
|
|
NexusGameId = 1704,
|
2019-10-01 22:39:25 +00:00
|
|
|
|
MO2Name = "Skyrim VR",
|
|
|
|
|
MO2ArchiveName = "skyrimse",
|
2019-11-17 13:35:02 +00:00
|
|
|
|
SteamIDs = new List<int> {611670},
|
|
|
|
|
RequiredFiles = new List<string>
|
|
|
|
|
{
|
|
|
|
|
"SkyrimVR.exe"
|
2020-02-13 12:29:59 +00:00
|
|
|
|
},
|
2020-03-19 02:16:38 +00:00
|
|
|
|
MainExecutable = "SkyrimVR.exe",
|
2020-06-20 22:51:47 +00:00
|
|
|
|
CommonlyConfusedWith = new []{Game.Skyrim, Game.SkyrimSpecialEdition},
|
|
|
|
|
CanSourceFrom = new [] {Game.SkyrimSpecialEdition}
|
2019-10-01 22:39:25 +00:00
|
|
|
|
}
|
2019-11-05 13:03:56 +00:00
|
|
|
|
},
|
2020-04-15 12:05:05 +00:00
|
|
|
|
{
|
|
|
|
|
Game.Enderal, new GameMetaData
|
|
|
|
|
{
|
|
|
|
|
SupportedModManager = ModManager.MO2,
|
|
|
|
|
Game = Game.Enderal,
|
|
|
|
|
NexusName = "enderal",
|
2020-08-17 04:15:19 +00:00
|
|
|
|
NexusGameId = 2736,
|
2020-04-15 12:05:05 +00:00
|
|
|
|
MO2Name = "Enderal",
|
|
|
|
|
MO2ArchiveName = "enderal",
|
2020-05-05 20:59:47 +00:00
|
|
|
|
SteamIDs = new List<int>{1027920, 933480},
|
2020-04-15 12:05:05 +00:00
|
|
|
|
RequiredFiles = new List<string>
|
|
|
|
|
{
|
|
|
|
|
"TESV.exe"
|
|
|
|
|
},
|
|
|
|
|
MainExecutable = "TESV.exe"
|
|
|
|
|
}
|
2020-06-05 20:53:44 +00:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Game.Fallout4VR, new GameMetaData
|
|
|
|
|
{
|
|
|
|
|
SupportedModManager = ModManager.MO2,
|
|
|
|
|
Game = Game.Fallout4VR,
|
|
|
|
|
NexusName = "fallout4",
|
|
|
|
|
MO2Name = "Fallout 4 VR",
|
|
|
|
|
MO2ArchiveName = "Fallout4",
|
|
|
|
|
SteamIDs = new List<int>{611660},
|
|
|
|
|
RequiredFiles = new List<string>
|
|
|
|
|
{
|
|
|
|
|
"Fallout4VR.exe"
|
|
|
|
|
},
|
|
|
|
|
MainExecutable = "Fallout4VR.exe",
|
2020-06-20 22:51:47 +00:00
|
|
|
|
CommonlyConfusedWith = new [] {Game.Fallout4},
|
|
|
|
|
CanSourceFrom = new [] {Game.Fallout4}
|
2020-06-05 20:53:44 +00:00
|
|
|
|
}
|
2020-06-11 15:45:26 +00:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Game.DarkestDungeon, new GameMetaData
|
|
|
|
|
{
|
|
|
|
|
Game = Game.DarkestDungeon,
|
|
|
|
|
NexusName = "darkestdungeon",
|
|
|
|
|
MO2Name = "Darkest Dungeon",
|
|
|
|
|
NexusGameId = 804,
|
|
|
|
|
SteamIDs = new List<int> {262060},
|
|
|
|
|
GOGIDs = new List<int>{1450711444},
|
2020-12-27 13:39:39 +00:00
|
|
|
|
EpicGameStoreIDs = new List<string> {"b4eecf70e3fe4e928b78df7855a3fc2d"},
|
2020-06-11 15:45:26 +00:00
|
|
|
|
IsGenericMO2Plugin = true,
|
|
|
|
|
RequiredFiles = new List<string>
|
|
|
|
|
{
|
2020-12-27 13:39:39 +00:00
|
|
|
|
"_windowsnosteam\\Darkest.exe"
|
2020-06-11 16:05:51 +00:00
|
|
|
|
},
|
2020-12-27 13:39:39 +00:00
|
|
|
|
MainExecutable = "_windowsnosteam\\Darkest.exe"
|
2020-06-11 15:45:26 +00:00
|
|
|
|
}
|
2020-07-02 00:19:24 +00:00
|
|
|
|
},
|
2020-10-25 22:05:14 +00:00
|
|
|
|
{
|
|
|
|
|
Game.Dishonored, new GameMetaData
|
|
|
|
|
{
|
|
|
|
|
Game = Game.Dishonored,
|
|
|
|
|
NexusName = "dishonored",
|
|
|
|
|
MO2Name = "Dishonored",
|
|
|
|
|
NexusGameId = 802,
|
|
|
|
|
SteamIDs = new List<int> {205100},
|
|
|
|
|
GOGIDs = new List<int>{1701063787},
|
|
|
|
|
RequiredFiles = new List<string>
|
|
|
|
|
{
|
|
|
|
|
"Binaries\\Win32\\Dishonored.exe"
|
|
|
|
|
},
|
2020-11-02 15:30:02 +00:00
|
|
|
|
MainExecutable = @"Binaries\Win32\Dishonored.exe"
|
2020-10-25 22:05:14 +00:00
|
|
|
|
}
|
|
|
|
|
},
|
2020-07-02 00:19:24 +00:00
|
|
|
|
{
|
|
|
|
|
Game.Witcher3, new GameMetaData
|
|
|
|
|
{
|
|
|
|
|
Game = Game.Witcher3,
|
|
|
|
|
NexusName = "witcher3",
|
2020-08-04 10:47:52 +00:00
|
|
|
|
NexusGameId = 952,
|
|
|
|
|
MO2Name = "The Witcher 3: Wild Hunt",
|
2020-07-02 00:19:24 +00:00
|
|
|
|
SteamIDs = new List<int>{292030, 499450}, // normal and GotY
|
|
|
|
|
GOGIDs = new List<int>{1207664643, 1495134320, 1207664663, 1640424747}, // normal, GotY and both in packages
|
|
|
|
|
RequiredFiles = new List<string>
|
|
|
|
|
{
|
|
|
|
|
"bin\\x64\\witcher3.exe"
|
|
|
|
|
},
|
|
|
|
|
MainExecutable = @"bin\x64\witcher3.exe"
|
|
|
|
|
}
|
2020-07-31 05:46:30 +00:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Game.StardewValley, new GameMetaData
|
|
|
|
|
{
|
|
|
|
|
Game = Game.StardewValley,
|
|
|
|
|
NexusName = "stardewvalley",
|
2020-07-31 07:34:30 +00:00
|
|
|
|
MO2Name = "Stardew Valley",
|
2020-07-31 05:46:30 +00:00
|
|
|
|
NexusGameId = 1303,
|
|
|
|
|
SteamIDs = new List<int>{413150},
|
|
|
|
|
GOGIDs = new List<int>{1453375253},
|
2020-07-31 07:34:30 +00:00
|
|
|
|
IsGenericMO2Plugin = true,
|
2020-07-31 05:46:30 +00:00
|
|
|
|
RequiredFiles = new List<string>
|
|
|
|
|
{
|
|
|
|
|
"Stardew Valley.exe"
|
|
|
|
|
},
|
|
|
|
|
MainExecutable = "Stardew Valley.exe"
|
|
|
|
|
}
|
2020-11-24 22:14:09 +00:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Game.KingdomComeDeliverance, new GameMetaData
|
|
|
|
|
{
|
|
|
|
|
Game = Game.KingdomComeDeliverance,
|
|
|
|
|
NexusName = "kingdomcomedeliverance",
|
|
|
|
|
MO2Name = "Kingdom Come: Deliverance",
|
2020-11-30 12:49:54 +00:00
|
|
|
|
MO2ArchiveName = "kingdomcomedeliverance",
|
2020-11-24 22:14:09 +00:00
|
|
|
|
NexusGameId = 2298,
|
|
|
|
|
SteamIDs = new List<int>{379430},
|
2020-12-30 13:06:33 +00:00
|
|
|
|
GOGIDs = new List<int>{1719198803},
|
2020-11-24 22:14:09 +00:00
|
|
|
|
IsGenericMO2Plugin = true,
|
|
|
|
|
RequiredFiles = new List<string>
|
|
|
|
|
{
|
|
|
|
|
@"bin\Win64\KingdomCome.exe"
|
|
|
|
|
},
|
|
|
|
|
MainExecutable = @"bin\Win64\KingdomCome.exe"
|
|
|
|
|
}
|
2020-12-16 21:41:28 +00:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Game.MechWarrior5Mercenaries, new GameMetaData
|
|
|
|
|
{
|
|
|
|
|
Game = Game.MechWarrior5Mercenaries,
|
|
|
|
|
NexusName = "mechwarrior5mercenaries",
|
|
|
|
|
MO2Name = "Mechwarrior 5: Mercenaries",
|
|
|
|
|
MO2ArchiveName = "mechwarrior5mercenaries",
|
|
|
|
|
NexusGameId = 3099,
|
|
|
|
|
EpicGameStoreIDs = new List<string> {"9fd39d8ac72946a2a10a887ce86e6c35"},
|
|
|
|
|
IsGenericMO2Plugin = true,
|
|
|
|
|
RequiredFiles = new List<string>
|
|
|
|
|
{
|
|
|
|
|
@"MW5Mercs\Binaries\Win64\MechWarrior-Win64-Shipping.exe"
|
|
|
|
|
},
|
|
|
|
|
MainExecutable = @"MW5Mercs\Binaries\Win64\MechWarrior-Win64-Shipping.exe"
|
|
|
|
|
}
|
2020-12-30 00:01:06 +00:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Game.NoMansSky, new GameMetaData
|
|
|
|
|
{
|
|
|
|
|
Game = Game.NoMansSky,
|
|
|
|
|
NexusName = "nomanssky",
|
|
|
|
|
NexusGameId = 1634,
|
2021-01-05 05:07:06 +00:00
|
|
|
|
MO2Name = "No Man's Sky",
|
2020-12-30 00:01:06 +00:00
|
|
|
|
SteamIDs = new List<int>{275850},
|
|
|
|
|
GOGIDs = new List<int>{1446213994},
|
|
|
|
|
RequiredFiles = new List<string>
|
|
|
|
|
{
|
|
|
|
|
@"Binaries\NMS.exe"
|
|
|
|
|
},
|
|
|
|
|
MainExecutable = @"Binaries\NMS.exe"
|
|
|
|
|
}
|
2021-01-05 05:07:06 +00:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Game.DragonAgeOrigins, new GameMetaData
|
|
|
|
|
{
|
|
|
|
|
Game = Game.DragonAgeOrigins,
|
|
|
|
|
NexusName = "dragonage",
|
|
|
|
|
NexusGameId = 140,
|
|
|
|
|
MO2Name = "Dragon Age: Origins", // Probably wrong
|
2021-01-06 03:01:37 +00:00
|
|
|
|
SteamIDs = new List<int>{47810},
|
2021-01-05 05:07:06 +00:00
|
|
|
|
OriginIDs = new List<string>{"DR:208591800"},
|
2021-01-30 20:35:05 +00:00
|
|
|
|
GOGIDs = new List<int>{1949616134},
|
2021-01-05 05:07:06 +00:00
|
|
|
|
RequiredFiles = new List<string>
|
|
|
|
|
{
|
|
|
|
|
@"bin_ship\daorigins.exe"
|
|
|
|
|
},
|
|
|
|
|
MainExecutable = @"bin_ship\daorigins.exe"
|
|
|
|
|
}
|
2021-01-08 13:42:58 +00:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Game.DragonAge2, new GameMetaData
|
|
|
|
|
{
|
|
|
|
|
Game = Game.DragonAge2,
|
|
|
|
|
NexusName = "dragonage2",
|
|
|
|
|
NexusGameId = 141,
|
|
|
|
|
MO2Name = "Dragon Age 2", // Probably wrong
|
|
|
|
|
SteamIDs = new List<int>{1238040},
|
|
|
|
|
OriginIDs = new List<string>{"OFB-EAST:59474"},
|
|
|
|
|
RequiredFiles = new List<string>
|
|
|
|
|
{
|
|
|
|
|
@"bin_ship\DragonAge2.exe"
|
|
|
|
|
},
|
|
|
|
|
MainExecutable = @"bin_ship\DragonAge2.exe"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Game.DragonAgeInquisition, new GameMetaData
|
|
|
|
|
{
|
|
|
|
|
Game = Game.DragonAgeInquisition,
|
|
|
|
|
NexusName = "dragonageinquisition",
|
|
|
|
|
NexusGameId = 728,
|
|
|
|
|
MO2Name = "Dragon Age: Inquisition", // Probably wrong
|
|
|
|
|
SteamIDs = new List<int>{1222690},
|
|
|
|
|
OriginIDs = new List<string>{"OFB-EAST:51937"},
|
|
|
|
|
RequiredFiles = new List<string>
|
|
|
|
|
{
|
|
|
|
|
@"DragonAgeInquisition.exe"
|
|
|
|
|
},
|
|
|
|
|
MainExecutable = @"DragonAgeInquisition.exe"
|
|
|
|
|
}
|
2021-02-07 23:36:11 +00:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Game.KerbalSpaceProgram, new GameMetaData
|
|
|
|
|
{
|
|
|
|
|
Game = Game.KerbalSpaceProgram,
|
|
|
|
|
NexusName = "kerbalspaceprogram",
|
|
|
|
|
MO2Name = "kerbalspaceprogram",
|
|
|
|
|
NexusGameId = 272,
|
|
|
|
|
SteamIDs = new List<int>{220200},
|
|
|
|
|
GOGIDs = new List<int>{1429864849},
|
|
|
|
|
IsGenericMO2Plugin = true,
|
|
|
|
|
RequiredFiles = new List<string>
|
|
|
|
|
{
|
|
|
|
|
@"KSP_x64.exe"
|
|
|
|
|
},
|
|
|
|
|
MainExecutable = @"KSP_x64.exe"
|
|
|
|
|
}
|
2020-07-31 05:46:30 +00:00
|
|
|
|
}
|
2019-09-29 00:22:25 +00:00
|
|
|
|
};
|
2020-02-11 00:30:38 +00:00
|
|
|
|
|
2020-07-25 18:09:02 +00:00
|
|
|
|
public static Dictionary<long, Game> ByNexusID =
|
|
|
|
|
Games.Values.Where(g => g.NexusGameId != 0)
|
|
|
|
|
.GroupBy(g => g.NexusGameId)
|
|
|
|
|
.Select(g => g.First())
|
|
|
|
|
.ToDictionary(d => d.NexusGameId, d => d.Game);
|
|
|
|
|
|
2019-09-29 00:22:25 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2020-10-25 22:05:14 +00:00
|
|
|
|
|