RPTools.net

Discussion and Support

Skip to content

It is currently Sun Dec 17, 2017 3:18 am 






Reply to topic  [ 10 posts ] 

Previous topic | Next topic 

  Print view

Author Message
 Offline
Great Wyrm
 
Joined: Sun Jun 22, 2008 6:53 pm
Posts: 2102
Location: Melbourne, Australia
 Post subject: MapTool 1.4.0.4 Build
PostPosted: Fri May 27, 2016 5:46 am 
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
  }
}


Top
 Profile  
 
 Offline
Dragon
 
Joined: Mon Mar 23, 2009 3:48 pm
Posts: 326
 Post subject: Re: MapTool 1.4.0.4 Build
PostPosted: Fri May 27, 2016 6:55 pm 
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.


Top
 Profile  
 
 Offline
Great Wyrm
 
Joined: Sun Jun 22, 2008 6:53 pm
Posts: 2102
Location: Melbourne, Australia
 Post subject: Re: MapTool 1.4.0.4 Build
PostPosted: Fri May 27, 2016 9:29 pm 
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...


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7968
Location: Bay Area
 Post subject: Re: MapTool 1.4.0.4 Build
PostPosted: Fri May 27, 2016 9:58 pm 
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.

_________________
Downloads:


Top
 Profile  
 
 Offline
Giant
 
Joined: Mon Aug 03, 2015 5:30 pm
Posts: 227
 Post subject: Re: MapTool 1.4.0.4 Build
PostPosted: Fri May 27, 2016 11:31 pm 
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.


Top
 Profile  
 
 Offline
Dragon
 
Joined: Tue Apr 20, 2010 7:22 pm
Posts: 602
 Post subject: Re: MapTool 1.4.0.4 Build
PostPosted: Sat May 28, 2016 5:47 pm 
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!


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon Sep 15, 2008 8:27 am
Posts: 1184
Location: Bristol, UK
 Post subject: Re: MapTool 1.4.0.4 Build
PostPosted: Sun May 29, 2016 4:01 am 
@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:


Top
 Profile  
 
 Offline
Dragon
 
Joined: Tue Apr 20, 2010 7:22 pm
Posts: 602
 Post subject: Re: MapTool 1.4.0.4 Build
PostPosted: Sun May 29, 2016 9:12 am 
Thanks, I'll keep my eye open for the new methods there!


Top
 Profile  
 
User avatar  Offline
Kobold
 
Joined: Sat May 28, 2016 12:35 pm
Posts: 3
Location: New Mexico
 Post subject: Re: MapTool 1.4.0.4 Build
PostPosted: Mon May 30, 2016 11:49 pm 
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!


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 1093 times ]

_________________
"The more complex the mind, the greater the need for the simplicity of play."
- Captain James T. Kirk (Shore Leave Stardate 3025)
Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon May 10, 2010 11:59 am
Posts: 1722
Location: Chicagoland
 Post subject: Re: MapTool 1.4.0.4 Build
PostPosted: Tue May 31, 2016 9:23 pm 
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 10 posts ] 

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

Search for:

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 1 guest





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman