0.4.9 Update

Version 0.4.9 has just been released, with a pretty handful of minor fixes and interesting improvements:

version 0.4.9

  • Added {@ } operator to Dice Roll String variables
  • Added DiceRollDescription variable to Dice Roll Engine trigger events
  • Make DiceRollAdditionalInfo variable accessible to Dice Roll Engine trigger events
  • String cycler Default Label property not generated properly. Fixed.
  • Added variable {modstackdesc} to Dice Roll Engine
  • Added object type icon to editor tabs
  • Added Stack with control property to all window controls
  • Added option to Ruleset Explorer to create windows copies
  • Added “On Icon” and “Off Icon” properties to Counter List control

New {@ } Operator

The dice roll engine has a new operator available for use in the formulas: {@ }, that brings the ultimate power to make any game system you can imagine.

This operator allows you to insert literal lua code in your dice string, which will be executed as is by FG and its returned value will be included in the dice string. Its main purpose is to allow you to set values in the roll coming from your own custom functions. For example, the following expression:

d20 + {@ getmymodifiers()}

will roll a d20 and add to it the result of the call to the function getmymodifiers().

As usual you can use this operator anywhere in the string, for example:

{@ getdicetotal()}d6

will roll a number of d6 equal to the result of the call to the function getdicetotal().

You can even generate the whole dice string in a separate custom function, for example:

{@ getdicerollstring() }

will make a roll with the dice string returned by the function getdicerollstring().

New variables accesible from Dice Roll Engine event trigger

Until now, you only had the variable DiceRollString available in the dice roll engine event trigger functions (onBeforeDiceRoll and onAfterDiceRoll).

Starting with version 0.4.9 you also have available the following variables in these functions:

  • DiceRollDescription: Allows you to change the dice roll description.
  • DiceRollAdditionalInfo: Allows you to change the dice roll AdditionalInfo collection, which is sent as a parameter to the result handling function.

New variable {modstackdesc} available in Dice roll strings

The {modstackdesc} variable is now available for its use in dice roll strings. It will be replaced with the current description of all the existing modifiers in the modifier stack.

Leave a Reply

Your email address will not be published. Required fields are marked *