Documentation: Update NewGRF road stops documents

pull/642/head
Jonathan G Rennison 4 months ago
parent 3ab31f5518
commit 6903e5c937

@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>JGR's Patchpack - NewGRF Road Stops Addition to NewGRF Specifications in NML</title>
<title>JGR's Patchpack - Additions to the NewGRF Road Stops Specification in NML</title>
<style type="text/css">
td li { white-space: nowrap; text-align: left; }
th { white-space: nowrap; text-align: center; }
@ -13,10 +13,10 @@
</style>
</head>
<body>
<h2>NewGRF Road Stops Addition to NewGRF Specifications in JGR's Patchpack in NML</h2>
<p>This document describes the non-standard addition of the NewGRF road stops feature to the <a href="https://newgrf-specs.tt-wiki.net/wiki/NML:Main">Official OpenTTD NML Specifications</a>, as implemented in this patchpack, and the associated <a href="https://github.com/JGRennison/nml">NML fork</a></br>
This feature does not match OpenTTD PR #7955 in a number of key areas, this feature may not necessarily match implementations of NewGRF road stops in other patches, branches, etc.</br>
This feature as implemented here MAY also be present in other patchpacks.</p>
<h2>Additions to the NewGRF Road Stops Specification in JGR's Patchpack in NML</h2>
<p>This document describes the non-standard additions to the NewGRF road stops feature in the <a href="https://newgrf-specs.tt-wiki.net/wiki/NML:Main">Official OpenTTD NML Specifications</a>, as implemented in this patchpack, and the associated <a href="https://github.com/JGRennison/nml">NML fork</a><br />
The additions here are compatible with the specification and OpenTTD 14.0, such that GRFs can run on OpenTTD 14.0 and also optionally use patchpack extensions where available.</p>
<p>These additions and the official specification do not match the obsolete OpenTTD PR #7955 which used a different NewGRF interface.</p>
<p>The feature identifier is <span class="code">FEAT_ROADSTOPS</span>, (the PARENT scope for this feature is the road stop's station's town).<br />
There is no permanent storage associated with this feature.</p>
@ -25,10 +25,9 @@
<p>See the associated <a href="newgrf-roadstops.html">non-NML document</a> for more details on the NewGRF road stops feature.</p>
<p>This feature will be automatically skipped when loaded into a version of OpenTTD which does not support this feature.<br />
If this feature is the only significant thing in this GRF, then <span class="code">extended_feature_test("road_stops")</span> SHOULD be called and some message, error or other form of
signalling to the user used to inform the user that this version of OpenTTD does not support the feature, if the return value is false.<br />
Otherwise the GRF could silently do nothing instead of the expected functionality, creating confusion for end users.</p>
<p>This feature will be automatically skipped when loaded into a version of OpenTTD which does not support this feature (before 14.0).<br />
If this feature is the only significant thing in this GRF, then <span class="code">version_openttd(14, 0) || extended_feature_test("road_stops")</span> MAY be called and some message, error or other form of
signalling to the user used to inform the user that this version of OpenTTD does not support the feature, if the value is false.</p>
<p><b>Sections:</b>
<ul>
@ -58,7 +57,7 @@
Predefined classes include:<br />
<ul>
<li>DFLT - Default class</li>
<li>WAYP - Waypoints: All road waypoints must be put in this class</li>
<li>WAYP - Waypoints: All road waypoints must be put in this class. <b>Not in standard specification</b>.</li>
</ul>
</td></tr>
<tr><td>classname</td><td>string</td><td>You only need to set this for one object in every class. </td></tr>
@ -70,7 +69,7 @@
<p><b>RST_DRAW_FLAG_DRIVE_THROUGH_ROAD_OVERLAY</b><br />
<span class="indent">Draw road overlays for drive-through stops.</span></p>
<p><b>RST_DRAW_FLAG_WAYPOINT_GROUND</b><br />
<span class="indent">Draw spritelayout ground sprite on top of underlying road (if unset, the spritelayout ground sprite is not drawn).</span></p>
<span class="indent">Draw spritelayout ground sprite on top of underlying road (if unset, the spritelayout ground sprite is not drawn). <b>Not in standard specification</b>.</span></p>
</td></tr>
<tr><td>cargo_random_triggers</td><td>cargo bitmask</td><td>Cargo bitmask to use for random triggers</td></tr>
<tr><td>animation_info</td><td>Array [ANIMATION_XXX, frame-count]</td><td>XXX = [LOOPING | NON_LOOPING], 1..253 frames</td></tr>
@ -80,7 +79,7 @@
<p><b>RST_GENERAL_FLAG_RANDOM_ANIMATION</b><br />
<span class="indent">Animation callback requires random bits in variable <span class="code">extra_callback_info1</span>.</span></p>
<p><b>RST_GENERAL_FLAG_NO_ONE_WAY_OVERLAY</b><br />
<span class="indent">Do not show one way road overlay sprites, this should only be set if different graphics are provided for the different one-way states using the <span class="code">one_way_info</span> variable.</span></p>
<span class="indent">Do not show one way road overlay sprites, this should only be set if different graphics are provided for the different one-way states using the <span class="code">one_way_info</span> variable. <b>Not in standard specification</b>.</span></p>
<p><b>RST_GENERAL_FLAG_NO_CATENARY</b><br />
<span class="indent">Do not show catenary graphics. (This only takes effect from <span class="code">road_stops</span> version 2).</span></p>
<p><b>RST_GENERAL_FLAG_DRIVE_THROUGH_ONLY</b><br />
@ -92,12 +91,12 @@
<p><b>RST_GENERAL_FLAG_BUILD_MENU_TRAM_ONLY</b><br />
<span class="indent">Only show in the tram build menu (not road). (This only takes effect from <span class="code">road_stops</span> version 4).</span></p>
<p><b>RST_GENERAL_FLAG_BUILD_MENU_DRAW_DISABLED_VIEWS</b><br />
<span class="indent">Use custom graphics for disabled road stop views. (This only takes effect from <span class="code">road_stops</span> version 8).</span></p>
<span class="indent">Use custom graphics for disabled road stop views. (This only takes effect from <span class="code">road_stops</span> version 8). <b>Not in standard specification</b>.</span></p>
<p><b>RST_GENERAL_FLAG_DRAW_MODE_REGISTER</b><br />
<span class="indent">Read the road stop draw mode from variable 0x100 (set using STORE_TEMP), this overrides the <span class="code">draw_mode</span> property. (This only takes effect from <span class="code">road_stops</span> version 9).</span></p>
<span class="indent">Read the road stop draw mode from variable 0x100 (set using STORE_TEMP), this overrides the <span class="code">draw_mode</span> property. (This only takes effect from <span class="code">road_stops</span> version 9). <b>Not in standard specification</b>.</span></p>
</td></tr>
<tr><td>minimum_bridge_height</td><td>Array of 6 items [0..255, ...]</td><td>Minimum clearances required for a bridge for each of the <a href="#roadstop_views">6 views/rotations</a> (or 0 to not allow any bridge). Values are given in height level units (1 level == 8px).</td></tr>
<tr><td>disallowed_bridge_pillars</td><td>Array of 6 items [bitmask(RST_BRIDGE_PILLAR_FLAG_, ...), ...]</td><td>
<tr><td>minimum_bridge_height<br /><b>Not in standard specification</b></td><td>Array of 6 items [0..255, ...]</td><td>Minimum clearances required for a bridge for each of the <a href="#roadstop_views">6 views/rotations</a> (or 0 to not allow any bridge). Values are given in height level units (1 level == 8px).</td></tr>
<tr><td>disallowed_bridge_pillars<br /><b>Not in standard specification</b></td><td>Array of 6 items [bitmask(RST_BRIDGE_PILLAR_FLAG_, ...), ...]</td><td>
<p>Which bridge pillars are disallowed on the tile for each of the <a href="#roadstop_views">6 views/rotations</a>.</p>
<p><b>RST_BRIDGE_PILLAR_FLAG_CORNER_W</b><br />
<span class="indent">Pillar in west corner</span></p>
@ -117,7 +116,7 @@
<span class="indent">Pillar along entire north-west edge</span></p>
</td></tr>
<tr><td>cost_multipliers</td><td>[build_cost, clear_cost]</td><td>Build and clear cost multipliers, 16 is the same as a non-NewGRF road stop</td></tr>
<tr><td>height</td><td>0..255</td><td>Road stop height (in the build window), in height level units (1 level == 8px), see also: <a href="https://newgrf-specs.tt-wiki.net/wiki/NML:Objects#Object_properties">object height property</a>.</td></tr>
<tr><td>height<br /><b>Not in standard specification</b></td><td>0..255</td><td>Road stop height (in the build window), in height level units (1 level == 8px), see also: <a href="https://newgrf-specs.tt-wiki.net/wiki/NML:Objects#Object_properties">object height property</a>.</td></tr>
</table>
<h3 id="roadstop_variables">Road Stop Variables</h3>
@ -127,7 +126,7 @@
<table>
<tr><th>Name</th><th>Value range</th><th>Comment</th></tr>
<tr><td>view</td><td>0..5</td><td>The <a href="#roadstop_views">view/rotation</a> of the road stop</td></tr>
<tr><td>stop_type</td><td>RST_TYPE_XXX</td><td>XXX = BUS | TRUCK | WAYPOINT</td></tr>
<tr><td>stop_type</td><td>RST_TYPE_XXX</td><td>XXX = BUS | TRUCK | WAYPOINT (<b>Not in standard specification</b>)</td></tr>
<tr><td>terrain_type</td><td>TILETYPE_XXX</td><td>XXX = NORMAL | DESERT | RAIN_FOREST | SNOW</td></tr>
<tr><td>tile_slope</td><td>SLOPE_XXX</td><td>See <a href="https://newgrf-specs.tt-wiki.net/wiki/NML:List_of_tile_slopes">tile slopes</a> for an overview of possible values</td></tr>
<tr><td>has_road</td><td>0 | 1</td><td>1 is this road stop has road</td></tr>
@ -145,9 +144,9 @@
<tr><td>waiting_triggers</td><td>0..255</td><td>Waiting triggers</td></tr>
<tr><td>random_bits</td><td>0..16777215</td><td>All random bits</td></tr>
<tr><td>random_bits_tile</td><td>0..255</td><td>Random bits (per tile), see also <a href="https://newgrf-specs.tt-wiki.net/wiki/NML:Stations#Base_station_variables">random_bits_station</a></td></tr>
<tr><td>one_way_info</td><td>RST_OWI_XXX</td><td>One-way road information of drive-through stop tile<br />XXX = TWO_WAY | WEST_BOUND | EAST_BOUND | NO_ENTRY</td></tr>
<tr><td>one_way_info_inferred</td><td>RST_OWI_XXX</td><td>Inferred one-way road information of drive-through stop tile<br />XXX = TWO_WAY | WEST_BOUND | EAST_BOUND | NO_ENTRY</td></tr>
<tr><td>drawn_in_gui</td><td>0 | 1</td><td>1 if this road stop is being drawn in the build window</td></tr>
<tr><td>one_way_info<br /><b>Not in standard specification</b></td><td>RST_OWI_XXX</td><td>One-way road information of drive-through stop tile<br />XXX = TWO_WAY | WEST_BOUND | EAST_BOUND | NO_ENTRY</td></tr>
<tr><td>one_way_info_inferred<br /><b>Not in standard specification</b></td><td>RST_OWI_XXX</td><td>Inferred one-way road information of drive-through stop tile<br />XXX = TWO_WAY | WEST_BOUND | EAST_BOUND | NO_ENTRY</td></tr>
<tr><td>drawn_in_gui<br /><b>Not in standard specification</b></td><td>0 | 1</td><td>1 if this road stop is being drawn in the build window</td></tr>
</table>
<br />
Variables that require one or more parameters:
@ -175,13 +174,13 @@
<tr><td>nearby_tile_one_way_info</td><td>x, y offset (-8..7)</td><td>RST_OWI_XXX</td><td>One-way state of nearby drive-through road stop tile</td></tr>
<tr><td>nearby_tile_road_stop_info</td><td>x, y offset (-8..7)</td><td></td><td>Above nearby road stop tile variables in one variable (all of variable 0x68)</td></tr>
<tr><td>nearby_tile_grfid</td><td>x, y offset (-8..7)</td><td>-1, 0 or a GRFID</td><td>Return value is -1 if the tile is not a road stop, 0 if the tile is a non-custom road stop, or else the GRFID of the NewGRF defining the road stop</td></tr>
<tr><td>nearby_tile_is_plain_road</td><td>x, y offset (-8..7)</td><td>0 | 1</td><td>Is nearby tile a plain road tile</td></tr>
<tr><td>nearby_tile_road_bits</td><td>x, y offset (-8..7)</td><td>bitmask(ROADBIT_XXX, ...)</td><td>XXX = [NW | SW | SE | NE]<br />Present road bits on nearby tile</td></tr>
<tr><td>nearby_tile_tram_bits</td><td>x, y offset (-8..7)</td><td>bitmask(ROADBIT_XXX, ...)</td><td>XXX = [NW | SW | SE | NE]<br />Present tram bits on nearby tile</td></tr>
<tr><td>nearby_tile_road_piece</td><td>x, y offset (-8..7)</td><td>0..18 | 0xFF</td><td>Present road piece and slope in <a href="https://newgrf-specs.tt-wiki.net/wiki/Action3/Roadtypes#Road_underlay_.2802.29">sprite order</a>, or 0xFF if none</td></tr>
<tr><td>nearby_tile_tram_piece</td><td>x, y offset (-8..7)</td><td>0..18 | 0xFF</td><td>Present tram piece and slope in <a href="https://newgrf-specs.tt-wiki.net/wiki/Action3/Roadtypes#Road_underlay_.2802.29">sprite order</a>, or 0xFF if none</td></tr>
<tr><td>nearby_tile_road_stop_info</td><td>x, y offset (-8..7)</td><td></td><td>Above nearby road tile variables in one variable (all of variable 0x6B)</td></tr>
<tr><td>nearby_tile_road_stop_info_v2</td><td>x, y offset (-8..7)</td><td></td><td>Above nearby road tile variables in one variable (all of variable roadstop_road_stop_info_nearby_tiles_v2)</td></tr>
<tr><td>nearby_tile_is_plain_road<br /><b>Not in standard specification</b></td><td>x, y offset (-8..7)</td><td>0 | 1</td><td>Is nearby tile a plain road tile</td></tr>
<tr><td>nearby_tile_road_bits<br /><b>Not in standard specification</b></td><td>x, y offset (-8..7)</td><td>bitmask(ROADBIT_XXX, ...)</td><td>XXX = [NW | SW | SE | NE]<br />Present road bits on nearby tile</td></tr>
<tr><td>nearby_tile_tram_bits<br /><b>Not in standard specification</b></td><td>x, y offset (-8..7)</td><td>bitmask(ROADBIT_XXX, ...)</td><td>XXX = [NW | SW | SE | NE]<br />Present tram bits on nearby tile</td></tr>
<tr><td>nearby_tile_road_piece<br /><b>Not in standard specification</b></td><td>x, y offset (-8..7)</td><td>0..18 | 0xFF</td><td>Present road piece and slope in <a href="https://newgrf-specs.tt-wiki.net/wiki/Action3/Roadtypes#Road_underlay_.2802.29">sprite order</a>, or 0xFF if none</td></tr>
<tr><td>nearby_tile_tram_piece<br /><b>Not in standard specification</b></td><td>x, y offset (-8..7)</td><td>0..18 | 0xFF</td><td>Present tram piece and slope in <a href="https://newgrf-specs.tt-wiki.net/wiki/Action3/Roadtypes#Road_underlay_.2802.29">sprite order</a>, or 0xFF if none</td></tr>
<tr><td>nearby_tile_road_stop_info<br /><b>Not in standard specification</b></td><td>x, y offset (-8..7)</td><td></td><td>Above nearby road tile variables in one variable (all of variable 0x6B)</td></tr>
<tr><td>nearby_tile_road_stop_info_v2<br /><b>Not in standard specification</b></td><td>x, y offset (-8..7)</td><td></td><td>Above nearby road tile variables in one variable (all of variable roadstop_road_stop_info_nearby_tiles_v2)</td></tr>
</table>
<h3 id="roadstop_callbacks">Road Stop Callbacks</h3>

