Refer a Friend
Page 300 of 331 First ... 200 250 290 298 299 300 301 302 310 ... Last
  1. #2991
    Okay, for the first part, I'm just trying to get one of the fields to recalculate the target when it's updated.

    Here's what I have in the function:

    Code:
    function calculateAbilityMod(nodeChar, strMod, numCurrent)
    
    	local nResult =0;
    	
    	if numCurrent < 10 then
    		nResult = math.ceil((nScore - 10) / 2);
    	elseif numCurrent > 10 then
    		nResult = math.floor((nScore - 10) / 2);
    	else
    		nResult = 0;
    	end
    
    	nodeChar.getChild(strMod).setValue(nResult);
    	
    	return true;
    	
    end
    Here's what I have in one of the triggers:

    Code:
    function onValueChanged()
    	--values passed> nodeChar, strMod, numCurrent
    	local nodeChar = window.getDatabaseNode();
    	local strMod = "numStrengthMod";
    	local numCurrent = nodeChar.getChild("numStrengthCurrent").getValue();
    	
    	charManager.calculateAbilityMod(nodeChar, strMod, numCurrent);
    end

    I don't think I'm handling the strMod value properly... I need this value so the function knows which stat modifier to update...

  2. #2992
    According to the developer of Ruleset Wizard, there is a .setColor and .getColor (as well as .getFontColor and .setFontColor) method for labels, but I can't seem to get them to work...

  3. #2993
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    34,737
    Quote Originally Posted by bloodylemming View Post
    According to the developer of Ruleset Wizard, there is a .setColor and .getColor (as well as .getFontColor and .setFontColor) method for labels, but I can't seem to get them to work...
    Probably better to ask coding questions in the Workshop sub-forum - you'll also get more people who can answer looking at your questions in that forum, and you won't take up this MoreCore thread with generic coding questions.
    Last edited by Trenloe; December 23rd, 2021 at 21:05.
    FG Wiki: How to Compile the FG Logs

    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!

  4. #2994
    Quote Originally Posted by Trenloe View Post
    Probably better to ask coding questions in the Workshop sub-forum - you'll also get more people who can answer looking at your questions in that forum, and you won't take up this MoreCore thread with generic coding questions.
    Good advice. Thanks!

  5. #2995
    What language was that code written in? Not that knowing it would make me understand it, but it does make me curious about what people are doing. My non-skill at coding is dissuading me from doing the alterations or additions needed to bring my ideas of systems to use to life.
    FGU Ultimate -- All Players Welcome
    "Without Love, I'd have no anger. I wouldn't believe in righteousness." -- Bernie Taupin

  6. #2996

  7. #2997
    The Side bar has disappeared when I use Morecore after the last update. Any help would be appreciated. Thank you.

  8. #2998

  9. #2999
    That was it! Thank you Damned!

  10. #3000
    I was worried there for a bit trying to get the forge to work and remove the old .pak. Thought I had lost everything.
    Anyways, Is there a way to remove Races, Parcels, etc from Campaigns on the drop down list on the right side buttons?
    I thought it was under options-->sidebar. But I don't see that anywhere.

Page 300 of 331 First ... 200 250 290 298 299 300 301 302 310 ... Last

Thread Information

Users Browsing this Thread

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

Bookmarks

Posting Permissions

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

Log in

Log in