Difference between revisions of "VariationalAction2/Roadtypes"
From GRFSpecs
Jump to navigationJump to search (initial creation) |
(variable 45) |
||
| Line 15: | Line 15: | ||
|- |
|- |
||
|44||B||{{ottdp|1.10}}||[[TownZones|Town zone]] of the tile. |
|44||B||{{ottdp|1.10}}||[[TownZones|Town zone]] of the tile. |
||
| + | |- |
||
| + | |45||D||{{ottdp|15}}||Track types |
||
|} |
|} |
||
| Line 45: | Line 47: | ||
This variable returns 1, if a crossing is closed. If the crossing is open or the tile is no level crossing, the return value is 0. |
This variable returns 1, if a crossing is closed. If the crossing is open or the tile is no level crossing, the return value is 0. |
||
| + | |||
| + | === Track types (45) === |
||
| + | |||
| + | '''Format:''' __RRttrr |
||
| + | * rr: Translated roadtype. |
||
| + | * tt: Translated tramtype. |
||
| + | * RR: Translated railtype. |
||
| + | * __: reserved for future use |
||
| + | |||
| + | Special values for rr, tt, RR: |
||
| + | * 0xFF: Track not present on tile. |
||
| + | * 0xFE: Track present, but no matching entry in translation table. |
||
==Example== |
==Example== |
||
Latest revision as of 11:29, 13 April 2025
Introduction
Variables
| Variable | Size | Version | Description |
|---|---|---|---|
| 40 | B | Terrain type: 0 normal, 1 desert, 2 rainforest, 4 on or above snowline. | |
| 41 | B | Enhanced tunnels; entrance has track above. Always 0 in OpenTTD. | |
| 42 | B | Level crossing status: 0 if open (or not a crossing), 1 if closed. | |
| 43 | D | Depot construction date (long format, 0 based); other: current date | |
| 44 | B | Town zone of the tile. | |
| 45 | D | Track types |
Description
Terrain type (40)
Format: byte
| value | Meaning |
|---|---|
| 0 | normal tile |
| 1 | desert tile |
| 2 | rain forest tile |
| 4 | tile on or above snow line |
Enhanced tunnels (41)
Format: byte
This variable will always return 0 and is reserved for future use with enhanced tunnels.
Level crossing status (42)
Format: byte
This variable returns 1, if a crossing is closed. If the crossing is open or the tile is no level crossing, the return value is 0.
Track types (45)
Format: __RRttrr
- rr: Translated roadtype.
- tt: Translated tramtype.
- RR: Translated railtype.
- __: reserved for future use
Special values for rr, tt, RR:
- 0xFF: Track not present on tile.
- 0xFE: Track present, but no matching entry in translation table.