Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Classes/ItemsTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,7 @@ end

-- Returns the slot control and equipped jewel for the given node ID
function ItemsTabClass:GetSocketAndJewelForNodeID(nodeId)
return self.sockets[nodeId], self.items[self.sockets[nodeId].selItemId]
return self.sockets[nodeId], self.sockets[nodeId] and self.items[self.sockets[nodeId].selItemId] or nil
end

-- Adds the given item to the build's item list
Expand Down
1 change: 1 addition & 0 deletions src/Classes/PassiveTree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ local PassiveTreeClass = newClass("PassiveTree", function(self, treeVersion)
self:LoadImage(file, data, "CLAMP")
for name, position in pairs(fileInfo) do
self.ddsMap[name] = {
found = data.width > 0,
handle = data.handle,
width = data.width,
height = data.height,
Expand Down
2 changes: 1 addition & 1 deletion src/Classes/PassiveTreeView.lua
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ end

-- Draws the given asset at the given position
function PassiveTreeViewClass:DrawAsset(data, x, y, scale, isHalf)
if not data then
if not data or not data.found then
return
end
if data.width == 0 then
Expand Down
38 changes: 31 additions & 7 deletions src/Export/Scripts/passivetree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ local json = require("dkjson")
-- by session we would like to don't extract the same file multiple times
main.treeCacheExtract = main.treeCacheExtract or { }
local cacheExtract = main.treeCacheExtract
local ignoreFilter = "^%[DNT"

if not loadStatFile then
dofile("statdesc.lua")
Expand Down Expand Up @@ -251,7 +252,7 @@ local use4kIfPossible = false
local idPassiveTree = 'Default'
-- Find a way to get version
local basePath = GetWorkDir() .. "/../TreeData/"
local version = "0_1"
local version = "0_2"
local path = basePath .. version .. "/"
local fileTree = path .. "tree.lua"

Expand Down Expand Up @@ -501,10 +502,15 @@ addToSheet(getSheet("lines"), "art/2dart/passivetree/passiveskillscreencurvesnor
-- adding jewel sockets
local jewelArt = dat("PassiveJewelArt")
for jewel in jewelArt:Rows() do
if jewel.Item.Name:find(ignoreFilter) ~= nil then
printf("Ignoring jewel socket " .. jewel.Item.Name)
goto nexttogo
end
local asset = uiImages[string.lower(jewel.JewelArt)]
printf("Adding jewel socket " .. jewel.Item.Name .. " " .. asset.path .. " to sprite")
local name = jewel.Item.Name
addToSheet(getSheet("jewel-sockets"), asset.path, "jewelpassive", commonMetadata(name))
:: nexttogo ::
end

-- adding legion assets
Expand Down Expand Up @@ -568,7 +574,6 @@ local tree = {
}

printf("Generating classes...")
local ignoreFilter = "^%[DNT%]"
for i, classId in ipairs(psg.passives) do
local passiveRow = dat("passiveskills"):GetRow("PassiveSkillNodeId", classId)
if passiveRow == nil then
Expand Down Expand Up @@ -609,13 +614,14 @@ for i, classId in ipairs(psg.passives) do

local ascendancies = dat("ascendancy"):GetRowList("Class", character)
for k, ascendency in ipairs(ascendancies) do
if ascendency.Name:find(ignoreFilter) ~= nil then
if ascendency.Name:find(ignoreFilter) ~= nil or ascendency.isDisabled then
printf("Ignoring ascendency " .. ascendency.Name .. " for class " .. character.Name)
goto continue3
end
table.insert(classDef.ascendancies, {
["id"] = ascendency.Name,
["name"] = ascendency.Name,
["internalId"] = ascendency.Id
})

-- add assets
Expand Down Expand Up @@ -706,7 +712,11 @@ for i, group in ipairs(psg.groups) do
if passiveRow == nil then
printf("Passive skill " .. passive.id .. " not found")
else
if passiveRow.Name:find(ignoreFilter) ~= nil then
if passiveRow.Name == "" then
printf("Ignoring passive skill " .. passive.id .. " No name")
goto exitNode
end
if passiveRow.Name:find(ignoreFilter) ~= nil and passiveRow.Name ~= "[DNT] Kite Fisher" and passiveRow.Name ~= "[DNT] Troller" and passiveRow.Name ~= "[DNT] Spearfisher" and passiveRow.Name ~= "[DNT] Angler" and passiveRow.Name ~= "[DNT] Whaler" then
printf("Ignoring passive skill " .. passiveRow.Name)
goto exitNode
end
Expand Down Expand Up @@ -734,7 +744,7 @@ for i, group in ipairs(psg.groups) do
-- Ascendancy
if passiveRow.Ascendancy ~= nil then
groupIsAscendancy = true
if passiveRow.Ascendancy.Name:find(ignoreFilter) ~= nil then
if passiveRow.Ascendancy.Name:find(ignoreFilter) ~= nil or passiveRow.Ascendancy.isDisabled then
printf("Ignoring node ascendancy " .. passiveRow.Ascendancy.Name)
goto exitNode
end
Expand Down Expand Up @@ -906,6 +916,18 @@ for i, group in ipairs(psg.groups) do
if passiveRow.MultipleChoiceOption then
node["isMultipleChoiceOption"] = true
end

-- Support for Smith of Kitava
if passiveRow["FreeAllocate"] == true then
node["isMultipleChoice"] = true
end

if passiveRow["ApplyToArmour?"] == true then
node["isFreeAllocate"] = true
node["isMultipleChoiceOption"] = true
end


end

for k, connection in ipairs(passive.connections) do
Expand Down Expand Up @@ -940,6 +962,7 @@ for i, group in ipairs(psg.groups) do
end
end

MakeDir(basePath .. version)
-- write file with missing Stats
if #missingStatInfo > 0 then
local file = io.open(basePath .. version .. "/missingStats.txt", "w")
Expand Down Expand Up @@ -991,6 +1014,9 @@ for i, classId in ipairs(psg.passives) do
for _, ascendancy in ipairs(class.ascendancies) do
local info = ascendancyGroups[ascendancy.id]
local ascendancyNode = tree.nodes[info.startId]
if ascendancyNode == nil then
printf("Ascendancy node " .. ascendancy.id .. " not found")
end
local groupAscendancy = tree.groups[ascendancyNode.group]

local angle = startAngle + (j - 1) * angleStep
Expand Down Expand Up @@ -1019,8 +1045,6 @@ for i, classId in ipairs(psg.passives) do
end
end

MakeDir(basePath .. version)

printf("Generating sprite info...")
for i, sheet in ipairs(sheets) do
printf("Calculating sprite dimensions for " .. sheet.name)
Expand Down
6 changes: 3 additions & 3 deletions src/Export/Tree/gimpbatch/extract_lines.scm
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
)
)

(set! new-layer (car (gimp-layer-new new-image width height RGBA-IMAGE "new-layer" 100 LAYER-MODE-NORMAL)))
(set! new-layer (car (gimp-layer-new new-image "new-layer" width height RGBA-IMAGE 100 LAYER-MODE-NORMAL)))
(gimp-image-insert-layer new-image new-layer -1 -1)
(gimp-edit-copy (vector src-layer-id))
(gimp-floating-sel-anchor (vector-ref (car (gimp-edit-paste new-layer TRUE)) 0))
Expand Down Expand Up @@ -121,14 +121,14 @@
)
)

