Paul Pratt
July 14th, 2014, 07:23
I have a list set up, and on a separate window instance I want to reuse the list, but filter the contents. For instance I have set up a skills list, and then on a mini sheet I want to reuse the list, but only want it to contain a few combat related skills, like "Dodge" , "Parry", climb, etc..
I have the entire list set to be invisible, figuring I could find the specfic skills and then set them to be visible. I could set up a button field to switch visiblity on off, but that would reside in the skill list template and effect the skills tab. I could have a seperate list, but that defeats the purpose, and forces a player to track/advance a skill in two different places.
So far, I can find the skill, it's name, but can not turn on/off the visibilty to just a specific skill. It's the whole list that is modified. I figure I need to get the ID of the skill, and am not sure how to do that. If I could find that, I should be able to set that ID node as visible and have a shortened skill list.
function FilterSkills()
local node = window.getDatabaseNode();
local basicskills = node.getChild(".basicskills");
local sCombatSkill = "Dodge" or "Parry";
if (basicskills ~= nil) then
for k, v in pairs (basicskills.getChildren()) do
if v.getChild("name").getValue() == sCombatSkill then
local ID = ("a way to find the ID number of the skill in the database")
return ID;
end
ID.setVisible(true);
end
end
end
Any help is appreciated.
-Paul
I have the entire list set to be invisible, figuring I could find the specfic skills and then set them to be visible. I could set up a button field to switch visiblity on off, but that would reside in the skill list template and effect the skills tab. I could have a seperate list, but that defeats the purpose, and forces a player to track/advance a skill in two different places.
So far, I can find the skill, it's name, but can not turn on/off the visibilty to just a specific skill. It's the whole list that is modified. I figure I need to get the ID of the skill, and am not sure how to do that. If I could find that, I should be able to set that ID node as visible and have a shortened skill list.
function FilterSkills()
local node = window.getDatabaseNode();
local basicskills = node.getChild(".basicskills");
local sCombatSkill = "Dodge" or "Parry";
if (basicskills ~= nil) then
for k, v in pairs (basicskills.getChildren()) do
if v.getChild("name").getValue() == sCombatSkill then
local ID = ("a way to find the ID number of the skill in the database")
return ID;
end
ID.setVisible(true);
end
end
end
Any help is appreciated.
-Paul