Difference between revisions of "NML:Canals"
From GRFSpecs
Jump to navigationJump to searchPlanetmaker (talk | contribs) (item definition for canals) |
m (Changed the appropriate tables from t to sortable) |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{NMLNavPropVarCB}} |
{{NMLNavPropVarCB}} |
||
− | ==Canal |
+ | == Canal ids == |
+ | The used item ID defines what sprites this item provides. Item IDs should be picked from the following table (WF_XXX). |
||
+ | The 'normal sprites' column contains the amount of sprites that should be provided for this feature. If the appropriate bit in the graphics_flags-property (see below) the amount of sprites stated in the 'alternative sprites' column must be provided instead. |
||
⚫ | |||
+ | {| class="wikitable sortable" |
||
− | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
− | |||
− | === graphic_flags === |
||
− | the <code style="color:darkgreen">WATERFEATURE_ALTERNATIVE_SPRITES</code> defines the type of spritesets used by the single <code style="color:darkgreen">ids</code> of canals (compare also [[Action3/Canals#id| nfo specs]]): |
||
− | |||
− | |||
⚫ | |||
!name |
!name |
||
!use |
!use |
||
Line 26: | Line 12: | ||
|- |
|- |
||
|WF_WATERCLIFFS |
|WF_WATERCLIFFS |
||
− | |{{ottdp|1.1|2.6|ottdrev=r20352|ttdprev=r1573}} water for |
+ | |{{ottdp|1.1|2.6|ottdrev=r20352|ttdprev=r1573}} water for canals / locks |
|4 slope sprites |
|4 slope sprites |
||
|1 flat ground sprite followed by 4 slope sprites |
|1 flat ground sprite followed by 4 slope sprites |
||
Line 51: | Line 37: | ||
|- |
|- |
||
|WF_RIVER_SLOPE |
|WF_RIVER_SLOPE |
||
− | |{{ottdp|1.1|2.6|ottdrev=r20352|ttdprev=r1573}} River |
+ | |{{ottdp|1.1|2.6|ottdrev=r20352|ttdprev=r1573}} River water |
|4 |
|4 |
||
|1 flat ground sprite followed by 4 slope sprites |
|1 flat ground sprite followed by 4 slope sprites |
||
Line 69: | Line 55: | ||
|1 |
|1 |
||
|undefined |
|undefined |
||
⚫ | |||
+ | |||
+ | |||
+ | ==Canal properties== |
||
+ | |||
⚫ | |||
+ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
+ | |} |
||
+ | |||
+ | == Canal variables == |
||
+ | |||
+ | {| class="wikitable sortable" |
||
+ | ! name |
||
+ | ! value range |
||
+ | ! comment |
||
+ | |- |
||
+ | |tile_height |
||
+ | |0 .. max_tile_height |
||
+ | | {{nml|0.2}} Tile height in pixels (=tiles * 8). |
||
+ | {{nml|0.3}} Tile height in tiles. |
||
+ | |- |
||
+ | |terrain_type |
||
+ | | TILETYPE_XXX |
||
+ | | |
||
+ | ;TILETYPE_NORMAL |
||
+ | :Normal grass in all climates |
||
+ | ;TILETYPE_DESERT |
||
+ | ;TILETYPE_RAIN_FOREST |
||
+ | :In tropical climate only: some tiles in the mountains, distant from desert and sea |
||
+ | ;TILETYPE_SNOW |
||
+ | |- |
||
+ | |dike_map |
||
+ | |bitmask(CANAL_DIRECTION_XXX, ...) |
||
+ | |{{ottdp|1.4|no|ottdrev=r25229}} bitmask of the directions where there is a dike: CANAL_DIRECTION_XXX where XXX: |
||
+ | ; along the grid: |
||
+ | :NORTHEAST = 0 |
||
+ | :SOUTHEAST = 1 |
||
+ | :SOUTHWEST = 2 |
||
+ | :NORTHWEST = 3 |
||
+ | ; vertical and horizontal: |
||
+ | :EAST = 4 |
||
+ | :SOUTH = 5 |
||
+ | :WEST = 6 |
||
+ | :NORTH = 7 |
||
+ | |- |
||
+ | |random_bits |
||
+ | |0 .. 255 |
||
+ | |random bits of that tile |
||
+ | |} |
||
+ | |||
+ | == Canal callbacks == |
||
+ | |||
⚫ | |||
+ | ! callback |
||
+ | ! return value |
||
+ | ! comment |
||
+ | |- |
||
+ | |default |
||
+ | |spriteset |
||
+ | |graphics for the canal id |
||
+ | |- |
||
+ | |sprite_offset |
||
+ | | |
||
+ | |numeric offset into the spriteset for the canal id |
||
|} |
|} |
Latest revision as of 20:56, 30 August 2022
Vehicles, Stations, Canals, Bridges, Towns, Houses, Industries (Tiles), Cargos, Airports+Tiles, Objects, Railtypes, Roadtypes, Tramtypes, Terrain
- common props | vars | CBs
- train | roadveh | ship | aircr props
- common variables
- industry props | vars | CBs
- tile props | vars | CBs
- airport props | vars | CBs
- tile props | vars | CBs
Canal ids
The used item ID defines what sprites this item provides. Item IDs should be picked from the following table (WF_XXX).
The 'normal sprites' column contains the amount of sprites that should be provided for this feature. If the appropriate bit in the graphics_flags-property (see below) the amount of sprites stated in the 'alternative sprites' column must be provided instead.
Canal properties
item (FEAT_CANALS, item_name, id) { ... }
name | value range | comment |
---|---|---|
graphic_flags | bitmask(flags) | There is currently only one possible bit: WATERFEATURE_ALTERNATIVE_SPRITES
|
Canal variables
Canal callbacks
callback | return value | comment |
---|---|---|
default | spriteset | graphics for the canal id |
sprite_offset | numeric offset into the spriteset for the canal id |