RPTools.net

Discussion and Support

Skip to content

It is currently Thu Jan 18, 2018 9:00 am 






Reply to topic  [ 5 posts ] 

Previous topic | Next topic 

  Print view

Author Message
 Offline
Kobold
 
Joined: Thu Jan 28, 2016 9:17 pm
Posts: 15
 Post subject: Token File Layout
PostPosted: Wed Jan 03, 2018 7:51 pm 
Is there such a thing as a Doc, File, whatever, that gives the layout of a token file? If so where would I find it?

I did do a quick browse of the svn site, but all I see is the java source code and a few other things.

The reason I'm looking for this is that I have been building a .Net application to help manage stuff for my Campaign. One of the things I have stored there are the Monsters. I would love to be able to generate a Map Tool token for the monsters from that tool. But obviously I would need to know what the file layout for the data would be.

If such a thing exists and someone can point me in the right direction I would greatly appreciate it.

Thanks.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri May 12, 2006 7:56 pm
Posts: 6347
Location: Middle of Nowhere, NM
 Post subject: Re: Token File Layout
PostPosted: Thu Jan 04, 2018 7:43 am 
None of the file formats have been documented AFAIK so you'll have to parse out the XML by hand referencing back to the code for insight into those things that are non-obvious.


Top
 Profile  
 
 Offline
Cave Troll
 
Joined: Thu Oct 19, 2017 11:36 am
Posts: 30
 Post subject: Re: Token File Layout
PostPosted: Thu Jan 04, 2018 7:44 am 
A token file is simply a zip file containing a bunch of xml files and possibly assets (binaries) which are probably images.

I've been manipulating these without any doc and believe me I'm not a hacker nor a genius.


typical content is:


content.xml
properties.xml
assets/ace7d82c4ed2ac6164e39666bd68156a -> actually a xml file
assets/ace7d82c4ed2ac6164e39666bd68156a.png


assets are binaries, named after their md5 checksum.


Top
 Profile  
 
 Offline
Giant
 
Joined: Mon Aug 03, 2015 5:30 pm
Posts: 238
 Post subject: Re: Token File Layout
PostPosted: Thu Jan 04, 2018 10:25 am 
Yeah, what bobifle said.

If you rename the file to end with .zip instead of .rptok, you can open it in Windows by double clicking on it. And the labels in the xlm files are generally pretty obvious.

If you want to alter the token file, best to work with a copy, because not all zip algorithms are created equal. There have been reports that some will leave the file in a state that Java can't read. (I use 7zip, which works fine and has a command line interface I can control from by VB program.)


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7983
Location: Bay Area
 Post subject: Re: Token File Layout
PostPosted: Fri Jan 05, 2018 4:44 am 
taustinoc wrote:
There have been reports that some will leave the file in a state that Java can't read. (I use 7zip, which works fine and has a command line interface I can control from by VB program.)


I've had this problem with using the Windows built-in and WinRAR. Although, WinRAR may have some settings to correct that problem. I didn't bother to explore for a solution. This was also a long while ago, so things may have changed since then.

_________________
Downloads:


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 5 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 are 2 users online :: 0 registered, 0 hidden and 2 guests (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 2 guests





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

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman