Added Address Library for 1.6.659; removed INI manipulation, failing in the GOG release

This commit is contained in:
Eddoursul 2022-09-29 21:41:38 +02:00
parent c428861029
commit 09f7922554
6 changed files with 48 additions and 48 deletions

BIN
SKSE/Plugins/EnderalSE.dll (Stored with Git LFS)

Binary file not shown.

BIN
SKSE/Plugins/versionlib-1-6-659-0.bin (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -33,6 +33,8 @@ SKSE\Plugins\EnderalSE.ini
SKSE\Plugins\EnderalVersion.ini
SKSE\Plugins\version-1-5-97-0.bin
SKSE\Plugins\versionlib-1-6-353-0.bin
SKSE\Plugins\versionlib-1-6-640-0.bin
SKSE\Plugins\versionlib-1-6-659-0.bin
SKSE\SKSE.ini
Skyrim.esm
Update.esm

View File

@ -6,7 +6,7 @@ message("Using toolchain file ${CMAKE_TOOLCHAIN_FILE}.")
########################################################################################################################
project(
EnderalSE
VERSION 1.0.0
VERSION 1.1
DESCRIPTION "Enderal SE DLL"
LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 23)

View File

@ -34,18 +34,8 @@ namespace {
void InitializeMessaging()
{
GetMessagingInterface()->RegisterListener([](MessagingInterface::Message* message) {
if (message->type == MessagingInterface::kPostLoad) {
if (DataFileExists("Dawnguard.esm") || DataFileExists("Dragonborn.esm") || DataFileExists("HearthFires.esm") || DataFileExists("Update.esm")) {
MessageBoxW(NULL, L"Skyrim DLCs are incompatible with Enderal.", L"Error", MB_OK | MB_ICONERROR);
exit(EXIT_FAILURE);
}
if (DataFileExists("Unofficial Skyrim Special Edition Patch.esp")) {
MessageBoxW(NULL, L"Unofficial Skyrim Special Edition Patch is incompatible with Enderal.", L"Error", MB_OK | MB_ICONERROR);
exit(EXIT_FAILURE);
}
CheckCCMods();
if (g_settings.at("StayAtSystemPage")) {
if (const auto pluginInfo = GetLoadInterface()->GetPluginInfo("StayAtSystemPage"); pluginInfo) {
MessageBoxW(NULL, L"Stay At The System Page is already included in Enderal, please, disable it.", L"Error", MB_OK | MB_ICONERROR);
@ -59,11 +49,6 @@ namespace {
}
}
SetINISettings();
EventListener::Install();
} else if (message->type == MessagingInterface::kPostPostLoad) {
SKSE::GetModCallbackEventSource()->AddEventSink(EventListener::GetSingleton());
} else if (message->type == MessagingInterface::kDataLoaded) {
const auto dataHandler = RE::TESDataHandler::GetSingleton();
if (dataHandler) {
@ -77,21 +62,38 @@ namespace {
}
}
if (!RE::BSScript::Internal::VirtualMachine::GetSingleton()->TypeIsValid("UI")) {
RE::DebugMessageBox("Unable to detect SKSE scripts, make sure SKSE is properly installed.");
}
bool bScripts = RE::BSScript::Internal::VirtualMachine::GetSingleton()->TypeIsValid("PRKF__00E_CraftQuestPotionPe_0300146D");
bool bSounds = RE::BSResourceNiBinaryStream("sound/fx/enderal/laughingchild.wav").good();
bool bVoices = RE::BSResourceNiBinaryStream("sound/voice/enderal - forgotten stories.esm/vt_calia/fs_mq18c__0002a4ed_1.fuz").good();
bool bMeshes = RE::BSResourceNiBinaryStream("meshes/enderal/loadscreenart/loadscreenundercity.nif").good();
bool bTextures = RE::BSResourceNiBinaryStream("textures/enderal/forgottenstories/theriantrophist/theriantrophistrecipe.dds").good();
bool bInterface = RE::BSResourceNiBinaryStream("interface/00e_heromenu.swf").good();
if (!bScripts || !bSounds || !bVoices || !bMeshes || !bTextures || !bInterface) {
MessageBoxW(NULL, L"One or more of Enderal's BSA archives are not loaded. Make sure Enderal - Forgotten Stories.esm is enabled and revalidate your files.", L"Error", MB_OK | MB_ICONERROR);
if (!bScripts || !bInterface) {
RE::DebugMessageBox("E - Misc.bsa is not loaded or is outdated. Make sure Enderal - Forgotten Stories.esm is enabled and revalidate your files.");
}
bool bSounds = RE::BSResourceNiBinaryStream("sound/fx/enderal/laughingchild.wav").good();
if (!bSounds) {
RE::DebugMessageBox("E - Sounds.bsa is not loaded. Make sure Enderal - Forgotten Stories.esm is enabled and revalidate your files.");
}
bool bVoices = RE::BSResourceNiBinaryStream("sound/voice/enderal - forgotten stories.esm/vt_calia/fs_mq18c__0002a4ed_1.fuz").good();
if (!bVoices) {
RE::DebugMessageBox("L - Voices.bsa is not loaded. Make sure Enderal - Forgotten Stories.esm is enabled and revalidate your files.");
exit(EXIT_FAILURE);
}
bool bMeshes = RE::BSResourceNiBinaryStream("meshes/enderal/loadscreenart/loadscreenundercity.nif").good();
if (!bMeshes) {
RE::DebugMessageBox("E - Meshes.bsa is not loaded. Make sure Enderal - Forgotten Stories.esm is enabled and revalidate your files.");
}
CheckIncompatibleMods();
} else if (message->type == MessagingInterface::kPreLoadGame) {
//
} else if ((message->type == MessagingInterface::kPostLoadGame && message->data) || message->type == MessagingInterface::kNewGame) {
NewGameCount(true);
}
@ -101,6 +103,18 @@ namespace {
SKSEPluginLoad(const LoadInterface* skse) {
if (DataFileExists("Dawnguard.esm") || DataFileExists("Dragonborn.esm") || DataFileExists("HearthFires.esm") || DataFileExists("Update.esm")) {
MessageBoxW(NULL, L"Skyrim DLCs are incompatible with Enderal.", L"Error", MB_OK | MB_ICONERROR);
exit(EXIT_FAILURE);
}
if (DataFileExists("Unofficial Skyrim Special Edition Patch.esp")) {
MessageBoxW(NULL, L"Unofficial Skyrim Special Edition Patch is incompatible with Enderal.", L"Error", MB_OK | MB_ICONERROR);
exit(EXIT_FAILURE);
}
CheckCCMods();
GetLoadInterface(skse);
InitializeLogging();
@ -114,6 +128,8 @@ SKSEPluginLoad(const LoadInterface* skse) {
Init(skse);
InitializeMessaging();
SKSE::GetModCallbackEventSource()->AddEventSink(EventListener::GetSingleton());
GetPapyrusInterface()->Register(Papyrus::Bind);
if (!IsVR()) {

View File

@ -34,27 +34,6 @@ inline bool IsVR()
return GetLoadInterface()->RuntimeVersion() == SKSE::RUNTIME_VR_1_4_15 || GetLoadInterface()->RuntimeVersion() == SKSE::RUNTIME_LATEST_VR;
}
inline void SetINISettings()
{
auto* setting = RE::INIPrefSettingCollection::GetSingleton()->GetSetting("bFreebiesSeen:General");
if (setting && !setting->GetBool()) {
setting->data.b = true;
RE::INIPrefSettingCollection::GetSingleton()->WriteSetting(setting);
}
setting = RE::INISettingCollection::GetSingleton()->GetSetting("bInvalidateOlderFiles:Archive");
if (setting && !setting->GetBool()) {
setting->data.b = true;
RE::INISettingCollection::GetSingleton()->WriteSetting(setting);
}
setting = RE::INISettingCollection::GetSingleton()->GetSetting("bModManagerMenuEnabled:General");
if (setting && setting->GetBool()) {
setting->data.b = false;
RE::INISettingCollection::GetSingleton()->WriteSetting(setting);
}
}
inline void CheckIncompatibleMods()
{
bool bPrinted = false;