DICE PACKS BUNDLE
  1. #1
    Valarian's Avatar
    Join Date
    Mar 2007
    Location
    Worcestershire, UK
    Posts
    2,567

    Question Help needed bringing custom data from roll into the results handlers

    I'm trying to add automation to the dice results for The One Ring 2nd edition. To this end, I've created a custom data object that I'm adding to the onDragStart dragdata object, and to the Comm.throwDice function call used for double-click rolling.

    Capture-Drag.PNGCapture-DoubleClick.PNG

    The custom data holds the target number (TN) and condition information to process the results. This object doesn't seem to come through to the rRoll object in the results handler.

    Is there any way to get custom data to go through to the results handler?
    Using Ultimate license - that means anyone can play.
    Valarian's Fantasy Grounds Rulesets

  2. #2
    Valarian's Avatar
    Join Date
    Mar 2007
    Location
    Worcestershire, UK
    Posts
    2,567
    For information, the custom data is to be used as follows:
    customData.favoured = if set to true, adds an additional d12 to the dice pool. The higher of the two d12 values will be used in the results.
    customData.illfavoured = if set to true, adds an additional d12 to the dice pool. The lower of the two d12 values will be used in the results.
    customData.bonusdice = adds/removes a number of d6s in the dice pool. Results processed to total the d6s and to report number of 6s rolled.
    customData.weary = if set to true, will ignore results of 1 to 3 on d6s
    customData.miserable = if set to true, will report automatic Failure if an 11 (Eye of Sauron) result is recorded for the d12s
    customData.wounded = no effect at the moment on rolls.
    customData.tn = the target number to compare the final result against to report Success / Failure
    Using Ultimate license - that means anyone can play.
    Valarian's Fantasy Grounds Rulesets

  3. #3
    The custom data in a drag object is actually a reference to a Lua variable; and that can't be passed through the roll mechanism and thus isn't handled by ActionsManager. I did set up ActionsManager to serialize any string/number variables in rRoll; so that they are available as strings in the rRoll in the result handler.

    So, you'll need to apply the custom data from the drag object to the rRoll table as string or number variables before sending to ActionsManager; then you can pick up those variables in the result handler.

    There's a very simple example in the ActionSkill script of 5E ruleset which attaches a target number to the roll when creating the roll, and reads that value in the result handler.

    Regards,
    JPG

  4. #4
    Valarian's Avatar
    Join Date
    Mar 2007
    Location
    Worcestershire, UK
    Posts
    2,567
    Thanks. I'll have a look there.
    Using Ultimate license - that means anyone can play.
    Valarian's Fantasy Grounds Rulesets

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
  •  
FG Spreadshirt Swag

Log in

Log in