-
November 9th, 2021, 18:41 #1
Get Value from PC Skill List in CT
Hi there,
I didn‘t find any post directly explaining how to achieve this: I‘m working on a ruleset based on the 5E rules. On the PC sheet I have the 5E standard skill list. In the CT I want to add a control which needs to catch the skill ranks for a die roll.
I understand how I can get an attribute value via crosslink and setLink, but I‘m wondering how to do this if I don‘t know the DB location beforehand (like I do for attributes).
Any help or examples are highly welcome. :-)Last edited by Mephisto; January 27th, 2022 at 21:00.
-
November 9th, 2021, 18:58 #2
Get the charsheet database entry for the PC record in the combat tracker. Then go to the skilllist node and iterate through each child checking the value of the child name field until you get to the skill you want to reference.
Something like this:
Code:for _,v in pairs(DB.getChildren(nodePCCharsheet, "skilllist")) do if DB.getValue(v, "name", "") == sSkill then -- Do your coding here - v is the skill node end end
Code:<name type="string">Perception</name> <prof type="number">1</prof> <stat type="string">wisdom</stat>
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
November 9th, 2021, 19:07 #3
You know that you are awesome, don‘t you? :-).
Last edited by Mephisto; November 10th, 2021 at 05:16.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks