Skip to content

Abyss timeless jewels: two-line passives with the same roll range show one roll on both lines #10432

Open

Description

@adam-solvedexile

What happens

For Abyss timeless jewels (Destructive Aspiration, Reclaimed Malevolence, etc.), a conquered passive with two lines that share the same roll range shows the same rolled value on both lines, even when the jewel rolled them differently. Which of the two rolls is shown depends on Lua table iteration order, so it can differ between PoB sessions.

Affected legion entries at current dev:

  • abyss_ghastly_small_attribute35 and abyss_special_small_attribute35: "Minions have (2-3)% increased Attack Speed" / "Minions have (2-3)% increased Cast Speed"
  • vaal_notable_dodge_1: "(8-10)% chance to Avoid Elemental Ailments" / "(8-10)% chance to Avoid being Stunned"
  • kalguur_notable_22: "20% faster Restoration of Ward" / "20% faster start of Energy Shield Recharge" (fixed text, replaced through the min ~= value branch)

Steps:

  1. Socket Destructive Aspiration with a seed and socket where a small passive becomes the Minion Attack/Cast Speed node, with different rolls for the two stats (e.g. 2% and 3%). The Timeless Jewel search window shows the two rolls separately.
  2. Hover the passive on the tree.

Expected: "Minions have 2% increased Attack Speed" and "Minions have 3% increased Cast Speed" (each line uses its own roll).
Actual: both lines show the same value (2% and 2%, or 3% and 3%), and the calculation uses that value for both.

Cause

For each output line, the code loops over all stats of the node with pairs() and applies each one's substitution to the line:

  • for statIndex, statLine in ipairs(changedNode.sd) do
    for statKey, statMod in pairs(changedNode.stats) do
    statLine = replaceHelperFunc(statLine, statKey, statMod, component.rolls[statMod.index])
    end
    self:NodeAdditionOrReplacementFromString(node, (replacesNode and "" or " \n") .. statLine, replacesNode and statIndex == 1)

replaceHelperFunc replaces the literal "(min-max)" text (or the fixed value):

  • local replaceHelperFunc = function(statToFix, statKey, statMod, value)
    if statMod.fmt == "g" then -- note the only one we actually care about is "Ritual of Flesh" life regen
    if statKey:find("per_minute") then
    value = round(value / 60, 1)
    elseif statKey:find("permyriad") then
    value = value / 100
    elseif statKey:find("_ms") then
    value = value / 1000
    end
    end
    --if statMod.fmt == "d" then -- only ever d or g, and we want both past here
    if statMod.min ~= statMod.max then
    return statToFix:gsub("%(" .. statMod.min .. "%-" .. statMod.max .. "%)", value)
    elseif statMod.min ~= value then -- only true for might/legacy of the vaal which can combine stats
    return statToFix:gsub(statMod.min, value)
    end
    return statToFix -- if it doesn't need to be changed
    end

When both stats have the same range text, whichever stat pairs() visits first fills the placeholder on every line, and the other roll is never used. The Glorious Vanity branch already picks one stat per line via sortedStats[i] (PassiveSpec.lua#L1313), and the Timeless Jewel search reads rolls by stat index with data.getAbyssJewelComponentRoll (TreeTab.lua#L2594-L2595). Only the tree conquest path has this problem.

Possible fix

In the Abyss branch, substitute only the stat that belongs to the line instead of looping over all stats:

for statIndex, statLine in ipairs(changedNode.sd) do
	local statKey = changedNode.sortedStats[statIndex]
	local statMod = changedNode.stats[statKey]
	statLine = replaceHelperFunc(statLine, statKey, statMod, component.rolls[statMod.index])
	...

(Check that sd and sortedStats are aligned for these entries. For kalguur_notable_22, index is the reverse of line order.) The additions loop at PassiveSpec.lua#L1351 uses the same pairs(addition.stats) pattern. It is harmless for single-stat additions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions