From 527723e71797d1781289794c0001965e9af5ff04 Mon Sep 17 00:00:00 2001 From: Peechey <92683202+Peechey@users.noreply.github.com> Date: Tue, 18 Nov 2025 00:25:34 -0600 Subject: [PATCH 1/5] qol for maintaining eldritch implicits across new gear --- src/Classes/ItemsTab.lua | 36 +++++++++++++++++++++++++++++------- src/Modules/Main.lua | 12 ++++++++++-- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/src/Classes/ItemsTab.lua b/src/Classes/ItemsTab.lua index d1b08541f8..d32399318f 100644 --- a/src/Classes/ItemsTab.lua +++ b/src/Classes/ItemsTab.lua @@ -1538,18 +1538,40 @@ function ItemsTabClass:DeleteItem(item, deferUndoState) end end --- Attempt to create a new item from the given item raw text and sets it as the new display item -function ItemsTabClass:CreateDisplayItemFromRaw(itemRaw, normalise) - local newItem = new("Item", itemRaw) - if newItem.base then +local function copyAnointsAndEldritchImplicits(self, newItem) + local currentItem = self.items[self.activeItemSet[newItem.base.type].selItemId] + -- if you don't have an equipped item that matches the type of the newItem, no need to do anything + if currentItem then -- if the new item is an amulet and does not have an anoint and your current amulet does, apply that anoint to the new item - if newItem.base.type == "Amulet" and #newItem.enchantModLines == 0 and self.activeItemSet["Amulet"].selItemId > 0 then - local currentAnoint = self.items[self.activeItemSet["Amulet"].selItemId].enchantModLines + if newItem.base.type == "Amulet" and #newItem.enchantModLines == 0 then + local currentAnoint = currentItem.enchantModLines if currentAnoint and #currentAnoint == 1 then -- skip if amulet has more than one anoint e.g. Stranglegasp newItem.enchantModLines = currentAnoint - newItem:BuildAndParseRaw() end end + + local implicitBaseTypes = { "Helmet", "Body Armour", "Gloves", "Boots" } + local implicitRarities = { "NORMAL", "MAGIC", "RARE" } + -- if the new item is a Normal, Magic, or Rare Helmet, Body Armour, Gloves, or Boots and does not have any eldritch implicits + -- and your current respective item does, apply those implicits and influence to the new item + if main.migrateEldritchImplicits and isValueInTable(implicitBaseTypes, newItem.base.type) and isValueInTable(implicitRarities, newItem.rarity) and + not (newItem.tangle and newItem.cleansing) and (currentItem.cleansing or currentItem.tangle) then + local currentImplicits = currentItem.implicitModLines + if currentImplicits then + newItem.implicitModLines = currentImplicits + newItem.tangle = currentItem.tangle + newItem.cleansing = currentItem.cleansing + end + end + newItem:BuildAndParseRaw() + end +end + +-- Attempt to create a new item from the given item raw text and sets it as the new display item +function ItemsTabClass:CreateDisplayItemFromRaw(itemRaw, normalise) + local newItem = new("Item", itemRaw) + if newItem.base then + copyAnointsAndEldritchImplicits(self, newItem) if normalise then newItem:NormaliseQuality() newItem:BuildModList() diff --git a/src/Modules/Main.lua b/src/Modules/Main.lua index ac823cb248..e2b5952a10 100644 --- a/src/Modules/Main.lua +++ b/src/Modules/Main.lua @@ -844,7 +844,7 @@ function main:OpenOptionsPopup() end local defaultLabelSpacingPx = -4 - local defaultLabelPlacementX = 240 + local defaultLabelPlacementX = popupWidth*0.45 drawSectionHeader("app", "Application options") @@ -1030,7 +1030,15 @@ function main:OpenOptionsPopup() self.slotOnlyTooltips = state end) controls.slotOnlyTooltips.state = self.slotOnlyTooltips - + + + nextRow() + controls.migrateEldritchImplicits = new("CheckBoxControl", { "TOPLEFT", nil, "TOPLEFT" }, { defaultLabelPlacementX, currentY, 20 }, "^7Copy Eldritch Implicits onto Display Item:", function(state) + self.migrateEldritchImplicits = state + end) + controls.migrateEldritchImplicits.tooltipText = "Carry over Eldritch Implicits from current gear when comparing new gear, given the new item does not already have Eldritch Implicits" + controls.migrateEldritchImplicits.state = self.migrateEldritchImplicits + nextRow() controls.notSupportedModTooltips = new("CheckBoxControl", { "TOPLEFT", nil, "TOPLEFT" }, { defaultLabelPlacementX, currentY, 20 }, "^7Show tooltip for unsupported mods :", function(state) self.notSupportedModTooltips = state From 018de98c9948e96f6f81468dead341dab579a339 Mon Sep 17 00:00:00 2001 From: Peechey <92683202+Peechey@users.noreply.github.com> Date: Tue, 18 Nov 2025 00:45:18 -0600 Subject: [PATCH 2/5] fix toggle saving and accounting for new item has any influence at all --- src/Classes/ItemsTab.lua | 12 ++++++++---- src/Modules/Main.lua | 7 +++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/Classes/ItemsTab.lua b/src/Classes/ItemsTab.lua index d32399318f..406c9b324e 100644 --- a/src/Classes/ItemsTab.lua +++ b/src/Classes/ItemsTab.lua @@ -1550,12 +1550,16 @@ local function copyAnointsAndEldritchImplicits(self, newItem) end end + -- if the new item is a Normal, Magic, or Rare Helmet, Body Armour, Gloves, or Boots and does not have any eldritch implicits nor any other influence + -- and your current respective item does, apply those implicits and influence to the new item local implicitBaseTypes = { "Helmet", "Body Armour", "Gloves", "Boots" } local implicitRarities = { "NORMAL", "MAGIC", "RARE" } - -- if the new item is a Normal, Magic, or Rare Helmet, Body Armour, Gloves, or Boots and does not have any eldritch implicits - -- and your current respective item does, apply those implicits and influence to the new item - if main.migrateEldritchImplicits and isValueInTable(implicitBaseTypes, newItem.base.type) and isValueInTable(implicitRarities, newItem.rarity) and - not (newItem.tangle and newItem.cleansing) and (currentItem.cleansing or currentItem.tangle) then + for _, influence in ipairs(itemLib.influenceInfo.default) do + if newItem[influence.key] then + return + end + end + if main.migrateEldritchImplicits and isValueInTable(implicitBaseTypes, newItem.base.type) and isValueInTable(implicitRarities, newItem.rarity) and (currentItem.cleansing or currentItem.tangle) then local currentImplicits = currentItem.implicitModLines if currentImplicits then newItem.implicitModLines = currentImplicits diff --git a/src/Modules/Main.lua b/src/Modules/Main.lua index e2b5952a10..74c3de6f42 100644 --- a/src/Modules/Main.lua +++ b/src/Modules/Main.lua @@ -107,6 +107,7 @@ function main:Init() self.dpiScaleOverridePercent = GetDPIScaleOverridePercent and GetDPIScaleOverridePercent() or 0 self.showWarnings = true self.slotOnlyTooltips = true + self.migrateEldritchImplicits = true self.notSupportedModTooltips = true self.notSupportedTooltipText = " ^8(Not supported in PoB yet)" self.POESESSID = "" @@ -627,6 +628,9 @@ function main:LoadSettings(ignoreBuild) if node.attrib.slotOnlyTooltips then self.slotOnlyTooltips = node.attrib.slotOnlyTooltips == "true" end + if node.attrib.migrateEldritchImplicits then + self.migrateEldritchImplicits = node.attrib.migrateEldritchImplicits == "true" + end if node.attrib.notSupportedModTooltips then self.notSupportedModTooltips = node.attrib.notSupportedModTooltips == "true" end @@ -761,6 +765,7 @@ function main:SaveSettings() lastExportedWebsite = self.lastExportedWebsite, showWarnings = tostring(self.showWarnings), slotOnlyTooltips = tostring(self.slotOnlyTooltips), + migrateEldritchImplicits = tostring(self.migrateEldritchImplicits), notSupportedModTooltips = tostring(self.notSupportedModTooltips), POESESSID = self.POESESSID, invertSliderScrollDirection = tostring(self.invertSliderScrollDirection), @@ -1082,6 +1087,7 @@ function main:OpenOptionsPopup() local initialDefaultItemAffixQuality = self.defaultItemAffixQuality or 0.5 local initialShowWarnings = self.showWarnings local initialSlotOnlyTooltips = self.slotOnlyTooltips + local initialMigrateEldritchImplicits = self.migrateEldritchImplicits local initialNotSupportedModTooltips = self.notSupportedModTooltips local initialInvertSliderScrollDirection = self.invertSliderScrollDirection local initialDisableDevAutoSave = self.disableDevAutoSave @@ -1136,6 +1142,7 @@ function main:OpenOptionsPopup() self.defaultItemAffixQuality = initialDefaultItemAffixQuality self.showWarnings = initialShowWarnings self.slotOnlyTooltips = initialSlotOnlyTooltips + self.migrateEldritchImplicits = initialMigrateEldritchImplicits self.notSupportedModTooltips = initialNotSupportedModTooltips self.invertSliderScrollDirection = initialInvertSliderScrollDirection self.disableDevAutoSave = initialDisableDevAutoSave From 41b66733149763583ea3175ea89bd13b22f6adf7 Mon Sep 17 00:00:00 2001 From: Peechey <92683202+Peechey@users.noreply.github.com> Date: Tue, 18 Nov 2025 00:49:39 -0600 Subject: [PATCH 3/5] comments, whitespace --- src/Classes/ItemsTab.lua | 5 ++--- src/Modules/Main.lua | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Classes/ItemsTab.lua b/src/Classes/ItemsTab.lua index 406c9b324e..a2d9f58c26 100644 --- a/src/Classes/ItemsTab.lua +++ b/src/Classes/ItemsTab.lua @@ -1549,9 +1549,8 @@ local function copyAnointsAndEldritchImplicits(self, newItem) newItem.enchantModLines = currentAnoint end end - - -- if the new item is a Normal, Magic, or Rare Helmet, Body Armour, Gloves, or Boots and does not have any eldritch implicits nor any other influence - -- and your current respective item does, apply those implicits and influence to the new item + -- if the new item is a Normal, Magic, or Rare Helmet, Body Armour, Gloves, or Boots and does not have any influence + -- and your current respective item has Eater and/or Exarch, apply those implicits and influence to the new item local implicitBaseTypes = { "Helmet", "Body Armour", "Gloves", "Boots" } local implicitRarities = { "NORMAL", "MAGIC", "RARE" } for _, influence in ipairs(itemLib.influenceInfo.default) do diff --git a/src/Modules/Main.lua b/src/Modules/Main.lua index 74c3de6f42..7b37cd55c1 100644 --- a/src/Modules/Main.lua +++ b/src/Modules/Main.lua @@ -1036,7 +1036,6 @@ function main:OpenOptionsPopup() end) controls.slotOnlyTooltips.state = self.slotOnlyTooltips - nextRow() controls.migrateEldritchImplicits = new("CheckBoxControl", { "TOPLEFT", nil, "TOPLEFT" }, { defaultLabelPlacementX, currentY, 20 }, "^7Copy Eldritch Implicits onto Display Item:", function(state) self.migrateEldritchImplicits = state From d776bb60b760d45478dc03cc836698c46eb500c7 Mon Sep 17 00:00:00 2001 From: Peechey <92683202+Peechey@users.noreply.github.com> Date: Tue, 18 Nov 2025 01:03:57 -0600 Subject: [PATCH 4/5] nil checks, update to check for newItem base implicits, wording on toggle tooltip --- src/Classes/ItemsTab.lua | 59 +++++++++++++++++++++------------------- src/Modules/Main.lua | 2 +- 2 files changed, 32 insertions(+), 29 deletions(-) diff --git a/src/Classes/ItemsTab.lua b/src/Classes/ItemsTab.lua index a2d9f58c26..27bbb03d03 100644 --- a/src/Classes/ItemsTab.lua +++ b/src/Classes/ItemsTab.lua @@ -1539,34 +1539,37 @@ function ItemsTabClass:DeleteItem(item, deferUndoState) end local function copyAnointsAndEldritchImplicits(self, newItem) - local currentItem = self.items[self.activeItemSet[newItem.base.type].selItemId] - -- if you don't have an equipped item that matches the type of the newItem, no need to do anything - if currentItem then - -- if the new item is an amulet and does not have an anoint and your current amulet does, apply that anoint to the new item - if newItem.base.type == "Amulet" and #newItem.enchantModLines == 0 then - local currentAnoint = currentItem.enchantModLines - if currentAnoint and #currentAnoint == 1 then -- skip if amulet has more than one anoint e.g. Stranglegasp - newItem.enchantModLines = currentAnoint - end - end - -- if the new item is a Normal, Magic, or Rare Helmet, Body Armour, Gloves, or Boots and does not have any influence - -- and your current respective item has Eater and/or Exarch, apply those implicits and influence to the new item - local implicitBaseTypes = { "Helmet", "Body Armour", "Gloves", "Boots" } - local implicitRarities = { "NORMAL", "MAGIC", "RARE" } - for _, influence in ipairs(itemLib.influenceInfo.default) do - if newItem[influence.key] then - return - end - end - if main.migrateEldritchImplicits and isValueInTable(implicitBaseTypes, newItem.base.type) and isValueInTable(implicitRarities, newItem.rarity) and (currentItem.cleansing or currentItem.tangle) then - local currentImplicits = currentItem.implicitModLines - if currentImplicits then - newItem.implicitModLines = currentImplicits - newItem.tangle = currentItem.tangle - newItem.cleansing = currentItem.cleansing - end - end - newItem:BuildAndParseRaw() + if newItem.base and self.activeItemSet[newItem.base.type] then + local currentItem = self.activeItemSet[newItem.base.type].selItemId and self.items[self.activeItemSet[newItem.base.type].selItemId] + -- if you don't have an equipped item that matches the type of the newItem, no need to do anything + if currentItem then + -- if the new item is an amulet and does not have an anoint and your current amulet does, apply that anoint to the new item + if newItem.base.type == "Amulet" and #newItem.enchantModLines == 0 then + local currentAnoint = currentItem.enchantModLines + if currentAnoint and #currentAnoint == 1 then -- skip if amulet has more than one anoint e.g. Stranglegasp + newItem.enchantModLines = currentAnoint + end + end + -- if the new item is a Normal, Magic, or Rare Helmet, Body Armour, Gloves, or Boots and does not have any influence + -- and your current respective item has Eater and/or Exarch, apply those implicits and influence to the new item + local implicitBaseTypes = { "Helmet", "Body Armour", "Gloves", "Boots" } + local implicitRarities = { "NORMAL", "MAGIC", "RARE" } + for _, influence in ipairs(itemLib.influenceInfo.default) do + if newItem[influence.key] then + return + end + end + if main.migrateEldritchImplicits and isValueInTable(implicitBaseTypes, newItem.base.type) and isValueInTable(implicitRarities, newItem.rarity) + and #newItem.implicitModLines == 0 and (currentItem.cleansing or currentItem.tangle) then + local currentImplicits = currentItem.implicitModLines + if currentImplicits then + newItem.implicitModLines = currentImplicits + newItem.tangle = currentItem.tangle + newItem.cleansing = currentItem.cleansing + end + end + newItem:BuildAndParseRaw() + end end end diff --git a/src/Modules/Main.lua b/src/Modules/Main.lua index 7b37cd55c1..b632a0abe3 100644 --- a/src/Modules/Main.lua +++ b/src/Modules/Main.lua @@ -1040,7 +1040,7 @@ function main:OpenOptionsPopup() controls.migrateEldritchImplicits = new("CheckBoxControl", { "TOPLEFT", nil, "TOPLEFT" }, { defaultLabelPlacementX, currentY, 20 }, "^7Copy Eldritch Implicits onto Display Item:", function(state) self.migrateEldritchImplicits = state end) - controls.migrateEldritchImplicits.tooltipText = "Carry over Eldritch Implicits from current gear when comparing new gear, given the new item does not already have Eldritch Implicits" + controls.migrateEldritchImplicits.tooltipText = "Apply Eldritch Implicits from current gear when comparing new gear, given the new item doesn't have any influence" controls.migrateEldritchImplicits.state = self.migrateEldritchImplicits nextRow() From c9802101c65b7513e74cbc6e3d916b32467bc94f Mon Sep 17 00:00:00 2001 From: Peechey <92683202+Peechey@users.noreply.github.com> Date: Tue, 18 Nov 2025 08:35:05 -0600 Subject: [PATCH 5/5] update for corrupted newItem --- src/Classes/ItemsTab.lua | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/Classes/ItemsTab.lua b/src/Classes/ItemsTab.lua index 27bbb03d03..af448a7cda 100644 --- a/src/Classes/ItemsTab.lua +++ b/src/Classes/ItemsTab.lua @@ -1550,23 +1550,20 @@ local function copyAnointsAndEldritchImplicits(self, newItem) newItem.enchantModLines = currentAnoint end end - -- if the new item is a Normal, Magic, or Rare Helmet, Body Armour, Gloves, or Boots and does not have any influence - -- and your current respective item has Eater and/or Exarch, apply those implicits and influence to the new item - local implicitBaseTypes = { "Helmet", "Body Armour", "Gloves", "Boots" } - local implicitRarities = { "NORMAL", "MAGIC", "RARE" } + -- if the new item is a non-corrupted Normal, Magic, or Rare Helmet, Body Armour, Gloves, or Boots and does not have any influence + -- and your current respective item is Eater and/or Exarch, apply those implicits and influence to the new item + local eldritchBaseTypes = { "Helmet", "Body Armour", "Gloves", "Boots" } + local eldritchRarities = { "NORMAL", "MAGIC", "RARE" } for _, influence in ipairs(itemLib.influenceInfo.default) do if newItem[influence.key] then return end end - if main.migrateEldritchImplicits and isValueInTable(implicitBaseTypes, newItem.base.type) and isValueInTable(implicitRarities, newItem.rarity) - and #newItem.implicitModLines == 0 and (currentItem.cleansing or currentItem.tangle) then - local currentImplicits = currentItem.implicitModLines - if currentImplicits then - newItem.implicitModLines = currentImplicits - newItem.tangle = currentItem.tangle - newItem.cleansing = currentItem.cleansing - end + if main.migrateEldritchImplicits and isValueInTable(eldritchBaseTypes, newItem.base.type) and isValueInTable(eldritchRarities, newItem.rarity) + and #newItem.implicitModLines == 0 and not newItem.corrupted and (currentItem.cleansing or currentItem.tangle) and currentItem.implicitModLines then + newItem.implicitModLines = currentItem.implicitModLines + newItem.tangle = currentItem.tangle + newItem.cleansing = currentItem.cleansing end newItem:BuildAndParseRaw() end