Register a SNAP EBT card with Amazon


Register a SNAP EBT card with Amazon



Sid Meier's Gettysburg & Antietam - Palettes


SMG & SMA use 256 colour palettes. I have deduced much of what SMG does with its colour palette in PCX images displayed on the map. The program has a master palette and ignores most of the colours in the palettes of the .pcx files. Two exceptions are index 0 which is the background colour and index 246 which is the shadow colour for that image. Any colours can be used in index 0 & 246 in the .pcx files that are displayed on the map. It is best not to use a colour that appears elsewhere in the palette because the graphics program may use the lowest palette index for the same colour when drawing (Paint Shop Pro 5 does this). If pasting into or manipulating an image in a way that gives the graphics program the chance to pick which colour will be used, it is best to avoid background and shadow colours that are close in colour to any in the image.

The master colour palette is, I think, like this:
SMxPalette.gif
This is how Paint Shop Pro 5 displays palettes except I have pasted in striped images for the pulsing colours.

The on map .pcx images have the same palettes up to the orange to dark red range but most differ above this. The colours displayed are: Index 216 is black, the 8 indices from 217 to 224 are displayed as pulsing blue-greens:
 R   G   B
115 151 163 131 167 175 147 179 187 131 167 175 115 151 163 99 139 151 87 131 139 75 119 127 225 to 236 are pink. 237 is off white. Indices 238 to 253 are the Windows colours: Grey 50% 128/128/128 Red 255/0/0 Bright Green 0/255/0 Yellow 255/255/0 Blue 0/0/255 Pink 255/0/255 Cyan 0/255/255 White 255/255/255 Black 0/0/0 Dark Red 128/0/0 Green 0/128/0 Dark Yellow 128/128/0 Dark Blue 0/0/128 Violet 128/0/128 Teal 0/128/128 Grey 25% 192/192/192 Index 254 is Light Green 192/220/192. Index 255 is Pale Blue 166/202/240.
I have tried editing the palettes to give other colours, but irrespective of what colour is shown in the image's or the master palette the above colours are displayed. Although the colours in index 0 & 246 are usually used for background or shadow, they are both displayed as in the master palette, black, where SMG uses colour shifting along a range of colours to indicate the sunny and shady sides of hills and in the line of sight shading colours. Only 2 .pcx graphics are colour shifted: gtex3.pcx and texture. It is best to avoid colours near the end of colour ranges in these graphics as strange results can occur if the colour is shifted into a different colour range. How many colours at the ends of the range should be avoided depends on the height of the slopes on the map. Where the height change from 1 square to another is only 1 level - the maximum colour shift is 4 shades. Where the height change from 1 square to another is more than 1 level - the maximum colour shift is 7 shades.
SMxPalette-Shades2.gif
The arrows indicate shade ranges that get lighter to the right. This is the direction that is useful for colour shifting.
Ranges with red arrows are too short to be able to even display a gentle slope without overflowing to adjacent shade ranges. Green arrows indicate longer ranges, colours inside the blue box can be used on steep slopes, those inside the yellow for features that only occur on gentle slopes - this might include fields, pikes or town. The black arrow indicates a range that is repeated above so is of no use.

The windows colours should be avoided in these as they are not part of a range. The standard gtex3.pcx has these index positions as pink (so they can't be used) but texture.pcx has some of the windows colours in its palette (these should be changed to pink as well). If the colour is shifted below 0 index it wraps around to index 255.

Editing The Palette
How you edit a palette will differ depending on the graphics program you use. In Paint Shop Pro it is under the "Colors" menu item. Palettes can be transferred between images by saving and loading them.

In Photoshop 7 the palette of a .pcx can be found under Image/Mode/Color_Table
e.g.:
Photoshop7Palette.gif

This is rotated 180 degrees relative to the Paint Shop Pro one above.



The master palette is in stuff.pcx for SMG. The same file in SMA has been renamed PalMaster.pcx.

The part of the palette from 237 to 255 is fixed. This includes the 16 windows colours and 3 others. The rest of the palette is whatever is in stuff.pcx (or PalMaster.pcx) except that palette index 236 displays the same colour as in index 235.

So you can have control over the palette colours by changing the palette of stuff.pcx (or PalMaster.pcx) but this can have an effect on all the files associated with the map. In SMG, 11 of the palette colours that are pink in stuff.pcx are not used in any file so can be changed and used for a particular purpose, such as more colours for a particular type of tree or a different uniform colour that is not well served by the standard palette. Any new file using this would have to be used in conjunction with the stuff.pcx with the same palette.

Here is an example of a tree pasted into trees.pcx with a standard palette and the same tree pasted after 11 extra colours have been substituted for the pinks in the palette. The tree is from Waterloo: Napoleon's Last Battle.
WNLB-trees.gif

This is the palette with extra colours:
WNLB-trees-palette.gif

In SMA, PalMaster.pcx does not have the pinks but has instead some colours that are used on the new command bar and in some of the pop-up screens e.g.:
SMAPalette.gif
The extra colours are not used for soldiers or other on-map graphics.



SMG Design Tools Page



Free Web Hosting