From 969aa6759689e44c6ff44f72f0a6a70faec1760b Mon Sep 17 00:00:00 2001 From: MrHB212 Date: Mon, 19 Jan 2026 14:47:15 +0100 Subject: [PATCH 1/8] Update PassiveTreeView.lua --- src/Classes/PassiveTreeView.lua | 71 ++++++++++++++++++++++++++++----- 1 file changed, 60 insertions(+), 11 deletions(-) diff --git a/src/Classes/PassiveTreeView.lua b/src/Classes/PassiveTreeView.lua index e33df5675..d6baba576 100644 --- a/src/Classes/PassiveTreeView.lua +++ b/src/Classes/PassiveTreeView.lua @@ -194,6 +194,7 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents) local vX = curTreeX - node.x local vY = curTreeY - node.y if vX * vX + vY * vY <= node.rsq then + -- Zeigt Box wenn man auf node ist hoverNode = node break end @@ -623,11 +624,36 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents) DrawImageQuad(handle, unpack(connector.c)) end + + -- Draw the connecting lines between nodes SetDrawLayer(nil, 20) for _, connector in pairs(tree.connectors) do - renderConnector(connector) + local node2 = spec.nodes[connector.nodeId2] + if node2.unlockConstraint then + for _, nodeId in ipairs(node2.unlockConstraint.nodes) do + if nodeId and build.spec.nodes[nodeId].alloc then + renderConnector(connector) + end + end + else + renderConnector(connector) + end + end + + + + + + + + + + + + + for _, subGraph in pairs(spec.subGraphs) do for _, connector in pairs(subGraph.connectors) do renderConnector(connector) @@ -759,10 +785,19 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents) if node.activeEffectImage then effect = tree:GetAssetByName(node.activeEffectImage) end - - base = tree:GetAssetByName(node.icon) - - overlay = node.overlay[state] + --Zeichnet Rand und Kern + if node.unlockConstraint then + for _, nodeId in ipairs(node.unlockConstraint.nodes) do + if nodeId and build.spec.nodes[nodeId].alloc then + base = tree:GetAssetByName(node.icon) + overlay = node.overlay[state] + end + end + else + base = tree:GetAssetByName(node.icon) + overlay = node.overlay[state] + end + end end @@ -970,13 +1005,27 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents) end if node == hoverNode and (node.type ~= "Socket" or not IsKeyDown("SHIFT")) and not IsKeyDown("CTRL") and not main.popups[1] then -- Draw tooltip - SetDrawLayer(nil, 100) - local size = m_floor(node.size * scale) - if self.tooltip:CheckForUpdate(node, self.showStatDifferences, self.tracePath, launch.devModeAlt, build.outputRevision, build.spec.allocMode) then - self:AddNodeTooltip(self.tooltip, node, build, incSmallPassiveSkillEffect) + if node.unlockConstraint then + for _, nodeId in ipairs(node.unlockConstraint.nodes) do + if nodeId and build.spec.nodes[nodeId].alloc then + SetDrawLayer(nil, 100) + local size = m_floor(node.size * scale) + if self.tooltip:CheckForUpdate(node, self.showStatDifferences, self.tracePath, launch.devModeAlt, build.outputRevision, build.spec.allocMode) then + self:AddNodeTooltip(self.tooltip, node, build, incSmallPassiveSkillEffect) + end + self.tooltip.center = true + self.tooltip:Draw(m_floor(scrX - size), m_floor(scrY - size), size * 2, size * 2, viewPort) + end + end + else + SetDrawLayer(nil, 100) + local size = m_floor(node.size * scale) + if self.tooltip:CheckForUpdate(node, self.showStatDifferences, self.tracePath, launch.devModeAlt, build.outputRevision, build.spec.allocMode) then + self:AddNodeTooltip(self.tooltip, node, build, incSmallPassiveSkillEffect) + end + self.tooltip.center = true + self.tooltip:Draw(m_floor(scrX - size), m_floor(scrY - size), size * 2, size * 2, viewPort) end - self.tooltip.center = true - self.tooltip:Draw(m_floor(scrX - size), m_floor(scrY - size), size * 2, size * 2, viewPort) end end From 7d2df9b0a903dc33edcc5457a0f5a5d39b4de06b Mon Sep 17 00:00:00 2001 From: MrHB212 Date: Mon, 19 Jan 2026 15:36:54 +0100 Subject: [PATCH 2/8] implemented new function --- src/Classes/PassiveTreeView.lua | 71 +++++++++++++-------------------- 1 file changed, 28 insertions(+), 43 deletions(-) diff --git a/src/Classes/PassiveTreeView.lua b/src/Classes/PassiveTreeView.lua index d6baba576..f358e1981 100644 --- a/src/Classes/PassiveTreeView.lua +++ b/src/Classes/PassiveTreeView.lua @@ -624,36 +624,18 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents) DrawImageQuad(handle, unpack(connector.c)) end - - -- Draw the connecting lines between nodes SetDrawLayer(nil, 20) + for _, connector in pairs(tree.connectors) do local node2 = spec.nodes[connector.nodeId2] - if node2.unlockConstraint then - for _, nodeId in ipairs(node2.unlockConstraint.nodes) do - if nodeId and build.spec.nodes[nodeId].alloc then - renderConnector(connector) - end - end - else + if not node2.unlockConstraint then + renderConnector(connector) + elseif checkUnlockConstraints(build, node2) then renderConnector(connector) end - end - - - - - - - - - - - - for _, subGraph in pairs(spec.subGraphs) do for _, connector in pairs(subGraph.connectors) do renderConnector(connector) @@ -786,18 +768,13 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents) effect = tree:GetAssetByName(node.activeEffectImage) end --Zeichnet Rand und Kern - if node.unlockConstraint then - for _, nodeId in ipairs(node.unlockConstraint.nodes) do - if nodeId and build.spec.nodes[nodeId].alloc then - base = tree:GetAssetByName(node.icon) - overlay = node.overlay[state] - end - end - else + if not node.unlockConstraint then + base = tree:GetAssetByName(node.icon) + overlay = node.overlay[state] + elseif checkUnlockConstraints(build, node) then base = tree:GetAssetByName(node.icon) overlay = node.overlay[state] end - end end @@ -1005,19 +982,15 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents) end if node == hoverNode and (node.type ~= "Socket" or not IsKeyDown("SHIFT")) and not IsKeyDown("CTRL") and not main.popups[1] then -- Draw tooltip - if node.unlockConstraint then - for _, nodeId in ipairs(node.unlockConstraint.nodes) do - if nodeId and build.spec.nodes[nodeId].alloc then - SetDrawLayer(nil, 100) - local size = m_floor(node.size * scale) - if self.tooltip:CheckForUpdate(node, self.showStatDifferences, self.tracePath, launch.devModeAlt, build.outputRevision, build.spec.allocMode) then - self:AddNodeTooltip(self.tooltip, node, build, incSmallPassiveSkillEffect) - end - self.tooltip.center = true - self.tooltip:Draw(m_floor(scrX - size), m_floor(scrY - size), size * 2, size * 2, viewPort) - end + if not node.unlockConstraint then + SetDrawLayer(nil, 100) + local size = m_floor(node.size * scale) + if self.tooltip:CheckForUpdate(node, self.showStatDifferences, self.tracePath, launch.devModeAlt, build.outputRevision, build.spec.allocMode) then + self:AddNodeTooltip(self.tooltip, node, build, incSmallPassiveSkillEffect) end - else + self.tooltip.center = true + self.tooltip:Draw(m_floor(scrX - size), m_floor(scrY - size), size * 2, size * 2, viewPort) + elseif checkUnlockConstraints(build, node) then SetDrawLayer(nil, 100) local size = m_floor(node.size * scale) if self.tooltip:CheckForUpdate(node, self.showStatDifferences, self.tracePath, launch.devModeAlt, build.outputRevision, build.spec.allocMode) then @@ -1834,4 +1807,16 @@ function PassiveTreeViewClass:LessLuminance() local newA = a * alphaFactor; SetDrawColor(newR, newG, newB, newA) +end + +-- Checks if a node has unlockConstraint and if that node is allocated +function checkUnlockConstraints(build, node) + if node.unlockConstraint then + for _, nodeId in ipairs(node.unlockConstraint.nodes) do + if nodeId and not build.spec.nodes[nodeId].alloc then + return false + end + end + end + return true end \ No newline at end of file From 4ac506ffd3f662cc1dd7151f3e424863f2c528cf Mon Sep 17 00:00:00 2001 From: MrHB212 Date: Mon, 19 Jan 2026 15:43:05 +0100 Subject: [PATCH 3/8] hiding images from tree --- src/Classes/PassiveTreeView.lua | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Classes/PassiveTreeView.lua b/src/Classes/PassiveTreeView.lua index f358e1981..01d47a70f 100644 --- a/src/Classes/PassiveTreeView.lua +++ b/src/Classes/PassiveTreeView.lua @@ -759,13 +759,20 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents) end elseif node.type == "OnlyImage" then -- This is the icon that appears in the center of many groups - base = tree:GetAssetByName(node.activeEffectImage) - + if not node.unlockConstraint then + base = tree:GetAssetByName(node.activeEffectImage) + elseif checkUnlockConstraints(build, node) then + base = tree:GetAssetByName(node.activeEffectImage) + end SetDrawLayer(nil, 15) else -- Normal node (includes keystones and notables) if node.activeEffectImage then - effect = tree:GetAssetByName(node.activeEffectImage) + if not node.unlockConstraint then + effect = tree:GetAssetByName(node.activeEffectImage) + elseif checkUnlockConstraints(build, node) then + effect = tree:GetAssetByName(node.activeEffectImage) + end end --Zeichnet Rand und Kern if not node.unlockConstraint then From 15ece683718d2e649f25d5ea33d3f1272ddd9312 Mon Sep 17 00:00:00 2001 From: MrHB212 Date: Mon, 19 Jan 2026 15:49:08 +0100 Subject: [PATCH 4/8] for connection now check both nodes there was at least one node connection that wasnt hidden properly. --- src/Classes/PassiveTreeView.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Classes/PassiveTreeView.lua b/src/Classes/PassiveTreeView.lua index 01d47a70f..b728db019 100644 --- a/src/Classes/PassiveTreeView.lua +++ b/src/Classes/PassiveTreeView.lua @@ -628,10 +628,11 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents) SetDrawLayer(nil, 20) for _, connector in pairs(tree.connectors) do + local node1 = spec.nodes[connector.nodeId1] local node2 = spec.nodes[connector.nodeId2] - if not node2.unlockConstraint then + if not node1.unlockConstraint and not node2.unlockConstraint then renderConnector(connector) - elseif checkUnlockConstraints(build, node2) then + elseif checkUnlockConstraints(build, node1) and checkUnlockConstraints(build, node2) then renderConnector(connector) end end From e820284dc62ba44bec2fa82d31e0c04a38c0749c Mon Sep 17 00:00:00 2001 From: MrHB212 Date: Mon, 19 Jan 2026 15:52:42 +0100 Subject: [PATCH 5/8] comments --- src/Classes/PassiveTreeView.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Classes/PassiveTreeView.lua b/src/Classes/PassiveTreeView.lua index b728db019..8e6396392 100644 --- a/src/Classes/PassiveTreeView.lua +++ b/src/Classes/PassiveTreeView.lua @@ -768,6 +768,7 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents) SetDrawLayer(nil, 15) else -- Normal node (includes keystones and notables) + -- draws image below notables which light up when allocated if node.activeEffectImage then if not node.unlockConstraint then effect = tree:GetAssetByName(node.activeEffectImage) @@ -775,7 +776,7 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents) effect = tree:GetAssetByName(node.activeEffectImage) end end - --Zeichnet Rand und Kern + --draws node image and border if not node.unlockConstraint then base = tree:GetAssetByName(node.icon) overlay = node.overlay[state] From a902cf0bae4a8c666d4830dfa4a701540c267d5b Mon Sep 17 00:00:00 2001 From: MrHB212 Date: Tue, 20 Jan 2026 12:56:09 +0100 Subject: [PATCH 6/8] comment --- src/Classes/PassiveTreeView.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Classes/PassiveTreeView.lua b/src/Classes/PassiveTreeView.lua index 8e6396392..320511b7f 100644 --- a/src/Classes/PassiveTreeView.lua +++ b/src/Classes/PassiveTreeView.lua @@ -194,7 +194,6 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents) local vX = curTreeX - node.x local vY = curTreeY - node.y if vX * vX + vY * vY <= node.rsq then - -- Zeigt Box wenn man auf node ist hoverNode = node break end From 12901c72c07a91e9da0574997bff9d83f52bfaa5 Mon Sep 17 00:00:00 2001 From: MrHB212 Date: Sat, 28 Feb 2026 22:46:02 +0100 Subject: [PATCH 7/8] display unseen path nodes in green when unallocated and hovered over --- src/Classes/PassiveTreeView.lua | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/Classes/PassiveTreeView.lua b/src/Classes/PassiveTreeView.lua index 320511b7f..118c64afe 100644 --- a/src/Classes/PassiveTreeView.lua +++ b/src/Classes/PassiveTreeView.lua @@ -13,6 +13,9 @@ local m_max = math.max local m_floor = math.floor local band = AND64 -- bit.band local b_rshift = bit.rshift +--This variable is used to display the Unseen Path nodes in green when unallocated and hovered over +--When true the checkUnlockConstraint function will return true for the check +local unseenPathHover = false local PassiveTreeViewClass = newClass("PassiveTreeView", function(self) self.ring = NewImageHandle() @@ -195,7 +198,12 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents) local vY = curTreeY - node.y if vX * vX + vY * vY <= node.rsq then hoverNode = node + if hoverNode.id == 5571 and not hoverNode.alloc then + unseenPathHover = true + end break + else + unseenPathHover = false end end end @@ -611,7 +619,13 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents) connector.c[5], connector.c[6] = treeToScreen(vert[5], vert[6]) connector.c[7], connector.c[8] = treeToScreen(vert[7], vert[8]) - if hoverDep and hoverDep[node1] and hoverDep[node2] then + if hoverNode and hoverNode.id == 5571 and hoverDep and (hoverDep[node1] or hoverDep[node2]) and not hoverNode.alloc then + --Used to display Unseen Path nodes green when unallocated and hovered over + setConnectorColor(0, 1, 0) + elseif hoverDep and (hoverDep[node1] or hoverDep[node2]) and hoverNode.id == 5571 and not hoverNode.isAlloc then + --Used to display Unseen Path nodes red when allocated and hovered over node + setConnectorColor(1, 0, 0) + elseif hoverDep and hoverDep[node1] and hoverDep[node2] then -- Both nodes depend on the node currently being hovered over, so color the line red setConnectorColor(1, 0, 0) elseif connector.ascendancyName and connector.ascendancyName ~= spec.curAscendClassBaseName then @@ -911,7 +925,9 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents) if node.type ~= "ClassStart" and node.type ~= "AscendClassStart" then if hoverNode and hoverNode ~= node then -- Mouse is hovering over a different node - if hoverDep and hoverDep[node] then + if hoverDep and hoverDep[node] and hoverNode.id == 5571 and not hoverNode.alloc then + SetDrawColor(0, 1, 0) + elseif hoverDep and hoverDep[node] then -- This node depends on the hover node, turn it red SetDrawColor(1, 0, 0) elseif hoverNode.type == "Socket" and hoverNode.nodesInRadius then @@ -1819,6 +1835,9 @@ end -- Checks if a node has unlockConstraint and if that node is allocated function checkUnlockConstraints(build, node) + if unseenPathHover and node.unlockConstraint and node.unlockConstraint.nodes[1] == 5571 then + return true + end if node.unlockConstraint then for _, nodeId in ipairs(node.unlockConstraint.nodes) do if nodeId and not build.spec.nodes[nodeId].alloc then From 98f9d8077c01197a1d6b92fe75f5a30f4fa3e718 Mon Sep 17 00:00:00 2001 From: MrHB212 Date: Sat, 28 Feb 2026 22:48:22 +0100 Subject: [PATCH 8/8] fix ascendancy connector coloring --- src/Classes/PassiveTreeView.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Classes/PassiveTreeView.lua b/src/Classes/PassiveTreeView.lua index 118c64afe..fa8e60a25 100644 --- a/src/Classes/PassiveTreeView.lua +++ b/src/Classes/PassiveTreeView.lua @@ -619,10 +619,10 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents) connector.c[5], connector.c[6] = treeToScreen(vert[5], vert[6]) connector.c[7], connector.c[8] = treeToScreen(vert[7], vert[8]) - if hoverNode and hoverNode.id == 5571 and hoverDep and (hoverDep[node1] or hoverDep[node2]) and not hoverNode.alloc then + if hoverNode and hoverNode.id == 5571 and hoverDep and (hoverDep[node1] or hoverDep[node2]) and not hoverNode.alloc and not connector.ascendancyName then --Used to display Unseen Path nodes green when unallocated and hovered over setConnectorColor(0, 1, 0) - elseif hoverDep and (hoverDep[node1] or hoverDep[node2]) and hoverNode.id == 5571 and not hoverNode.isAlloc then + elseif hoverDep and (hoverDep[node1] or hoverDep[node2]) and hoverNode.id == 5571 and not hoverNode.isAlloc and not connector.ascendancyName then --Used to display Unseen Path nodes red when allocated and hovered over node setConnectorColor(1, 0, 0) elseif hoverDep and hoverDep[node1] and hoverDep[node2] then