From 0b83918c3dc088b6cea38c72d2791ae290233f57 Mon Sep 17 00:00:00 2001 From: Eddoursul Date: Thu, 1 Sep 2022 12:59:36 +0200 Subject: [PATCH] Verify existence of assets from BSA archives on game load --- SKSE/Plugins/EnderalSE.dll | 4 ++-- source/Enderal DLL/src/Main.cpp | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/SKSE/Plugins/EnderalSE.dll b/SKSE/Plugins/EnderalSE.dll index c2172c3c..91d5482c 100644 --- a/SKSE/Plugins/EnderalSE.dll +++ b/SKSE/Plugins/EnderalSE.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:392d24293a9519119a8d1b9866a0d291515b7e00dfa0b74f1a08b6958117c230 -size 660992 +oid sha256:e3cc5bb32ce859a719433cd24b994965f4a3d461c0d4472ed736a5ee7399552c +size 663040 diff --git a/source/Enderal DLL/src/Main.cpp b/source/Enderal DLL/src/Main.cpp index 843f9f03..982ba337 100644 --- a/source/Enderal DLL/src/Main.cpp +++ b/source/Enderal DLL/src/Main.cpp @@ -76,11 +76,19 @@ namespace { exit(EXIT_FAILURE); } } - const auto vm = RE::BSScript::Internal::VirtualMachine::GetSingleton(); - if (!vm->TypeIsValid("_00e_questfunctions")) { + + 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); exit(EXIT_FAILURE); } + CheckIncompatibleMods(); } else if (message->type == MessagingInterface::kPreLoadGame) { //