Please note/obey the following if you want to draw for CETS or other sets using its code base (Britrains, ...):
(If you are really drawing only and leaving filling the tracking table to us, you can skip straight to point 3; if you want to do the developers a favor, also read point 1.)

1. File name format/file location is:
src/gfx/A/B_C_D_E_F.png

where:
A is the (first) company name noted in the tracking table (e.g. "pruss").
B is the vehicle's "short name" noted in the tracking table (e.g. "G7_2"). All vehicles that share sprites can share a sprite sheet. If there are several IDs using a single one, enter this into the "Graphics File" column of the Google Docs tracking table wherever applicable.
C is the numerical length noted in the tracking table (e.g. "5").
D is a variation name that you are free to choose (alphanumeric and underscore only [A-Za-z0-9_], e.g. "DRG"). This will be noted in the "Graphics" column in the tracking table. For variation switches, see below.
E = color depth (8bpp/32bpp). To convert an 8 bpp file to 32 bpp, use the GIMP script "GIMP_32bpp_convert.scm".
F = zoom level (zi4, zi2, normal, zo2, zo4, zo8; only "normal" used at the moment)
The examples given above will produce a relative path of "src/gfx/pruss/G7_2_5_DRG_[8/32]bpp_normal.png".

Be aware of case sensitivity - check the extension is ".png" and not ".PNG". The variation name (D) will be noted in the "Graphics" column in the tracking table. 

2. The graphics switches currently available are:
"date" (year, actually): You may use the ">", "<", ">=" and "<=" operators, and additionally "year1..year2". This is additionally randomized according to the last service date until 1024 days after the given year starts, see scripts/tree.py lines 127 ff.
"cargo": Test for cargo labels.
"load": 100 = full vehicle, 0 = empty (percent values). You may use the ">", "<", ">=" and "<=" operators. 
"epoch[1/2/3/4/5]": Test for companies of a particular time period (1 to 5). They are listed in the "companies" table in scripts/tables.py.
"random": The higher the number before a given variation, the greater the probability it will appear (e.g.: "random:(3:A,2:B)" will make A appear about 3/2 as many times as B on average).
"parent_random": Same as the former, but randomizes based on the leading vehicle. Use for MUs to guarantee the same livery for the whole train.
They are used like this

switch_name:(default:variation,value_1:variation_1,value_2:switch_name_2:(value_3:variation_2,value_4:variation_3))

in the tracking table, with nesting possible to any depth. For the code, see tree.py.

3. To ensure a harmonious appearance:
a) Start with the templates in src/gfx/ and adhere to their dimensions.
b) Use 32 bpp (true-color) and only then add an 8 bpp (palettized) conversion using the OpenTTD DOS palette, replacing transparent parts with "magic blue"; it's necessary to convert to a "safe" palette (no action or company colors) before the actual conversion. This will often allow improved coloring and goes along with the other sprites.
c) Do use the livery colors given in the example graphic (docs/liveries_[8/32]bpp.png) for the side views of your sprites, with one palette step brighter/darker in 8 bpp and 18 value units (in 255ths, HSV system) in 32 bpp for sides facing right/left. With very dark colors, 13 value units may also be appropriate. If you find no example, tell the developers and we'll put one in, usually a RAL color.
d) Draw buffers or corridor connections only in the very left and right line of pixels in the horizontal views and at the very top of verticals and diagonals (top left/right). 
e) Keep flat surfaces uniformly bright on the side views as per reality. 

* To convert a sprite sheet to 32 bpp, use scripts/GIMP_32bpp_convert.scm. GIMP must be installed and the file must be placed in its script folder. 
To automatically convert all sprites in a directory, you can use scripts/batch_32bpp_convert.sh on a Unix system, which automatically calls the aforementioned GIMP script (file name must end with _8bpp_normal.png to be recognized).

