Skip to content

Fix node power cache sharing results across radius jewel contexts - #10575

Open
ArtemNA wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
ArtemNA:fix/power-cache-radius-jewels
Open

ArtemNA wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
ArtemNA:fix/power-cache-radius-jewels

Conversation

@ArtemNA

@ArtemNA ArtemNA commented Nov 25, 2026 •

Copy link
Copy Markdown

Description of the problem being solved:

PowerBuilder caches each calculation by node.modKey. Nodes with the same stats share a modKey, but radius jewels such as The Light of Meaning apply their effects by node position, so two such nodes can be worth different amounts. Whichever of them was calculated first decided the heat map colour and Power Report value for all of them. That order comes from pairs(), so the result could also change between launches. The hover tooltip was not affected, since it recalculates the specific node.

The cache key now also lists the radius jewels that reach the node. Nodes outside every radius still share one calculation, so the extra cost is small: 37 more calculations on top of 2072 in the build I tested. Masteries keep the old key, since radius jewel functions skip them.

Steps taken to verify a working solution:

  • Ran a headless script that calculates every node on its own, without the cache, and compares the result with node.power after PowerBuilder.
  • Build with The Light of Meaning, Offence/Defence mode: 57 of 2315 nodes differed before the fix, 0 after. Life mode and a second build without such jewels: 0 differences both before and after.
  • Checked in the app: nodes inside the jewel radius now match their hover tooltip, and the heat map stays the same after restarting.

Link to a build that showcases this PR:

https://pobb.in/FYMDI56vOBXC

Before screenshot:

pob-heat-map

The same build open in two windows of 2.69.0. The marked node inside the jewel radius has power in one window and none in the other.

PowerBuilder cached each calculation by node.modKey. Nodes with the same
stats share a modKey, but radius jewels (e.g. The Light of Meaning) apply
their functions by node position, so such twins can be worth different
amounts. Whichever twin was calculated first decided the heat map colour
and Power Report value for all of them, and since that order comes from
pairs(), it could change between launches.

The cache key now also lists the radius jewels that reach the node.
Twins outside every radius still share one calculation.
@ArtemNA
ArtemNA marked this pull request as ready for review November 25, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant