I took a look inside one of my campaign files and noticed several images still in there when I know the objects/drawn element/etc that use them are gone. Is there any way to make maptool remove any assets that aren't being used?
I mean, it's not a big deal. My campaign file is only 40 mb, but the two images in question were both over 2 mb. Just those two alone would reduce the file by 10%, and I imagine there's a lot of smaller resources that I just haven't noticed yet.
"Garbage" collection in campaign files
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: "Garbage" collection in campaign files
Check if some of the images are in tables, I know that fooled me a few times.
MT Framework: Call of Cthulhu 7th fork, D&D 5e Spell Library
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
Re: "Garbage" collection in campaign files
Rupert - Were they map images or something else like perhaps handouts on a token?
And welcome to the forums!
And welcome to the forums!
Re: "Garbage" collection in campaign files
It was a colours-on-white image I used to pattern fill a drawn prismatic wall. But the wall has since been dispelled & deleted from the campaign file.
Re: "Garbage" collection in campaign files
I'm a complete MT noob, I only use it as a pencil & paper mapping replacement, all my players are even in the same room w/ me. I don't use any tables (checked the tables window just now to be sure)
The image in my example is listed as the backgroundPaint of a drawn element, like I remember using it, but there's no such element in the the campaign anymore.
Code: Select all
<net.rptools.maptool.model.drawing.DrawnElement>
<drawable class="net.rptools.maptool.model.drawing.LineSegment">
<id>
<baGUID>AAAAAJrS5l5isQMAAAAAAA==</baGUID>
</id>
<layer>BACKGROUND</layer>
<points>
<java.awt.Point>
<x>3306</x>
<y>892</y>
</java.awt.Point>
<java.awt.Point>
<x>3306</x>
<y>892</y>
</java.awt.Point>
</points>
<width>1.0</width>
<squareCap>false</squareCap>
</drawable>
<pen>
<foregroundMode>1</foregroundMode>
<backgroundMode>0</backgroundMode>
<backgroundPaint class="net.rptools.maptool.model.drawing.DrawableTexturePaint">
<assetId>
<id>edbb0b732e4a72f53fc9d48f6664cc10</id>
</assetId>
<scale>1.0</scale>
</backgroundPaint>
<thickness>1.0</thickness>
<eraser>false</eraser>
<squareCap>false</squareCap>
<opacity>1.0</opacity>
<color>0</color>
<backgroundColor>0</backgroundColor>
</pen>
</net.rptools.maptool.model.drawing.DrawnElement>
Re: "Garbage" collection in campaign files
Did you remove the drawing by deleting it from the Draw Explorer window or did you "delete" it by drawing over it with the erase option?
Check your Draw Explorer window and make sure it isn't there.
Check your Draw Explorer window and make sure it isn't there.
Re: "Garbage" collection in campaign files
Deleted from draw explorer, and I searched all the drawn elements of all maps of the campaign file before I posted my question. Besides, this is just one example. There's at one, possibly two, other image assets that are hanging around orphaned.
Re: "Garbage" collection in campaign files
That's curious. Tried a number of ways to make it happen and couldn't. What version of MapTool are you using?
Re: "Garbage" collection in campaign files
I'm using 1.5.1 right now. The campaign file has been this approximately this size for a while now, I was using 1.4.1.8 until 1.5.1 became available.
Yeah, I just don't get it.
The image, which has an asset id edbb0b[yada yada yada].png is then named in the corresponding edbb0b[yadayada] "<name>prismatic wall</name>". But then, outside of actual text (token notes) there's no occurrence of 'prismatic wall' in all of content.xml.
So, I've just manually deleted each pair of .png and naming-file from the campaign file asset folder and it still loads without any complaints. Weird. There's ~400 images/icons/patterns, so I only had a quick look at the bigger ones, there doesn't seem to be any other orphans. My campaign file went from ~40mb to just under 35mb.
edit: for what it's worth, the other two [large] image files that I deleted would have also been background drawn pattern files. Perhaps I found a combo for draw-undo-redo that made maptools lose track.
Yeah, I just don't get it.
The image, which has an asset id edbb0b[yada yada yada].png is then named in the corresponding edbb0b[yadayada] "<name>prismatic wall</name>". But then, outside of actual text (token notes) there's no occurrence of 'prismatic wall' in all of content.xml.
So, I've just manually deleted each pair of .png and naming-file from the campaign file asset folder and it still loads without any complaints. Weird. There's ~400 images/icons/patterns, so I only had a quick look at the bigger ones, there doesn't seem to be any other orphans. My campaign file went from ~40mb to just under 35mb.
edit: for what it's worth, the other two [large] image files that I deleted would have also been background drawn pattern files. Perhaps I found a combo for draw-undo-redo that made maptools lose track.
Re: "Garbage" collection in campaign files
That could be. IIRC, undo was still pretty borked in MapTool 1.4.1.8.