Difference between revisions of "Action5"
m (13 revisions) |
m (Bot: Automated text replacement (--= +==)) |
||
Line 1: | Line 1: | ||
+ | == Introduction == |
||
− | '''''Define TTDPatch specific graphics sets''''' |
||
− | =Action 5= |
||
Define TTDPatch specific graphics sets |
Define TTDPatch specific graphics sets |
||
− | -=Introduction=- |
||
− | Action 5 is used to define graphics for several new features of TTDPatch. |
+ | Action 5 is used to define graphics for several new features of TTDPatch. This is similar to action 1. |
+ | ==Syntax== |
||
− | -=Format=- |
||
The data looks as follows: |
The data looks as follows: |
||
− | < |
+ | <Sprite-number> * <Length> 05 <type> <num-sprites> |
+ | {| |
||
− | ||'''Element'''|[[GRFActionsDetailed|'''Size''']]|'''Description''' |
||
+ | !Element!![[GRFActionsDetailed|Size]]!!Description |
||
+ | |- |
||
− | <Sprite-number>|dec|A sequential sprite number |
||
+ | |<Sprite-number>||dec||A sequential sprite number |
||
+ | |- |
||
− | <length>|dec|The total number of bytes used in this action |
||
+ | |<length>||dec||The total number of bytes used in this action |
||
+ | |- |
||
− | 05|B|Defines action 05 |
||
+ | |05||B||Defines action 05 |
||
+ | |- |
||
− | <type>|B|What type of graphics follow |
||
+ | |<type>||B||What type of graphics follow |
||
+ | |- |
||
− | <num-sprites>|B*|How many regular sprites follow |
||
+ | |<num-sprites>||B*||How many regular sprites follow |
||
+ | |- |
||
− | <offset>|B*|Offset in the Action 5 assignable block of sprites|| |
||
+ | |<offset>||B*||Offset in the Action 5 assignable block of sprites |
||
+ | |} |
||
The following num-sprites sprites in the .nfo file have to be RealSprites that will be used as graphics for the given TTDPatch feature, except for type 0A, which requires RecolorSprites. |
The following num-sprites sprites in the .nfo file have to be RealSprites that will be used as graphics for the given TTDPatch feature, except for type 0A, which requires RecolorSprites. |
||
Line 34: | Line 40: | ||
Action 5 entries in a .grf file which has a regular GRF ID (not FFFFFFFF) will always override those from .grf files with a GRF ID of FFFFFFFF (starting from 2.0.1 alpha 19). |
Action 5 entries in a .grf file which has a regular GRF ID (not FFFFFFFF) will always override those from .grf files with a GRF ID of FFFFFFFF (starting from 2.0.1 alpha 19). |
||
+ | ==Description== |
||
− | -=Filling in the terms=- |
||
===Sprite-number=== |
===Sprite-number=== |
||
Line 48: | Line 54: | ||
This sets the type of feature that the graphics are for. If bit 7 is set, the offset variable needs to be set. Bit 7 may only be set if the type supports it. The type can be one of: |
This sets the type of feature that the graphics are for. If bit 7 is set, the offset variable needs to be set. Bit 7 may only be set if the type supports it. The type can be one of: |
||
+ | {| |
||
− | ||Type|Feature|num-sprites (decimal)|Minimum version |
||
+ | !Type!!Feature!!num-sprites (decimal)!!Minimum version |
||
+ | |- |
||
− | 04|Pre-signal graphics|48 |
||
+ | |04||Pre-signal graphics||48 |
||
+ | |- |
||
− | 04|Pre-signal and semaphore graphics|112 |
||
+ | |04||Pre-signal and semaphore graphics||112 |
||
+ | |- |
||
− | 04|Pre-signal, semaphore, and [[PathBasedSignalling|PBS]] graphics|240|2.0.1 alpha 41 |
||
+ | |04||Pre-signal, semaphore, and [[PathBasedSignalling|PBS]] graphics||240||2.0.1 alpha 41 |
||
+ | |- |
||
− | 05|Overhead wires and pylon graphics|48 |
||
+ | |05||Overhead wires and pylon graphics||48 |
||
+ | |- |
||
− | 06|Foundations (retaining walls) for BuildOnSlopes |74 |
||
+ | |06||Foundations (retaining walls) for BuildOnSlopes ||74 |
||
+ | |- |
||
− | 06|Foundations for BuildOnSlopes and half tiles (NS and EW foundations) |90|OpenTTD r11321 |
||
+ | |06||Foundations for BuildOnSlopes and half tiles (NS and EW foundations) ||90||OpenTTD r11321 |
||
+ | |- |
||
− | 07 (a)|GUI sprites|93|2.0.1 alpha 43 |
||
+ | |07 (a)||GUI sprites||93||2.0.1 alpha 43 |
||
+ | |- |
||
− | 08|Canals|65|2.0.1 alpha 17 |
||
+ | |08||Canals||65||2.0.1 alpha 17 |
||
+ | |- |
||
− | 09|One-way road arrows|6|2.0.1 alpha 58 |
||
+ | |09||One-way road arrows||6||2.0.1 alpha 58 |
||
+ | |- |
||
− | 0A|Two company color translation maps|256|2.0.1 alpha 67 |
||
+ | |0A||Two company color translation maps||256||2.0.1 alpha 67 |
||
+ | |- |
||
− | 0B|Tram tracks|113|2.0.1 alpha 68 |
||
+ | |0B||Tram tracks||113||2.0.1 alpha 68 |
||
+ | |- |
||
− | 0C|Snowy temperate trees|133|2.0.1 alpha 74 |
||
+ | |0C||Snowy temperate trees||133||2.0.1 alpha 74 |
||
+ | |- |
||
− | 0D|Coast Tile graphics|16 (18)|2.5 beta 5, OpenTTD r7325 (OpenTTD r11726) |
||
+ | |0D||Coast Tile graphics||16 (18)||2.5 beta 5, OpenTTD r7325 (OpenTTD r11726) |
||
+ | |- |
||
− | 0E|New Signals|Any|2.6 alpha 0 r1247 |
||
+ | |0E||New Signals||Any||2.6 alpha 0 r1247 |
||
+ | |- |
||
− | 0F|Sprites for marking tracks on slopes (for track reservation systems like PBS or YAPP)|12|2.6 alpha 0 r1487, OpenTTD r13469 |
||
+ | |0F||Sprites for marking tracks on slopes (for track reservation systems like PBS or YAPP)||12||2.6 alpha 0 r1487, OpenTTD r13469 |
||
+ | |- |
||
− | 10|Additional airport graphics|15|OpenTTD r9645 |
||
+ | |10||Additional airport graphics||15||OpenTTD r9645 |
||
+ | |- |
||
− | 11|Road stop graphics|8|OpenTTD r9645, 2.6 alpha 0 r1589 |
||
+ | |11||Road stop graphics||8||OpenTTD r9645, 2.6 alpha 0 r1589 |
||
+ | |- |
||
− | 12|Aqueduct graphics|8|2.6 alpha 0 r1498, OpenTTD r13464 |
||
+ | |12||Aqueduct graphics||8||2.6 alpha 0 r1498, OpenTTD r13464 |
||
+ | |- |
||
− | 13|Autorail sprites|55|OpenTTD r11433 |
||
+ | |13||Autorail sprites||55||OpenTTD r11433 |
||
+ | |- |
||
− | 14,94|Flag sprites|Up to 36|OpenTTD r11433 |
||
+ | |14,94||Flag sprites||Up to 36||OpenTTD r11433 |
||
+ | |- |
||
− | 15,95|OpenTTD GUI sprites|Up to 160|OpenTTD r11433 |
||
+ | |15,95||OpenTTD GUI sprites||Up to 160||OpenTTD r11433 |
||
+ | |- |
||
− | 16,96|Airport preview sprites|Up to 9|OpenTTD r20370 |
||
+ | |16,96||Airport preview sprites||Up to 9||OpenTTD r20370 |
||
− | + | {| |
|
+ | ! |
||
(a) Type 07 only requires 73 sprites in the stable (2.5 branch); the extra sprites are the clone train and build canal cursors. |
(a) Type 07 only requires 73 sprites in the stable (2.5 branch); the extra sprites are the clone train and build canal cursors. |
||
Line 100: | Line 130: | ||
====04 Signal graphics.==== |
====04 Signal graphics.==== |
||
− | Signal graphics come in groups of 16. These groups contain sprites in the same order as sprites 1275-1290 in trg1 |
+ | 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. |
+ | {| |
||
− | ||Group(s)|Contents |
||
+ | !Group(s)!!Contents |
||
+ | |- |
||
− | 0|lighted entrance signals |
||
+ | |0||lighted entrance signals |
||
+ | |- |
||
− | 1|lighted exit signals |
||
+ | |1||lighted exit signals |
||
+ | |- |
||
− | 2|lighted combo signals |
||
+ | |2||lighted combo signals |
||
+ | |- |
||
− | 3|standard (non-pre-signal) semaphore signals |
||
+ | |3||standard (non-pre-signal) semaphore signals |
||
+ | |- |
||
− | 4..6|repeat 0..2 for semaphores |
||
+ | |4..6||repeat 0..2 for semaphores |
||
+ | |- |
||
− | 7|standard lighted PBS signals |
||
+ | |7||standard lighted PBS signals |
||
+ | |- |
||
− | 8..14|repeat 0..6 for PBS signals|| |
||
+ | |8..14||repeat 0..6 for PBS signals |
||
+ | |} |
||
====0C Snowy temperate trees==== |
====0C Snowy temperate trees==== |
||
Line 144: | Line 183: | ||
''In OpenTTD 10 sprites for type 0D is enough in base graphic sets. The 16 sprites version should not be used for base graphics.'' |
''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 |
+ | 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==== |
====0E New Signals==== |
||
Line 170: | Line 209: | ||
<pre>\d1313 |
<pre>\d1313 |
||
− | \b13 \b0 \b0 \b3 \b16 \b16 |
+ | \b13 \b0 \b0 \b3 \b16 \b16 <SW sprite> |
− | \b0 \b0 \b0 \b3 \b16 \b16 |
+ | \b0 \b0 \b0 \b3 \b16 \b16 <NE sprite> |
80</pre> |
80</pre> |
||
Line 180: | Line 219: | ||
<pre>\d1314 |
<pre>\d1314 |
||
− | \b0 \b0 \b0 \b16 \b3 \b16 |
+ | \b0 \b0 \b0 \b16 \b3 \b16 <NW sprite> |
− | \b0 \b13 \b0 \b16 \b3 \b16 |
+ | \b0 \b13 \b0 \b16 \b3 \b16 <SE sprite> |
80</pre> |
80</pre> |
||
Line 210: | Line 249: | ||
'''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:''' 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. |
||
− | + | ==Example== |
|
<span style='color:#808080'>Something to go here</span> |
<span style='color:#808080'>Something to go here</span> |
Revision as of 23:07, 14 June 2011
Introduction
Define TTDPatch specific graphics sets
Action 5 is used to define graphics for several new features of TTDPatch. This is similar to action 1.
Syntax
The data looks as follows:
<Sprite-number> * <Length> 05 <type> <num-sprites>
Element | Size | Description |
---|---|---|
<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 |
The following num-sprites sprites in the .nfo file have to be RealSprites that will be used as graphics for the given TTDPatch feature, except for type 0A, which requires RecolorSprites.
Action 5 entries in a .grf file which has a regular GRF ID (not FFFFFFFF) will always override those from .grf files with a GRF ID of FFFFFFFF (starting from 2.0.1 alpha 19).
Description
Sprite-number
This is just the number you are at.
Length
Count the number of bytes in this action.
type
This sets the type of feature that the graphics are for. If bit 7 is set, the offset variable needs to be set. Bit 7 may only be set if the type supports it. The type can be one of:
Type | Feature | num-sprites (decimal) | Minimum version | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
04 | Pre-signal graphics | 48 | ||||||||||||||||||
04 | Pre-signal and semaphore graphics | 112 | ||||||||||||||||||
04 | Pre-signal, semaphore, and PBS graphics | 240 | 2.0.1 alpha 41 | |||||||||||||||||
05 | Overhead wires and pylon graphics | 48 | ||||||||||||||||||
06 | Foundations (retaining walls) for BuildOnSlopes | 74 | ||||||||||||||||||
06 | Foundations for BuildOnSlopes and half tiles (NS and EW foundations) | 90 | OpenTTD r11321 | |||||||||||||||||
07 (a) | GUI sprites | 93 | 2.0.1 alpha 43 | |||||||||||||||||
08 | Canals | 65 | 2.0.1 alpha 17 | |||||||||||||||||
09 | One-way road arrows | 6 | 2.0.1 alpha 58 | |||||||||||||||||
0A | Two company color translation maps | 256 | 2.0.1 alpha 67 | |||||||||||||||||
0B | Tram tracks | 113 | 2.0.1 alpha 68 | |||||||||||||||||
0C | Snowy temperate trees | 133 | 2.0.1 alpha 74 | |||||||||||||||||
0D | Coast Tile graphics | 16 (18) | 2.5 beta 5, OpenTTD r7325 (OpenTTD r11726) | |||||||||||||||||
0E | New Signals | Any | 2.6 alpha 0 r1247 | |||||||||||||||||
0F | Sprites for marking tracks on slopes (for track reservation systems like PBS or YAPP) | 12 | 2.6 alpha 0 r1487, OpenTTD r13469 | |||||||||||||||||
10 | Additional airport graphics | 15 | OpenTTD r9645 | |||||||||||||||||
11 | Road stop graphics | 8 | OpenTTD r9645, 2.6 alpha 0 r1589 | |||||||||||||||||
12 | Aqueduct graphics | 8 | 2.6 alpha 0 r1498, OpenTTD r13464 | |||||||||||||||||
13 | Autorail sprites | 55 | OpenTTD r11433 | |||||||||||||||||
14,94 | Flag sprites | Up to 36 | OpenTTD r11433 | |||||||||||||||||
15,95 | OpenTTD GUI sprites | Up to 160 | OpenTTD r11433 | |||||||||||||||||
16,96 | Airport preview sprites | Up to 9 | OpenTTD r20370
|