Achieved the same filtering of disenchantable items with KID alone. Oh well.
This commit is contained in:
parent
4344512a25
commit
c258414056
@ -7,5 +7,13 @@ Keyword = ETR_ExtraArtifact|Book|0xEF07A,0xF33CD,0xF33CE,0xF33CF,0xF33D0,0xF33D1
|
|||||||
; Soul Gem Fragments
|
; Soul Gem Fragments
|
||||||
Keyword = ETR_NotArtifact|Misc Item|0x67181,0x67182,0x67183,0x67184,0x67185
|
Keyword = ETR_NotArtifact|Misc Item|0x67181,0x67182,0x67183,0x67184,0x67185
|
||||||
|
|
||||||
|
; Dummy items
|
||||||
|
Keyword = ETR_NotArtifact|Weapon|Dummy
|
||||||
|
Keyword = ETR_NotArtifact|Armor|Dummy
|
||||||
|
|
||||||
; ClothingPoor
|
; ClothingPoor
|
||||||
Keyword = ETR_NotArtifact|Armor|ClothingPoor
|
Keyword = ETR_NotArtifact|Armor|ClothingPoor
|
||||||
|
|
||||||
|
; Disenchantable items, minus daedric artifacts just in case
|
||||||
|
Keyword = ETR_NotArtifact|Weapon|-MagicDisallowEnchanting,-DaedricArtifact|E
|
||||||
|
Keyword = ETR_NotArtifact|Armor|-MagicDisallowEnchanting,-DaedricArtifact|E
|
||||||
|
Binary file not shown.
@ -45,14 +45,10 @@ namespace ArtifactTracker
|
|||||||
|
|
||||||
const auto recipeKeyword = dataHandler->LookupForm<RE::BGSKeyword>(0xF5CB0, "Skyrim.esm"); // VendorItemRecipe
|
const auto recipeKeyword = dataHandler->LookupForm<RE::BGSKeyword>(0xF5CB0, "Skyrim.esm"); // VendorItemRecipe
|
||||||
const auto excludeKeywords = dataHandler->LookupForm<RE::BGSListForm>(0x801, "Artifact Tracker.esp"); // ETR_ExcludeMiscKeywords
|
const auto excludeKeywords = dataHandler->LookupForm<RE::BGSListForm>(0x801, "Artifact Tracker.esp"); // ETR_ExcludeMiscKeywords
|
||||||
const auto dummyKeyword = dataHandler->LookupForm<RE::BGSKeyword>(0xF3E6C, "Skyrim.esm"); // Dummy
|
|
||||||
const auto disallowEnchanting = dataHandler->LookupForm<RE::BGSKeyword>(0xC27BD, "Skyrim.esm"); // MagicDisallowEnchanting
|
|
||||||
const auto daedricArtifact = dataHandler->LookupForm<RE::BGSKeyword>(0xA8668, "Skyrim.esm"); // DaedricArtifact
|
|
||||||
|
|
||||||
const auto extraArtifactKeyword = dataHandler->LookupForm<RE::BGSKeyword>(0xDE3FD3, "Update.esm"); // ETR_ExtraArtifact
|
const auto extraArtifactKeyword = dataHandler->LookupForm<RE::BGSKeyword>(0xDE3FD3, "Update.esm"); // ETR_ExtraArtifact
|
||||||
const auto notArtifactKeyword = dataHandler->LookupForm<RE::BGSKeyword>(0xDE3FD4, "Update.esm"); // ETR_NotArtifact
|
const auto notArtifactKeyword = dataHandler->LookupForm<RE::BGSKeyword>(0xDE3FD4, "Update.esm"); // ETR_NotArtifact
|
||||||
|
|
||||||
if (!g_cellContainer || !g_listNew || !g_listStored || !g_listFound || !g_persistentStorage || !g_homeKeyword || !recipeKeyword || !excludeKeywords || !dummyKeyword || !extraArtifactKeyword || !notArtifactKeyword || !disallowEnchanting || !daedricArtifact) {
|
if (!g_cellContainer || !g_listNew || !g_listStored || !g_listFound || !g_persistentStorage || !g_homeKeyword || !recipeKeyword || !excludeKeywords || !extraArtifactKeyword || !notArtifactKeyword) {
|
||||||
SKSE::log::warn("Unable to load data from Artifact Tracker.esp");
|
SKSE::log::warn("Unable to load data from Artifact Tracker.esp");
|
||||||
RE::DebugMessageBox("Unable to load data from Artifact Tracker.esp, the mod is disabled.");
|
RE::DebugMessageBox("Unable to load data from Artifact Tracker.esp, the mod is disabled.");
|
||||||
return false;
|
return false;
|
||||||
@ -61,20 +57,15 @@ namespace ArtifactTracker
|
|||||||
// Preloading item lists
|
// Preloading item lists
|
||||||
|
|
||||||
std::map<std::string, bool> settings{
|
std::map<std::string, bool> settings{
|
||||||
{ "ExcludeDisenchantableItems", true },
|
{ "DumpItemList", false },
|
||||||
{ "DumpItemNames", false },
|
|
||||||
};
|
};
|
||||||
LoadINI(&settings, "Data/SKSE/Plugins/ArtifactTracker.ini");
|
LoadINI(&settings, "Data/SKSE/Plugins/ArtifactTracker.ini");
|
||||||
|
|
||||||
bool bExcludeDisenchantableItems = settings.at("ExcludeDisenchantableItems");
|
|
||||||
|
|
||||||
g_artifactFormTypes.insert(RE::FormType::Weapon);
|
g_artifactFormTypes.insert(RE::FormType::Weapon);
|
||||||
for (const auto& form : dataHandler->GetFormArray<RE::TESObjectWEAP>()) {
|
for (const auto& form : dataHandler->GetFormArray<RE::TESObjectWEAP>()) {
|
||||||
if (form->GetPlayable() && !form->IsBound() && !form->weaponData.flags.all(RE::TESObjectWEAP::Data::Flag::kCantDrop) && !form->IsDeleted() && !form->HasKeyword(dummyKeyword)) {
|
if (form->GetPlayable() && !form->IsBound() && !form->weaponData.flags.all(RE::TESObjectWEAP::Data::Flag::kCantDrop) && !form->IsDeleted()) {
|
||||||
if (!bExcludeDisenchantableItems || !form->As<RE::TESEnchantableForm>()->formEnchanting || form->HasKeyword(disallowEnchanting) || form->HasKeyword(daedricArtifact) || form->HasKeyword(extraArtifactKeyword)) {
|
if ((!form->HasKeyword(notArtifactKeyword) || form->HasKeyword(extraArtifactKeyword)) && strlen(form->GetName()) > 0) {
|
||||||
if (!form->HasKeyword(notArtifactKeyword) && strlen(form->GetName()) > 0) {
|
g_artifactMap[form->formID] = form;
|
||||||
g_artifactMap[form->formID] = form;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -82,11 +73,9 @@ namespace ArtifactTracker
|
|||||||
|
|
||||||
g_artifactFormTypes.insert(RE::FormType::Armor);
|
g_artifactFormTypes.insert(RE::FormType::Armor);
|
||||||
for (const auto& form : dataHandler->GetFormArray<RE::TESObjectARMO>()) {
|
for (const auto& form : dataHandler->GetFormArray<RE::TESObjectARMO>()) {
|
||||||
if (form->GetPlayable() && !form->IsDeleted() && !form->HasKeyword(dummyKeyword)) {
|
if (form->GetPlayable() && !form->IsDeleted()) {
|
||||||
if (!bExcludeDisenchantableItems || !form->As<RE::TESEnchantableForm>()->formEnchanting || form->HasKeyword(disallowEnchanting) || form->HasKeyword(daedricArtifact) || form->HasKeyword(extraArtifactKeyword)) {
|
if ((!form->HasKeyword(notArtifactKeyword) || form->HasKeyword(extraArtifactKeyword)) && strlen(form->GetName()) > 0) {
|
||||||
if (!form->HasKeyword(notArtifactKeyword) && strlen(form->GetName()) > 0) {
|
g_artifactMap[form->formID] = form;
|
||||||
g_artifactMap[form->formID] = form;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -146,7 +135,7 @@ namespace ArtifactTracker
|
|||||||
|
|
||||||
SKSE::log::info("Total artifacts: {}", g_artifactMap.size());
|
SKSE::log::info("Total artifacts: {}", g_artifactMap.size());
|
||||||
|
|
||||||
if (settings.at("DumpItemNames")) {
|
if (settings.at("DumpItemList")) {
|
||||||
for (const auto& item : g_artifactMap) {
|
for (const auto& item : g_artifactMap) {
|
||||||
SKSE::log::info("[{:08X}] {}", item.second->formID, item.second->GetName());
|
SKSE::log::info("[{:08X}] {}", item.second->formID, item.second->GetName());
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ inline void LoadINI(std::map<std::string, bool>* settings, const char* iniPath)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!std::filesystem::exists(iniPath)) {
|
if (!std::filesystem::exists(iniPath)) {
|
||||||
SKSE::log::warn("{} does not exists, using default values.", iniPath);
|
SKSE::log::warn("{} does not exist, using default values.", iniPath);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user