MapTool 1.4.0.4 Build

New build announcements plus site news and changes.

Moderators: dorpond, trevor, Azhrei, Craig

Post Reply
Craig
Great Wyrm
Posts: 2107
Joined: Sun Jun 22, 2008 7:53 pm
Location: Melbourne, Australia

MapTool 1.4.0.4 Build

Post by Craig »

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
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
  }
}

paulstrait
Dragon
Posts: 304
Joined: Mon Mar 23, 2009 4:48 pm

Re: MapTool 1.4.0.4 Build

Post by paulstrait »

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.

Craig
Great Wyrm
Posts: 2107
Joined: Sun Jun 22, 2008 7:53 pm
Location: Melbourne, Australia

Re: MapTool 1.4.0.4 Build

Post by Craig »

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...

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: MapTool 1.4.0.4 Build

Post by aliasmask »

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.

taustinoc
Dragon
Posts: 516
Joined: Mon Aug 03, 2015 6:30 pm

Re: MapTool 1.4.0.4 Build

Post by taustinoc »

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.

xavram
Dragon
Posts: 891
Joined: Tue Apr 20, 2010 8:22 pm

Re: MapTool 1.4.0.4 Build

Post by xavram »

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!

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: MapTool 1.4.0.4 Build

Post by Jagged »

@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:

xavram
Dragon
Posts: 891
Joined: Tue Apr 20, 2010 8:22 pm

Re: MapTool 1.4.0.4 Build

Post by xavram »

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

User avatar
SeulDragon
Kobold
Posts: 3
Joined: Sat May 28, 2016 1:35 pm
Location: New Mexico

Re: MapTool 1.4.0.4 Build

Post by SeulDragon »

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
Screenshot showing missing icons.
Screenshot showing missing icons.
maptool-1.4.0.4-no-icons-on-drawing-panel.png (4.15 KiB) Viewed 3439 times
"The more complex the mind, the greater the need for the simplicity of play."
- Captain James T. Kirk (Shore Leave Stardate 3025)

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: MapTool 1.4.0.4 Build

Post by JamzTheMan »

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.
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

Post Reply

Return to “Announcements”