Skip to content

Commit 66cbc36

Browse files
justjuanguijustjuangui
authored andcommitted
Add 0.3 Passive tree (PathOfBuildingCommunity#1234)
* Add 0.3 Passive tree * Fix Live Target Version --------- Co-authored-by: justjuangui <servicios@juacarvajal.com>
1 parent e6f479e commit 66cbc36

File tree

64 files changed

+108145
-38
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+108145
-38
lines changed

src/Classes/PassiveTreeView.lua

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,20 +1076,24 @@ function PassiveTreeViewClass:DoesNodeMatchSearchParams(node)
10761076
end
10771077

10781078
-- Check node description
1079-
for index, line in ipairs(node.sd) do
1080-
-- Check display text first
1081-
err, needMatches = PCall(search, line:lower(), needMatches)
1082-
if err then return false end
1083-
if #needMatches == 0 then
1084-
return true
1085-
end
1086-
if #needMatches > 0 and node.mods[index].list then
1087-
-- Then check modifiers
1088-
for _, mod in ipairs(node.mods[index].list) do
1089-
err, needMatches = PCall(search, mod.name, needMatches)
1090-
if err then return false end
1091-
if #needMatches == 0 then
1092-
return true
1079+
if not node.sd then
1080+
ConPrintf("Node %d has no sd", node.id)
1081+
else
1082+
for index, line in ipairs(node.sd) do
1083+
-- Check display text first
1084+
err, needMatches = PCall(search, line:lower(), needMatches)
1085+
if err then return false end
1086+
if #needMatches == 0 then
1087+
return true
1088+
end
1089+
if #needMatches > 0 and node.mods[index].list then
1090+
-- Then check modifiers
1091+
for _, mod in ipairs(node.mods[index].list) do
1092+
err, needMatches = PCall(search, mod.name, needMatches)
1093+
if err then return false end
1094+
if #needMatches == 0 then
1095+
return true
1096+
end
10931097
end
10941098
end
10951099
end
@@ -1342,7 +1346,10 @@ function PassiveTreeViewClass:AddNodeTooltip(tooltip, node, build, incSmallPassi
13421346
local mNode = copyTableSafe(node, true, true)
13431347

13441348
-- This stanza actives for both Mastery and non Mastery tooltips. Proof: add '"Blah "..' to addModInfoToTooltip
1345-
if mNode.sd[1] and not mNode.allMasteryOptions then
1349+
if not mNode.sd then
1350+
ConPrintf("Node %d has no sd", node.id)
1351+
end
1352+
if mNode.sd and mNode.sd[1] and not mNode.allMasteryOptions then
13461353
tooltip:AddLine(16, "")
13471354
local localSmallIncEffect = 0
13481355
if not mNode.isAttribute and (mNode.type == "Normal" or mNode.type == "Notable") and isNodeInARadius(node) then

src/Export/Scripts/passivetree.lua

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ local use4kIfPossible = false
275275
local idPassiveTree = 'Default'
276276
-- Find a way to get version
277277
local basePath = GetWorkDir() .. "/../TreeData/"
278-
local version = "0_2"
278+
local version = "0_3"
279279
local path = basePath .. version .. "/"
280280
local fileTree = path .. "tree.lua"
281281

@@ -441,43 +441,43 @@ local gBgLarge = uiImages[string.lower(uIArt.GroupBackgroundLarge)].path
441441
addToSheet(getSheet("group-background"), gBgLarge, "groupBackground", commonMetadata("PSGroupBackground3"))
442442

443443
printf("Getting PassiveFrame")
444-
local pFrameNormal = uiImages[string.lower(uIArt.PassiveFrameNormal)].path
444+
local pFrameNormal = uiImages[string.lower(uIArt.PassiveFrame.Normal)].path
445445
addToSheet(getSheet("group-background"), pFrameNormal, "frame", commonMetadata("PSSkillFrame"))
446446

447-
local pFrameActive = uiImages[string.lower(uIArt.PassiveFrameActive)].path
447+
local pFrameActive = uiImages[string.lower(uIArt.PassiveFrame.Active)].path
448448
addToSheet(getSheet("group-background"), pFrameActive, "frame", commonMetadata("PSSkillFrameActive"))
449449

450-
local pFrameCanAllocate = uiImages[string.lower(uIArt.PassiveFrameCanAllocate)].path
450+
local pFrameCanAllocate = uiImages[string.lower(uIArt.PassiveFrame.CanAllocate)].path
451451
addToSheet(getSheet("group-background"), pFrameCanAllocate, "frame", commonMetadata("PSSkillFrameHighlighted"))
452452

453453
printf("Getting KeystoneFrame")
454-
local kFrameNormal = uiImages[string.lower(uIArt.KeystoneFrameNormal)].path
454+
local kFrameNormal = uiImages[string.lower(uIArt.KeystoneFrame.Normal)].path
455455
addToSheet(getSheet("group-background"), kFrameNormal, "frame", commonMetadata("KeystoneFrameUnallocated"))
456456

457-
local kFrameActive = uiImages[string.lower(uIArt.KeystoneFrameActive)].path
457+
local kFrameActive = uiImages[string.lower(uIArt.KeystoneFrame.Active)].path
458458
addToSheet(getSheet("group-background"), kFrameActive, "frame", commonMetadata("KeystoneFrameAllocated"))
459459

460-
local kFrameCanAllocate = uiImages[string.lower(uIArt.KeystoneFrameCanAllocate)].path
460+
local kFrameCanAllocate = uiImages[string.lower(uIArt.KeystoneFrame.CanAllocate)].path
461461
addToSheet(getSheet("group-background"), kFrameCanAllocate, "frame", commonMetadata("KeystoneFrameCanAllocate"))
462462

463463
printf("Getting NotableFrame")
464-
local nFrameNormal = uiImages[string.lower(uIArt.NotableFrameNormal)].path
464+
local nFrameNormal = uiImages[string.lower(uIArt.NotableFrame.Normal)].path
465465
addToSheet(getSheet("group-background"), nFrameNormal, "frame", commonMetadata("NotableFrameUnallocated"))
466466

467-
local nFrameActive = uiImages[string.lower(uIArt.NotableFrameActive)].path
467+
local nFrameActive = uiImages[string.lower(uIArt.NotableFrame.Active)].path
468468
addToSheet(getSheet("group-background"), nFrameActive, "frame", commonMetadata("NotableFrameAllocated"))
469469

470-
local nFrameCanAllocate = uiImages[string.lower(uIArt.NotableFrameCanAllocate)].path
470+
local nFrameCanAllocate = uiImages[string.lower(uIArt.NotableFrame.CanAllocate)].path
471471
addToSheet(getSheet("group-background"), nFrameCanAllocate, "frame", commonMetadata("NotableFrameCanAllocate"))
472472

473473
printf("Getting GroupBackgroundBlank")
474-
local gBgSmallBlank = uiImages[string.lower(uIArt.GroupBackgroundSmallBlank)].path
474+
local gBgSmallBlank = uiImages[string.lower(uIArt.GroupBackgroundSmall)].path
475475
addToSheet(getSheet("group-background"), gBgSmallBlank, "groupBackground", commonMetadata("PSGroupBackgroundSmallBlank"))
476476

477-
local gBgMediumBlank = uiImages[string.lower(uIArt.GroupBackgroundMediumBlank)].path
477+
local gBgMediumBlank = uiImages[string.lower(uIArt.GroupBackgroundMedium)].path
478478
addToSheet(getSheet("group-background"), gBgMediumBlank, "groupBackground", commonMetadata("PSGroupBackgroundMediumBlank"))
479479

480-
local gBgLargeBlank = uiImages[string.lower(uIArt.GroupBackgroundLargeBlank)].path
480+
local gBgLargeBlank = uiImages[string.lower(uIArt.GroupBackgroundLarge)].path
481481
addToSheet(getSheet("group-background"), gBgLargeBlank, "groupBackground", commonMetadata("PSGroupBackgroundLargeBlank"))
482482

483483
printf("Getting JewelSocketFrame")
@@ -665,7 +665,7 @@ for i, classId in ipairs(psg.passives) do
665665

666666
local ascendancies = dat("ascendancy"):GetRowList("Class", character)
667667
for k, ascendency in ipairs(ascendancies) do
668-
if ascendency.Name:find(ignoreFilter) ~= nil or ascendency.isDisabled then
668+
if ascendency.Name:find(ignoreFilter) ~= nil or ascendency.isDisabled or ascendency.Id == "Witch3b" then
669669
printf("Ignoring ascendency " .. ascendency.Name .. " for class " .. character.Name)
670670
goto continue3
671671
end
@@ -779,6 +779,7 @@ for i, group in ipairs(psg.groups) do
779779
printf("Ignoring passive skill " .. passiveRow.Name)
780780
goto exitNode
781781
end
782+
printf("Passive skill " .. passiveRow.Name .. "(id: " .. passiveRow.Id .. ") found")
782783
node["name"] = escapeGGGString(passiveRow.Name)
783784
node["icon"] = passiveRow.Icon
784785
if passiveRow.Keystone then
@@ -814,16 +815,16 @@ for i, group in ipairs(psg.groups) do
814815
if passiveRow.JewelSocket then
815816
node["containJewelSocket"] = true
816817

817-
local uioverride = dat("passivenodeuiartoverride"):GetRow("Id", passiveRow.Id)
818+
local uioverride = dat("passiveskilltreenodeframeart"):GetRow("Id", "LichAscendancyJewel")
818819

819820
if uioverride then
820-
local uiSocketNormal = uiImages[string.lower(uioverride.SocketNormal)]
821+
local uiSocketNormal = uiImages[string.lower(uioverride.Normal)]
821822
addToSheet(getSheet("group-background"), uiSocketNormal.path, "frame", commonMetadata(nil))
822823

823-
local uiSocketActive = uiImages[string.lower(uioverride.SocketActive)]
824+
local uiSocketActive = uiImages[string.lower(uioverride.Active)]
824825
addToSheet(getSheet("group-background"), uiSocketActive.path, "frame", commonMetadata(nil))
825826

826-
local uiSocketCanAllocate = uiImages[string.lower(uioverride.SocketCanAllocate)]
827+
local uiSocketCanAllocate = uiImages[string.lower(uioverride.CanAllocate)]
827828
addToSheet(getSheet("group-background"), uiSocketCanAllocate.path, "frame", commonMetadata(nil))
828829

829830
node.jewelOverlay = {
@@ -879,10 +880,10 @@ for i, group in ipairs(psg.groups) do
879880

880881
-- support for images
881882
if passiveRow.MasteryGroup ~= nil then
882-
node["activeEffectImage"] = passiveRow.MasteryGroup.Background
883+
node["activeEffectImage"] = passiveRow.MasteryGroup.MasteryArt.Effect
883884

884-
local uiEffect = uiImages[string.lower(passiveRow.MasteryGroup.Background)]
885-
addToSheet(getSheet("mastery-active-effect"), uiEffect.path, "masteryActiveEffect", commonMetadata(passiveRow.MasteryGroup.Background))
885+
local uiEffect = uiImages[string.lower(passiveRow.MasteryGroup.MasteryArt.Effect)]
886+
addToSheet(getSheet("mastery-active-effect"), uiEffect.path, "masteryActiveEffect", commonMetadata(passiveRow.MasteryGroup.MasteryArt.Effect))
886887
end
887888

888889
-- if the passive is "Attribute" we are going to add values
@@ -1107,10 +1108,16 @@ for i, classId in ipairs(psg.passives) do
11071108
local j = 1
11081109
for _, class in ipairs(classes) do
11091110
for _, ascendancy in ipairs(class.ascendancies) do
1111+
printf("Positioning ascendancy " .. ascendancy.name .. " for class " .. class.name)
11101112
local info = ascendancyGroups[ascendancy.id]
1113+
if info == nil then
1114+
printf("Ascendancy group " .. ascendancy.id .. " not found")
1115+
goto continuepositioning
1116+
end
11111117
local ascendancyNode = tree.nodes[info.startId]
11121118
if ascendancyNode == nil then
11131119
printf("Ascendancy node " .. ascendancy.id .. " not found")
1120+
goto continuepositioning
11141121
end
11151122
local groupAscendancy = tree.groups[ascendancyNode.group]
11161123

@@ -1149,6 +1156,7 @@ for i, classId in ipairs(psg.passives) do
11491156
end
11501157
end
11511158
j = j + 1
1159+
:: continuepositioning ::
11521160
end
11531161
end
11541162
end

src/GameVersions.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
---Default target version for unknown builds and builds created before 3.0.0.
33
legacyTargetVersion = "0_0"
44
---Default target for new builds and target to convert legacy builds to.
5-
liveTargetVersion = "0_1"
5+
liveTargetVersion = "0_3"
66

77
-- Skill tree versions
88
---Added for convenient indexing of skill tree versions.
99
---@type string[]
10-
treeVersionList = { "0_1", "0_2" }
10+
treeVersionList = { "0_1", "0_2", "0_3" }
1111
--- Always points to the latest skill tree version.
1212
latestTreeVersion = treeVersionList[#treeVersionList]
1313
---Tree version where multiple skill trees per build were introduced to PoBC.
@@ -23,4 +23,8 @@ treeVersions = {
2323
display = "0_2",
2424
num = 0.2,
2525
},
26+
["0_3"] = {
27+
display = "0_3",
28+
num = 0.3,
29+
},
2630
}
31.8 MB
Binary file not shown.
2.69 MB
Binary file not shown.
232 KB
Binary file not shown.
19.7 KB
Binary file not shown.
113 KB
Binary file not shown.
31.9 KB
Binary file not shown.
62.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)