NML:Canals: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
Planetmaker (talk | contribs) |
Move ID section to the top, add some usage notes |
||
| Line 1: | Line 1: | ||
{{NMLNavPropVarCB}} |
{{NMLNavPropVarCB}} |
||
== 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="t" |
|||
!name |
|||
!use |
|||
!normal sprites |
|||
!alternative sprites |
|||
|- |
|||
|WF_WATERCLIFFS |
|||
|{{ottdp|1.1|2.6|ottdrev=r20352|ttdprev=r1573}} water for canals / locks |
|||
|4 slope sprites |
|||
|1 flat ground sprite followed by 4 slope sprites |
|||
|- |
|||
|WF_LOCKS |
|||
|{{ottdp|0.6|2.5}} Locks |
|||
|24 |
|||
|undefined |
|||
|- |
|||
|WF_DIKES |
|||
|{{ottdp|0.6|2.5}} Dikes |
|||
|12 |
|||
|undefined |
|||
|- |
|||
|WF_CANAL_GUI |
|||
|{{ottdp|no|2.5}} Canal GUI |
|||
|1 |
|||
|undefined |
|||
|- |
|||
|WF_FLAT_DOCKS |
|||
|{{ottdp|no|2.5}} Flat docks |
|||
|4 |
|||
|undefined |
|||
|- |
|||
|WF_RIVER_SLOPE |
|||
|{{ottdp|1.1|2.6|ottdrev=r20352|ttdprev=r1573}} River water |
|||
|4 |
|||
|1 flat ground sprite followed by 4 slope sprites |
|||
|- |
|||
|WF_RIVERBANKS |
|||
|{{ottdp|0.6|2.6}} Riverbanks |
|||
|12*5 (Last 4 for slopes) |
|||
|undefined |
|||
|- |
|||
|WF_RIVER_GUI |
|||
|{{ottdp|no|2.6}} River GUI |
|||
|2 |
|||
|undefined |
|||
|- |
|||
|WF_BUOY |
|||
|{{ottdp|1.2|no|ottdrev=r22973}} Buoy |
|||
|1 |
|||
|undefined |
|||
|} |
|||
==Canal properties== |
==Canal properties== |
||
| Line 12: | Line 69: | ||
| graphic_flags |
| graphic_flags |
||
| bitmask(flags) |
| bitmask(flags) |
||
| |
| There is currently only one possible bit: <code style="color:darkgreen">WATERFEATURE_ALTERNATIVE_SPRITES</code> |
||
|} |
|} |
||
=== 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]]) |
|||
== Canal variables == |
== Canal variables == |
||
| Line 59: | Line 114: | ||
| |
| |
||
|numeric offset into the spriteset for the canal id |
|numeric offset into the spriteset for the canal id |
||
|} |
|||
== Canal ids == |
|||
{| class="t" |
|||
!name |
|||
!use |
|||
!normal sprites |
|||
!alternative sprites |
|||
|- |
|||
|WF_WATERCLIFFS |
|||
|{{ottdp|1.1|2.6|ottdrev=r20352|ttdprev=r1573}} water for canals / locks |
|||
|4 slope sprites |
|||
|1 flat ground sprite followed by 4 slope sprites |
|||
|- |
|||
|WF_LOCKS |
|||
|{{ottdp|0.6|2.5}} Locks |
|||
|24 |
|||
|undefined |
|||
|- |
|||
|WF_DIKES |
|||
|{{ottdp|0.6|2.5}} Dikes |
|||
|12 |
|||
|undefined |
|||
|- |
|||
|WF_CANAL_GUI |
|||
|{{ottdp|no|2.5}} Canal GUI |
|||
|1 |
|||
|undefined |
|||
|- |
|||
|WF_FLAT_DOCKS |
|||
|{{ottdp|no|2.5}} Flat docks |
|||
|4 |
|||
|undefined |
|||
|- |
|||
|WF_RIVER_SLOPE |
|||
|{{ottdp|1.1|2.6|ottdrev=r20352|ttdprev=r1573}} River water |
|||
|4 |
|||
|1 flat ground sprite followed by 4 slope sprites |
|||
|- |
|||
|WF_RIVERBANKS |
|||
|{{ottdp|0.6|2.6}} Riverbanks |
|||
|12*5 (Last 4 for slopes) |
|||
|undefined |
|||
|- |
|||
|WF_RIVER_GUI |
|||
|{{ottdp|no|2.6}} River GUI |
|||
|2 |
|||
|undefined |
|||
|- |
|||
|WF_BUOY |
|||
|{{ottdp|1.2|no|ottdrev=r22973}} Buoy |
|||
|1 |
|||
|undefined |
|||
|} |
|} |
||
Revision as of 19:08, 2 August 2012
Vehicles, Stations, Roadstops, Canals, Towns, Houses, Industries (Tiles), Cargos, Airports+Tiles, Objects, Railtypes, Roadtypes, Tramtypes, Bridges, Badges, 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_CANAL, item_name, id) { ... }
| name | value range | comment |
|---|---|---|
| graphic_flags | bitmask(flags) | There is currently only one possible bit: WATERFEATURE_ALTERNATIVE_SPRITES
|
Canal variables
| 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 |
|
| 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 |