Difference between revisions of "VariationalAction2/Canals"
From GRFSpecs
Jump to navigationJump to searchm (Bot: Automated text replacement (- 2.6 + TTDPatch 2.6)) |
Planetmaker (talk | contribs) |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 11: | Line 11: | ||
|- |
|- |
||
|80 |
|80 |
||
+ | |{{ottdp|0.6|2.5}} |
||
⚫ | |||
|B |
|B |
||
− | |Height above ground, top parts of locks have the same height as the lower parts. |
+ | |Height above ground, top parts of locks have the same height as the lower parts. Note: this returns height in increments of 1 (and not 8) |
|- |
|- |
||
|81 |
|81 |
||
+ | |{{ottdp|0.6|2.5}} |
||
⚫ | |||
|B |
|B |
||
|Terrain type: 0 normal, 1 desert, 2 rainforest, 4 on or above snowline |
|Terrain type: 0 normal, 1 desert, 2 rainforest, 4 on or above snowline |
||
|- |
|- |
||
|82 |
|82 |
||
+ | |{{ottdp|1.4|2.5|ottdrev=r25229}} |
||
⚫ | |||
|B |
|B |
||
+ | |Dike map |
||
− | |reversed for internal usage, dikemap |
||
|- |
|- |
||
|83 |
|83 |
||
+ | |{{ottdp|0.6|2.6|ttdprev=r1562}} |
||
⚫ | |||
|B |
|B |
||
|Random byte for plain canals and river tiles, otherwise zero (under bridges as example, or old savegames)|| |
|Random byte for plain canals and river tiles, otherwise zero (under bridges as example, or old savegames)|| |
||
|} |
|} |
||
− | |||
− | (a) TTDPatch 2.6 r1562 |
||
Variational Action 2 are available for IDs 0/1/2/5/6 (Watercliffs, Locks, Dikes, River Slopes, River waterside) |
Variational Action 2 are available for IDs 0/1/2/5/6 (Watercliffs, Locks, Dikes, River Slopes, River waterside) |
||
== Description == |
== Description == |
||
+ | |||
+ | === Dike map (0x82) === |
||
+ | The variable returns the sides and edges at which the water has a dike, i.e. no connection to water. The variable is a bitset where single bits indicate a dike towards the eight adjacent tiles: |
||
+ | {| |- |
||
+ | !Bit!!Value!!Direction |
||
⚫ | |||
+ | |0||1||North-East |
||
⚫ | |||
+ | |1||2||South-East |
||
⚫ | |||
+ | |2||4||South-West |
||
⚫ | |||
+ | |3||8||North-West |
||
+ | |- |
||
+ | |4||16||East |
||
+ | |- |
||
+ | |5||32||South |
||
+ | |- |
||
+ | |6||64||West |
||
+ | |- |
||
+ | |7||128||North |
||
+ | |} |
||
+ | {{ttdp|}} In TTDPatch this variable is for internal use only. |
||
==Example== |
==Example== |
Latest revision as of 21:46, 6 May 2013
Introduction
Variables
Variable | Version | Size | Content | |
---|---|---|---|---|
80 | 0.6 2.5 | B | Height above ground, top parts of locks have the same height as the lower parts. Note: this returns height in increments of 1 (and not 8) | |
81 | 0.6 2.5 | B | Terrain type: 0 normal, 1 desert, 2 rainforest, 4 on or above snowline | |
82 | 1.4 2.5 | B | Dike map | |
83 | 0.6 2.6 | B | Random byte for plain canals and river tiles, otherwise zero (under bridges as example, or old savegames) |
Variational Action 2 are available for IDs 0/1/2/5/6 (Watercliffs, Locks, Dikes, River Slopes, River waterside)
Description
Dike map (0x82)
The variable returns the sides and edges at which the water has a dike, i.e. no connection to water. The variable is a bitset where single bits indicate a dike towards the eight adjacent tiles:
Bit | Value | Direction |
---|---|---|
0 | 1 | North-East |
1 | 2 | South-East |
2 | 4 | South-West |
3 | 8 | North-West |
4 | 16 | East |
5 | 32 | South |
6 | 64 | West |
7 | 128 | North |
In TTDPatch this variable is for internal use only.