Changed out images in .cmpgn zip file and corrupted file!

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
Tyshalle
Giant
Posts: 173
Joined: Sat Jul 10, 2010 5:45 pm

Changed out images in .cmpgn zip file and corrupted file!

Post by Tyshalle »

I am very confused by what has just occurred.

I was under the impression you could open up a .cmpgn file in 7zip and replace image assets, but this has resulted in very odd behavior.

Basically I am trying to replace image assets with more compressed versions of the same image, doing it in 7zip rather than meticulously replacing every file manually inside maptool itself. Doing this initially resulted in no change, the original, larger image continued to show up in maptool, so I realized this was the assetcache folder, deleted the folder's contents, and then the correct image showed up.

But then I closed maptool and re-opened it, and the image asset has been replaced with a large red questionmark. I have determined this is not the result of bad compression or what not. Replacing an image with the same exact image results in the same issue.

But what is confusing the hell out of me is that it works THE FIRST TIME. As in, if I were to replace something and delete the assetcache, everything loads just fine with the newly replaced images. But once you save, shut down maptool and reload it all, then it starts getting corrupted.

I have no idea what's going on or how to fix it, but hopefully there's some way of doing this that will work.

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

Re: Changed out images in .cmpgn zip file and corrupted file

Post by aliasmask »

I believe the image asset id is based on the image data. So, you can probably change the image, but you also need to replace the asset id.

Tyshalle
Giant
Posts: 173
Joined: Sat Jul 10, 2010 5:45 pm

Re: Changed out images in .cmpgn zip file and corrupted file

Post by Tyshalle »

If by asset ID you mean when maptool changes an image file name to "babca61e52d45cec10ec075545d05f45.png", I have already accounted for this. Before I put the more compressed image file into the zip, I change its name to be identical to what is already in the zip. It didn't help.

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: Changed out images in .cmpgn zip file and corrupted file

Post by Jagged »

Tyshalle wrote: But what is confusing the hell out of me is that it works THE FIRST TIME. As in, if I were to replace something and delete the assetcache, everything loads just fine with the newly replaced images. But once you save, shut down maptool and reload it all, then it starts getting corrupted.
If you can get the Campaign file to load once, then perhaps you should try exporting the map in question, then go back to a safe campaign, and import the map into that.

Generally speaking I would not recommend mucking about with the zip file. I've done it myself, but its undocumented, there are cross references that need to be taken into account and its generally a right pain in the arse ;). Its also the reason I started work on the Draw Explorer feature.

Post Reply

Return to “MapTool”