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.
Changed out images in .cmpgn zip file and corrupted file!
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.
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.
Re: Changed out images in .cmpgn zip file and corrupted file
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.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Changed out images in .cmpgn zip file and corrupted file
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.
Re: Changed out images in .cmpgn zip file and corrupted file
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.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.
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.