1. #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.
    “The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents. We live on a placid island of ignorance in the midst of black seas of the infinity, and it was not meant that we should voyage far.”
    ― H. P. Lovecraft, The Call of Cthulhu and Other Weird Stories

    “The oldest and strongest emotion of mankind is fear, and the oldest and strongest kind of fear is fear of the unknown”
    ― H.P. Lovecraft, Supernatural Horror in Literature

  2. #2
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    18,878
    Blog Entries
    1
    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

    MoreCore - Generic Ruleset
    --- Projects ---
    Extensions | Tutorials | MoreCore | MoreCore Themes | Call of Cthulhu | Maelstrom | FG Con

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in