-
September 1st, 2019, 20:15 #1
[programming] character sheet button on CT
Hey again guys! So I have my AlienRPG ruleset set up so that when the calendar is increased by 5 minutes, stress is reduced by 1 unless a button on the character sheet is toggled on.
I would like to have that button on the combat tracker as well, for easy access by the GM.
I’ve played around with button_crosslink but I feel that isn’t something for pc’s. I tried using another number_ct_crosslink much like I did with the health of the character, but that doesn’t appear to want to work.
Any ideas where I could find a similar code? Or any examples of adding a button?
You can find my code in my AlienRPG ruleset, in character_main2.xml both in “dateframe” and “stressroll”. I believe I removed the code from the combat tracker before pushing out my last update.Last edited by pr6i6e6st; September 1st, 2019 at 21:22.
-
September 2nd, 2019, 08:53 #2
For _crosslinks to work you also need to register them in ct_entry.lua (or similar) like this:
Code:function linkPCFields() local nodeChar = link.getTargetDatabaseNode(); -- Debug.console("linkPCFields:"); -- Debug.console(nodeChar); if nodeChar then name.setLink(nodeChar.createChild("name", "string"), true); health.setLink(nodeChar.createChild("health", "number"), false); defence.setLink(nodeChar.createChild("defence", "number"), false); fieldthree.setLink(nodeChar.createChild("wounds", "number"), false); initresult.setLink(nodeChar.createChild("initresult", "number")); atk.setLink(nodeChar.createChild("attacks", "string"), true); fieldfour.setLink(nodeChar.createChild("four", "number"), false); fieldfive.setLink(nodeChar.createChild("five", "number"), false); end end
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks