Raw Data import tool?

Discussion of your thoughts & requests, help for users and game specific configuration files for Character Tool

Moderators: dorpond, Azhrei

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

Raw Data import tool?

Post by aliasmask »

Is there anything / anyone out there that has developed an import tool to set the stats of a token, especially for a custom config. I can use that or need the info to build a token from scratch. I have the wotc db for monsters in 3.5 as well as my own server to do the number crunching for me. It would be great if I could automate the process somewhat rather than typing in each character/monster by hand.

All I want to do is set the properties and possibly the token image(s) from a generated list like .csv or with value assignment like Strength = 10. I can do that, or create my own token generator if I can get the file format and encryption method used so MT can load the token.

I would be more than willing to share whatever I develop.

neofax
Great Wyrm
Posts: 1694
Joined: Tue May 26, 2009 8:51 pm
Location: Philadelphia, PA
Contact:

Re: Raw Data import tool?

Post by neofax »

You could use the Character Tool to generate a token and then unzip the rptok file. Inside you will find the xml and assets. From there, you can figure out how to do it. I have looked at the info, but do not know how to go about it.

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

Re: Raw Data import tool?

Post by aliasmask »

I can work with xml as well, but I'm not sure how to uncompress rptok files or what tool to use. I'll look around the boards for the answer. I'm still fairly new to MT but I find myself using it more often. I've only ran one "dungeon" with it having my friends in the same room, but I see it's power to play remotely as well. I'd like to do some programming work now to save me time later, specifically with random encounters. The faster I can generate a monster, the better.

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

Re: Raw Data import tool?

Post by aliasmask »

I see. I changed rptok extension to zip.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Raw Data import tool?

Post by Azhrei »

Search the forum for IMarvinTPA's web site. He has all of the monsters already available as RPTOK files for 3.5. I'm hoping he'll find a way to get the data and do the same for Pathfinder!

neofax
Great Wyrm
Posts: 1694
Joined: Tue May 26, 2009 8:51 pm
Location: Philadelphia, PA
Contact:

Re: Raw Data import tool?

Post by neofax »

@Azhrei: Do you know how he accomplished this? I have the capability of geting all of the monsters for 4E using my DDI account and would love to be able to gen monsters fast.

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Re: Raw Data import tool?

Post by jay »

aliasmask wrote:I can work with xml as well, but I'm not sure how to uncompress rptok files or what tool to use.
They are just zip files. The xml file you update for MT is called content.xml. The CT data is in character.xml. There is a directory containing the images which are called assets. The MD5 key for the image is used to link to the proper image in the XML.
aliasmask wrote:The faster I can generate a monster, the better.
All the 3.5 MM monsters are in IT, but they wouldn't have any of your custom properties defined.

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

Re: Raw Data import tool?

Post by aliasmask »

@Azhrei

Great resource. He did a lot of work there. The link is http://www.imarvintpa.com/DnDLive/index.php

I took a look at the XML files and I think I can generate my own tokens from scratch, specifically for NPCs, but I would like to know how the keys are generated and how important they are (ie if I leave blank, will they be generated for me later?)

<net.rptools.maptool.model.Token>
<id>
<baGUID>wKgBC/O5ntSfGwAAwIgBAw==</baGUID>
</id>

and

<net.rptools.maptool.model.GUID>
<baGUID>fwABAc9lFSoFAAAAKgABAQ==</baGUID>

and

<net.rptools.lib.MD5Key>
<id>2423c1226884107bdb9dd3afc06c3d15</id>

I'm familiar with MD5Keys and how they're used for encryption, but I don't really see any encryption. All these ids seem to be different for each token although some segments are the same. Any insight on this will help.

I think the model.GUID may be related to the size of image. This id seems very similar to other ids I have seen. I'm pretty sure the token id can be anything unique.

--edit
@jay
Thanks for the MD5Key info about the image. I didn't notice the relation to file name.

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Re: Raw Data import tool?

Post by jay »

The keys are generated from the actual image data. The entire file is loaded into a byte array and then the MD5 key is generated from that. You will need the MD5Key keys referenced in the XML or you will get broken images for your tokens & portraits. The GUID for the token is generated anew when loaded into MT so any one you put in there is fine. Not sure what <net.rptools.maptool.model.GUID> is so I don't know if it is needed or not.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Raw Data import tool?

Post by Azhrei »

Jay is correct. The MD5Key can easily be generated by the md5 (or sometimes md5sum) command by giving it a list of image files. The MD5Key is related to the image content but not the file name.

The GUID is simply a globally unique number. As long as it doesn't match any other GUID in the file you should be fine setting it to anything you want. (Don't take my word for that, though. Be sure to test it. :))

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

Re: Raw Data import tool?

Post by aliasmask »

Okay, thanks. I haven't done it yet, but it shouldn't be a problem. I'm running coldfusion and it should be as easy as id = HASH(fileByteString,"MD5");

Post Reply

Return to “CharacterTool”