Raoden's Quick'n'Dirty Token Manager
Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice
- CoveredInFish
- Demigod
- Posts: 3104
- Joined: Mon Jun 29, 2009 10:37 am
- Location: Germany
- Contact:
Re: Quick'n'Dirty Token Property Editing Dialog
i really should improve my testing skills. I think i'll be able to fix that .. maybe encode the property names before using them as variable name.
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: Quick'n'Dirty Token Property Editing Dialog
Heh. Well, of course, I just appreciate you sharing the tool. I'm sure it was working fine for you before I started breaking it.CoveredInFish wrote: i really should improve my testing skills.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
Re: Quick'n'Dirty Token Property Editing Dialog
OK, I added this feature and uploaded Version 1.1. Rather than italicizing the property name itself, I decided to just put a note in the Defaults column (since a "hidden" property by definition can't have a default value, AFAIK).Full Bleed wrote:Could you distinguish between which properties are "Hidden"? Maybe make them display in italics if they are?
Once I upgrade MapTool to b66, it will be pretty trivial to make the Property Editor dialog preserve properties' capitalization. Which will, in turn, allow me to simplify one obnoxious little line of code that I just put in the new version:
Code: Select all
[h: compareKeys = json.fromList( lower( getAllPropertyNames( getPropertyType() ) ) )]
Code: Select all
[h: compareKeys = getAllPropertyNames( getPropertyType(), "json" )]
Though I have to ask, FullBleed: have you played with Aliasmask's Macro Import/Export tool? It's quite handy for when you need to copy an old token's useful functions to a brand new token and leave behind any hidden property baggage.
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G. K. Chesterton
Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0
- G. K. Chesterton
Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0
Re: Quick'n'Dirty Token Property Editing Dialog
This looks like it would be a great tool but I can't seem to make it work. Using either the 1.0 ver or the 1.1 ver I get the same error.Raoden wrote:OK, I wasn't planning to post this as an independent User Creation, as I know there are already some similar things floating around. But there's been some interest expressed in this tool, and as far as I know there isn't currently any other tool on this Forum that has all of this utility.
InstructionsFeatures
- Download the attached token
- Place it in your campaign
- Copy the main macro -- the red one -- to Campaign Macros
- Select or impersonate on the token whose properties you want to edit
- Click on the new Edit Token Properties Campaign Macro
One thing I've noticed it can't do is change the order of elements in a JSON array. If such a feature would increase the utility significantly, let me know and I'll work on it.
- Interface should be pretty self-explanatory
- Accesses all of a token's properties, whether defined in Campaign Settings or "hidden"
- Can work with token properties that use JSON structures (of any reasonable depth). To make a token property into a JSON, or to add a nested layer to an existing JSON, just enter {} or [] when prompted for a value of a property.
Function getPropertyType requires exactly 0 parameters; 1 were provided.
I'm pretty sure I followed the instructions. Any thoughts?
DCI/RPGA# 7208328396 Skype ID mfrizzell77
Characters:
Strabor - Dwarf Avenger 5th Level
Tikkanan - Human Warlock 2nd Level
----------------------------------------------------
"People are more violently opposed to fur than leather because it's safer to harass rich women than motorcycle gangs."
Characters:
Strabor - Dwarf Avenger 5th Level
Tikkanan - Human Warlock 2nd Level
----------------------------------------------------
"People are more violently opposed to fur than leather because it's safer to harass rich women than motorcycle gangs."
- CoveredInFish
- Demigod
- Posts: 3104
- Joined: Mon Jun 29, 2009 10:37 am
- Location: Germany
- Contact:
Re: Quick'n'Dirty Token Property Editing Dialog
@FullBleed
This fix proved to be pretty hard. I had to drop using property names as variable name at all and use index numbers. For properties with weird signs like the pipe i build the input dialog now with encoded property names ... what might look weird but works reliable.
This fix proved to be pretty hard. I had to drop using property names as variable name at all and use index numbers. For properties with weird signs like the pipe i build the input dialog now with encoded property names ... what might look weird but works reliable.
duplicateToken the third
Code: Select all
[h: '<!-- get source and destination via user input -->']
[h: tokens = getTokens()]
[h: names = ""]
[h, foreach( id, tokens ): names = listAppend(names, getName(id))]
[h: status = input(
strformat("srcIdx|%s|Select source|LIST", names),
strformat("destIdx|%s|Select destination|LIST", names)
)]
[h: abort(status)]
[h: assert( srcIdx != destIdx ,"You must select different tokens.")]
[h: src = listGet(tokens, srcIdx)]
[h: dest = listGet(tokens, destIdx)]
[h: '<!-- set states -->']
[h: allStates = getTokenStates()]
[h, foreach(state, allStates): setState(state, getState(state, src), dest)]
[h: '<!-- set image -->']
[h, token(src): image = getTokenImage()]
[h, token(dest): setTokenImage( image )]
[h: '<!-- copy properties -->']
[h: allProps = getPropertyNames(",", src)]
[h: '<!-- build dialog -->']
[h: fields = ""][h: idx = 0]
[h, foreach(prop, allProps), code: {
[h: fields = json.append(fields, strformat("exclude%d|0|<html>%s</html>|CHECK", idx, encode(prop)))]
[h: idx = idx+1]
}]
[h: status = input("dummy|<html><b>Select properties to exclude from copy</b></html>||LABEL|SPAN=TRUE",
json.toList(fields, "##"))]
[h: abort(status)]
[h: excludeList = ""][h: idx = 0]
[h, foreach(prop, allProps), code: {
[h: propValue = eval("exclude"+idx)]
[h, if(propValue==1): excludeList = listAppend(excludeList, prop)]
[h: idx = idx+1]
}]
[h, foreach(prop, allProps), code: {
[h, if(listFind(excludeList, prop)==-1), code: {
[h: setProperty(prop, getProperty(prop, src), dest)]
};{}]
}]
[h: '<!-- misc -->']
[h: setName(getName(src)+" copy", dest)]
[h: setGMName(getGMName(src), dest)]
[h: setLabel(getLabel(src), dest)]
[h, token(src): notes = getNotes()]
[h, token(dest): setNotes(notes)]
[h, token(src): notes = getGMNotes()]
[h, token(dest): setGMNotes(notes)]
[h, if( isPC(src)): setPC(dest); setNPC(dest)]
[h: setSize(getSize(src), dest)]
[h: setVisible(getVisible(src), dest)]
[h: setPropertyType(getPropertyType(src), dest)]
[h: '<!-- macros -->']
[h: allMacros = getMacros(",", src)]
[h, foreach( macro, allMacros ), code: {
[h: indexes = getMacroIndexes(macro, ",", src)]
[h, foreach( index, indexes ), code: {
[h: props = getMacroProps(index, "json", src)]
[h: createMacro(props, dest)]
}]
}]
It would still require some handywork. The duplicate-Token-macro should do it all by itself - with the possibility to *not* create specific properties (or we could use copyToken).Raoden wrote: Though I have to ask, FullBleed: have you played with Aliasmask's Macro Import/Export tool? It's quite handy for when you need to copy an old token's useful functions to a brand new token and leave behind any hidden property baggage.
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: Quick'n'Dirty Token Property Editing Dialog
Thanks for the tweak. I think it helps create a clearer snapshot of the properties on a token.Raoden wrote:OK, I added this feature and uploaded Version 1.1. Rather than italicizing the property name itself, I decided to just put a note in the Defaults column (since a "hidden" property by definition can't have a default value, AFAIK).
Once I upgrade MapTool to b66, it will be pretty trivial to make the Property Editor dialog preserve properties' capitalization.
I'm also still using b63, since b66 still has a few outstanding bugs to be fixed in the next release.
Well, first, I want to give credit where credit is due... the Macro I/O tool was originally CiF's baby, and Alias took it up a couple notches. A great collaborative effort.Now that that feature is in place, I can start investigating the other stuff you guys have been doing here ...
Though I have to ask, FullBleed: have you played with Aliasmask's Macro Import/Export tool? It's quite handy for when you need to copy an old token's useful functions to a brand new token and leave behind any hidden property baggage.
Second, it is a very cool tool and a part of my MT toolbox but it's not really geared toward what this duplicateToken tool is doing. This thing that CiF has been working on in this thread is more specialized at copying everything in a token, except the properties you don't want (which is an awesome feature in and of itself considering how dirty MT is about leaving unused property stuff behind in a token.) After I post this I'm going to check out his new version, but it was really copying everything about the token except the vision setting when I did get it to partially work. The I/O tool was really designed to move large chunks of macro code to an external editor, and while you can move move macros from token to token, you've got to do some additional token setup as well (not to mention the whole cut'n'paste thing you have to do as opposed to just clicking a single button to copy everything... this does give me another feature request for CiF's duplicateToken tool though... )
I do, however, think your Edit Property Tool, the duplicateToken tool, and the Macro I/O tool would all be great in one really cool Token Management Tool. But getting them all together might be more trouble than it's worth since it requires UI work.
Last edited by Full Bleed on Wed May 19, 2010 5:44 am, edited 1 time in total.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: Quick'n'Dirty Token Property Editing Dialog
Awesome. Just tried it out and it worked great.CoveredInFish wrote:@FullBleed
This fix proved to be pretty hard. I had to drop using property names as variable name at all and use index numbers. For properties with weird signs like the pipe i build the input dialog now with encoded property names ... what might look weird but works reliable.
I do have a couple other requests if you're interested in developing the tool further...
1) Change the "Check properties that you want to exclude" terminology to be "Remove Properties you don't want to Copy" and make all the boxes checked by default. I think it's a little more intuitive to see the checkmarks next to what I want to keep... but that may just be me.
2) Give us a selection screen that works like 1) for the macros on the token so that we can also remove macros we don't want to copy over. I figure that most of the time, people will want to copy all of them, but being able to uncheck the macros you no longer use/need might be pretty nice. Right now if you have a bunch of macros you want to remove from a token it's actually a little annoying to "right-click>delete" them all. Using this would be easier.
3) Heck, giving us options in the macro to make any changes to all of the things that are being copied would be nice. Again, most will probably just want a straight copy, but it would be nice to be able to make quick changes right there.
4) It's not currently copying the Vision type. The copy is always set to "normal." Can that be copied too?
5) How about an option to "Copy and Replace" the selected token so that we don't have to drag a "blank" image onto the screen and rename anything?
6) This doesn't copy over Portraits or Handouts. Can that be done by macro?
I know I'm complicating what was a "simple" tool, but after just using it to clear out some old properties (which was a whole lot easier than editing the XML!) I just started to think about what would make it even better.
Edit: Added #6.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
Re: Quick'n'Dirty Token Property Editing Dialog
What MapTool build are you using? I haven't tested this resource in anything except b63.mfrizzell wrote:This looks like it would be a great tool but I can't seem to make it work. Using either the 1.0 ver or the 1.1 ver I get the same error.
Function getPropertyType requires exactly 0 parameters; 1 were provided.
I'm pretty sure I followed the instructions. Any thoughts?
That's a very strange error for you to be reporting, though. IIRC, version 1.0 didn't use Wiki: getPropertyType() at all; and in version 1.1, it only uses getPropertyType in one place, where there should indeed be zero parameters.
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G. K. Chesterton
Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0
- G. K. Chesterton
Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0
Re: Quick'n'Dirty Token Property Editing Dialog
Good point. That was rather rude of me to forget and leave out.Full Bleed wrote:Well, first, I want to give credit where credit is due... the Macro I/O tool was originally CiF's baby, and Alias took it up a couple notches. A great collaborative effort.
Yeah, I know the I/O doesn't do everything you're looking for. I just wanted to make sure you were aware of it, since it has already been useful to me in cleaning up unwanted "hidden" properties on old tokens. Granted, the macros and the hidden properties were pretty much all I cared about on those tokens; not the properties' values, or the portrait or facing or speeches or anything.Second, it is a very cool tool and a part of my MT toolbox but it's not really geared toward what this duplicateToken tool is doing. This thing that CiF has been working on in this thread is more specialized at copying everything in a token, except the properties you don't want (which is an awesome feature in and of itself considering how dirty MT is about leaving unused property stuff behind in a token.) After I post this I'm going to check out his new version, but it was really copying everything about the token except the vision setting when I did get it to partially work. The I/O tool was really designed to move large chunks of macro code to an external editor, and while you can move move macros from token to token, you've got to do some additional token setup as well (not to mention the whole cut'n'paste thing you have to do as opposed to just clicking a single button to copy everything... this does give me another feature request for CiF's duplicateToken tool though... )
Not too hard, considering I've already combined the Property Editor with the I/O (and some other random macros). I'll let you know once I've also integrated the duplicateToken tool.I do, however, think your Edit Property Tool, the duplicateToken tool, and the Macro I/O tool would all be great in one really cool Token Management Tool. But getting them all together might be more trouble than it's worth since it requires UI work.
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G. K. Chesterton
Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0
- G. K. Chesterton
Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0
Re: Quick'n'Dirty Token Property Editing Dialog
I was using b64 at the time. I didn't try it in anything else.Raoden wrote:What MapTool build are you using? I haven't tested this resource in anything except b63.mfrizzell wrote:This looks like it would be a great tool but I can't seem to make it work. Using either the 1.0 ver or the 1.1 ver I get the same error.
Function getPropertyType requires exactly 0 parameters; 1 were provided.
I'm pretty sure I followed the instructions. Any thoughts?
That's a very strange error for you to be reporting, though. IIRC, version 1.0 didn't use Wiki: getPropertyType() at all; and in version 1.1, it only uses getPropertyType in one place, where there should indeed be zero parameters.
Edit: I tried it in B63 and it works fine, but apparently not in B64. I'll try later in B66.
DCI/RPGA# 7208328396 Skype ID mfrizzell77
Characters:
Strabor - Dwarf Avenger 5th Level
Tikkanan - Human Warlock 2nd Level
----------------------------------------------------
"People are more violently opposed to fur than leather because it's safer to harass rich women than motorcycle gangs."
Characters:
Strabor - Dwarf Avenger 5th Level
Tikkanan - Human Warlock 2nd Level
----------------------------------------------------
"People are more violently opposed to fur than leather because it's safer to harass rich women than motorcycle gangs."
Re: Quick'n'Dirty Token Property Editing Dialog
B64 had a lot of issues, and some of them were indeed related to getProperty()-related functions. Let me know if it works in B66 -- I am curious about that.mfrizzell wrote:I was using b64 at the time. I didn't try it in anything else.
Edit: I tried it in B63 and it works fine, but apparently not in B64. I'll try later in B66.
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G. K. Chesterton
Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0
- G. K. Chesterton
Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0
Re: Quick'n'Dirty Token Property Editing Dialog
Mixed results, it works I would guess on the basic property set but apparently not added property sets.Raoden wrote:B64 had a lot of issues, and some of them were indeed related to getProperty()-related functions. Let me know if it works in B66 -- I am curious about that.mfrizzell wrote:I was using b64 at the time. I didn't try it in anything else.
Edit: I tried it in B63 and it works fine, but apparently not in B64. I'll try later in B66.
I dropped a picture onto the map and gave the basic set a few properties then gave it a couple of hidden properties and even added some properties from a made up extra set. They were all read just fine. But when I dropped a token on there that was heavy with hidden properties and added properties it failed to read it with the following error:
Unknown property type Enhanced in function getAllPropertyNames
I could attach the token if you want to look at it.
Edit: Attatched the token, thanks for taking a look.
- Attachments
-
- Strabor 5-26-10.rptok
- (330.57 KiB) Downloaded 108 times
Last edited by mfrizzell on Wed May 26, 2010 8:02 pm, edited 1 time in total.
DCI/RPGA# 7208328396 Skype ID mfrizzell77
Characters:
Strabor - Dwarf Avenger 5th Level
Tikkanan - Human Warlock 2nd Level
----------------------------------------------------
"People are more violently opposed to fur than leather because it's safer to harass rich women than motorcycle gangs."
Characters:
Strabor - Dwarf Avenger 5th Level
Tikkanan - Human Warlock 2nd Level
----------------------------------------------------
"People are more violently opposed to fur than leather because it's safer to harass rich women than motorcycle gangs."
Re: Quick'n'Dirty Token Property Editing Dialog
Yeah, without seeing your macros and the token data we'd just be guessing at what the issue could be...mfrizzell wrote:Unknown property type Enhanced in function getAllPropertyNames
I could attach the token if you want to look at it.
Re: Quick'n'Dirty Token Property Editing Dialog
I've added my token please see previous post.
Thanks
Thanks
DCI/RPGA# 7208328396 Skype ID mfrizzell77
Characters:
Strabor - Dwarf Avenger 5th Level
Tikkanan - Human Warlock 2nd Level
----------------------------------------------------
"People are more violently opposed to fur than leather because it's safer to harass rich women than motorcycle gangs."
Characters:
Strabor - Dwarf Avenger 5th Level
Tikkanan - Human Warlock 2nd Level
----------------------------------------------------
"People are more violently opposed to fur than leather because it's safer to harass rich women than motorcycle gangs."
- CoveredInFish
- Demigod
- Posts: 3104
- Joined: Mon Jun 29, 2009 10:37 am
- Location: Germany
- Contact:
Re: Quick'n'Dirty Token Property Editing Dialog
I checked and experienced following.
Dropping your token in b63 throw a error.
Dropping in b66 worked fine.
I could confirm your error report there.
I could manually call getAllPropertyNames() on that token without problems (thinking that the error message is - as often - misleading).
Output was
I noticed that you have images in your macro labels on the token and use single quotes there. I think that is reported for some problems, not sure if it has anything to do with that here.
Dropping your token in b63 throw a error.
error
java.lang.InstantiationError: java.util.Map$Entry
at sun.reflect.GeneratedSerializationConstructorAccessor84.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.thoughtworks.xstream.converters.reflection.Sun14ReflectionProvider.newInstance(Sun14ReflectionProvider.java:62)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:257)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:124)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:45)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46)
at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:66)
at com.thoughtworks.xstream.converters.collections.MapConverter.populateMap(MapConverter.java:63)
at com.thoughtworks.xstream.converters.collections.MapConverter.unmarshal(MapConverter.java:54)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:45)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46)
at com.thoughtworks.xstream.annotations.AnnotationReflectionConverter.unmarshallField(AnnotationReflectionConverter.java:66)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:188)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:125)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:45)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:117)
at com.thoughtworks.xstream.core.ReferenceByXPathMarshallingStrategy.unmarshal(ReferenceByXPathMarshallingStrategy.java:29)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:846)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:833)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:789)
at net.rptools.lib.io.PackedFile.getContent(PackedFile.java:138)
at net.rptools.lib.io.PackedFile.getContent(PackedFile.java:123)
at net.rptools.maptool.util.PersistenceUtil.loadToken(PersistenceUtil.java:400)
at net.rptools.maptool.client.TransferableHelper.handleFileList(TransferableHelper.java:133)
at net.rptools.maptool.client.TransferableHelper.getAsset(TransferableHelper.java:76)
at net.rptools.maptool.client.TransferableHelper.importData(TransferableHelper.java:238)
at javax.swing.TransferHandler.importData(Unknown Source)
at javax.swing.TransferHandler$DropHandler.drop(Unknown Source)
at java.awt.dnd.DropTarget.drop(Unknown Source)
at javax.swing.TransferHandler$SwingDropTarget.drop(Unknown Source)
at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(Unknown Source)
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(Unknown Source)
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(Unknown Source)
at sun.awt.dnd.SunDropTargetEvent.dispatch(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.processDropTargetEvent(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.dispatchEvent(Unknown Source)
at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:24)
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)
at sun.reflect.GeneratedSerializationConstructorAccessor84.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.thoughtworks.xstream.converters.reflection.Sun14ReflectionProvider.newInstance(Sun14ReflectionProvider.java:62)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:257)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:124)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:45)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46)
at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:66)
at com.thoughtworks.xstream.converters.collections.MapConverter.populateMap(MapConverter.java:63)
at com.thoughtworks.xstream.converters.collections.MapConverter.unmarshal(MapConverter.java:54)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:45)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46)
at com.thoughtworks.xstream.annotations.AnnotationReflectionConverter.unmarshallField(AnnotationReflectionConverter.java:66)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:188)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:125)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:56)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:45)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:46)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:117)
at com.thoughtworks.xstream.core.ReferenceByXPathMarshallingStrategy.unmarshal(ReferenceByXPathMarshallingStrategy.java:29)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:846)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:833)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:789)
at net.rptools.lib.io.PackedFile.getContent(PackedFile.java:138)
at net.rptools.lib.io.PackedFile.getContent(PackedFile.java:123)
at net.rptools.maptool.util.PersistenceUtil.loadToken(PersistenceUtil.java:400)
at net.rptools.maptool.client.TransferableHelper.handleFileList(TransferableHelper.java:133)
at net.rptools.maptool.client.TransferableHelper.getAsset(TransferableHelper.java:76)
at net.rptools.maptool.client.TransferableHelper.importData(TransferableHelper.java:238)
at javax.swing.TransferHandler.importData(Unknown Source)
at javax.swing.TransferHandler$DropHandler.drop(Unknown Source)
at java.awt.dnd.DropTarget.drop(Unknown Source)
at javax.swing.TransferHandler$SwingDropTarget.drop(Unknown Source)
at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(Unknown Source)
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(Unknown Source)
at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(Unknown Source)
at sun.awt.dnd.SunDropTargetEvent.dispatch(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.processDropTargetEvent(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.dispatchEvent(Unknown Source)
at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:24)
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)
I could confirm your error report there.
I could manually call getAllPropertyNames() on that token without problems (thinking that the error message is - as often - misleading).
Output was
Code: Select all
getPropertyNames() =
ac,actionpoints,bloodied,charisma,constitution,damage,damagetaken,defense,description,dexterity,elevation,fortitude,hp,immune,initbonus,intelligence,languages,level,maxhp,ml_ac,ml_ap,ml_atkmod,ml_bloodied,ml_chrmod,ml_conmod,ml_damage,ml_dexmod,ml_fort,ml_hp,ml_intmod,ml_level,ml_maxhp,ml_ml_hp,ml_name,ml_ref,ml_strmod,ml_surge,ml_surgenumber,ml_surgesperday,ml_surgesremaining,ml_surgevalue,ml_swused,ml_temphp,ml_will,ml_wismod,ml_xp,movement,name,reflex,regeneration,resist,savebonus,skills,speed,strength,surgeperday,surgeremaining,surgevalue,temphp,vulnerable,will,wisdom
getAllPropertyNames() =
Strength,Dexterity,Constitution,Intelligence,Wisdom,Charisma,HP,AC,Defense,Movement,Elevation,Description