Packages
 Comm
 DB
 Debug
 Extension
 Input
 Interface
 Module
 Token
 User

Objects
 bitmapwidget
 databasenode
 dragdata
 textbasecontrol
 textwidget
 tokeninstance
 widget
 widgetcontainer
 windowcontrol
 windowinstance

Controls
 buttoncontrol
 buttonfield
 categoryselectioncontrol
 chatentry
 chatwindow
 databasecontrol
 diecontrol
 diefield
 formattedtextcontrol
 formattedtextfield
 genericcontrol
 imagecontrol
 numbercontrol
 numberfield
 portraitselectioncontrol
 scrollbarcontrol
 scrollercontrol
 stringcontrol
 stringfield
 subwindow
 tokenbag
 tokencontrol
 tokenfield
 windowlist
 windowreferencecontrol
 windowreferencefield

Assets and Settings
 announcement
 categoryselectionsettings
 characterdbroot
 customdie
 description
 desktopframe
 die
 diebox
 distance
 font
 framedef
 hotkeybar
 icon
 imageupdatefolder
 imagesettings
 importinfo
 importruleset
 includefile
 panel
 pollbox
 portraitset
 properties
 replaces
 script
 string
 template
 textsettings
 tokenroot
 tooltip
 windowclass
onValue



This definition is used to define a custom die resource. Custom dice are based on one of the built-in die models (d4,d6,d8,d10,d12,d20,dF).

The result number of a custom dice can be calculated based on custom logic or a formula translating the model die result number to a custom result. If not defined, the basic result for that die model will be used.

If the die model for the custom die is available on the desktop, then the custom die will be accessible via the radial menu of that die.

If the die model is not available on the desktop, then the custom die can only be accessed programmatically.



Definition

<customdie name="..." >
<model > ... </model> The name of a die resource used as the model
<menuicon > ... </menuicon> The name of an icon resource used in the radial menu of the built-in die
<script > ... </script> The name of an icon resource used in the radial menu of the built-in die
</customdie>


Interface


onValue

function onValue(result)

This function is called to calculate the value for the custom die. The result of the roll made on the built-in die is passed as a parameter.

Parameters

result   (number)   

The result of the built-in die roll

Return values

(number)
The value to be used as the result of the custom die


'Fantasy Grounds' is a trademark of SmiteWorks Ltd. All other trademarks are the property of their respective owners.
© 2004-2010 SmiteWorks Ltd. ALL RIGHTS RESERVED.
Privacy policy