Skip to content

Commit abafbf7

Browse files
LocalIdentityLocalIdentityWires77
authored
Add 3.27 Skill Tree (#9068)
* Add 3.27 Skill Tree The new skill tree uses the old wildwood ascendancies data type so we'll need a way to filter just the Wildwood nodes out We also currently rely on assets from the 3.19 tree to draw the wildwood ascendancy art so would need to change it to use the sprite file for the bloodline ones * Use alphabetical order for bloodline ascendancies * Load Bloodline sprites * Count towards regular ascendancy points * Add back alt ascendancy dropdown * Remove legacy wildwood nodes from the tree * Use bloodline art assets from sprite sheet * Remove PNG assets and use web-p ones instead * Add ruthless tree, clean up unnecessary code * Update PoE Planner versions * ModCache --------- Co-authored-by: LocalIdentity <localidentity2@gmail.com> Co-authored-by: Wires77 <Wires77@users.noreply.github.com>
1 parent c608000 commit abafbf7

46 files changed

Lines changed: 211159 additions & 88 deletions

Some content is hidden

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

fix_ascendancy_positions.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ def __sub__(self, other: Point2D) -> Point2D:
4242
"Warden": Point2D(8250, 8350),
4343
"Primalist": Point2D(7200, 9400),
4444
"Warlock": Point2D(9300, 7300),
45+
"Aul": Point2D(-6750, 12000),
46+
"Breachlord": Point2D(-5250, 12000),
47+
"Catarina": Point2D(-3750, 12000),
48+
"Trialmaster": Point2D(-2250, 12000),
49+
"Delirious": Point2D(-750, 12000),
50+
"Farrul": Point2D(750, 12000),
51+
"Lycia": Point2D(2250, 12000),
52+
"KingInTheMists": Point2D(3750, 12000),
53+
"Olroth": Point2D(5250, 12000),
54+
"Oshabi": Point2D(6750, 12000),
4555
}
4656
EXTRA_NODES = {
4757
"Necromancer": [{"Node": {"name": "Nine Lives", "icon": "Art/2DArt/SkillIcons/passives/Ascendants/Int.png", "isNotable": True, "skill" : 27602},

src/Classes/PassiveSpec.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -735,10 +735,9 @@ function PassiveSpecClass:CountAllocNodes()
735735
if node.type ~= "ClassStart" and node.type ~= "AscendClassStart" then
736736
if node.ascendancyName then
737737
if not node.isMultipleChoiceOption then
738+
ascUsed = ascUsed + 1
738739
if self.tree.secondaryAscendNameMap and self.tree.secondaryAscendNameMap[node.ascendancyName] then
739740
secondaryAscUsed = secondaryAscUsed + 1
740-
else
741-
ascUsed = ascUsed + 1
742741
end
743742
end
744743
else

src/Classes/PassiveTree.lua

Lines changed: 101 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -122,27 +122,50 @@ local PassiveTreeClass = newClass("PassiveTree", function(self, treeVersion)
122122
end
123123
end
124124

125-
-- hide alternate_ascendancies as they are unobtainable in the newest versions and will cause a crash if an older version is loaded with it at the moment
125+
-- hide legacy alternate ascendancies that are no longer obtainable
126126
if self.alternate_ascendancies then
127-
if launch.devMode then
128-
ConPrintf("WARNING! alternate_ascendancies exist but are being hidden")
129-
end
130-
local tempMap = {}
131-
local temp_groups = {}
127+
local legacyAlternateAscendancyIds = {
128+
Warden = true,
129+
Warlock = true,
130+
Primalist = true,
131+
}
132+
local filteredAlternateAscendancies = { }
133+
local legacyAscMap = { }
132134
for ascendClassId, ascendClass in pairs(self.alternate_ascendancies) do
133-
tempMap[ascendClass.id] = true
135+
if legacyAlternateAscendancyIds[ascendClass.id] then
136+
legacyAscMap[ascendClass.id] = true
137+
else
138+
filteredAlternateAscendancies[ascendClassId] = ascendClass
139+
end
134140
end
135-
for i, node in pairs(self.nodes) do
136-
if node.ascendancyName and tempMap[node.ascendancyName] then
137-
self.nodes[i] = nil
138-
temp_groups[node.group] = true
141+
if next(legacyAscMap) then
142+
if launch.devMode then
143+
local removed = { }
144+
for id in pairs(legacyAscMap) do
145+
removed[#removed + 1] = id
146+
end
147+
table.sort(removed)
148+
ConPrintf("Removing legacy alternate ascendancies from tree: %s", table.concat(removed, ", "))
149+
end
150+
local temp_groups = {}
151+
for nodeId, node in pairs(self.nodes) do
152+
if node.ascendancyName and legacyAscMap[node.ascendancyName] then
153+
self.nodes[nodeId] = nil
154+
temp_groups[node.group] = true
155+
end
156+
end
157+
for groupId in pairs(temp_groups) do
158+
self.groups[groupId] = nil
159+
end
160+
for legacyId in pairs(legacyAscMap) do
161+
self.ascendNameMap[legacyId] = nil
139162
end
140163
end
141-
for i, group in pairs(temp_groups) do
142-
self.groups[i] = nil
164+
if next(filteredAlternateAscendancies) then
165+
self.alternate_ascendancies = filteredAlternateAscendancies
166+
else
167+
self.alternate_ascendancies = nil
143168
end
144-
145-
self.alternate_ascendancies = nil
146169
end
147170

148171
if self.alternate_ascendancies then
@@ -262,6 +285,64 @@ local PassiveTreeClass = newClass("PassiveTree", function(self, treeVersion)
262285
end
263286
end
264287

288+
local bloodlineSpriteTypes = {
289+
Trialmaster = "trialmasterBloodline",
290+
Oshabi = "oshabiBloodline",
291+
Olroth = "olrothBloodline",
292+
Lycia = "lyciaBloodline",
293+
KingInTheMists = "kingInTheMistsBloodline",
294+
Farrul = "farrulBloodline",
295+
Delirious = "deliriousBloodline",
296+
Catarina = "catarinaBloodline",
297+
Breachlord = "breachlordBloodline",
298+
Aul = "aulBloodline",
299+
Azmeri = "azmeriBloodline",
300+
}
301+
local bloodlineAssetNames = {
302+
"AscendancyButton",
303+
"AscendancyButtonHighlight",
304+
"AscendancyButtonPressed",
305+
"AscendancyFrameLargeNormal",
306+
"AscendancyFrameLargeCanAllocate",
307+
"AscendancyFrameLargeAllocated",
308+
"AscendancyFrameSmallNormal",
309+
"AscendancyFrameSmallCanAllocate",
310+
"AscendancyFrameSmallAllocated",
311+
"AscendancyMiddle",
312+
}
313+
self.bloodlineSpritePrefixes = self.bloodlineSpritePrefixes or { }
314+
for ascendancyName, spriteType in pairs(bloodlineSpriteTypes) do
315+
local hasSprite = false
316+
for _, assetName in ipairs(bloodlineAssetNames) do
317+
local spriteSet = self.spriteMap[assetName]
318+
local spriteData = spriteSet and spriteSet[spriteType]
319+
if spriteData then
320+
self.assets[ascendancyName .. assetName] = spriteData
321+
hasSprite = true
322+
end
323+
end
324+
if hasSprite then
325+
self.bloodlineSpritePrefixes[ascendancyName] = ascendancyName
326+
end
327+
end
328+
329+
if self.alternate_ascendancies then
330+
-- Use the bloodline sprite sheets for the remaining alternate ascendancy emblems
331+
local legacyClasses = {
332+
ClassesPrimalist = true,
333+
ClassesWarlock = true,
334+
ClassesWarden = true,
335+
}
336+
for spriteName, spriteSet in pairs(self.spriteMap) do
337+
if spriteName:match("^Classes") and not legacyClasses[spriteName] and not self.assets[spriteName] then
338+
local _, sprite = next(spriteSet)
339+
if sprite then
340+
self.assets[spriteName] = sprite
341+
end
342+
end
343+
end
344+
end
345+
265346
-- Load legion sprite sheets and build sprite map
266347
local legionSprites = LoadModule("TreeData/legion/tree-legion.lua")
267348
for type, data in pairs(legionSprites) do
@@ -720,6 +801,11 @@ function PassiveTreeClass:ProcessNode(node)
720801
node.sprites = self.spriteMap["Art/2DArt/SkillIcons/passives/MasteryBlank.png"]
721802
end
722803
node.overlay = self.nodeOverlay[node.type]
804+
if node.ascendancyName then
805+
node.bloodlineOverlayPrefix = self.bloodlineSpritePrefixes and self.bloodlineSpritePrefixes[node.ascendancyName]
806+
else
807+
node.bloodlineOverlayPrefix = nil
808+
end
723809
if node.overlay then
724810
node.rsq = node.overlay.rsq
725811
node.size = node.overlay.size

src/Classes/PassiveTreeView.lua

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,11 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
483483
overlay = isAlloc and node.startArt or "PSStartNodeBackgroundInactive"
484484
elseif node.type == "AscendClassStart" then
485485
overlay = treeVersions[tree.treeVersion].num >= 3.10 and "AscendancyMiddle" or "PassiveSkillScreenAscendancyMiddle"
486-
if node.ascendancyName and tree.secondaryAscendNameMap and tree.secondaryAscendNameMap[node.ascendancyName] then
487-
overlay = "Azmeri"..overlay
486+
if node.ascendancyName then
487+
local prefix = tree.bloodlineSpritePrefixes and tree.bloodlineSpritePrefixes[node.ascendancyName]
488+
if prefix then
489+
overlay = prefix .. overlay
490+
end
488491
end
489492
else
490493
local state
@@ -561,9 +564,17 @@ function PassiveTreeViewClass:Draw(build, viewPort, inputEvents)
561564
effect = node.effectSprites["tattooActiveEffect"]
562565
end
563566
base = node.sprites[node.type:lower()..(isAlloc and "Active" or "Inactive")]
564-
overlay = node.overlay[state .. (node.ascendancyName and "Ascend" or "") .. (node.isBlighted and "Blighted" or "")]
565-
if node.ascendancyName and tree.secondaryAscendNameMap and tree.secondaryAscendNameMap[node.ascendancyName] then
566-
overlay = "Azmeri"..overlay
567+
local overlayKey = state .. (node.ascendancyName and "Ascend" or "") .. (node.isBlighted and "Blighted" or "")
568+
local overlayName = node.overlay[overlayKey]
569+
if node.ascendancyName then
570+
local prefix = node.bloodlineOverlayPrefix or (tree.bloodlineSpritePrefixes and tree.bloodlineSpritePrefixes[node.ascendancyName])
571+
if prefix and overlayName then
572+
overlay = prefix .. overlayName
573+
else
574+
overlay = overlayName
575+
end
576+
else
577+
overlay = overlayName
567578
end
568579
end
569580
end

0 commit comments

Comments
 (0)