FG Spreadshirt Swag
Page 1 of 2 12 Last
  1. #1
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    4,202
    Blog Entries
    4

    Issue with the Control Key, Targeting and the Modifier Stack...

    I'm not sure where or when this problem began... I've not worked on my ruleset in a few months... but now whenever I try and make a roll it gives me this error:
    Code:
    Script Error: [string "desktop/scripts/modifierstack.lua"]:241: attempt to index global 'control' (a nil value)
    I tracked this back and it seems to have something to do with holding the control key while targeting. This is something built into CoreRPG and CoreRPG rolls seem to be working ok... so I'm not sure what I broke that is tweaking it... I removed the modifierstack from my ruleset a long time ago... so it might be somehow connected to that. (since that seems to be the file that's having the issue) but it's been working just fine up until today. As I said.. I probably haven't made any rolls in the ruleset since the last update went through.. so the issue is probably something in there. I looked though the patch notes and nothing jumped out at me as being a related 'fix' that would break my stuff. I KNOW my rolls were working correctly on Dec. 28th 2014.

    Anyone have any ideas as to what might be going on there... where I might look to fix it?
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

  2. #2
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    4,202
    Blog Entries
    4
    Hrm. I wonder if this has something to do with that 'targeting toggle' thing. Since I removed the modifier box.. that obviously does not exist either.
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

  3. #3
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    I'm assuming your ruleset is layered on top of CoreRPG?

    If so, you need to override the ModifierStack.getTargeting() function.

    If you don't have modifierstack.lua in your ruleset, have some code in your ruleset that makes this function do nothing. Such as:

    Code:
    ModifierStack.getTargeting = myOverride;
    
    function myOverride()
         return true;
    end
    The above will replace the ModifierStack.getTargeting function with a function (myOverride) that does nothing, so this will replace the normal code that looks for the targeting control and gives the error because it isn't there.
    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. #4
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    4,202
    Blog Entries
    4
    This is attached to a new CoreRPG feature? I don't see the reference in the update notes... unless it's :
    [CoreRPG+] Added targeting toggle to desktop for all rolls.
    I'm guessing that I can just put that code into the base.xml file?
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

  5. #5
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Quote Originally Posted by Blackfoot View Post
    This is attached to a new CoreRPG feature? I don't see the reference in the update notes... unless it's :
    Yep, that's what it is.
    Quote Originally Posted by Blackfoot View Post
    I'm guessing that I can just put that code into the base.xml file?
    Yep, but it's better in a .lua file, in case you get errors around it, as it will tell you the LUA file and the line number.

    Also, if you don't want rolls dropped into the chat window to use targeting as default then change the return true; in the myOverride function to return false; Essentially this function is emulating what state the new toggle is in.
    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!

  6. #6
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    4,202
    Blog Entries
    4
    Hmm.. tried putting it into data_common.lua ... that didn't fly... Hrm.
    Code:
    Script Error: [string "scripts/data_common.lua"]:810: attempt to index global 'ModifierStack' (a nil value)
    Script Error: [string "desktop/scripts/modifierstack.lua"]:241: attempt to index global 'control' (a nil value)
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

  7. #7
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Which data_common.lua file? The one in your ruleset or Core RPG?
    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!

  8. #8
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    4,202
    Blog Entries
    4
    The one for the ruleset... obviously I can't mess with the CoreRPG one since I can only modify my ruleset. Is there a better place to put it? I get the impression that data_common.lua is getting loaded too soon for it to work properly.
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

  9. #9
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Put it in it's own LUA file - so you know where your override functions are. Or call it modifierstack_override.lua so you know what it's actually doing. Put the ModifierStack.getTargeting = myOverride; code in an onInit() function so that it is called when the LUA file is loaded.

    Code:
    function onInit()
         ModifierStack.getTargeting = myOverride;
    end
    
    function myOverride()
         return true;
    end
    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!

  10. #10
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    4,202
    Blog Entries
    4
    Cool. Putting the first line into the onInit() kicked the problem. Thanks Trenloe.
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 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
  •  
DICE PACKS BUNDLE

Log in

Log in