RPTools.net
http://forums.rptools.net/

MapTool 1.4.0.4 Build
http://forums.rptools.net/viewtopic.php?f=1&t=26684
Page 1 of 1

Author:  Craig [ Fri May 27, 2016 5:46 am ]
Post subject:  MapTool 1.4.0.4 Build

Time for another build with bug fixes and some features
  • Fix for math.cos(), math.sin(), math.tan(), math.acos(), math.asin(), math.atan() macro functions.
  • Added json.rolls() macro function.
  • Added json.objrolls() macro function.
  • Overdue update to the credits file.


Build Related
  • Continuous Integration using Travis CI (joshsziegler)

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[b]
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 ] ]

[b]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:
{
  "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:
{
  "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
  }
}

Author:  paulstrait [ Fri May 27, 2016 6:55 pm ]
Post subject:  Re: MapTool 1.4.0.4 Build

I've found a strange bug. Whenever you make a new map, and you set the background to the white color in the upper lefthand corner, it spits out this error:

java.lang.IllegalArgumentException: Invalid type of paint: java.awt.TexturePaint
at net.rptools.maptool.model.drawing.DrawablePaint.convertPaint(DrawablePaint.java:38)
at net.rptools.maptool.client.ui.MapPropertiesDialog$3.actionPerformed(MapPropertiesDialog.java:304)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:36)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.WaitDispatchSupport$2.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:36)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


It is possible to edit a currently existing map to make it have a white background. I just checked and this also existed in 1.4.0.0.

Author:  Craig [ Fri May 27, 2016 9:29 pm ]
Post subject:  Re: MapTool 1.4.0.4 Build

paulstrait wrote:
I've found a strange bug. Whenever you make a new map, and you set the background to the white color in the upper lefthand corner, it spits out this error:

It is possible to edit a currently existing map to make it have a white background. I just checked and this also existed in 1.4.0.0.


Hmmm even stranger, if you select another colour, then you select white then it works... odd...

Author:  aliasmask [ Fri May 27, 2016 9:58 pm ]
Post subject:  Re: MapTool 1.4.0.4 Build

The error is new. Before if you select white it wouldn't do anything. You would have to select a different color then white for it to be selected.

Author:  taustinoc [ Fri May 27, 2016 11:31 pm ]
Post subject:  Re: MapTool 1.4.0.4 Build

I've always gotten that error at that point, since .b91 at least.

paulstrait:

If you go to the RGB tab on the Choose Background windows, and move one of the sliders, then move it back, you'll get a white background without errors.

Author:  xavram [ Sat May 28, 2016 5:47 pm ]
Post subject:  Re: MapTool 1.4.0.4 Build

Is there a place where all the new functions/methods available in 1.4.x are? I've used the Maptool wiki for a long time to find functions/methods to achieve what I want but I don't know if its being kept up to date with all the 1.4 changes.

Thanks!

Author:  Jagged [ Sun May 29, 2016 4:01 am ]
Post subject:  Re: MapTool 1.4.0.4 Build

@aliasmask I had that error in 1.3, so not sure when it was introduced.

@xavram the wiki is kept up-to-date but there is something of a lag :mrgreen:

Author:  xavram [ Sun May 29, 2016 9:12 am ]
Post subject:  Re: MapTool 1.4.0.4 Build

Thanks, I'll keep my eye open for the new methods there!

Author:  SeulDragon [ Mon May 30, 2016 11:49 pm ]
Post subject:  Re: MapTool 1.4.0.4 Build

A minor bug: The icons for the snap to grid, erase, paint brush, and opacity settings are missing on the drawing tools panel (both for drawing tools and template tools). They are replaced with the missing icon (red x) instead. Seen on both Windows 10 and Linux, using Java 8 x64. Same machines running 1.4.0.3 show the icons correctly. Snap to grid and erase both work normally when selected.

I did a quick checkout and build, and got the same results, but not being familiar with Java on this scale, I could not find where the code references the images. I didn't see any reports while poking around the forums and the Github repository, so I thought I would post it here. If there is a better place to report little bugs like this, please let me know.

I have attached a screenshot of the issue, in case my terminology is unclear or incorrect. I have not found any other missing icons either.

Thank you for your time and work on this project!

Attachments:
File comment: Screenshot showing missing icons.
maptool-1.4.0.4-no-icons-on-drawing-panel.png
maptool-1.4.0.4-no-icons-on-drawing-panel.png [ 4.15 KiB | Viewed 1194 times ]

Author:  JamzTheMan [ Tue May 31, 2016 9:23 pm ]
Post subject:  Re: MapTool 1.4.0.4 Build

Well that is strange indeed.

I can confirm this for 1.4.0.4. But It is currently working in our development build of 1.4.1.x. We didn't touch that code/resources AFAIK.

Page 1 of 1 All times are UTC - 6 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/