393
edits
No edit summary |
No edit summary |
||
Line 25: | Line 25: | ||
end | end | ||
function p. | function p.printAllSkillTrees() | ||
local skillTrees = | -- Iterate through all skills in GameData.skillData | ||
for skillName, skillData in pairs(GameData.skillData) do | |||
local skillTrees = skillData.skillTrees | |||
if skillTrees then | |||
mw.log("Skill Trees for " .. skillName .. ":") | |||
for _, skillTree in ipairs(skillTrees) do | |||
mw.log("------------------------------") | |||
mw.log("Skill Tree ID: " .. skillTree.id) | |||
mw.log("Skill Tree Name: " .. skillTree.name) | |||
mw.log("Points Available: " .. (skillTree.points or "N/A")) | |||
mw.log("Number of Nodes: " .. #skillTree.nodes) | |||
-- Print information for each node in the skill tree | |||
for _, node in ipairs(skillTree.nodes) do | |||
mw.log(" Node ID: " .. node.id) | |||
mw.log(" Node Name: " .. node.name) | |||
mw.log(" Costs: " .. (node.costs.points or 0) .. " points") | |||
mw.log(" Unlocked: " .. tostring(node.isUnlocked)) | |||
-- Print the node's modifiers | |||
if node.modifiers then | |||
mw.log(" Modifiers:") | |||
deepPrint(node.modifiers, 2) | |||
end | |||
-- Print the node's parents (if any) | |||
if node.parents then | |||
mw.log(" Parents:") | |||
for _, parentID in ipairs(node.parents) do | |||
mw.log(" Parent Node ID: " .. parentID) | |||
end | |||
end | |||
end | end | ||
end | end | ||
else | |||
mw.log("No skill trees found for " .. skillName .. ".") | |||
end | end | ||
end | end | ||
Line 67: | Line 69: | ||
function p.getSkillTreeNodes(checkFunc) | function p.getSkillTreeNodes(checkFunc) | ||
local nodes = {} | local nodes = {} | ||
for _, | |||
for _, | for _, skillData in pairs(GameData.skillData) do | ||
local skillTrees = skillData.skillTrees | |||
if skillTrees then | |||
for _, skillTree in ipairs(skillTrees) do | |||
for _, node in ipairs(GameData.getEntities(skillTree.nodes, checkFunc)) do | |||
table.insert(nodes, node) | |||
end | |||
end | end | ||
end | end |
edits