Page 1 of 2
T³ - Tiamat 0.3.0
Posted: Mon Feb 10, 2014 5:39 am
by Virenerus
Hey guys. I have here for you the first testing version of my maptools. I document the progress of my work
here. This is not a stable version. There are missing and broken features as stated below. I am thankful for every bug report that is not in the known bugs list below.
Cool features that are included:
- properties now have types (see campaign properties and token property editor)
- The HP are read as: minimum current maximum
- properties.jpg (113.13 KiB) Viewed 6648 times
- Float type means a real number
- the Capped type allows you to store something like 40 of 50 in one property
- the old macro language was replaced by the much faster groovy scripting language
- the macro editor was improved to make editing easier
- The new macro editor
- macroeditor.jpg (152.68 KiB) Viewed 6648 times
Download Tiamat Build 0.3.0
How to install:
Just extract the zip file somewhere and execute the launcher.jar
Re: Virenerus' Tiamat Maptool
Posted: Tue Feb 11, 2014 11:00 am
by badsequel
Hi, the .zip file has a size of 0 bytes and no content...
Re: Virenerus' Tiamat Maptool
Posted: Tue Feb 11, 2014 12:06 pm
by Virenerus
darn, seems like a bug in git or github or my git tool. Very embaressing
I have a working version up in a minute.
Edit:
Okay, it is uploading. Should be there any minute now.
Re: Virenerus' Tiamat Maptool
Posted: Tue Feb 11, 2014 1:22 pm
by badsequel
.zip has content now.
I'll give it a try when time allows.
Re: Virenerus' Tiamat Maptool
Posted: Tue Feb 11, 2014 1:46 pm
by badsequel
No go. Crashes immediately
C:\Progs\maptool-1.3.b89>java -Xmx1024M -Xss512K -jar maptool-1.3.b89.jar
Exception in thread "main" java.lang.NoClassDefFoundError: com/jidesoft/plaf/LookAndFeelFactory$UIDefaultsCustomizer
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.jidesoft.plaf.LookAndFeelFactory$UIDefaultsCustomizer
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 6 more
C:\Progs\maptool-1.3.b89>
my setup:
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
Re: Virenerus' Tiamat Maptool
Posted: Tue Feb 11, 2014 2:05 pm
by Virenerus
Did you copy it over a clean install? I will make a build with all the files tomorrow. Had too much fun coding the whole day^^
Re: Virenerus' Tiamat Maptool
Posted: Tue Feb 11, 2014 2:45 pm
by badsequel
Yup.
will try testing again when you publish a new zip.
Re: Virenerus' Tiamat Maptool
Posted: Wed Feb 12, 2014 5:40 am
by Virenerus
Oh man, is this embaressing. But well. The build script had a bug that missed to packe some depencies into the zip. I hope
thisone works finally^^ I actually tested it this time on another computer.
Re: Virenerus' Tiamat Maptool
Posted: Wed Feb 12, 2014 7:34 am
by badsequel
I will test again later tonight.
Re: Virenerus' Tiamat Maptool
Posted: Wed Feb 12, 2014 7:45 am
by Virenerus
Thank you very much for your help!
Re: Virenerus' Tiamat Maptool
Posted: Thu Feb 13, 2014 1:22 am
by badsequel
Doh! Forgot all about it..
New attempt tonight
Re: Virenerus' Tiamat Maptool
Posted: Sun Feb 16, 2014 2:06 pm
by badsequel
Sorry for the delay.
Works fine on my end.
Anything specific your want tested?
Re: Virenerus' Tiamat Maptool
Posted: Sun Feb 16, 2014 3:34 pm
by Virenerus
Well first is the property system. There could be something I missed that leads to a crash/error when changing the types or switch the token type.
Also you could test every function from the API
But that's probably a bit much. I think bugs there will mostly be discovered when some people are actually using my version of maptool.
So I am grateful for anything you do with the tool. There will be more specific things to test in future releases.
API:
Code: Select all
TokenView:
getVisibleTokenParts(TokenView target) : EnumSet<TokenPart>
setNPC()
getBar(String barName) : Integer
hashCode() : int
removeOwner(String player)
getGMName() : String
getStateNames(String group) : Set<String>
addToInitiative(boolean allowDuplicates) : boolean
addToInitiative() : boolean
addToInitiative(boolean allowDuplicates, String state) : boolean
setBarVisible(String barName, boolean show)
getLayer() : String
copyToken(int numberOfCopies) : List<TokenView>
copyToken() : TokenView
setNotes(String notes)
isPC() : boolean
getId() : GUID
getStateName() : Set<String>
sendToBack()
equals(Object obj) : boolean
testInt()
setSpeech(String speechKey, String speech)
getPropertyDefault(String property) : Object
getDistance(int x, int y, String metric) : double
getDistance(TokenView target, boolean gridUnits, String metric) : double
getDistance(TokenView target, boolean gridUnits) : double
getDistance(int x, int y, boolean gridUnits, String metric) : double
getDistance(int x, int y) : double
getDistance(TokenView target, String metric) : double
getDistance(TokenView target) : double
getDistance(int x, int y, boolean gridUnits) : double
addOwner(String player)
isNPC() : boolean
isOwner(String player) : boolean
getNotes() : String
setSightType(String sightType)
getSpeechNames() : Set<String>
setGMNotes(String notes)
setVisibleToOwnerOnly(boolean ownerOnlyVisible)
removeFacing()
setGMName(String name)
getPropertyNames() : Set<String>
getSpeech(String speechKey) : String
isBarVisible(String barName) : boolean
getInitiative() : String
hasProperty(String name) : boolean
getMacro(String macroName) : MacroView
isSnapToGrid() : boolean
setVisible(boolean visible)
removeMacro(String macroName) : boolean
getLocation(boolean useDistancePerCell) : TokenLocation
getLocation() : TokenLocation
clearAllOwners()
getName() : String
setTokenImage(String assetId)
setHasSight(boolean value)
bringToFront()
getInitiativeHold() : boolean
getTokenImage() : String
getGMNotes() : String
isVisibleToOwnerOnly() : boolean
getMatchingProperties(String regex) : List<String>
isState(String state) : boolean
getBounds(Zone zone) : Rectangle
getBounds(Zone zone, int x, int y) : Rectangle
setDrawOrder(int newOrder)
getFacing() : Integer
setPC()
getWidth() : int
getDrawOrder() : int
createMacro(String label) : MacroView
setTokenInitiative(String state)
getSize() : String
hasLightSource(String category, String name) : boolean
hasLightSource(String category) : boolean
hasLightSource() : boolean
getOwners() : Set<String>
clearLightSources()
removeToken()
setBar(String barName, int value)
setAllStates(boolean value)
getLights(Token token, String category) : List<String>
getLights(Token token) : List<String>
setHalo(String hexColor)
moveToken(int x, int y, boolean gridUnits)
removeFromInitiative() : int
setLayer(String layer, boolean forceShape)
resetProperty(String property)
getPropertyType() : String
getProperty(String property) : Object
hasMacro(String macroName) : boolean
toString() : String
setName(String name)
getTokenShape() : String
isOwnedByAll() : boolean
getLastPath(boolean gridUnits) : List<IntPoint>
getHalo() : String
setLight(String category, String name, boolean active) : boolean
setLabel(String label)
setTokenShape(String shape)
getStateImage(String stateName, int size) : String
getStateImage(String stateName) : String
getTokenHandout() : String
hasSight() : boolean
getInitiatives() : List<String>
getHeight() : int
isVisible() : boolean
isVisible(int x, int y) : boolean
setFacing(Integer direction)
setTokenPortrait(String assetId)
setState(String state, boolean value)
setPropertyType(String type)
getSightType() : String
setSize(String size) : String
getTokenPortrait() : String
setProperty(String property, Object value)
getLabel() : String
setTokenHandout(String assetId)
setInitiativeHold(boolean value)
MapView:
getOwnedTokens(String playerID) : List<TokenView>
drawVBL(Shape shape, int thickness, AffineTransform transform)
drawVBL(Shape shape, int thickness)
drawVBL(Shape shape, boolean fill, int thickness)
drawVBL(Shape shape, boolean fill, AffineTransform transform)
drawVBL(Shape shape, boolean fill)
drawVBL(Shape shape, boolean fill, int thickness, AffineTransform transform)
drawVBL(Shape shape)
drawVBL(Shape shape, AffineTransform transform)
getVisibleTokens() : ArrayList<TokenView>
moveTokenToMap(MapView target, TokenView token, int targetX, int targetY) : boolean
moveTokenToMap(MapView target, List<TokenView> tokens, int targetX, int targetY) : int
deselectTokens(Collection<TokenView> tokens)
getTokensWithState(String state) : List<TokenView>
selectTokens(Collection<TokenView> tokens, boolean cumulative)
getTokens() : List<TokenView>
getSelectedTokens() : List<TokenView>
getNPCTokens() : List<TokenView>
exposeVisibleAreaGof()
deselectAllTokens()
getName() : String
getPCTokens() : List<TokenView>
makeCurrentMap()
exposePCAreaFog()
findToken(String identifier) : TokenView
getExposedTokens() : List<TokenView>
eraseVBL(Shape shape, int thickness)
eraseVBL(Shape shape, AffineTransform transform)
eraseVBL(Shape shape, boolean fill, int thickness)
eraseVBL(Shape shape, int thickness, AffineTransform transform)
eraseVBL(Shape shape, boolean fill, int thickness, AffineTransform transform)
eraseVBL(Shape shape, boolean fill, AffineTransform transform)
eraseVBL(Shape shape, boolean fill)
eraseVBL(Shape shape)
MacroView:
getCommand() : String
setCompareSortPrefix(Boolean value)
setAutoExecute(boolean autoExecute)
setFontColorKey(String fontColorKey)
setLabel(String label)
setMinWidth(String minWidth)
getColorKey() : String
setSortby(String sortby)
setCompareGroup(Boolean value)
getMaxWidth() : String
getCompareApplyToSelectedTokens() : Boolean
getCompareSortPrefix() : Boolean
getGroup() : String
setMaxWidth(String maxWidth)
getCompareIncludeLabel() : Boolean
getCommonMacro() : Boolean
getToolTip() : String
getApplyToTokens() : boolean
getAutoExecute() : boolean
setCommand(String command)
getFontColorKey() : String
setCompareApplyToSelectedTokens(Boolean value)
getMinWidth() : String
getCompareAutoExecute() : Boolean
getCompareCommand() : Boolean
getLabel() : String
setGroup(String group)
setCompareCommand(Boolean value)
setCommonMacro(Boolean value)
getSortby() : String
setColorKey(String colorKey)
setCompareAutoExecute(Boolean value)
getToken() : TokenView
setToolTip(String tt)
getCompareGroup() : Boolean
setApplyToTokens(boolean applyToTokens)
global scope:
getAllPropertyNames(String type) : List<String>
getAllPropertyNames() : List<String>
goTo(TokenView token)
goTo(int x, int y)
goTo(int x, int y, boolean gridUnit)
print(int i)
print(Object o)
print(boolean b)
print(float f)
ini.
setInitiativeRound(int round)
addAllNPCsToInitiative() : int
addAllNPCsToInitiative(boolean allowDuplicates) : int
getInitiativeToken() : TokenView
getInitiativeList(boolean hideNPCs) : InitiativeListView
getInitiativeList() : InitiativeListView
addAllPCsToInitiative(boolean allowDuplicates) : int
addAllPCsToInitiative() : int
nextInitiative() : int
removeAllNPCsFromInitiative() : int
addAllToInitiative(boolean allowDuplicates) : int
addAllToInitiative() : int
removeAllFromInitiative() : int
setCurrentInitiative(int value)
initiativeSize() : int
getInitiativeRound() : int
removeAllPCsFromInitiative() : int
sortInitiative()
getCurrentInitiative() : int
input.
input(TokenView token, String... parameters) : Map<String,String>
input(String... parameters) : Map<String,String>
getIcon(String id, int size, ImageObserver io) : ImageIcon
info.
getClientInfo() : JSONObject
getServerInfo() : JSONObject
getCampaignInfo() : JSONObject
getMapInfo() : JSONObject
getDebugInfo() : JSONObject
player.
getPlayers() : List<String>
hasImpersonatedToken() : boolean
getImpersonatedToken() : TokenView
getPlayer() : String
map.
getCurrentMap() : MapView
getAllMaps() : List<MapView>
setCurrentMap(MapView map)
getMapNames() : List<String>
getMap(String mapName) : MapView
dialog.
isFrameVisible(String name) : boolean
closeFrame(String name)
closeDialog(String name)
isDialogVisible(String name) : boolean
resetFrame(String name)
path.
movedOverPoint(TokenView token, List<IntPoint> path, List<IntPoint> points) : List<IntPoint>
movedOverToken(TokenView token, List<IntPoint> path, TokenView target) : List<IntPoint>
getMoveCount(List<IntPoint> path, boolean followGrid) : double
Re: Virenerus' Tiamat Maptool
Posted: Mon Feb 17, 2014 12:32 pm
by JML
Tried to download your build to no avail. I get the dreaded 404 error
By the way, did someone ask you why you chose Groovy instead of JavaScript ?
Re: Virenerus' Tiamat Maptool
Posted: Mon Feb 17, 2014 1:44 pm
by Virenerus
JML wrote:Tried to download your build to no avail. I get the dreaded 404 error
Right, i changed a name in github and forgot to update the link yesterday-.- Should be fixed now.
JML wrote:By the way, did someone ask you why you chose Groovy instead of JavaScript ?
There are many reasons: Groovy is a language that was very much influenced by some of the javascript freedoms. If you know javascript you will automatically feel at home with groovy. Most javascript stuff is directly the same in groovy. So groovy offers us all the benefits of javascript, e.g. dynamic typing(if you like that
). On the other hand groovy inherits many of the great qualities of java. It allows you to work with all the basic java classes. Want to write scripts that collect data from a sql backend? No problem. Java can do that and thus can Groovy. WIth Javascript you would have to write new API functions for that. You want to read files from the filesystem? Use image libraries to compose images on the fly? Groovy is a full programming language that allows you to do whatever you want while at the same time being as simple as javascript for beginners.
The other big thing is that groovy code can be more easily transformed into Java code. The final step of modularizing maptool (a future vision) will be to create living plug-in environment with the community. That would allow the knowledgeable to write game system specific plug-ins (or bags of tricks^^) that can be enabled/disabled by users as needed, without the need for them to understand anything about scripting/macro editing.
I think groovy is the perfect mix of a grown language and a little easy to use scripting language for maptool. Groovy does everything that a Javascrit fan could want in maptool and gives even more options to the more advanced user.
Here an example. Decide yourself if this is JS or Groovy:
Code: Select all
print(token.getName()+" distances:"); //token always refers to the token from which you execute your macro
var tokens=map.getCurrentMap().getNPCTokens();
for(int i=0;i<token.size();i++) {
var enemy=tokens.get(i);
print(enemy.getName()+" => "+token.getDistance(enemy));
}
ps: Also groovy is able to already see some bugs in you code when you try to save a macro button. At this time it compiles you code into java byte code.