Wednesday, June 25, 2014

FMod - Better Exporter

In addition to making small progress on the New Project Wizard, I did some major improvements and additions to the bitmap exporter! In fact, those additions necessitated the addition of a configuration substructure for it.

First, I added an option to preserve the zoom level. By default, Abiathar will export the level as if it was zoomed to the 16 pixels per tile level. Since one might want to make it look more pixellated (or get a farther-out view), they can now switch BitmapExporter.PreserveZoom to True and do the image export as normal.

Then, I added an option to remove the two-tile-wide level borders, which usually just have bunch of ugly "edge of map" tiles, present only to appease the in-game renderer. When that is turned on, Abiathar will render the level as normal and then grab the appropriately sized rectangle out of the middle.

Finally, I added a way to export the level image without having to type a filename. If BitmapExporter.AutoFilename is not blank, it will be used as a template for the filename. There are a few special "entities" that Abiathar will replace before saving:
  • %l is the current level's name
  • %n is the current level's ID
  • %p is the Abiathar residing directory
  • %d is the dependency file residing directory
  • %f is the dependency file's name without extension
So, the AutoFilename string %d\%f_%n_%l.bmp saves the file in the dependency file's directory with the depfile's name, level ID, and level name in the file name.

No comments:

Post a Comment