Verify existence of assets from BSA archives on game load

This commit is contained in:
Eddoursul 2022-09-01 12:59:36 +02:00
parent 5078a42dbb
commit 0b83918c3d
2 changed files with 12 additions and 4 deletions

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

Binary file not shown.

View File

@ -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) {
//