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]

Fix for trailing end of line character of version string in getInfo('client') macro function.

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.

Fix for parser error messages not being displayed nicely.

Also the following math functions have been added. While they have been tested they could stand to have more testing done, so please test them a bit more before relying on them

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

[*] Added a client id to getInfo. This will return the id of a client (an essentially randomly 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.

How static is this ID? What conditions change it? Don't want to try using it and then see the ID changing like it does for tokens.

Can we get some more examples on how/when to use this? I.e, what inspired its deployment? I figure there is a particular use case in mind... which might help me understand the broader picture.

Oh yeah, thanks for the build/deployment!

_________________Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

[*] Added a client id to getInfo. This will return the id of a client (an essentially randomly 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.

How static is this ID? What conditions change it? Don't want to try using it and then see the ID changing like it does for tokens.

Can we get some more examples on how/when to use this? I.e, what inspired its deployment? I figure there is a particular use case in mind... which might help me understand the broader picture.

Oh yeah, thanks for the build/deployment!

It remains the same until a player deletes their .maptool folder (or the client-id file inside it).Aliasmask asked for it, I assume so he can save variables against a client for next log in. Maybe he can enlighten us as to his plans

It remains the same until a player deletes their .maptool folder (or the client-id file inside it).Aliasmask asked for it, I assume so he can save variables against a client for next log in. Maybe he can enlighten us as to his plans

Yep, pretty much. I plan to associate tokens to certain players and have a pseudo log-in feature. Sometimes my players log in with different names for various reasons. With this function, I won't have to nag for a log in because it'll just know.

I'm having some issues with the cos and sin functions. The expected result is for both to move from zero to one as the angel moves around the circle. The 45 degree (1/4pi radians) point in each quadrant should be .707

So the expected result is to go 1(0)-> .707 -> 0(1). I see this for radians. Degrees seems to be borked.

I notice some (not all) of the new math functions appear to parallel ones that MT already had, like abs, hypot, etc. Is there any difference between them, or are these effectively just alternate names?

I'm having some issues with the cos and sin functions. The expected result is for both to move from zero to one as the angel moves around the circle. The 45 degree (1/4pi radians) point in each quadrant should be .707

So the expected result is to go 1(0)-> .707 -> 0(1). I see this for radians. Degrees seems to be borked.

I'm having some issues with the cos and sin functions. The expected result is for both to move from zero to one as the angel moves around the circle. The 45 degree (1/4pi radians) point in each quadrant should be .707

So the expected result is to go 1(0)-> .707 -> 0(1). I see this for radians. Degrees seems to be borked.

I see the problem, doh. I will have them fixed for next build...

those ones that are double ups you can use the ones that suit you best. No real need to favour one over the other

I'm having some issues with the cos and sin functions. The expected result is for both to move from zero to one as the angel moves around the circle. The 45 degree (1/4pi radians) point in each quadrant should be .707

So the expected result is to go 1(0)-> .707 -> 0(1). I see this for radians. Degrees seems to be borked.

I see the problem, doh. I will have them fixed for next build...

those ones that are double ups you can use the ones that suit you best. No real need to favour one over the other

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum