<sprite-number> * <length> 05 <type> <num-sprites>
|<sprite-number>||dec||A sequential sprite number|
|<length>||dec||The total number of bytes used in this action|
|05||B||Defines action 05|
|<type>||B||What type of graphics follow|
|<num-sprites>||B*||How many regular sprites follow|
|<offset>||B*||Offset in the Action 5 assignable block of sprites|
|Type||Feature||num-sprites (decimal)||Minimum version||TTDPatch||OTTD|
|04||Pre-signal and semaphore graphics||112|
|Pre-signal, semaphore, and PBS graphics||240||2.0.1 alpha 41|
|05, 85[*]||Overhead wires and pylon graphics||48|
|06||Foundations (retaining walls) for BuildOnSlopes||74|
|06, 86[*]||Foundations for BuildOnSlopes and half tiles (NS and EW foundations)||90||n/a||r11321|
|07[a]||GUI sprites||93||2.0.1 alpha 43|
|Canals||65||2.0.1 alpha 17|
|09, 89[*]||One-way road arrows||6||2.0.1 alpha 58|
|0A, 8A[*]||Two company color translation maps||256||2.0.1 alpha 67|
|0B, 8B[*]||Tram tracks||113||2.0.1 alpha 68|
|0C||Snowy temperate trees||133||2.0.1 alpha 74||n/a|
|0D||Coast Tile graphics||16 (18)||2.5 beta 5||r11726|
|0E||New Signals||Any||2.6 alpha 0 r1247||n/a|
|0F, 8F[*]||Sprites for marking tracks on slopes (for track reservation systems like PBS or YAPP)||12||2.6 alpha 0 r1487||r13469|
|10, 90[*]||Additional airport graphics||15||n/a||r9645|
|11, 91[*]||Road stop graphics||8||2.6 alpha 0 r1589||r9645|
|12, 92[*]||Aqueduct graphics||8||2.6 alpha 0 r1498||r13464|
|13, 93[*]||Autorail sprites||55||n/a||r11433|
|14, 94||Flag sprites||Up to 36||n/a||r11433|
|15, 95||OpenTTD GUI sprites||Up to 160||n/a||r11433|
|16, 96||Airport preview sprites||Up to 9||n/a||r20370|
|17, 97||Railtype tunnel base sprites||16||n/a||r23952|
|18, 98||Extra all black palette ('for more height levels')||1||n/a||OpenTTD 1.5|
04 Signal graphics
Signal graphics come in groups of 16. These groups contain sprites in the same order as sprites 1275-1290 in trg1[r].grf; red, then green, for each of: SW-facing, NE-facing, NW-facing, SE-facing, E-facing, W-facing, S-facing, N-facing.
|0||lighted entrance signals|
|1||lighted exit signals|
|2||lighted combo signals|
|3||standard (non-pre-signal) semaphore signals|
|4 .. 6||repeat 0 .. 2 for semaphores|
|7||standard lighted PBS signals|
|8 .. 14||repeat 0 .. 6 for PBS signals|
0C Snowy temperate trees
If the temperate snow line is enabled, you can use this to specify the snowy versions of temperate trees. The sprites must be the snowy versions of sprites 1576 .. 1708 from trg1[r].grf, in the same order as they appear there.
0D Coast tile sprites
If diagonal flooding is enabled due to the new corner coasts feature, you can use this to give a complete set of replacement coast tile sprites. There are 16 in total, 8 original Transport Tycoon Deluxe sprites and 8 for the corner slopes. Order of the sprites (numbers according to trg1[r].grf) is as follows:
3997, 4063, 4064, 4068, 4062, 3998, 4066, 3988, 4065, 4069, 3996, 3992, 4067, 3994, 3995, 3999.
Additionally, OpenTTD since r11726 supports another method of supplying all additional coast tile sprites, but this is only allowed in the extra NewGRF of Base Graphic Sets. In this, only 10 sprites are supplied in the same order as the 16 sprites above, but without the coast sprites already in trg1[r].grf. Note that the 10 sprites version supplies two additional slopes, but they are not used, and are currently unlikely to be ever used.
In OpenTTD 10 sprites for type 0D is enough in base graphic sets. The 16 sprites version should not be used for base graphics.
The reason for the existence of a 10 sprite version is to remove the need for including original graphics, and to keep compatibility with old NewGRFs that replace the original shore graphics using Action A without adding new shores using Action 5: When a NewGRF uses the 16 sprites version it takes precedence above any NewGRF replacing the shore graphics using Action A; when a NewGRF uses Action A to replace shore graphics it takes precedence above a 10-sprite Action 5, effectively disabling diagonal flooding. Also due to compatibility the 10 sprites version is invalid for normal NewGRFs, which are not the "extra" NewGRF of some Base Graphics Set.
0E New Signals
Any number of real and recolour sprites can be specified in the action in any order.
Sprites are referenced by their offset into the action5 block by a VarAction2NewSignals, hence a logically easily calculable order is advised.
As of 2.6 alpha 0 r1346, the action 5 block defined in the same GRF file as the varaction2, will be used as the base sprite block for the offsets returned by the callback even if it is overridden by a higher priority GRF action 5 definition of the same feature (0E).
0F Tracks for Slopes
This should be in the same order as sprites 1031 .. 1035 (Sprite numbers from trg1[r].grf). These should only be the rails, basically the same format as sprites 1005 to 1010. There should be 3 groups of these sprites, one for each rail type (railroad, monorail, maglev).
11 Road stop graphics
Road stop graphics consist of 2 groups of 4 sprites. The first group contains graphics for bus stops, second for truck stops. In each group, the sprites are in the following order: SW, NE, NW, SE.
SW and NE sprites are used with road going along the Y axis ( .\' ), NW and SE with road along the X axis( '/. ).
Internally, the stations are defined using the following station layouts:
where 1313 and 1314 are city road sprites.
Reference sprites can be found in ttdpbase(w).grf (TTDPatch) and in roadstops.grf (OpenTTD).
Note: As of OpenTTD r10185, the behaviour of this feature is identical in both games.
8 real sprites should be given. Firstly: 4 bridge end sprites in the order: SW, SE, NE, NW, where the direction is that heading onto the aqueduct. Then 2 middle part sprites for the X and Y directions. Followed by two pillar sprites for the X and Y directions.
For examples of where the division between middle sprites and pillars should be made see sprites 2437 to 2592 (trgr1[r].pcx), or an existing aqueduct GRF. Note, that for higher bridges to work effectively, pillars should be approximately 8px in height.
15 / 95 OpenTTD GUI sprites
OpenTTD defines 162 GUI sprites. Additional sprites not needed by an OpenTTD are simply ignored, so that new(er) base sets can be used by old OpenTTD versions. One can (re-)define a subset of the GUI sprites by giving an offset into the GUI sprites. The sprites are:
|0 .. 11||Halftile selections|
|12 .. 13||Title screen letters E and D|
|14 .. 37||Bridge piers colours 1 .. 4|
|38||Square indicating NewGRF compatibility|
|39||Blob indicating server compatibility|
|41||Empty check box|
|42||Checked check box|
|44||Window resize right|
|45 .. 48||Arrows|
|51 .. 52||Pin / pinned|
|53 .. 62||Rail build icons and cursors|
|63 .. 68||Monorail build icons and cursors|
|69 .. 74||Maglev build icons and cursors|
|76 .. 77||Waypoint toolbar and cursor icon|
|78 .. 81||Waypoint buildings|
|82 .. 85||Autoroad toobar and cursor for road and trams|
|87||Build ship lift cursor|
|88 .. 89||Build canal toolbar and cursor|
|91 .. 92||Level land toolbar and cursor|
|93 .. 96||Sell vehicle|
|97 .. 100||Sell all vehicles|
|101 .. 104||Replace vehicle|
|105||Sell chain of rail vehicles|
|106 .. 113||Clone vehicles button and cursors|
|114 .. 117||Create vehicle group button|
|118 .. 121||Delete vehicle group button|
|122 .. 125||Rename vehicle group button|
|126 .. 133||Group replace on / off button|
|134||Road toolbar: build one-way roads|
|135||Signal toolbar: convert signals|
|136 .. 137||Build rivers toolbar and cursor|
|138 .. 143||OSK|
|145 .. 146||Build aqueduct toolbar and cursor|
|147 .. 148||(+) and (-) icon|
|149||Window resize left|
|150||Play music right-to-left languages|
|151 .. 152||Shade / unshade|
|154 .. 157||Vehicle profit icons|
|159||Exclusive transport rights|
The number of sprites that follow.
Since TTDPatch 2.0.1 alpha 49, this value is an extended byte. Note that it is not generally an error to provide more sprites than required, but this does expend sprite slots unnecessarily.
The offset in the Action 5 assignable block of sprites. This term is only read when bit 7 of the type has been set. It can be used to only replace a subset of sprites from a set.
Note: When creating a TTDPatch compatible grf, you have to skip the OpenTTD specific Action 05's using an Action 09 rather than an Action 07. Using the latter will result in an error on your Action 05 when using the grf in TTDPatch.
Note: NFORenum distinguishes Action5 with no offset and Action5 with offset 0. While they have technically the same effect, NFORenum assumes an Action5 with no offset has the intention to replace all sprites and checks the number of sprites accordingly. An Action5 with offset is considered to only replace a subset of the sprites, so the sprites are not checked for completeness.