Token File Layout

Progress reports and musings from the developers on the current gaming tools.

Moderators: dorpond, trevor, Azhrei

Post Reply
fredjsquirrel
Kobold
Posts: 22
Joined: Thu Jan 28, 2016 9:17 pm

Token File Layout

Post by fredjsquirrel »

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.

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: Token File Layout

Post by Phergus »

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.

bobifle
Giant
Posts: 219
Joined: Thu Oct 19, 2017 12:36 pm

Re: Token File Layout

Post by bobifle »

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.

taustinoc
Dragon
Posts: 515
Joined: Mon Aug 03, 2015 6:30 pm

Re: Token File Layout

Post by taustinoc »

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.)

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

Re: Token File Layout

Post by aliasmask »

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.

Post Reply

Return to “Developer Notes”