Many image editing programs have an option to coerce an image into a given color table. That will work just as well as starting from a vanilla file. The exact method would depend on what image editor you're using. The problem is that if you save the color table out of a vanilla file and load it into your image, it will probably change the colors of what you've drawn rather than rearrange your image to match the color table.I've been following along so far, but at this stage I'm stuck. The map files are not cooperative; trying to place images into them doesn't work (option is greyed). The only alternative I could devise is to convert my map files color mode into "indexed", save and load the correct color tables into the new ones. My primary question is if this is good enough, or I should stick strictly to the guide?
I can think of 2 ways to do it with the Gimp editor:
• 1 Copy the vanila file palette into Gimp. Open your image in Gimp. Convert it to RGB (menu: Image>Mode>RGB). Convert it back to indexed Convert it to RGB (menu: Image>Mode>Indexed…). That will open a dialogue: chose "Use custom palette" and select the palette you imported earlier; untick "removed unused…". Hit "Convert", and your file should now have the proper color table.
• 2 Open your image in Gimp. Select menu Colors>Map>Rearrange Colomap…. This will open a dialogue with all the colors in the palette. Here, you can drag-and-drop the colors into the order of the vanilla file's palette. After it matches, hit "OK" and you file will be adjusted to the proper color table.
As I said, other editors have other commands.
Technically, even the specific colors in the color table don't matter. Color 0 in the terrain.bmp image you quoted is dark green, but you could make it fuschia if you want. But whatever color you made it, that color would represent whatever that green means in the vanilla file. All the game engine cares is that it is color 0. That said, it's probably best to retain the vanilla colors just for clarity.