Why did I get a .zip file when I downloaded a .cmpgn file?

Please post questions that you think belong here in the parent forum for discussion first. Then use the "Report this Post" function to alert a moderator that the post/thread should be moved. Common thread examples should not include macro programming, but rather user interface issues or usability issues.

Moderators: dorpond, trevor, Azhrei

Forum rules
Do not conduct discussion here. Do that in the parent forum.
Locked
User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Why did I get a .zip file when I downloaded a .cmpgn file?

Post by Rumble »

The .cmpgn format - which is the format that MapTool stores its campaign data in - is actually a renamed .zip file: it is a collection of xml, images, and other data that records all of the details of the campaign. So the imaginary file example.cmpgn is actually just a zip file that has had its extension changed.

When you download a campaign file from the internet, your browser may decide that since it recognizes the format of example.cmpgn as a Zip file, the file really should be renamed with what the browser thinks is the "proper" extension - and thus, during the download process, the browser renames the file to example.zip.

This can be confusing, because if you then unzip that file (the normal response to seeing a zip file) you will see the following in it:

* A directory called "assets"
* A file called properties.xml
* A file called content.xml

But nothing with the .cmpgn extension, and you may end up having no idea what to do.

The solution is simple: if the link you were downloading was pointed to a file that had the extension .cmpgn, and what you got was the same filename, but with the .zip extension, you can usually solve the problem by changing the file extension back to .cmpgn, and then opening it in MapTool.

For reference, MapTool stores all of its components in the zip format, with different extensions:

.cmpgn - Campaign data file (the entire campaign)
.rptok - Token data file (if you save an individual token, this is the extension)
.mtmacro - Macro data file (when you save - or export - an individual macro)
.mtmacset - Macro Set data file (when you export a set of multiple macros)
.mtprops - Campaign Properties (when you export the Campaign properties from within a campaign)

Update: As mentioned by Azhrei below, if the .zip file you downloaded has the proper structure, MapTool will be able to open it and understand its contents even without a MapTool-specific extension; however, the use of the extensions above will help you keep your MapTool files organized and minimize confusion.
Last edited by Rumble on Mon Mar 15, 2010 9:26 am, edited 1 time in total.

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

Re: Why did I get a .zip file when I downloaded a .cmpgn file?

Post by Azhrei »

Rumble wrote:The solution is simple: if the link you were downloading was pointed to a file that had the extension .cmpgn, and what you got was the same filename, but with the .zip extension, you can usually solve the problem by changing the file extension back to .cmpgn, and then opening it in MapTool.
This is the ideal solution because it will help you organize your MapTool files. However, a zip file can be opened directly by MapTool as long as it the required contents in it.
For reference, MapTool stores all of its components in the zip format, with different extensions:

.cmpgn - Campaign data file (the entire campaign)
.rptok - Token data file (if you save an individual token, this is the extension)
.mtmacro - Macro data file (when you save - or export - an individual macro)
.mtmacset - Macro Set data file (when you export a set of multiple macros)
.mtprops - Campaign Properties (when you export the Campaign properties from within a campaign)
And there's an unofficial .rpmap if you're using my patched version that can load/save individual maps.

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: Why did I get a .zip file when I downloaded a .cmpgn file?

Post by Rumble »

Azhrei wrote:This is the ideal solution because it will help you organize your MapTool files. However, a zip file can be opened directly by MapTool as long as it the required contents in it.
I was not aware of that. I was sure I'd tried to do so at one point or another and been told to go find something else to do. I must be misremembering.

Locked

Return to “WIP - User FAQ”