@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>JGR's Patchpack - NewGRF Road Stops Addition to NewGRF Specifications</title>
<title>JGR's Patchpack - Additions to the NewGRF Road Stops Specification</title>
<style type="text/css">
td li { white-space: nowrap; text-align: left; }
th { white-space: nowrap; text-align: center; }
@ -11,15 +11,16 @@
</style>
</head>
<body>
<h2>NewGRF Road Stops Addition to NewGRF Specifications in JGR's Patchpack</h2>
<p>This document describes the non-standard addition of the NewGRF road stops feature to the <a href="https://newgrf-specs.tt-wiki.net/wiki/Main_Page">Official OpenTTD NewGRF Specifications</a>, as implemented in this patchpack.</br>
This feature does not match OpenTTD PR #7955 in a number of key areas, this feature may not necessarily match implementations of NewGRF road stops in other patches, branches, etc.</br>
This feature as implemented here MAY also be present in other patchpacks.</p>
<h2>Additions to the NewGRF Road Stops Specification in JGR's Patchpack</h2>
<p>This document describes the non-standard additions to the NewGRF road stops feature in the <a href="https://newgrf-specs.tt-wiki.net/wiki/Main_Page">Official OpenTTD NewGRF Specifications</a> (OpenTTD 14.0 and later), as implemented in this patchpack.</br>
The additions here are compatible with the specification and OpenTTD 14.0, such that GRFs can run on OpenTTD 14.0 and also optionally use patchpack extensions where available.</p>
<p>These additions and the official specification do not match the obsolete OpenTTD PR #7955 which used a different NewGRF interface.</p>
<p>See the <a href="newgrf-additions.html">NewGRF additions</a> document for background information on additions to the NewGRF specifications.</p>
<p>A subset of the functionality listed below is also supported in a fork of NML, see the associated <a href="newgrf-roadstops-nml.html">NML road stops</a> and <a href="newgrf-additions-nml.html">NML additions</a> documents for more details.</p>
<p>NewGRFs which use this feature SHOULD use the <a href="newgrf-additions.html#feature-test">feature testing</a> mechanism to check whether the road stop feature and/or feature ID mapping is supported.</p>
<p>NewGRFs which use this feature MUST use the <a href="newgrf-additions.html#feature-id-mapping">feature ID mapping</a> mechanism to map the non-standard NewGRF road stop feature to a local feature ID.</p>
<p>This feature is indicated by the feature name: <font face="monospace">road_stops</font>, version 1.<br />
<p>The functionality listed below is also supported in a fork of NML, see the associated <a href="newgrf-roadstops-nml.html">NML road stops</a> and <a href="newgrf-additions-nml.html">NML additions</a> documents for more details.</p>
<p>NewGRFs which use this feature MAY use the <a href="newgrf-additions.html#feature-test">feature testing</a> mechanism to check whether/which extensions to the road stop feature are supported.</p>
<p>NewGRFs which use this feature MAY use the <a href="newgrf-additions.html#feature-id-mapping">feature ID mapping</a> mechanism to map the road stop feature to local feature ID 0x14 to additionally support earlier
versions of this patchpack before the feature was added to the specification, otherwise feature ID 0x14 may be used without any mapping (as per the specification).</p>
<p>These extensions are indicated by the feature name: <font face="monospace">road_stops</font>, version 1.<br />
The feature name to use for feature ID mapping is <font face="monospace">road_stops</font>.<br />
Features/properties/variables which require a higher version will indicate the required version. Unless indicated otherwise these will fall back to doing nothing on versions which do not support them.</p>
@ -36,26 +37,26 @@
<h3 id="a0roadstops">Action 0 - Road Stops</h3>
<p>See the <a href="https://newgrf-specs.tt-wiki.net/wiki/Action0">Action 0 Specification</a> for background information.</p>
<p>See the <a href="https://newgrf-specs.tt-wiki.net/wiki/Action0/Road_Stops">Action 0 Roadstops Specification</a> for background information.</p>
<b>Properties:</b>
<table>
<tr><th>Number</th><th>Mappable name</th><th>Size in bytes</th><th>Description</th></tr>
<tr><td><a href="#roadstop_class_id">08</a></td><td><a href="#roadstop_class_id">roadstop_class_id</a></td><td>4</td><td>Class ID</td></tr>
<tr><td><a href="#roadstop_stop_type">09</a></td><td><a href="#roadstop_stop_type">roadstop_stop_type</a></td><td>1</td><td>Stop type availability</td></tr>
<tr><td><a href="#roadstop_stop_name">0A</a></td><td><a href="#roadstop_stop_name">roadstop_stop_name</a></td><td>2</td><td>Name</td></tr>
<tr><td><a href="#roadstop_class_name">0B</a></td><td><a href="#roadstop_class_name">roadstop_class_name</a></td><td>2</td><td>Class name</td></tr>
<tr><td><a href="#roadstop_draw_mode">0C</a></td><td><a href="#roadstop_draw_mode">roadstop_draw_mode</a></td><td>1</td><td>Draw mode</td></tr>
<tr><td><a href="#roadstop_random_trigger_cargoes">0D</a></td><td><a href="#roadstop_random_trigger_cargoes">roadstop_random_trigger_cargoes</a></td><td>4</td><td>Random trigger cargoes</td></tr>
<tr><td><a href="#roadstop_animation_info">0E</a></td><td><a href="#roadstop_animation_info">roadstop_animation_info</a></td><td>2</td><td>Animation info</td></tr>
<tr><td><a href="#roadstop_animation_speed">0F</a></td><td><a href="#roadstop_animation_speed">roadstop_animation_speed</a></td><td>1</td><td>Animation speed</td></tr>
<tr><td><a href="#roadstop_animation_triggers">10</a></td><td><a href="#roadstop_animation_triggers">roadstop_animation_triggers</a></td><td>2</td><td>Animation triggers</td></tr>
<tr><td><a href="#roadstop_callback_mask">11</a></td><td><a href="#roadstop_callback_mask">roadstop_callback_mask</a></td><td>1</td><td>Callback flags</td></tr>
<tr><td><a href="#roadstop_general_flags">12</a></td><td><a href="#roadstop_general_flags">roadstop_general_flags</a></td><td>4</td><td>General flags</td></tr>
<tr><td><a href="#roadstop_min_bridge_height">13</a></td><td><a href="#roadstop_min_bridge_height">roadstop_min_bridge_height</a></td><td>6</td><td>Minimum bridge heights</td></tr>
<tr><td><a href="#roadstop_disallowed_bridge_pillars">14</a></td><td><a href="#roadstop_disallowed_bridge_pillars">roadstop_disallowed_bridge_pillars</a></td><td>6</td><td>Disallowed bridge pillars</td></tr>
<tr><td><a href="#roadstop_cost_multipliers">15</a></td><td><a href="#roadstop_cost_multipliers">roadstop_cost_multipliers</a></td><td>2</td><td>Cost multipliers</td></tr>
<tr><td><a href="#roadstop_height">16</a></td><td><a href="#roadstop_height">roadstop_height</a></td><td>1</td><td>Height (for build window)</td></tr>
<tr><th>Number</th><th>Mappable name</th><th>Size in bytes</th><th>Description</th><th>Difference to specification</th></tr>
<tr><td><a href="#roadstop_class_id">08</a></td><td><a href="#roadstop_class_id">roadstop_class_id</a></td><td>4</td><td>Class ID</td><td>WAYP (road waypoints)</td></tr>
<tr><td><a href="#roadstop_stop_type">09</a></td><td><a href="#roadstop_stop_type">roadstop_stop_type</a></td><td>1</td><td>Stop type availability</td><td></td></tr>
<tr><td><a href="#roadstop_stop_name">0A</a></td><td><a href="#roadstop_stop_name">roadstop_stop_name</a></td><td>2</td><td>Name</td><td></td></tr>
<tr><td><a href="#roadstop_class_name">0B</a></td><td><a href="#roadstop_class_name">roadstop_class_name</a></td><td>2</td><td>Class name</td><td></td></tr>
<tr><td><a href="#roadstop_draw_mode">0C</a></td><td><a href="#roadstop_draw_mode">roadstop_draw_mode</a></td><td>1</td><td>Draw mode</td><td>Bit 2</td></tr>
<tr><td><a href="#roadstop_random_trigger_cargoes">0D</a></td><td><a href="#roadstop_random_trigger_cargoes">roadstop_random_trigger_cargoes</a></td><td>4</td><td>Random trigger cargoes</td><td></td></tr>
<tr><td><a href="#roadstop_animation_info">0E</a></td><td><a href="#roadstop_animation_info">roadstop_animation_info</a></td><td>2</td><td>Animation info</td><td></td></tr>
<tr><td><a href="#roadstop_animation_speed">0F</a></td><td><a href="#roadstop_animation_speed">roadstop_animation_speed</a></td><td>1</td><td>Animation speed</td><td></td></tr>
<tr><td><a href="#roadstop_animation_triggers">10</a></td><td><a href="#roadstop_animation_triggers">roadstop_animation_triggers</a></td><td>2</td><td>Animation triggers</td><td></td></tr>
<tr><td><a href="#roadstop_callback_mask">11</a></td><td><a href="#roadstop_callback_mask">roadstop_callback_mask</a></td><td>1</td><td>Callback flags</td><td></td></tr>
<tr><td><a href="#roadstop_general_flags">12</a></td><td><a href="#roadstop_general_flags">roadstop_general_flags</a></td><td>4</td><td>General flags</td><td>Bits 1, 7, 8</td></tr>
<tr><td><a href="#roadstop_min_bridge_height">13</a></td><td><a href="#roadstop_min_bridge_height">roadstop_min_bridge_height</a></td><td>6</td><td>Minimum bridge heights</td><td>Not in spec</td></tr>
<tr><td><a href="#roadstop_disallowed_bridge_pillars">14</a></td><td><a href="#roadstop_disallowed_bridge_pillars">roadstop_disallowed_bridge_pillars</a></td><td>6</td><td>Disallowed bridge pillars</td><td>Not in spec</td></tr>
<tr><td><a href="#roadstop_cost_multipliers">15</a></td><td><a href="#roadstop_cost_multipliers">roadstop_cost_multipliers</a></td><td>2</td><td>Cost multipliers</td><td></td></tr>
<tr><td><a href="#roadstop_height">16</a></td><td><a href="#roadstop_height">roadstop_height</a></td><td>1</td><td>Height (for build window)</td><td>Not in spec</td></tr>
</table>
<h4 id="roadstop_class_id">Road stop class ID (08, or mappable property: roadstop_class_id)</h4>
@ -65,7 +66,7 @@
<table>
<tr><th>Name</th><th>Class ID</th><th>Meaning</th></tr>
<tr><td>DFLT</td><td>44 46 4C 54</td><td>Default bus and lorry stops</td></tr>
<tr><td>WAYP</td><td>57 41 59 50</td><td>This class is used for road waypoints</td></tr>
<tr><td>WAYP</td><td>57 41 59 50</td><td>This class is used for road waypoints. This is reserved in the specification, but not implemented.</td></tr>
</table>
All classes except WAYP are used for bus and/or lorry stops.<br />
This functions the same way as <a href="https://newgrf-specs.tt-wiki.net/wiki/Action0/Stations#Station_class_.2808.29">station (feature 4) property 08</a>.<br />
@ -95,7 +96,10 @@
<tr><th>Bit</th><th>Value</th><th>Meaning</th></tr>
<tr><td>0</td><td>1</td><td>Bay stops: Draw road type ground sprite</td></tr>
<tr><td>1</td><td>2</td><td>Drive through stops: Draw road/tram type overlays</td></tr>
<tr><td>2</td><td>4</td><td>Road waypoints: Draw sprite layout ground sprite on top of the underlying road (by default the sprite layout ground sprite is not used)</td></tr>
<tr><td>2</td><td>4</td><td>
Road waypoints: Draw sprite layout ground sprite on top of the underlying road (by default the sprite layout ground sprite is not used).<br />
This is not in the specification.
</td></tr>
</table>
The default value is 3 (bits 0 and 1 both set).
</p>
@ -152,27 +156,29 @@
<table>
<tr><th>Bit</th><th>Value</th><th>Meaning</th></tr>
<tr><td>0</td><td>1</td><td>Callback 141 needs random bits in variable 10</td></tr>
<tr><td>1</td><td>2</td><td>Do not show one way road overlay sprites, this should only be set if different graphics are provided for the different one-way states using bits 0..1 of variable 50.</td></tr>
<tr><td>1</td><td>2</td><td>Do not show one way road overlay sprites, this should only be set if different graphics are provided for the different one-way states using bits 0..1 of variable 50.<br />This is not in the specification.</td></tr>
<tr><td>2</td><td>4</td><td>Do not show catenary graphics.</br>This requires <font face="monospace">road_stops</font>, version 2.</td></tr>
<tr><td>3</td><td>8</td><td>Only allow drive-through stops (not bay stops).</br>This requires <font face="monospace">road_stops</font>, version 2.</td></tr>
<tr><td>4</td><td>10</td><td>Do not automatically build connecting road pieces.</br>This requires <font face="monospace">road_stops</font>, version 3.</td></tr>
<tr><td>5</td><td>20</td><td>Only show in the road build menu (not tram).</br>This requires <font face="monospace">road_stops</font>, version 4.</td></tr>
<tr><td>6</td><td>40</td><td>Only show in the tram build menu (not road).</br>This requires <font face="monospace">road_stops</font>, version 4.</td></tr>
<tr><td>7</td><td>80</td><td>Use custom graphics for disabled road stop views.</br>This requires <font face="monospace">road_stops</font>, version 8.</td></tr>
<tr><td>8</td><td>100</td><td>Read the road stop draw mode from variable 0x100, this overrides the <a href="#roadstop_draw_mode">roadstop_draw_mode</a> property.</br>This requires <font face="monospace">road_stops</font>, version 9.</td></tr>
<tr><td>7</td><td>80</td><td>Use custom graphics for disabled road stop views.</br>This requires <font face="monospace">road_stops</font>, version 8.<br />This is not in the specification.</td></tr>
<tr><td>8</td><td>100</td><td>Read the road stop draw mode from variable 0x100, this overrides the <a href="#roadstop_draw_mode">roadstop_draw_mode</a> property.</br>This requires <font face="monospace">road_stops</font>, version 9.<br />This is not in the specification.</td></tr>
</table>
The default value is 0 (no flags enabled).
</p>
<h4 id="roadstop_min_bridge_height">Road stop minimum bridge heights (13, or mappable property: roadstop_min_bridge_height)</h4>
<p>This property allows or disallows building bridges over road stops.<br />
The bridge height property defines minimum clearances required for a bridge for each of the 6 views/rotations (or 0 to not allow any bridge). Values are given in height level units (1 level == 8px).<br />
Each height value is 1 byte, the total property length is 6 bytes.
Each height value is 1 byte, the total property length is 6 bytes.<br />
This property is not in the specification.
</p>
<h4 id="roadstop_disallowed_bridge_pillars">Road stop disallowed bridge pillars (14, or mappable property: roadstop_disallowed_bridge_pillars)</h4>
<p>This property describes which bridge pillars are not allowed on the road stop tile.<br />
It consists of a set of pillar flags, for each of the 6 road stop views/rotations.<br />
Each set of flags is 1 byte, the total property length is 6 bytes.<br />
Each set of flags has the format described in the <a href="newgrf-additions.html#bridge_pillar_flags">bridge_pillar_flags property section</a>.
Each set of flags has the format described in the <a href="newgrf-additions.html#bridge_pillar_flags">bridge_pillar_flags property section</a>.<br />
This property is not in the specification.
</p>
<h4 id="roadstop_cost_multipliers">Road stop cost multipliers (15, or mappable property: roadstop_cost_multipliers)</h4>
<p>This property sets the build and removal cost multipliers.<br />
@ -186,7 +192,8 @@
The nominal height for the road stop preview is set to at least: 32 + "value of this property" * 8.<br />
This similar to <a href="https://newgrf-specs.tt-wiki.net/wiki/Action0/Objects#Building_height_.2816.29">Object variable 16</a>.<br />
The total property length is 1 byte.<br />
This requires <font face="monospace">road_stops</font>, version 6.
This requires <font face="monospace">road_stops</font>, version 6.<br />
This property is not in the specification.
</p>
<p style="padding-top: 0.25em;">
@ -212,36 +219,36 @@
<h3 id="varaction2roadstops">Variational Action 2 - Road Stops</h3>
<p>See the <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2">Variational Action 2 Specification</a> for background information.</p>
<p>See the <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Road_Stops">Variational Action 2 Road Stops Specification</a> for background information.</p>
<p>The parent scope for this feature is the road stop's station's town.</p>
<b>Variables:</b>
<table>
<tr><th>Number</th><th>Mappable name</th><th>Description</th></tr>
<tr><td><a href="#roadstop_view">40</a></td><td><a href="#roadstop_view">roadstop_view</a></td><td>View/rotation</td></tr>
<tr><td><a href="#roadstop_type">41</a></td><td><a href="#roadstop_type">roadstop_type</a></td><td>Stop type</td></tr>
<tr><td><a href="#roadstop_terrain_type">42</a></td><td><a href="#roadstop_terrain_type">roadstop_terrain_type</a></td><td>Terrain type</td></tr>
<tr><td><a href="#roadstop_road_type">43</a></td><td><a href="#roadstop_road_type">roadstop_road_type</a></td><td>Road type</td></tr>
<tr><td><a href="#roadstop_tram_type">44</a></td><td><a href="#roadstop_tram_type">roadstop_tram_type</a></td><td>Tram type</td></tr>
<tr><td><a href="#roadstop_town_zone">45</a></td><td><a href="#roadstop_town_zone">roadstop_town_zone</a></td><td>Town zone and Manhattan distance of town</td></tr>
<tr><td><a href="#roadstop_town_distance_squared">46</a></td><td><a href="#roadstop_town_distance_squared">roadstop_town_distance_squared</a></td><td>Square of Euclidean distance of town</td></tr>
<tr><td><a href="#roadstop_company_info">47</a></td><td><a href="#roadstop_company_info">roadstop_company_info</a></td><td>Player/company info</td></tr>
<tr><td><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">48</a></td><td></td><td>Bitmask of accepted cargoes (BaseStation)</td></tr>
<tr><td><a href="#roadstop_animation_frame">49</a></td><td><a href="#roadstop_animation_frame">roadstop_animation_frame</a></td><td>Current animation frame</td></tr>
<tr><td><a href="#roadstop_misc_info">50</a></td><td><a href="#roadstop_misc_info">roadstop_misc_info</a></td><td>Miscellaneous info</td></tr>
<tr><td><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">60</a></td><td></td><td>Amount of cargo waiting (BaseStation)</td></tr>
<tr><td><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">61</a></td><td></td><td>Time since last cargo pickup (BaseStation)</td></tr>
<tr><td><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">62</a></td><td></td><td>Rating of cargo (BaseStation)</td></tr>
<tr><td><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">63</a></td><td></td><td>Time spent on route (BaseStation)</td></tr>
<tr><td><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">64</a></td><td></td><td>Information about last vehicle picking cargo up (BaseStation)</td></tr>
<tr><td><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">65</a></td><td></td><td>Amount of cargo acceptance (BaseStation)</td></tr>
<tr><td><a href="#roadstop_animation_frame_nearby_tiles">66</a></td><td><a href="#roadstop_animation_frame_nearby_tiles">roadstop_animation_frame_nearby_tiles</a></td><td>Animation frame of nearby tile</td></tr>
<tr><td><a href="#roadstop_land_info_nearby_tiles">67</a></td><td><a href="#roadstop_land_info_nearby_tiles">roadstop_land_info_nearby_tiles</a></td><td>Land info of nearby tiles</td></tr>
<tr><td><a href="#roadstop_road_stop_info_nearby_tiles">68</a></td><td><a href="#roadstop_road_stop_info_nearby_tiles">roadstop_road_stop_info_nearby_tiles</a></td><td>Road stop info of nearby tiles</td></tr>
<tr><td></td><td><a href="#roadstop_road_stop_info_nearby_tiles_v2">roadstop_road_stop_info_nearby_tiles_v2</a></td><td>Road stop info of nearby tiles (v2)</td></tr>
<tr><td><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">69</a></td><td></td><td>Information about cargo accepted in the past (BaseStation)</td></tr>
<tr><td><a href="#roadstop_road_stop_grfid_nearby_tiles">6A</a></td><td><a href="#roadstop_road_stop_grfid_nearby_tiles">roadstop_road_stop_grfid_nearby_tiles</a></td><td>GRFID of nearby road stop tiles</td></tr>
<tr><td><a href="#roadstop_road_info_nearby_tiles">6B</a></td><td><a href="#roadstop_road_info_nearby_tiles">roadstop_road_info_nearby_tiles</a></td><td>Road info of nearby plain road tiles</td></tr>
<tr><th>Number</th><th>Mappable name</th><th>Description</th><th>Difference to specification</th></tr>
<tr><td><a href="#roadstop_view">40</a></td><td><a href="#roadstop_view">roadstop_view</a></td><td>View/rotation</td><td></td></tr>
<tr><td><a href="#roadstop_type">41</a></td><td><a href="#roadstop_type">roadstop_type</a></td><td>Stop type</td><td>Road waypoint</td></tr>
<tr><td><a href="#roadstop_terrain_type">42</a></td><td><a href="#roadstop_terrain_type">roadstop_terrain_type</a></td><td>Terrain type</td><td></td></tr>
<tr><td><a href="#roadstop_road_type">43</a></td><td><a href="#roadstop_road_type">roadstop_road_type</a></td><td>Road type</td><td></td></tr>
<tr><td><a href="#roadstop_tram_type">44</a></td><td><a href="#roadstop_tram_type">roadstop_tram_type</a></td><td>Tram type</td><td></td></tr>
<tr><td><a href="#roadstop_town_zone">45</a></td><td><a href="#roadstop_town_zone">roadstop_town_zone</a></td><td>Town zone and Manhattan distance of town</td><td></td></tr>
<tr><td><a href="#roadstop_town_distance_squared">46</a></td><td><a href="#roadstop_town_distance_squared">roadstop_town_distance_squared</a></td><td>Square of Euclidean distance of town</td><td></td></tr>
<tr><td><a href="#roadstop_company_info">47</a></td><td><a href="#roadstop_company_info">roadstop_company_info</a></td><td>Player/company info</td><td></td></tr>
<tr><td><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">48</a></td><td></td><td>Bitmask of accepted cargoes (BaseStation)</td><td></td></tr>
<tr><td><a href="#roadstop_animation_frame">49</a></td><td><a href="#roadstop_animation_frame">roadstop_animation_frame</a></td><td>Current animation frame</td><td></td></tr>
<tr><td><a href="#roadstop_misc_info">50</a></td><td><a href="#roadstop_misc_info">roadstop_misc_info</a></td><td>Miscellaneous info</td><td>Not in spec</td></tr>
<tr><td><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">60</a></td><td></td><td>Amount of cargo waiting (BaseStation)</td><td></td></tr>
<tr><td><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">61</a></td><td></td><td>Time since last cargo pickup (BaseStation)</td><td></td></tr>
<tr><td><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">62</a></td><td></td><td>Rating of cargo (BaseStation)</td><td></td></tr>
<tr><td><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">63</a></td><td></td><td>Time spent on route (BaseStation)</td><td></td></tr>
<tr><td><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">64</a></td><td></td><td>Information about last vehicle picking cargo up (BaseStation)</td><td></td></tr>
<tr><td><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">65</a></td><td></td><td>Amount of cargo acceptance (BaseStation)</td><td></td></tr>
<tr><td><a href="#roadstop_animation_frame_nearby_tiles">66</a></td><td><a href="#roadstop_animation_frame_nearby_tiles">roadstop_animation_frame_nearby_tiles</a></td><td>Animation frame of nearby tile</td><td></td></tr>
<tr><td><a href="#roadstop_land_info_nearby_tiles">67</a></td><td><a href="#roadstop_land_info_nearby_tiles">roadstop_land_info_nearby_tiles</a></td><td>Land info of nearby tiles</td><td></td></tr>
<tr><td><a href="#roadstop_road_stop_info_nearby_tiles">68</a></td><td><a href="#roadstop_road_stop_info_nearby_tiles">roadstop_road_stop_info_nearby_tiles</a></td><td>Road stop info of nearby tiles</td><td>Road waypoint, bits 24 - 31</td></tr>
<tr><td></td><td><a href="#roadstop_road_stop_info_nearby_tiles_v2">roadstop_road_stop_info_nearby_tiles_v2</a></td><td>Road stop info of nearby tiles (v2)</td><td>Not in spec</td></tr>
<tr><td><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">69</a></td><td></td><td>Information about cargo accepted in the past (BaseStation)</td><td></td></tr>
<tr><td><a href="#roadstop_road_stop_grfid_nearby_tiles">6A</a></td><td><a href="#roadstop_road_stop_grfid_nearby_tiles">roadstop_road_stop_grfid_nearby_tiles</a></td><td>GRFID of nearby road stop tiles</td><td></td></tr>
<tr><td><a href="#roadstop_road_info_nearby_tiles">6B</a></td><td><a href="#roadstop_road_info_nearby_tiles">roadstop_road_info_nearby_tiles</a></td><td>Road info of nearby plain road tiles</td><td>Not in spec</td></tr>
</table>
<h4 id="roadstop_view">Road stop view/rotation (40, or mappable variable: roadstop_view)</h4>
@ -332,7 +339,8 @@
</td></tr>
</table>
<br />
The remaining bits are reserved for future use and should be masked.
The remaining bits are reserved for future use and should be masked.<br />
This variable is not in the specification.
</p>
<h4 id="roadstop_animation_frame_nearby_tiles">Animation frame of nearby tile (66, or mappable variable: roadstop_animation_frame_nearby_tiles)</h4>
@ -363,7 +371,7 @@
<tr><td>16 - 19</td><td>
0 - Passenger/bus stop<br />
1 - Freight/lorry stop<br />
2 - Road waypoint
2 - Road waypoint (not in specification)
</td></tr>
<tr><td>20</td><td>Set if the stop type (passenger/bus, freight/lorry or road waypoint) is the same as the current tile</td></tr>
<tr><td>21 - 22</td><td>
@ -378,7 +386,8 @@
This can be ignored if this GRF does not have any road stop setIDs greater than 255 (does not define more than 256 road stop types).<br />
This requires <font face="monospace">road_stops</font>, version 7.<br />
<br />
If the <font face="monospace">road_stops</font> feature is not tested for, this is set to 0.
If the <font face="monospace">road_stops</font> feature is not tested for, this is set to 0.<br />
This is not in the specification.
</td></tr>
</table>
<br />
@ -415,7 +424,8 @@
</table>
<br />
The remaining bits are reserved for future use and should be masked.<br />
This requires <font face="monospace">road_stops</font>, version 7.
This requires <font face="monospace">road_stops</font>, version 7.<br />
This variable is not in the specification.
</p>
<h4 id="roadstop_road_stop_grfid_nearby_tiles">GRFID of nearby road stop tile (6A, or mappable variable: roadstop_road_stop_grfid_nearby_tiles)</h4>
@ -451,13 +461,17 @@
<br />
The remaining bits are reserved for future use and should be masked.
<br />
This requires <font face="monospace">road_stops</font>, version 5.
This requires <font face="monospace">road_stops</font>, version 5.<br />
This variable is not in the specification.
</p>
<br />
<h3 id="randomaction2roadstops">Random Action 2 - Road Stops</h3>
<p>See the <a href="https://newgrf-specs.tt-wiki.net/wiki/RandomAction2">Random Action 2 Specification</a> for background information.</p>
<p>See the <a href="https://newgrf-specs.tt-wiki.net/wiki/RandomAction2#Road_stops">Random Action 2 Road Stops Specification</a> for information.</p>
<details>
<summary>Same as standard specification</summary>
<p>Road stops have 16+8 random bits. Bits 0 to 15 are a property of the station as a whole, and bits 16 to 23 are different for each tile.
@ -477,6 +491,7 @@
Triggers 04, 08, and 10 only affect the tile on which they occur, as well as the random bits of the station, but not other tiles.
</p>
<br />
</details>
<h3 id="a3roadstops">Action 3 - Road Stops</h3>

Loading…
Cancel
Save