Starfinder Playlist
  1. #1
    Valarian's Avatar
    Join Date
    Mar 2007
    Location
    Worcestershire, UK
    Posts
    2,567

    onDoubleClick not working as expected

    Ruleset: The One Ring
    Issue: onDoubleClick action not working

    The onDoubleClick action defined for the skill on the character sheet doesn't work. The onDragStart action does.
    Code:
    function onDoubleClick(x,y)
      local dieLabel = "";
      local dieMod = 0;
                            
      if dieLabel and dieLabel ~= "" then
        dieLabel = dieLabel .. " + " .. window.athleticslabel.getValue();
      else
        dieLabel = window.athleticslabel.getValue();
      end
                
      local weary = window.conditionweary.getState();
      if weary then
        ChatDice.wearyDiceCheck(getValue(), dieMod, dieLabel);
      else
        ChatDice.skillDiceCheck(getValue(), dieMod, dieLabel);
      end
      return true;
    end
    The code called by the double-click action builds the dice table and uses Comm.throwDice() to roll.
    Code:
    function skillDiceCheck(number, bonus, name)
      if Comm then
        local dice = {};
        table.insert(dice, "d12");
        for i = 1, number, 1 do
          table.insert(dice, "d6");
        end
        Comm.throwDice("skilldice", dice, bonus, name);
      end
    end
    I'm also experiencing the problem in the Yggdrasill ruleset, that builds up the dice directly in the char_attribute template onDoubleClick action.
    Code:
            function onDoubleClick(x,y)
              local label = getName():gsub("^%l", string.upper);
              local woundState = window.getDatabaseNode().getChild("hpstate");
              local penalty = window.getDatabaseNode().getChild("hppenalty");
              local type = "dice";
              if woundState.getValue() == "Severely Wounded" then
                type = "wounddice";
              else						
                type = "skilldice";
              end 
              local dice = {};
              for i = 1, getValue(), 1 do
                table.insert(dice, "d10");
              end
              Comm.throwDice(type, dice, penalty.getValue(), label);
              return true;
            end
    Attached Images Attached Images
    Using Ultimate license - that means anyone can play.
    Valarian's Fantasy Grounds Rulesets

  2. #2
    Thanks for the report. Filed as FGU-598. I'll be circling back to you to get more detail once I get through the bug submission crush and memory issues.

    Cheers,
    JPG

  3. #3
    I've checked over this issue and appears to be working correctly. Can you check to see if the ruleset is still producing an issue on your end? Also if it is still being replicated, can you provide me the steps in replicating on my end and what issues you may still be experiencing?


    TheOneRing.PNG
    Dominic Morta
    Ruleset Developer
    Smiteworks

    How to zip up your campaign if the Developers ask for it-How to zip up your campaign if the Developers ask for it

    How to provide an Unity Connection issue?-Connection Issues and What to Provide

    Unity Updater issue?-Updater Issues

    Classic and Unity Port Forwarding?-Fantasy Grounds Connections Explained

    Comcast or Cox ISP User?-Comcast XFinity and Cox Users

    Have a suggestion?-Feature Request

  4. #4
    Valarian's Avatar
    Join Date
    Mar 2007
    Location
    Worcestershire, UK
    Posts
    2,567
    Seems to be working now.
    Using Ultimate license - that means anyone can play.
    Valarian's Fantasy Grounds Rulesets

  5. #5
    Thank you. I will push to have this set as resolved.
    Dominic Morta
    Ruleset Developer
    Smiteworks

    How to zip up your campaign if the Developers ask for it-How to zip up your campaign if the Developers ask for it

    How to provide an Unity Connection issue?-Connection Issues and What to Provide

    Unity Updater issue?-Updater Issues

    Classic and Unity Port Forwarding?-Fantasy Grounds Connections Explained

    Comcast or Cox ISP User?-Comcast XFinity and Cox Users

    Have a suggestion?-Feature Request

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
  •  
5E Character Create Playlist

Log in

Log in