mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Add support for Skyrim Special Edition
This commit is contained in:
+1
-1
@@ -82,7 +82,7 @@ set(LIBGIT2_LIBRARIES "${BINARY_DIR}/${CMAKE_CFG_INTDIR}/${CMAKE_STATIC_LIBRARY_
|
||||
ExternalProject_Add(libloadorder
|
||||
PREFIX "external"
|
||||
DEPENDS libespm
|
||||
URL "https://github.com/WrinklyNinja/libloadorder/archive/9.4.1.tar.gz"
|
||||
URL "https://github.com/WrinklyNinja/libloadorder/archive/9.5.0.tar.gz"
|
||||
CMAKE_ARGS -DBOOST_INCLUDEDIR=${Boost_INCLUDE_DIR} -DMSVC_STATIC_RUNTIME=${MSVC_STATIC_RUNTIME}
|
||||
BUILD_COMMAND ${CMAKE_COMMAND} --build . --target loadorder --config $(CONFIGURATION)
|
||||
INSTALL_COMMAND "")
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
## Introduction
|
||||
|
||||
LOOT is a plugin load order optimisation tool for TES IV: Oblivion, TES V: Skyrim, Fallout 3, Fallout: New Vegas and Fallout 4. It is designed to assist mod users in avoiding detrimental conflicts, by automatically calculating a load order that satisfies all plugin dependencies and maximises each plugin's impact on the user's game.
|
||||
LOOT is a plugin load order optimisation tool for TES IV: Oblivion, TES V: Skyrim, TES V: Skyrim Special Edition, Fallout 3, Fallout: New Vegas and Fallout 4. It is designed to assist mod users in avoiding detrimental conflicts, by automatically calculating a load order that satisfies all plugin dependencies and maximises each plugin's impact on the user's game.
|
||||
|
||||
LOOT also provides some load order error checking, including checks for requirements, incompatibilities and cyclic dependencies. In addition, it provides a large number of plugin-specific usage notes, bug warnings and Bash Tag suggestions.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Introduction
|
||||
************
|
||||
|
||||
LOOT is a plugin load order optimiser for TES IV: Oblivion, TES V: Skyrim, Fallout 3, Fallout: New Vegas and Fallout 4. It is designed to assist mod users in avoiding detrimental conflicts, by automatically calculating a load order that satisfies all plugin dependencies and maximises each plugin's impact on the user's game.
|
||||
LOOT is a plugin load order optimiser for TES IV: Oblivion, TES V: Skyrim, TES V: Skyrim Special Edition, Fallout 3, Fallout: New Vegas and Fallout 4. It is designed to assist mod users in avoiding detrimental conflicts, by automatically calculating a load order that satisfies all plugin dependencies and maximises each plugin's impact on the user's game.
|
||||
|
||||
LOOT also provides some load order error checking, including checks for requirements, incompatibilities and cyclic dependencies. In addition, it provides a large number of plugin-specific usage notes, bug warnings and Bash Tag suggestions for Wrye Bash.
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace loot {
|
||||
enum struct GameType : unsigned int {
|
||||
/** The Elder Scrolls IV: Oblivion */
|
||||
tes4,
|
||||
/** The Elder Scrolls IV: Skyrim */
|
||||
/** The Elder Scrolls V: Skyrim */
|
||||
tes5,
|
||||
/** Fallout 3 */
|
||||
fo3,
|
||||
@@ -42,6 +42,8 @@ enum struct GameType : unsigned int {
|
||||
fonv,
|
||||
/** Fallout 4 */
|
||||
fo4,
|
||||
/** The Elder Scrolls V: Skyrim Special Edition */
|
||||
tes5se,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ LootSettings::LootSettings() :
|
||||
gameSettings_({
|
||||
GameSettings(GameType::tes4),
|
||||
GameSettings(GameType::tes5),
|
||||
GameSettings(GameType::tes5se),
|
||||
GameSettings(GameType::fo3),
|
||||
GameSettings(GameType::fonv),
|
||||
GameSettings(GameType::fo4),
|
||||
@@ -92,6 +93,9 @@ void LootSettings::load(YAML::Node& settings) {
|
||||
if (find(begin(gameSettings_), end(gameSettings_), GameSettings(GameType::tes5)) == end(gameSettings_))
|
||||
gameSettings_.push_back(GameSettings(GameType::tes5));
|
||||
|
||||
if (find(begin(gameSettings_), end(gameSettings_), GameSettings(GameType::tes5se)) == end(gameSettings_))
|
||||
gameSettings_.push_back(GameSettings(GameType::tes5se));
|
||||
|
||||
if (find(begin(gameSettings_), end(gameSettings_), GameSettings(GameType::fo3)) == end(gameSettings_))
|
||||
gameSettings_.push_back(GameSettings(GameType::fo3));
|
||||
|
||||
|
||||
@@ -57,10 +57,6 @@ Game::Game(const GameSettings& gameSettings) : GameSettings(gameSettings), plugi
|
||||
Game::Game(const GameType gameType, const std::string& folder) : GameSettings(gameType, folder), pluginsFullyLoaded_(false) {}
|
||||
|
||||
void Game::Init(bool createFolder, const boost::filesystem::path& gameLocalAppData) {
|
||||
if (Type() != GameType::tes4 && Type() != GameType::tes5 && Type() != GameType::fo3 && Type() != GameType::fonv && Type() != GameType::fo4) {
|
||||
throw std::invalid_argument(translate("Invalid game ID supplied.").str());
|
||||
}
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << "Initialising filesystem-related data for game: " << Name();
|
||||
|
||||
if (!this->IsInstalled()) {
|
||||
|
||||
@@ -55,6 +55,12 @@ GameSettings::GameSettings(const GameType gameCode, const std::string& folder) :
|
||||
lootFolderName_ = "Skyrim";
|
||||
masterFile_ = "Skyrim.esm";
|
||||
repositoryURL_ = "https://github.com/loot/skyrim.git";
|
||||
} else if (Type() == GameType::tes5se) {
|
||||
name_ = "TES V: Skyrim Special Edition";
|
||||
registryKey_ = "Software\\Bethesda Softworks\\Skyrim Special Edition\\Installed Path";
|
||||
lootFolderName_ = "SkyrimSE";
|
||||
masterFile_ = "Skyrim.esm";
|
||||
repositoryURL_ = "https://github.com/loot/skyrimse.git";
|
||||
} else if (Type() == GameType::fo3) {
|
||||
name_ = "Fallout 3";
|
||||
registryKey_ = "Software\\Bethesda Softworks\\Fallout3\\Installed Path";
|
||||
@@ -122,7 +128,7 @@ GameType GameSettings::Type() const {
|
||||
libespm::GameId GameSettings::LibespmId() const {
|
||||
if (type_ == GameType::tes4)
|
||||
return libespm::GameId::OBLIVION;
|
||||
else if (type_ == GameType::tes5)
|
||||
else if (type_ == GameType::tes5 || type_ == GameType::tes5se)
|
||||
return libespm::GameId::SKYRIM;
|
||||
else if (type_ == GameType::fo3)
|
||||
return libespm::GameId::FALLOUT3;
|
||||
|
||||
@@ -118,6 +118,8 @@ struct convert<loot::GameSettings> {
|
||||
rhs = GameSettings(GameType::tes4, node["folder"].as<std::string>());
|
||||
else if (node["type"].as<std::string>() == GameSettings(GameType::tes5).FolderName())
|
||||
rhs = GameSettings(GameType::tes5, node["folder"].as<std::string>());
|
||||
else if (node["type"].as<std::string>() == GameSettings(GameType::tes5se).FolderName())
|
||||
rhs = GameSettings(GameType::tes5se, node["folder"].as<std::string>());
|
||||
else if (node["type"].as<std::string>() == GameSettings(GameType::fo3).FolderName())
|
||||
rhs = GameSettings(GameType::fo3, node["folder"].as<std::string>());
|
||||
else if (node["type"].as<std::string>() == GameSettings(GameType::fonv).FolderName())
|
||||
|
||||
@@ -41,14 +41,6 @@ LoadOrderHandler::~LoadOrderHandler() {
|
||||
}
|
||||
|
||||
void LoadOrderHandler::Init(const GameSettings& game, const boost::filesystem::path& gameLocalAppData) {
|
||||
if (game.Type() != GameType::tes4
|
||||
&& game.Type() != GameType::tes5
|
||||
&& game.Type() != GameType::fo3
|
||||
&& game.Type() != GameType::fonv
|
||||
&& game.Type() != GameType::fo4) {
|
||||
throw std::invalid_argument(translate("Unsupported game ID supplied.").str());
|
||||
}
|
||||
|
||||
if (game.GamePath().empty()) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Game path is not initialised.";
|
||||
throw std::invalid_argument(translate("Game path is not initialised.").str());
|
||||
@@ -70,6 +62,8 @@ void LoadOrderHandler::Init(const GameSettings& game, const boost::filesystem::p
|
||||
ret = lo_create_handle(&gh_, LIBLO_GAME_TES4, game.GamePath().string().c_str(), gameLocalDataPath);
|
||||
else if (game.Type() == GameType::tes5)
|
||||
ret = lo_create_handle(&gh_, LIBLO_GAME_TES5, game.GamePath().string().c_str(), gameLocalDataPath);
|
||||
else if (game.Type() == GameType::tes5se)
|
||||
ret = lo_create_handle(&gh_, LIBLO_GAME_TES5SE, game.GamePath().string().c_str(), gameLocalDataPath);
|
||||
else if (game.Type() == GameType::fo3)
|
||||
ret = lo_create_handle(&gh_, LIBLO_GAME_FO3, game.GamePath().string().c_str(), gameLocalDataPath);
|
||||
else if (game.Type() == GameType::fonv)
|
||||
|
||||
@@ -72,6 +72,7 @@ tt, code, kbd, samp {
|
||||
}
|
||||
#gameMenu {
|
||||
margin: 0 8px;
|
||||
width: 250px;
|
||||
}
|
||||
#applySortButton {
|
||||
color: var(--dark-accent-color);
|
||||
|
||||
@@ -16,6 +16,8 @@ it a <select>-like API. This means:
|
||||
<template>
|
||||
<style>
|
||||
paper-dropdown-menu {
|
||||
width: 100%;
|
||||
|
||||
--paper-input-container: {
|
||||
transition: opacity var(--state-transition-time);
|
||||
};
|
||||
|
||||
@@ -353,7 +353,7 @@
|
||||
<h2>About LOOT</h2>
|
||||
<paper-dialog-scrollable>
|
||||
<p>Version <span id="LOOTVersion"></span> (build <span id="LOOTBuild"></span>)</p>
|
||||
<p>Load order optimisation for Oblivion, Skyrim, Fallout 3, Fallout: New Vegas and Fallout 4.</p>
|
||||
<p>Load order optimisation for Oblivion, Skyrim, Skyrim Special Edition, Fallout 3, Fallout: New Vegas and Fallout 4.</p>
|
||||
<p><a href="https://loot.github.io">https://loot.github.io</a></p>
|
||||
<p>LOOT is free, but if you want to show your appreciation with some money, donations may be made to WrinklyNinja (LOOT's creator and main developer) using <a href="https://www.paypal.me/OliverHamlet">PayPal</a> or <a href="https://wrinklyninja.github.io/bitcoin/">Bitcoin</a>.</p>
|
||||
<p>Copyright © 2012–2016 WrinklyNinja</p>
|
||||
|
||||
@@ -43,6 +43,7 @@ private:
|
||||
|
||||
temp.push_back(GameSettings(GameType::tes4).FolderName());
|
||||
temp.push_back(GameSettings(GameType::tes5).FolderName());
|
||||
temp.push_back(GameSettings(GameType::tes5se).FolderName());
|
||||
temp.push_back(GameSettings(GameType::fo3).FolderName());
|
||||
temp.push_back(GameSettings(GameType::fonv).FolderName());
|
||||
temp.push_back(GameSettings(GameType::fo4).FolderName());
|
||||
|
||||
@@ -51,7 +51,9 @@ public:
|
||||
//Sort plugins into their load order.
|
||||
std::vector<Plugin> plugins = sortPlugins();
|
||||
|
||||
if ((state_.getCurrentGame().Type() == GameType::tes5 || state_.getCurrentGame().Type() == GameType::fo4))
|
||||
if ((state_.getCurrentGame().Type() == GameType::tes5
|
||||
|| state_.getCurrentGame().Type() == GameType::fo4
|
||||
|| state_.getCurrentGame().Type() == GameType::tes5se))
|
||||
applyUnchangedLoadOrder(plugins);
|
||||
|
||||
std::string json = generateJsonResponse(plugins);
|
||||
|
||||
@@ -69,7 +69,8 @@ INSTANTIATE_TEST_CASE_P(,
|
||||
GameType::tes5,
|
||||
GameType::fo3,
|
||||
GameType::fonv,
|
||||
GameType::fo4));
|
||||
GameType::fo4,
|
||||
GameType::tes5se));
|
||||
|
||||
TEST_P(CreateDatabaseTest, shouldSucceedIfPassedValidParametersWithRelativePaths) {
|
||||
EXPECT_NO_THROW(db_ = CreateDatabase(GetParam(), dataPath.parent_path().string(), localPath.string()));
|
||||
|
||||
@@ -98,7 +98,8 @@ INSTANTIATE_TEST_CASE_P(,
|
||||
GameType::tes5,
|
||||
GameType::fo3,
|
||||
GameType::fonv,
|
||||
GameType::fo4));
|
||||
GameType::fo4,
|
||||
GameType::tes5se));
|
||||
|
||||
TEST_P(DatabaseInterfaceTest, loadListsShouldThrowIfNoMasterlistIsPresent) {
|
||||
EXPECT_ANY_THROW(db_->LoadLists(masterlistPath.string(), ""));
|
||||
|
||||
@@ -50,6 +50,7 @@ TEST_F(LootSettingsTest, defaultConstructorShouldSetDefaultValues) {
|
||||
const std::vector<GameSettings> expectedGameSettings({
|
||||
GameSettings(GameType::tes4),
|
||||
GameSettings(GameType::tes5),
|
||||
GameSettings(GameType::tes5se),
|
||||
GameSettings(GameType::fo3),
|
||||
GameSettings(GameType::fonv),
|
||||
GameSettings(GameType::fo4),
|
||||
@@ -301,6 +302,7 @@ TEST_F(LootSettingsTest, loadingFromYamlShouldAddMissingBaseGames) {
|
||||
const std::vector<GameSettings> expectedGameSettings({
|
||||
GameSettings(GameType::tes4),
|
||||
GameSettings(GameType::tes5),
|
||||
GameSettings(GameType::tes5se),
|
||||
GameSettings(GameType::fo3),
|
||||
GameSettings(GameType::fonv),
|
||||
GameSettings(GameType::fo4),
|
||||
|
||||
@@ -53,7 +53,8 @@ INSTANTIATE_TEST_CASE_P(,
|
||||
GameType::tes5,
|
||||
GameType::fo3,
|
||||
GameType::fonv,
|
||||
GameType::fo4));
|
||||
GameType::fo4,
|
||||
GameType::tes5se));
|
||||
|
||||
TEST_P(GameTest, constructingFromGameSettingsShouldUseTheirValues) {
|
||||
GameSettings settings = GameSettings(GetParam(), "folder");
|
||||
|
||||
@@ -45,7 +45,8 @@ INSTANTIATE_TEST_CASE_P(,
|
||||
GameType::tes5,
|
||||
GameType::fo3,
|
||||
GameType::fonv,
|
||||
GameType::fo4));
|
||||
GameType::fo4,
|
||||
GameType::tes5se));
|
||||
|
||||
TEST_P(LoadOrderHandlerTest, initShouldThrowIfNoGamePathIsSet) {
|
||||
GameSettings game(GetParam());
|
||||
@@ -136,7 +137,7 @@ TEST_P(LoadOrderHandlerTest, setLoadOrderShouldSetTheLoadOrder) {
|
||||
});
|
||||
EXPECT_NO_THROW(loadOrderHandler_.SetLoadOrder(loadOrder));
|
||||
|
||||
if (GetParam() == GameType::fo4)
|
||||
if (GetParam() == GameType::fo4 || GetParam() == GameType::tes5se)
|
||||
loadOrder.erase(begin(loadOrder));
|
||||
|
||||
EXPECT_EQ(loadOrder, getLoadOrder());
|
||||
|
||||
@@ -73,7 +73,8 @@ INSTANTIATE_TEST_CASE_P(,
|
||||
GameType::tes5,
|
||||
GameType::fo3,
|
||||
GameType::fonv,
|
||||
GameType::fo4));
|
||||
GameType::fo4,
|
||||
GameType::tes5se));
|
||||
|
||||
TEST_P(MasterlistTest, updateWithGameParameterShouldReturnTrueIfNoMasterlistExists) {
|
||||
Game game(GetParam());
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user