View Single Post
Jamz
Senior Member
 
Join Date: Aug 2005
Location: Chicagoland
Posts: 397

Old June 25th, 2020, 07:53 AM
Quote:
Originally Posted by Venger View Post
Yes sir, I joined recently. Theres currently none, and I find it difficult to ask someone to do that scope of work needed to write an importer. Many lines of code.
I find Meleks fw very easy to configure tokens though
Im loving the integration and advances in Maptool and Hero Lab
Thanks for replies Jamz
No problem. Generally, an importer like this can be a lot of lines of code but a lot of copy/paste as it's generally the same "pattern". For instance it, to get Alignment, it may be something like:

[h: Alignment = herolab.XPath('/document/public/character/alignment/@name')]

And then getting Size, space, reach it may be like:
[h: Size = herolab.XPath('/document/public/character/size/@name')]
[h: Space = herolab.XPath('/document/public/character/size/space/@value')]
[h: Reach = herolab.XPath('/document/public/character/size/reach/@value')]

So depends on how familiar you are with XML and Xpath but it's not terribly difficult. You can use other tools to test and built them outside of MapTool if needed.

Someone (you?) could possibly create a macro to get a bulk of the properties like this, leaving more complicated ones to be done via the framework's normal method. Maybe. Depends on how he does things.

Mostly it's busy work looking up where certain things are stored in the XML more than anything and matching it with the property used in MapTool. It depends on how he stores the same data in MapTool (like storing all Attributes in a single JSON in a Property called Attributes vs storing in six properties called Str, Dex, Con, etc.

-Jamz

RPTools.net | MapTool Discord Invite

Download Latest MapTool Release | Download Latest TokenTool Release
Jamz is offline   #12 Reply With Quote