Fantasy grounds 2 change ruleset12/18/2022 ![]() The onAfterDiceRoll function does not serve this purpose, as it is executed before you get the result of the roll.ĭue to the Fantasy Grounds process model the result of the dice roll can only be obtained asynchronously, by using a handler function. Result handler function nameĪt some point in the development of a ruleset you will want to get the result of a roll and execute some kind of logic based on it. This greatly expands the level of flexibility your rulesets can achieve. Now Ruleset Wizard exposes the new variable DiceRollString, with it you can modify the dice roll before it is processed by Fantasy Grounds.įor example, if you want to add 1d6 to the roll only under certain circumstances you could type in the control’s LUA code section the following: function onBeforeDiceRoll()ĭiceRollString = DiceRollString. You can use them to create your own logic in response to the roll, but you couldn’t change the dice roll itself as defined in the control properties. Since version 0.4.0 you have available two event functions related to the dice roll: onBeforeDiceRoll and onAfterDiceRoll. This is the look of the new Dice Roll structure, there are three new properties: ‘Targeting type’, ‘Use modifier stack’ and ‘Result handler function name’, we will discuss them later in this article. ![]() Ruleset Wizard Core project updated to add combat tab and attack and initiative rolls handling examples.Added support for handling dice roll results.Properties ‘Targeting type’, ‘Use modifier stack’ and ‘Result handler function name’ added to Dice Roll structure.Main window remembers last Open/Save and Generate folders.Fixed a crash with Window control names starting with numbers.Added logo icon to announcement message.Changed Button text behaviour to add a click offset effect.Added DiceRollString variable to controls’ roll event to allow roll string modificaton in onBeforeDiceRoll function.As promised version 0.4.2 is already here with a bunch of exciting new features added to the Dice Roll Engine.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |