MapTool 1.4.0.4 Released

You are currently viewing MapTool 1.4.0.4 Released

Time for another build with bug fixes and some features

SwatBugBug Fixes and New Features

  • Fix for math.cos(), math.sin(), math.tan(), math.acos(), math.asin(), math.atan() macro functions (Craig).
  • Added json.rolls() macro function (Craig).
  • Added json.objrolls() macro function (Craig).
  • Overdue update to the credits file (Craig).

Build Related

  • Continuous Integration using Travis CI (joshsziegler)

New JSON functions
Two new functions are useful for generating multiple rolls for characters and npcs. In both cases these are simple roll expressions not macros.

json.rolls
This function takes 2 or 3 parameters and returns a json array
json.rolls(roll, dim1, dim2) => returns a json array with the rolls performed
e.g.
{json.rolls(“3d6”, 6),2} => [ 11, 7, 15, 8, 10, 13 ]

The three parameter version returns a two dimensional array
e.g.
{json.rolls(“3d6”, 6, 4),2} => [ [ 11, 13, 11, 13 ], [ 8, 11, 17, 10 ], [ 8, 11, 14, 11 ], [ 6, 8, 13, 6 ], [ 6, 11, 8, 10 ], [ 10, 7, 17, 11 ] ]

json.objrolls
Is similar to json.rolls() but returns a json object.
It takes 3 parameters
json.objrolls(names, stat, rolls)
This will generate rolls for all the stat for each “name”. rolls is either a single string with a roll expression in which case every stat will use same roll expression, or a json array with a roll expression for each stat (so must be same size as stat).
e.g.
<pre>{json.indent(json.objrolls(“[‘henchman1’, ‘henchman2’, ‘henchman3’]”, “[‘Str’, ‘Dex’, ‘Con’, ‘Int’, ‘Wis’, ‘Chr’]”, “3d6”),2)}</pre>

{
“henchman1”:   {
“Str”: 10,
“Dex”: 12,
“Con”: 10,
“Int”: 10,
“Wis”: 8,
“Chr”: 12
},
“henchman2”:   {
“Str”: 11,
“Dex”: 10,
“Con”: 7,
“Int”: 13,
“Wis”: 9,
“Chr”: 7
},
“henchman3”:   {
“Str”: 10,
“Dex”: 10,
“Con”: 10,
“Int”: 12,
“Wis”: 15,
“Chr”: 13
}
}

<pre>{json.indent(json.objrolls(“[‘henchman1’, ‘henchman2’, ‘henchman3’]”, “[‘Str’, ‘Dex’, ‘Con’, ‘Int’, ‘Wis’, ‘Chr’]”, “[‘3d6+1’, ‘3d6’, ‘3d6’, ‘3d6-2’, ‘3d6’, ‘2d6’]”),2)}</pre>

{
“henchman1”:   {
“Str”: 11,
“Dex”: 12,
“Con”: 13,
“Int”: 8,
“Wis”: 10,
“Chr”: 11
},
“henchman2”:   {
“Str”: 12,
“Dex”: 11,
“Con”: 12,
“Int”: 8,
“Wis”: 12,
“Chr”: 3
},
“henchman3”:   {
“Str”: 12,
“Dex”: 13,
“Con”: 9,
“Int”: 8,
“Wis”: 13,
“Chr”: 7
}
}

Next up, Development build 1.4.1.0 with loads of new functionality and features – now with Nerps!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.