(set! new-layer (car (gimp-layer-new new-image width-image height-image RGBA-IMAGE "new-layer" 100 LAYER-MODE-NORMAL)))
(set! new-layer (car (gimp-layer-new new-image "new-layer" width-image height-image RGBA-IMAGE 100 LAYER-MODE-NORMAL)))
(gimp-image-insert-layer new-image new-layer -1 -1)
(gimp-selection-none src-image)
(gimp-edit-copy (vector src-layer-id))
(gimp-floating-sel-anchor (vector-ref (car (gimp-edit-paste new-layer TRUE)) 0))

;; add new mask layer to the new image
(set! mask-layer (car (gimp-layer-new new-image width-image height-image RGBA-IMAGE "mask" 100 LAYER-MODE-NORMAL)))
(set! mask-layer (car (gimp-layer-new new-image "mask" width-image height-image RGBA-IMAGE 100 LAYER-MODE-NORMAL)))
(gimp-context-set-foreground '(255 255 255))
(gimp-image-insert-layer new-image mask-layer -1 -1)
(gimp-drawable-edit-fill mask-layer FILL-FOREGROUND)
Expand Down
2 changes: 1 addition & 1 deletion src/Export/spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1506,7 +1506,7 @@ return {
},
[14]={
list=false,
name="",
name="isDisabled",
refTo="",
type="Bool",
width=150
Expand Down
8 changes: 6 additions & 2 deletions src/GameVersions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@ liveTargetVersion = "0_1"
-- Skill tree versions
---Added for convenient indexing of skill tree versions.
---@type string[]
treeVersionList = { "0_1" }
treeVersionList = { "0_1", "0_2" }
--- Always points to the latest skill tree version.
latestTreeVersion = treeVersionList[#treeVersionList]
---Tree version where multiple skill trees per build were introduced to PoBC.
defaultTreeVersion = treeVersionList[1]
---Display, comparison and export data for all supported skill tree versions.
---@type table<string, {display: string, num: number, url: string}>
---@type table<string, {display: string, num: number}>
treeVersions = {
["0_1"] = {
display = "0_1",
num = 0.1,
},
["0_2"] = {
display = "0_2",
num = 0.2,
},
}
15 changes: 14 additions & 1 deletion src/Modules/ModTools.lua
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,20 @@ function modLib.formatValue(value)
t_insert(paramNames, name)
end
end
t_sort(paramNames)

t_sort(paramNames, function (a, b)
if type(a) == "number" and type(b) == "number" then
return a < b
end
if type(a) == "number" then
return true
end
if type(b) == "number" then
return false
end
return a < b
end)

if haveType then
t_insert(paramNames, 1, "type")
end
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/TreeData/0_2/legion_128_128_BC1.dds.zst
Binary file not shown.
Binary file added src/TreeData/0_2/legion_564_564_BC7.dds.zst
Binary file not shown.
Binary file added src/TreeData/0_2/legion_64_64_BC1.dds.zst
Binary file not shown.
Binary file added src/TreeData/0_2/lines_1436_1436_BC7.dds.zst
Binary file not shown.
Binary file not shown.
Binary file added src/TreeData/0_2/oils_108_108_RGBA.dds.zst
Binary file not shown.
Binary file added src/TreeData/0_2/orbit_active0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_active1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_active2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_active3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_active4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_active5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_active6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_active7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_active8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_active9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_intermediate0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_intermediate1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_intermediate2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_intermediate3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_intermediate4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_intermediate5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_intermediate6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_intermediate7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_intermediate8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_intermediate9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_normal0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_normal1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_normal2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_normal3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_normal4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/TreeData/0_2/orbit_normal5.png
Binary file added src/TreeData/0_2/orbit_normal6.png
Binary file added src/TreeData/0_2/orbit_normal7.png
Binary file added src/TreeData/0_2/orbit_normal8.png
Binary file added src/TreeData/0_2/orbit_normal9.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/TreeData/0_2/skills_128_128_BC1.dds.zst
Binary file not shown.
Binary file added src/TreeData/0_2/skills_172_172_BC1.dds.zst
Binary file not shown.
Binary file added src/TreeData/0_2/skills_176_176_BC1.dds.zst
Binary file not shown.
Binary file added src/TreeData/0_2/skills_64_64_BC1.dds.zst
Binary file not shown.
1 change: 1 addition & 0 deletions src/TreeData/0_2/tree.json

Large diffs are not rendered by default.

Loading
Loading