Added the ability to view and export the Plane B layout (backgrounds) of the Zones, as well.
Accessing the Zone Layout no longer has a lengthy delay.
Automatically detects Zone, Act, and Time Frame from the save state.
Fixed collision masks of the objects to make selecting them with the mouse easier.
Removed the 256x256 mappings export page.
Added the ability to take single screenshots of the Layout.
Added the ability to flip the orientation of objects in the Layout.
Added the ability to alter Tileset palette, and also import and export palettes to .tpl format.
ImageMagick installer no longer included, to keep filesize down.
A bunch of other cosmetic things, bugfixes, and cleanup.
What is Sonic Extractor CD Mix, and what does it do?
Presently, it is a simple programme designed for a single purpose - to assemble and export PNG images of the Sonic CD Zone Layouts, complete with objects.
How do I use Sonic Extractor to make a useful image?
Step 1: Tileset
When Sonic Extractor opens, there are four buttons in the top right-hand corner of the window - Open, Export, Layout, and Help. The Help Button opens this very document, which can also be done by pressing F1. Only the Open and Help Buttons can be accessed at programme start. Should you attempt to click the Export or Layout Buttons, they will implore you to first load a savestate.
Sonic Extractor requires you to supply it with a Gens savestate, from which it will extract the necessary data to compile the Zone map. Because Sonic CD is a Mega CD game, some of the data is stored in the Mega CD RAM, and so you will need to use savestates made in a version of Gens that correctly dumps Mega CD RAM. I recommend Gens+ 0.0.9.61. To get you started, a file called "Savestates.7z" is supplied with Sonic Extractor . It is a 7Zip archive of savestates made in each of the 70 Zones using Gens+ 0.0.9.61.
Press Open to access the Open Savestate dialog box. Navigate to the savestate you want to load, and open it. The centre of the screen should begin filling up with 16x16 tiles, if the savestate is of a compatible Gens format. If it is not compatible, Sonic Extractor will do its best to warn you, but the check for this is not completely infallible. If you load an incompatible file that Sonic Extractor is fooled into accepting (which I imagine would be incredibly rare, as that file's initial bytes would have to represent the ASCII for "GST" as Gens savestates do), unexpected errors may occur.
Anyway, if all goes well, the tiles will begin filling in. While this is happening, you cannot do anything else, but I have tried to make it as speedy as possible. You can however, at any time, press the Space Bar to cut the Tileset short. You might want to do this if you discover that you have accidentally loaded the wrong savestate, or if the relevant tiles have already finished loading.
You see, every Zone has a different number of tiles, and whereas the programme runs until it fills the whole Tileset canvas, if you see a couple of blank lines go by you can be confident that all of the tiles in use for the Zone are already in memory and you can stop the process early, speeding it up further (you can also stop it even earlier, before all the tiles are on the canvas, and compile the zone with those tiles missing, but that would only be good for a lark, if anything).
Now that you have a Tileset, the four buttons in the bottom right-hand corner of the screen, the Palette Buttons, will have been filled in with colours. These are all the colours used in the Tileset. You can edit them by clicking on them to bring up the standard Windows colour dialog. However, the Tileset will not change to reflect your modifications unless you manually refresh it. How do you do this? With the Tileset Menu - just Right Click anywhere on the screen to bring it up.
The first option is "Load Palette", which allows you to open any ".tpl" palette file (the format used in the useful programme, Tile Layer Pro). The Tileset will immediately recompile using the new palette data.
The second option is "Save Palette", which simply exports the palette in memory to a ".tpl" file.
The third option is "Recompile Tileset", which will do just what it says. Any modifications you've made to the palette using the Palette Buttons will be taken into account.
The final options are "Change Background Colour", which allows you to pick a colour of your choice, using the standard Windows colour dialog, and "Default Background Colour", which returns it to the original hue from the palette (the first colour on the third Palette Button down). Sometimes the default background colour from the Zone's own palette is just too dark for a pleasing map, and might need to be changed.
Should you choose to use this Tileset image in another programme, or just hang it on your desktop wallpaper for its inherent chaotic beauty, you can press the Export Button and export the image to a location of your choice. Otherwise, press the Layout Button, and it's on to Step 2 for you.
Step 2: Layout
You should be immediately met with a pretty faithful reproduction of the Zone you know and love from the Mega Drive.
By using the cursor keys, you can scroll through the Zone in 128-pixel steps. Press Page Up to hop to the top of the Layout, and Page Down to hop to the bottom. Pressing Home and End will take you to the horizontal extremes of the Layout. Press Space Bar to zoom in and back out.
Hover the mouse over any object (it will be highlighted blue when your cursor encounters it) to see a readout of its location in the upper left corner. Left-click drag an object to move it to a new location. This might be necessary in a number of cases. Though I have done my best to make the objects appear as faithfully as possible, some moving objects, such as Badniks, are always shown in their spawning location. Sonic games think nothing of spawning Badniks in the air, or even embedded in the ground, and then letting their own movement code snap them to a more favourable position before Sonic comes across them. So for someone making a map, some Badniks will almost surely need to be moved to better positions, and that is why I included the drag feature. However, should you regret where you have moved an object, just Right Click it to bring up its menu, and select "Restore Position" - it will obligingly return to its spawning location.
Other options on the object's Right Click menu include "Show", "Hide", "Show Type", and "Hide Type". Show and Hide turn the individual object on and off, so that it won't be visible upon export of the Zone Map. A shadow is left behind when you Hide the object, just so you can find it again to Show it, should you want to. But that shadow will not be seen on the final map or screenshots. Showing or Hiding Type does the indicated action for every object of the same type as the one you clicked - so that if you should feel it is not necessary to depict frolicking animals, or even Rings, on your final map, you can turn them all off easily. Remember, however, that object types may not be the same, even if they look the same. For instance, platforms may look identical, but exhibit distinct behaviour in the running game. This is undetectable on a map, of course, but bear in mind that if you Hide Type for a platform and they all don't obediently disappear, this is probably what is happening.
Next are "Flip Horizontal", "Flip Vertical". These simply reverse the image for that one object from left-to-right and from top-to-bottom, respectively. You can click "Restore Orientation" to return the object to its default appearance.
The final option on the object's Right Click menu is "Layer". You can choose between three layers - Back, Middle, and Front. This is because objects don't know which layer to be on (the data is just not accessible from the savestate, I'm afraid). For the most part, though, all objects are sandwiched in-between the low and high plane of the Zone tiles, but in some cases you may feel like changing the layer of the object to more accurately reflect the image as seen on the Mega Drive itself.
There is a second Right Click menu available in the Layout page, and it is accessed by Right Clicking on a blank area (i.e. not on an object). The first four options here are "Export Zone Map as BMP", "Export Zone Map as PNG", "Save Screenshot", and "Specify ImageMagick Directory", all of which will be covered in the next section. For now I'll describe the rest.
"Jump To..." lets you jump to any coordinate within the Zone Map easily. "Go to Background" takes you to the Zone’s Plane B layout, upon which the choice becomes "Go to Foreground", which returns you to the Plane A layout. "Zoom" does the same thing as hitting the space bar. "Toggle Layers" lets you show only the layers of Zone Tiles that you wish to, and "Toggle Objects" shows or hides all the objects at the same time, regardless of their type. "Change Background Colour" and "Default Background Colour" perform the same functions as on the Tileset Menu. “Count Rings” shows a message box with the number of Rings in the Act.
Finally, "Return" sends you back to the Tileset page. Be careful - pressing the Return option will cause you to lose all your changes to the Zone, as it is re-assembled each time you press the Layout tab. There is a confirmation prompt, though, so don't worry too much about hitting it by accident.
Step 3: Export the Zone Map
Once you have scrolled through the Zone Map (and tweaked whatever you felt was necessary), it's time to actually export the map. But which image format are you going to want to export it in? Sonic Extractor supports ".bmp" natively, since Game Maker can export in that format, but it sure takes up a lot of space. With a little help from the freeware command-line image manipulation tool, ImageMagick, though, Sonic Extractor can support ".png", as well. You just have to specify where the file "convert.exe" is stored in your Image Magick directory, so Sonic Extractor knows where to find it to make use of it. To do this you just bring up the Right Click menu and select "Specify ImageMagick Directory". If you don't want to install ImageMagick (though it really is a rather neat programme) you don't have to, of course, but you will be restricted to uncompressed bitmaps only.
If you're not using ImageMagick, then, select "Export Zone Map to BMP". Next, a message box will tell you the estimated disc cost, and you can cancel if you think it's too much. If you happen to be running the programme off a partition, or a USB drive, you could run into trouble. You'll just have to clear some space, drive hog!
If you are using ImageMagick, select "Export Zone Map to PNG" instead. There will be no disc cost message, since I can't predict how much the images will be compressed. The process only exports one bitmap at a time, usually 2048x2048 (if the Zone's dimensions aren't perfectly divisible by 2048, the final bitmap may be narrower). ImageMagick is used to convert each BMP chunk to PNG as it is made, unceremoniously deleting each BMP as it goes. Because of this, the Command Prompt window will appear several times, as necessary. The temporary bitmap can be up to 16 megabytes in size, so if you are operating on an extremely cramped drive, you might still want to make space considerations.
Because Game Maker has a size limit of 2048x2048 on exported images, when you export the Zone map you will be left with a series of chunks, and not one whole image. It'll be up to you to decide how to concatenate them (I’d recommend using ImageMagick for this). You may want to break Zones into several maps, or even discard unnecessary chunks.
Finally, you can choose "Save Screenshot" to save a bitmap of just the current screen.
This programme is made entirely by me, Mercury - the contents, though (sprites, layouts, etc) are entirely the property of Sega. For this reason, I don't need to be given credit for any maps exported with Sonic Extractor. However, I wouldn't take too kindly to somebody redistributing the programme as their own work, or using it to violate anyone's copyright, so please be polite.
Keep in mind also that ImageMagick is protected by its own licences, and Sonic Extractor is coded to be compatible with ImageMagick. Thus it might be infringing upon them, as well, if somebody tried doing something unscrupulous.
And finally, don't try selling the programme for money or anything. Cos that'd be stupid.
If you have anything to say about the programme (bug reports, feedback, and whatnot), you can send them to email@example.com. Any serious bugs brought to my attention I will try to remedy in future updates, but don't expect any personal replies. I'm simply far too busy (and misanthropic ;p).