Page 1 of 1

MapTool 1.4.0.5

Posted: Sun Jun 12, 2016 1:00 am
by Craig
This build contains only bug fixes (all the new juicy stuff is going into dev/test build).

Bugfixes
  • Resize free size figure tokens (Jagged)
  • Fixes for Z Order on freesized objects (Jagged)
  • Fixes for resizing stamps that are type "figure" (Jagged)
  • Small iso fixes (Jagged)
  • Fix for Missing images (Jamz)
1.4.0.4 New Features
The new json functions are useful for generating multiple rolls (for characters, npcs what have you). 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>

Code: Select all

{
  "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>

Code: Select all

{
  "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
  }
}
1.4.0.3 New Features
  • Added a client id to getInfo. This will return the id of a client (an essentially randonmly generated id that can't be used to identify your ip etc). This is so macro writers can save settings per client in the campaign.
  • Added json.removeFirst macro function, similar to json.difference() but will only remove the first occurrence of match. e.g. json.removeFirst('[2,2,4,5,6,6,4]', '[2,6]') = [2,4,5,6,4]
  • math.abs -- Return the absolute (non negative) of of a value.
  • math.ceil -- Return the nearest whole number, rounding up
  • math.floor -- Return the nearest whole number, rounding down
  • math.cos -- Return the cosine of an angle (angle in degrees)
  • math.cos_r -- Return the cosine of an angle (angle in radians)
  • math.sin -- Return the sine of an an angle (angle in degrees)
  • math.sin_r -- Return the sine of an angle (angle in radians)
  • math.tan -- Return the tangent of an angle (angle in degrees)
  • math.tan_r -- Return the tangent of an angle (angle in radians)
  • math.acos -- Return the inverse cosine of a ratio (returned angle is in degrees)
  • math.acos_r -- Return the inverse cosine of a ratio (returned angle is in radians)
  • math.asin -- Return the inverse sine of a ratio (returned angle is in degrees)
  • math.asin_r -- Return the inverse sine of a ratio (returned angle is in radians)
  • math.atan -- Return the inverse tangent of a ratio (returned angle is in degrees)
  • math.atan_r -- Return the inverse tangent of a ratio (returned angle is in radians)
  • math.atan2 -- A version of atan that takes 2 arguments instead of a ratio so that it can return angle based on signs of inputs (allowing you to determine quadrant). Return is in degrees
  • math.atan2_r -- A version of atan that takes 2 arguments instead of a ratio so that it can return angle based on signs of inputs (allowing you to determine quadrant). Return is in radians
  • math.cbrt, math.cuberoot -- Return the cube root of a number
  • math.hypot, math.hypotenuse -- Return the hypotenuse (h = sqrt(a*a + b*b)) for the two sides passed in
  • math.log -- Return the natural logarithm of a number
  • math.log10 -- Return the base 10 logarithm of a number
  • math.min -- Returns the minimum number from its arguments (2+ arguments)
  • math.max -- Returns the maximum number from its arguments (2+ arguments)
  • math.mod -- Returns the modulus of the arguments (remainder from the division)
  • math.pow -- Returns the value of the first argument raised to the power of the second
  • math.sqrt, math.squareroot -- Returns the square root of a number
  • math.toRadians -- Converts an angle from degrees to radians
  • math.toDegrees -- Converts an angle from radians to degrees
  • math.pi -- Returns the value of PI, mmmmm pie...
  • math.e -- Returns the mathematical constant e (base of natural logarithm)
  • math.isOdd -- Returns 1 if the argument is odd, 0 if it is even
  • math.isEven -- Returns 1 if the argument is even, 0 if it is odd
  • math.isInt -- Returns 1 if the argument is an integer, 0 if it is not.
1.4.0.2 New Features
Allow scripts to modify max loops/recursion post (Craig).
1.4.0.1 New Features
  • Map Visible Commands thread (Jagged).
  • Table Additions thread (Jagged).
  • Copy Map Function thread (Jagged).
  • Add UPnP Discovery Timeout preference to UI (joshsziegler).
  • Add new macro function setTokenSnapToGrid thread (DarkAlf).
  • Tweak display and drawable selection (Jagged).
  • Display drawn elements in split panel (Jagged).
  • Allow DrawablesGroup to have children (Jagged).
  • ViewDrawing thread (Jagged).
  • Add double click centre function to draw panel (Jagged).
  • Populate the change layer and arrange commands. (Jagged).
  • Add smaller icons for templates. (Jagged).
1.4.0.0 New Features
  • Isometric Maps (Jagged) [BETA FEATURE] Isometric Map & new Token type
  • Set view area macro command (Jagged)
  • Add setTokenWidth/Height macro functions (Dark Alf)
  • Add setZoom(x) and getZoom() macro functions (Jagged)
  • Fixes for stylesheet removal issues in htmlframe/form with Java 1.7 and up (Yorik + Username)
  • New right-click menu option on Stamps to allow user to select a pixel range and enter the number of cells/squares in the selection (JamzTheMan)
  • Start of a WebAPI (not ready for use yet).
  • German Language Updates (FantasyTeddy)

Re: MapTool 1.4.0.5

Posted: Wed Jun 15, 2016 11:20 pm
by taustinoc
<Moved to the correct thread. It was my turn to be an idiot.>

Re: MapTool 1.4.0.5

Posted: Thu Jun 16, 2016 12:09 pm
by taustinoc
<Moved to the correct thread. It was my turn to be an idiot.>

Re: MapTool 1.4.0.5

Posted: Thu Jun 16, 2016 12:51 pm
by JamzTheMan
Hi, can you post your issues under the dev thread please? http://forums.rptools.net/viewtopic.php?f=1&t=26693

We don't want to confuse any folks running 1.4.0.x versions...

Re: MapTool 1.4.0.5

Posted: Thu Jun 16, 2016 12:57 pm
by taustinoc
My apologies. I thought (or not, as the case may be) I'd put it in a thread relating to the dev builds.

Re: MapTool 1.4.0.5

Posted: Thu Jun 16, 2016 4:32 pm
by Full Bleed
JamzTheMan wrote:We don't want to confuse any folks running 1.4.0.x versions...
Someone might want to move those posts, too. It does make it seem like he's got problems with this newest release.

Re: MapTool 1.4.0.5

Posted: Mon Aug 08, 2016 10:33 am
by Irrlicht
Uhm, what's the difference between math.ceil/math.floor and the old regular ceil/floor?

Re: MapTool 1.4.0.5

Posted: Sat Dec 17, 2016 4:18 am
by metatheurgist
Excuse me for being thick, but have we reached a point where old macros won't work with the 1.4 series? I had a look at each of the 1.4.x release threads and it wasn't obvious. At what point do I have to update MTscript to JavaScript?

Re: MapTool 1.4.0.5

Posted: Sat Dec 17, 2016 4:30 am
by aliasmask
I think there's just new ways of doing old stuff but the old stuff is still there. The java options right now are very limited just covering a couple of basics. The main advantage to the java code options is probably speed, but I haven't tested out that theory.

Re: MapTool 1.4.0.5

Posted: Sat Dec 17, 2016 9:20 am
by JamzTheMan
Nope, all the old macros functions work as is just fine. We currently have no intention of breaking that functionality.

Re: MapTool 1.4.0.5

Posted: Sat Dec 17, 2016 10:17 am
by metatheurgist
Awesome!

Re: MapTool 1.4.0.5

Posted: Tue Feb 21, 2017 7:13 pm
by PinkRose
I've been away for awhile, and busy with an instant family (adopted 3 girls).
So glad to see this is moving right along still.
Nice work all!