VariationalAction2/Railtypes: Difference between revisions

From GRFSpecs
Jump to navigation Jump to search
Content deleted Content added
Rubidium (talk | contribs)
No edit summary
variable 45
 
(8 intermediate revisions by 6 users not shown)
Line 1: Line 1:
==Introduction==


== Variables ==
'''''Variational Action 2 for Railtypes'''''


{| |-
=Variational Action 2 for Railtypes=
!Variable !![[GRFActionsDetailed|Size]]!!Version !! Description
|-
|10||D||{{ottdp|1.3|ottdrev=r24367}}||Additional information for sprite selection - See [[Action3/Railtypes#Signal_sprites_.280B.29|Action3 Signals]]
|-
|18||D||{{ottdp|1.3|ottdrev=r24367}}||Additional information for sprite selection - See [[Action3/Railtypes#Signal_sprites_.280B.29|Action3 Signals]]
|-
|40||B||{{ottdp|1.0|ottdrev=r19056}}||Terrain type: 0 normal, 1 desert, 2 rainforest, 4 on or above snowline.
|-
|41||B||{{ottdp|1.0|ottdrev=r19056}}||Enhanced tunnels; entrance has track above. Always 0 in OpenTTD.
|-
|42||B||{{ottdp|1.0|ottdrev=r19056}}||Level crossing status: 0 if open (or not a crossing), 1 if closed.
|-
|43||D||{{ottdp|1.0|ottdrev=r19056}}||Depot construction date (long format, 0 based); other: current date
|-
|44||B||{{ottdp|1.2|ottdrev=r23866}}||[[TownZones|Town zone]] of the tile. (Only available for level crossings and depots.)
|-
|45||D||{{ottdp|15}}||Track types
|}


== Description ==
available in OpenTTD r19056
=== Terrain type (40) ===


'''Format:''' byte
||Variable|[[GRFActionsDetailed|'''Size''']]|Content


{| |-
40|B|Terrain type: 0 normal, 1 desert, 2 rainforest, 4 on or above snowline.
!value!!Meaning
|-
|0||normal tile
|-
|1||desert tile
|-
|2||rain forest tile
|-
|4||tile on or above snow line
|}


41|B|Enhanced tunnels; entrance has track above. Always 0 in OpenTTD.
=== Enhanced tunnels (41) ===


'''Format:''' byte
42|B|Level crossing status: 0 if open (or not a crossing), 1 if closed.


This variable will always return 0 and is reserved for future use with enhanced tunnels.
43|D|Depot construction date (long format, 0 based); other: current date||


== Terrain type (40)==
=== Level crossing status (42) ===


Format: byte
'''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.
||value|Meaning


=== Track types (45) ===
0|normal tile


'''Format:''' __RRttrr
1|desert tile
* rr: Translated roadtype.
* tt: Translated tramtype.
* RR: Translated railtype.
* __: reserved for future use


Special values for rr, tt, RR:
2|rain forest tile
* 0xFF: Track not present on tile.
* 0xFE: Track present, but no matching entry in translation table.


==Example==
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.

Latest revision as of 11:29, 13 April 2025

Introduction

Variables

Variable Size Version Description
10 D Supported by OpenTTD 1.3 (r24367)1.3 Not supported by TTDPatch Additional information for sprite selection - See Action3 Signals
18 D Supported by OpenTTD 1.3 (r24367)1.3 Not supported by TTDPatch Additional information for sprite selection - See Action3 Signals
40 B Supported by OpenTTD 1.0 (r19056)1.0 Not supported by TTDPatch Terrain type: 0 normal, 1 desert, 2 rainforest, 4 on or above snowline.
41 B Supported by OpenTTD 1.0 (r19056)1.0 Not supported by TTDPatch Enhanced tunnels; entrance has track above. Always 0 in OpenTTD.
42 B Supported by OpenTTD 1.0 (r19056)1.0 Not supported by TTDPatch Level crossing status: 0 if open (or not a crossing), 1 if closed.
43 D Supported by OpenTTD 1.0 (r19056)1.0 Not supported by TTDPatch Depot construction date (long format, 0 based); other: current date
44 B Supported by OpenTTD 1.2 (r23866)1.2 Not supported by TTDPatch Town zone of the tile. (Only available for level crossings and depots.)
45 D Supported by OpenTTD 1515 Not supported by TTDPatch 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.

Example