diff --git a/src/ArchiveBuilderFactory.cpp b/src/ArchiveBuilderFactory.cpp index 3eb3138..5c6fca5 100644 --- a/src/ArchiveBuilderFactory.cpp +++ b/src/ArchiveBuilderFactory.cpp @@ -23,8 +23,10 @@ namespace BsaPacker case NexusId::Fallout3: case NexusId::NewVegas: case NexusId::Skyrim: + case NexusId::Enderal: return std::vector { baFO3 }; case NexusId::SkyrimSE: + case NexusId::EnderalSE: return std::vector { baSSE }; case NexusId::Fallout4: case NexusId::Starfield: diff --git a/src/ArchiveNameService.cpp b/src/ArchiveNameService.cpp index e75e62c..56b19ad 100644 --- a/src/ArchiveNameService.cpp +++ b/src/ArchiveNameService.cpp @@ -18,6 +18,8 @@ namespace BsaPacker case NexusId::NewVegas: case NexusId::Skyrim: case NexusId::SkyrimSE: + case NexusId::Enderal: + case NexusId::EnderalSE: return QStringLiteral(".bsa"); case NexusId::Fallout4: case NexusId::Starfield: diff --git a/src/DummyPluginServiceFactory.cpp b/src/DummyPluginServiceFactory.cpp index 3f3ad7e..8789bd6 100644 --- a/src/DummyPluginServiceFactory.cpp +++ b/src/DummyPluginServiceFactory.cpp @@ -36,8 +36,10 @@ namespace BsaPacker case NexusId::NewVegas: return std::make_unique(m_FileWriterService, m_DummyPluginLogic); case NexusId::Skyrim: + case NexusId::Enderal: return std::make_unique(m_FileWriterService, m_DummyPluginLogic); case NexusId::SkyrimSE: + case NexusId::EnderalSE: return std::make_unique(m_FileWriterService, m_DummyPluginLogic); case NexusId::Fallout4: return std::make_unique(m_FileWriterService, m_DummyPluginLogic); diff --git a/src/ModContext.cpp b/src/ModContext.cpp index 1c1acc5..2f6e631 100644 --- a/src/ModContext.cpp +++ b/src/ModContext.cpp @@ -26,7 +26,19 @@ namespace BsaPacker int ModContext::GetNexusId() const { const MOBase::IPluginGame* managedGame = this->m_Organizer->managedGame(); - return managedGame->nexusGameID(); + int nexusId = managedGame->nexusGameID(); + + // Games with no Nexus page have an ID of 0. Use primarySources in that case + if (nexusId != 0) { + return nexusId; + } + if (!managedGame->primarySources().isEmpty()) { + QString primarySource = managedGame->primarySources().first(); + if (primarySource == "FalloutNV") { // TTW + return NexusId::NewVegas; + } + } + return nexusId; } QStringList ModContext::GetPlugins(const QDir& modDirectory) const diff --git a/src/NexusId.h b/src/NexusId.h index c084dc2..c1971d9 100644 --- a/src/NexusId.h +++ b/src/NexusId.h @@ -5,6 +5,7 @@ namespace BsaPacker { enum NexusId { + // Skyrim VR, Fallout 4 VR, and TTW don't have Nexus pages so are 0 Morrowind = 100, Oblivion = 101, Fallout3 = 120, @@ -12,6 +13,8 @@ namespace BsaPacker Skyrim = 110, SkyrimSE = 1704, Fallout4 = 1151, + Enderal = 2736, + EnderalSE = 3685, Starfield = 4187 }; } // namespace BsaPacker