- Please use Feature / Add / Change / Fix for player-facing changes. E.g.: "Feature: My cool new feature".
- Please use Feature / Add / Change / Fix followed by "[NewGRF]" or "[Script]" for moddable changes. E.g.: "Feature: [NewGRF] My cool new NewGRF addition".
- Please use Codechange / Codefix for developer-facing changes. E.g.: "Codefix #1234: Validate against nullptr properly".
See https://github.com/OpenTTD/OpenTTD/blob/master/CODINGSTYLE.md#commit-message for more details.
* Use curly braces and put the contained statements on their own lines (e.g., don't put them directly after the **if**).
* Opening curly bracket **{** stays on the first line, closing curly bracket **}** gets a line to itself (except for the **}** preceding an **else**, which should be on the same line as the **else**).
* When only a single statement is contained, the brackets can be omitted. In this case, put the single statement on the same line as the preceding keyword (**if**, **while**, etc.). Note that this is only allowed for if statements without an **else** clause.
* Non-trivial fall throughs must be documented, using a `[[fallthrough]]` attribute.
* All fall throughs must be documented, using a **FALLTHROUGH** define/macro.
* The NOT_REACHED() macro can be used in default constructs that should never be reached.
* Unconditional loops are written with **`for (;;) {`**
@ -180,7 +180,7 @@ switch (a) {
case 1:
DoSomething();
[[fallthrough]];
FALLTHROUGH;
case 2:
DoMore();
@ -191,7 +191,7 @@ switch (a) {
int r = 2;
DoEvenMore(a);
[[fallthrough]];
FALLTHROUGH;
}
case 4: {
@ -248,7 +248,7 @@ Templates are a very powerful C++ tool, but they can easily confuse beginners. T
* Templates are to be documented in a very clear and verbose manner. Never assume anything in the documentation.
* the template keyword and the template layout get a separate line. typenames are either "T" or preceded by a "T", integers get a single capital letter or a descriptive name preceded by "T".
* Add, Feature: Adding new stuff. Difference between "Feature" and "Add" is somewhat subjective. "Feature" for user-point-of-view stuff, "Add" for other.
* Change: Changing behaviour from user-point-of-view.
* Remove: Removing something from user-point-of-view.
* Codechange, Cleanup: Changes without intentional change of behaviour from user-point-of-view. Difference between "Codechange" and "Cleanup" is somewhat subjective.
* Fix, Revert: Fixing stuff.
* Doc, Update: Documentation changes, version increments, translator commits.
* Prepare: Preparation for bigger changes. Rarely used.
Keywords can either be player-facing, NewGRF / Script author-facing, or developer-facing.
If you commit a fix for an [issue](https://github.com/OpenTTD/OpenTTD/issues), add the corresponding issue number in the form of #NNNN. Do it as well if you implement a feature with a matching entry.
For player-facing changes, we have these keywords:
* Feature: Adding a significant new functionality to the game. This can be small in code-size, but is meant for the bigger things from a player perspective.
* Add: Similar to Feature, but for small functionalities.
* Change: Changing existing behaviour to an extent the player needs to know about it.
* Fix: Fixing an issue with the game (as seen by the player).
* Doc: Update to (player-facing) documentation, like in the `docs/` folder etc.
* Update: Translator commits.
In the case of bugfixes, if you know what revision the bug was introduced (eg regression), please mention that revision as well just after the prefix. Finding the trouble-causing revision is highly encouraged as it makes backporting/branching/releases that much easier.
For NewGRF / Script author-facing changes, we use the same keywords as player-facing changes, followed by `[NewGRF]` / `[Script]` component.
This also means the commit is aimed (and worded) towards the NewGRF / Script authors, rather than players.
To further structure the changelog, you can add sections. Example are:
* "Network" for network specific changes
* "NewGRF" for NewGRF additions
* "YAPP", "NPF", for changes in these features
* "OSX", "Debian", "win32", for OS-specific packaging changes
For developer-facing changes, we have these keywords:
* Codechange: Changes to the code the player is not going to notice. Refactors, modernization, etc.
* Cleanup: Similar to Codechange, but when it is more about removing old code, rather than an actual change.
* Codefix: Fixing problems in earlier commits that the player is not actually going to notice. Wrong comments, missing files, CI changes.
If you commit a `Fix` for an [issue](https://github.com/OpenTTD/OpenTTD/issues), add the corresponding issue number in the form of #NNNNN.
In the case of `Fix`es, if you know the hash of the commit in which the bug was introduced (eg regression), please mention that hash (the first 7 characters) as well just after the keyword (or, if present, after the issue number).
Finding the trouble-causing commit is highly encouraged as it makes backporting / branching / releases that much easier.
Do not mention two keywords; if two apply, pick one that best represents the commit (for example, "Fix #123" is mostly always better than "Revert", even if both are true).
The `<details>` part starts with a capital and does not end with a dot.
Try to be descriptive to what the player will notice, not to what is actually being changed in the code.
See `changelog.txt` for inspiration.
To further structure the changelog, you can add components. Example are:
* "Network" for network specific changes.
* "NewGRF" for NewGRF additions.
* "Script" for AI / GS additions.
* "YAPF", "NPF", for changes in these features.
* "MacOS", "Linux", "Windows", for OS-specific changes.
* "CI", "CMake", for changes to the (build) infrastructure.
Further explanations, more details, etc. don't go into the first line. Use a new line for those.
Further explanations, general bitching, etc. don't go into the first line. Use a new line for those.
Complete examples:
* `Fix: [YAPF] Infinite loop in pathfinder`
* `Fix #5926: [YAPF] Infinite loop in pathfinder`
* `Codefix 80dffae: Warning about unsigned unary minus`
* `Fix #6673, 99bb3a9: Store the map variety setting in the savegame`
* `Codefix #5922: ClientSizeChanged is only called via WndProcGdi which already has the mutex`
* `Codechange #1264, #2037, #2038, #2110: Rewrite the autoreplace kernel`
* Fix: [YAPF] Infinite loop in pathfinder.
* Fix #5926: [YAPF] Infinite loop in pathfinder.
* Fix 80dffae130: Warning about unsigned unary minus.
* Fix #6673, 99bb3a95b4: Store the map variety setting in the samegame.
* Revert d9065fbfbe, Fix #5922: ClientSizeChanged is only called via WndProcGdi which already has the mutex.
@ -112,7 +112,7 @@ Every pull request should have a clear scope, with no unrelated commits.
Adhering to the following process is the best way to get your work included in the project:
1. [Fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) the project, clone your fork, and configure the remotes:
1. [Fork](https://help.github.com/fork-a-repo/) the project, clone your fork, and configure the remotes:
@ -266,7 +266,7 @@ This is inevitable, because it is a main feature of git.
If you are concerned about your privacy, we strongly recommend to use "Anonymous <anonymous@openttd.org>" as the git commit author. We might refuse anonymous contributions if malicious intent is suspected.
Please note that the contributor identity, once given, is used for copyright verification and to provide proof should a malicious commit be made.
As such, the [EU GDPR](https://gdpr.eu) "right to be forgotten" does not apply, as this is an overriding legitimate interest.
As such, the [EU GDPR](https://www.eugdpr.org/key-changes.html) "right to be forgotten" does not apply, as this is an overriding legitimate interest.
Please also note that your commit is public and as such will potentially be processed by many third-parties.
Git's distributed nature makes it impossible to track where exactly your commit, and thus your personal data, will be stored and be processed.
This is a collection of features and other modifications applied to [OpenTTD](http://www.openttd.org/).
It's a separate version of the game which can be installed and played alongside the standard game, not a loadable mod (NewGRF, script, or so on).
This is mainly intended to be used by players who are already familiar with the standard game and how to play it.
It is not aimed at beginner/novice players. Some features and settings are there for very experienced players and so may have a steep learning curve.
This is a collection of patches applied to [OpenTTD](http://www.openttd.org/)
* * *
@ -20,14 +16,14 @@ section "Licensing" below for details,
See [below](#openttd) for the original OpenTTD readme.
The thread for this patchpack can be found [here](http://www.tt-forums.net/viewtopic.php?f=33&t=73469).
See [jgrpp-changelog.md](jgrpp-changelog.md) for the changelog.
See the [wiki](https://github.com/JGRennison/OpenTTD-patches/wiki) for guides on how to use some of the included features.
See [installation.md](/installation.md) for instructions on how to install.
The TT-Forums thread for this patchpack can be found [here](http://www.tt-forums.net/viewtopic.php?f=33&t=73469).
(Nearly all of the patches which are listed below have been modified, fixed or extended in some way, and so are not the same as the originals which are linked).
#### Railways and Trains
@ -62,7 +58,6 @@ The TT-Forums thread for this patchpack can be found [here](http://www.tt-forums
* Remember the last-used signal type between games.
* Add client setting to show the introduction year for train wagons.
* Add setting for rail depot maximum speed.
* Add setting to allow auto-fill signal dragging to skip over stations/waypoints.
#### Roads and Road Vehicles
@ -120,6 +115,7 @@ The TT-Forums thread for this patchpack can be found [here](http://www.tt-forums
* Open train vehicle details window on total cargo tab if shift pressed.
* Add news/advice setting to warn if no depot order in vehicle schedule.
* [Add buttons to collapse/expand all groups](http://www.tt-forums.net/viewtopic.php?f=33&t=74365).
* Add a menu item to the vehicle list to assign all listed vehicles to a new group.
* Add a setting to include the train length and group name in the vehicle details window.
* Add a setting for whether to open the new vehicle GUI when share-cloning.
* Add setting to disable mass action buttons for top-level vehicle lists.
@ -135,6 +131,7 @@ The TT-Forums thread for this patchpack can be found [here](http://www.tt-forums
* [Automated timetables and separation](http://www.tt-forums.net/viewtopic.php?f=33&t=46391).
* Allow clearing of timetable time fields which are at 0. Allow explicitly setting timetable time fields to 0 without clearing them.
* Allow changing/clearing the timetabled waiting time and max speed of all of a vehicle's orders at once.
* Add client setting to show the remainder ticks in timetable, after dividing to days or minutes.
* Add a company setting to control the number of ticks used in auto-fill timetable rounding.
* [Cargo type orders](https://www.tt-forums.net/viewtopic.php?p=1047749).
@ -169,6 +166,7 @@ The TT-Forums thread for this patchpack can be found [here](http://www.tt-forums
@ -504,15 +506,6 @@ Most types of add-on content can be downloaded within OpenTTD via the 'Check Onl
Add-on content can also be installed manually, but that's more complicated; the [OpenTTD wiki](https://wiki.openttd.org/) may offer help with that, or the [OpenTTD directory structure guide](./docs/directory_structure.md).
### 1.5.1) Social Integration
OpenTTD has the ability to load plugins to integrate with Social Platforms like Steam, Discord, etc.
To enable such integration, the plugin for the specific platform has to be downloaded and stored in the `social_integration` folder.
See [OpenTTD's website](https://www.openttd.org), under Downloads, for what plugins are available.
### 1.6) OpenTTD directories
OpenTTD uses its own directory structure to store game data, add-on content etc.
@ -592,12 +585,6 @@ See `src/3rdparty/catch2/LICENSE.txt` for the complete license text.
The icu scriptrun implementation in `src/3rdparty/icu` is licensed under the Unicode license.
See `src/3rdparty/icu/LICENSE` for the complete license text.
The monocypher implementation in `src/3rdparty/monocypher` is licensed under the 2-clause BSD and CC-0 license.
See `src/3rdparty/monocypher/LICENSE.md` for the complete license text.
The OpenTTD Social Integration API in `src/3rdparty/openttd_social_integration_api` is licensed under the MIT license.
See `src/3rdparty/openttd_social_integration_api/LICENSE` for the complete license text.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
@ -209,12 +209,12 @@ the array so you can quickly see what is used and what is not.
<tdclass="bits"rowspan=2><spanclass="usable"title="Graphics index">OOOO O</span><spanclass="used"title="Graphics index: 00 (exit towards NE), 01 (exit towards SE), 02 (exit towards SW), 03 (exit towards NW), 04 (drive through X), 05 (drive through Y)">XXX</span></td>
<tdclass="bits"rowspan=6><spanclass="free">O<spanclass="patch"title="Station type (extra bit)">P</span></span><spanclass="used"title="Station type">XXX</span><spanclass="free">OOO</span></td>
<tdclass="bits"rowspan=2><spanclass="free">OOO</span><spanclass="used"title="Owner of road">X XXXX</span></td>
<tdclass="bits"><spanclass="free">O</span><spanclass="patch"title="Road cached one way state">PPP</span><spanclass="used"title="Tram type">XXXX XX</span><spanclass="used" title="Custom road stops specifications ID">XXXXXX</span></td>
<tdclass="bits"><spanclass="free">O</span><spanclass="patch"title="Road cached one way state">PPP</span><spanclass="used"title="Tram type">XXXX XX</span><spanclass="patch" title="Custom road stops specifications ID">PP PPPP</span></td>
</tr>
<tr>
<tdclass="caption">road waypoint</td>
<tdclass="bits"><spanclass="used"title="Owner of tram">XXXX</span><spanclass="patch"title="Pavement type">PP</span><spanclass="patch"title="Disallow vehicles to go a specific direction (drive-through road stop)">PP</span></td>
<tdclass="bits"><spanclass="patch"title="Snow/desert present">P</span><spanclass="patch"title="Road cached one way state">PPP</span><spanclass="used"title="Tram type">XXXX XX</span><spanclass="used" title="Custom road stops specifications ID">XXXXXX</span></td>
<tdclass="bits"><spanclass="patch"title="Snow/desert present">P</span><spanclass="patch"title="Road cached one way state">PPP</span><spanclass="used"title="Tram type">XXXX XX</span><spanclass="patch" title="Custom road stops specifications ID">PP PPPP</span></td>
The default graphics chain for the primary vehicle may check the cargo states of the other ship parts if required.<br/>
Additional ship parts may be refitted individually.
<p>This requires the <spanclass="code">multi_part_ships</span> feature.</p>
<p>From version 3 of the <spanclass="code">multi_part_ships</span> feature, spritegroup loading/loaded cargo thresholds refer to the entire ship, not just the first vehicle.</p>
Set whether signals should be drawn on the opposite side of the track for the most recently defined style (defined using the <spanclass="code">define_style</span> property).
</td>
</tr>
<tr><td>style_both_sides</td><td>0 or 1</td>
<td>
Set whether signals should be drawn on both sides of the track for the most recently defined style (defined using the <spanclass="code">define_style</span> property).<br/>
If set, the <spanclass="code">signal_context_is_second</span> variable is true when drawing the second signal.<br/>
If this and <spanclass="code">style_opposite_side</span> are both set, the first signal is drawn on the opposite side and the second signal is drawn on the usual side.
</td>
</tr>
<tr><td>style_realistic_braking_only</td><td>0 or 1</td>
<td>
Set whether signals using this style may only be built when realistic braking is enabled, for the most recently defined style (defined using the <spanclass="code">define_style</span> property).
@ -731,11 +722,6 @@ item (FEAT_GLOBALVARS) {
The signal is being drawn on a tunnel entrance/exit (not a bridge)
</td>
</tr>
<tr><td>signal_context_is_second</td><td>0 or 1</td>
<td>
The second signal is being drawn (on the opposite side to the first signal), see the style_both_sides property
</td>
</tr>
<tr><td>signal_context_info</td><td></td>
<td>
Above signal context variables in one variable (all of the signals_signal_context variable)
The Action 0 Id field is not used, the value is ignored.
</p>
<p>This is indicated by the feature name: <fontface="monospace">action0_signals_style</font>, version 1</p>
<h4id="signals_style_both_sides">Set custom signal style signal drawn on both sides (mappable property: signals_style_both_sides)</h4>
<p>This applies to the most recent custom signal style defined using the <ahref="#signals_define_style">signals_define_style</a> property.<br/>
When enabled, signals using this style are drawn on both sides of the track.<br/>
Bit 9 of <ahref="#signals_signal_context">signals_signal_context</a> is set when drawing the second signal on the opposite side.</p>
<p>If this and <ahref="#signals_style_opposite_side">signals_style_opposite_side</a> are both set, the first signal is drawn on the opposite side
and the second signal is drawn on the usual side.</p>
<p>The property length is 1 byte. 0 is disabled (default). 1 is enabled.<br/>
The Action 0 Id field is not used, the value is ignored.
</p>
<p>This is indicated by the feature name: <fontface="monospace">action0_signals_style</font>, version 3</p>
<h4id="signals_style_realistic_braking_only">Set custom signal style signal requires realistic braking (mappable property: signals_style_realistic_braking_only)</h4>
<p>This applies to the most recent custom signal style defined using the <ahref="#signals_define_style">signals_define_style</a> property.<br/>
When enabled, signals using this style may only be built when realistic braking is enabled.</p>
@ -583,7 +573,7 @@
<h4id="object_use_land_ground">Object uses land ground sprite (mappable property: object_use_land_ground)</h4>
<p>This property sets whether to use the underlying ground as the object ground sprite, ignoring the ground sprite provided in the sprite layout.<br/>
When enabled, the ground sprite will be bare ground, grass, snow, desert, etc. as if it were a clear ground tile.<br/>
In edge foundation mode, or when foundations are disabled, the ground may be coast/shore when flooded.<br/>
In edge foundation mode, the ground may be coast/shore when flooded.<br/>
The property length is 1 byte. 0 is disabled (default). 1 is enabled.</p>
<p>This is indicated by the feature name: <fontface="monospace">action0_object_use_land_ground</font>, version 1</p>
<h4id="object_edge_foundation_mode">Enable object edge foundation mode (mappable property: object_edge_foundation_mode)</h4>
@ -939,7 +929,6 @@
</table>
</td></tr>
<tr><td>8</td><td>Tunnel tile</td></tr>
<tr><td>9</td><td>Second signal (being drawn on opposite side), see: <ahref="#signals_style_both_sides">signals_style_both_sides</a></td></tr>
</table>
</p>
<p>This is indicated by the feature name: <fontface="monospace">varaction2_signals_signal_context</font>, version 1</p>
@ -986,7 +975,6 @@
Additional ship parts may be refitted individually.
</p>
<p>This is indicated by the feature name: <fontface="monospace">multi_part_ships</font>, version 1</p>
<p>From version 3 of the <fontface="monospace">multi_part_ships</font> feature, Action 2 loadtypes/loadingtypes cargo thresholds refer to the entire ship, not just the first vehicle.</p>
<p><b>Callback EC008002 - Ship part name for refit window</b><br/>
This callback is called on the primary vehicle to get the name of each part of the ship (e.g. the name of each cargo hold) in the refit window.<br/>
This is not called for ships of only one part.<br/>
<title>JGR's Patchpack - Additions to the NewGRF Road Stops Specification in NML</title>
<title>JGR's Patchpack - NewGRF Road Stops Addition to NewGRF Specifications in NML</title>
<styletype="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>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 <ahref="https://newgrf-specs.tt-wiki.net/wiki/NML:Main">Official OpenTTD NML Specifications</a>, as implemented in this patchpack, and the associated <ahref="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>
<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 <ahref="https://newgrf-specs.tt-wiki.net/wiki/NML:Main">Official OpenTTD NML Specifications</a>, as implemented in this patchpack, and the associated <ahref="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>
<p>The feature identifier is <spanclass="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,9 +25,10 @@
<p>See the associated <ahref="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 (before 14.0).<br/>
If this feature is the only significant thing in this GRF, then <spanclass="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>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 <spanclass="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><b>Sections:</b>
<ul>
@ -57,7 +58,7 @@
Predefined classes include:<br/>
<ul>
<li>DFLT - Default class</li>
<li>WAYP - Waypoints: All road waypoints must be put in this class. <b>Not in standard specification</b>.</li>
<li>WAYP - Waypoints: All road waypoints must be put in this class</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>
<spanclass="indent">Draw road overlays for drive-through stops.</span></p>
<p><b>RST_DRAW_FLAG_WAYPOINT_GROUND</b><br/>
<spanclass="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>
<spanclass="indent">Draw spritelayout ground sprite on top of underlying road (if unset, the spritelayout ground sprite is not drawn).</span></p>
</td></tr>
<tr><td>cargo_random_triggers</td><td>cargo bitmask</td><td>Cargo bitmask to use for random triggers</td></tr>
<spanclass="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 <spanclass="code">one_way_info</span> variable.<b>Not in standard specification</b>.</span></p>
<spanclass="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 <spanclass="code">one_way_info</span> variable.</span></p>
<p><b>RST_GENERAL_FLAG_NO_CATENARY</b><br/>
<spanclass="indent">Do not show catenary graphics. (This only takes effect from <spanclass="code">road_stops</span> version 2).</span></p>
<spanclass="indent">Only show in the tram build menu (not road). (This only takes effect from <spanclass="code">road_stops</span> version 4).</span></p>
<spanclass="indent">Use custom graphics for disabled road stop views. (This only takes effect from <spanclass="code">road_stops</span> version 8).<b>Not in standard specification</b>.</span></p>
<spanclass="indent">Use custom graphics for disabled road stop views. (This only takes effect from <spanclass="code">road_stops</span> version 8).</span></p>
<spanclass="indent">Read the road stop draw mode from variable 0x100 (set using STORE_TEMP), this overrides the <spanclass="code">draw_mode</span> property. (This only takes effect from <spanclass="code">road_stops</span> version 9).<b>Not in standard specification</b>.</span></p>
<spanclass="indent">Read the road stop draw mode from variable 0x100 (set using STORE_TEMP), this overrides the <spanclass="code">draw_mode</span> property. (This only takes effect from <spanclass="code">road_stops</span> version 9).</span></p>
</td></tr>
<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 <ahref="#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>
<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 <ahref="#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>
<p>Which bridge pillars are disallowed on the tile for each of the <ahref="#roadstop_views">6 views/rotations</a>.</p>
<p><b>RST_BRIDGE_PILLAR_FLAG_CORNER_W</b><br/>
<spanclass="indent">Pillar in west corner</span></p>
@ -116,7 +117,7 @@
<spanclass="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<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: <ahref="https://newgrf-specs.tt-wiki.net/wiki/NML:Objects#Object_properties">object height property</a>.</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: <ahref="https://newgrf-specs.tt-wiki.net/wiki/NML:Objects#Object_properties">object height property</a>.</td></tr>
<tr><td>view</td><td>0..5</td><td>The <ahref="#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 (<b>Not in standard specification</b>)</td></tr>
<tr><td>stop_type</td><td>RST_TYPE_XXX</td><td>XXX = BUS | TRUCK | WAYPOINT</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 <ahref="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 if this road stop has road</td></tr>
<tr><td>has_tram</td><td>0 | 1</td><td>1 if this road stop has tram</td></tr>
<tr><td>has_road</td><td>0 | 1</td><td>1 is this road stop has road</td></tr>
<tr><td>has_tram</td><td>0 | 1</td><td>1 is this road stop has tram</td></tr>
<tr><td>road_type</td><td>road type | 0xFF</td><td>Road type. If there is no road the value will be 0xFF. If the roadtype has no entry in the roadtype translation table of the GRF, this value will be 0xFF. If no translation table is present, the raw value will be returned.</td></tr>
<tr><td>tram_type</td><td>tram type | 0xFF</td><td>Tram type. If there is no tram the value will be 0xFF. If the tramtype has no entry in the tramtype translation table of the GRF, this value will be 0xFF. If no translation table is present, the raw value will be returned.</td></tr>
<tr><td>town_manhattan_dist</td><td></td><td>Manhattan distance to the associated town</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 <ahref="https://newgrf-specs.tt-wiki.net/wiki/NML:Stations#Base_station_variables">random_bits_station</a></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>
<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>
</table>
<br/>
Variables that require one or more parameters:
@ -173,13 +175,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<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 <ahref="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 <ahref="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>
<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 <ahref="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 <ahref="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>
<title>JGR's Patchpack - Additions to the NewGRF Road Stops Specification</title>
<title>JGR's Patchpack - NewGRF Road Stops Addition to NewGRF Specifications</title>
<styletype="text/css">
td li { white-space: nowrap; text-align: left; }
th { white-space: nowrap; text-align: center; }
@ -11,16 +11,15 @@
</style>
</head>
<body>
<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 <ahref="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>
<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 <ahref="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>
<p>See the <ahref="newgrf-additions.html">NewGRF additions</a> document for background information on additions to the NewGRF specifications.</p>
<p>The functionality listed below is also supported in a fork of NML, see the associated <ahref="newgrf-roadstops-nml.html">NML road stops</a> and <ahref="newgrf-additions-nml.html">NML additions</a> documents for more details.</p>
<p>NewGRFs which use this feature MAY use the <ahref="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 <ahref="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: <fontface="monospace">road_stops</font>, version 1.<br/>
<p>A subset of the functionality listed below is also supported in a fork of NML, see the associated <ahref="newgrf-roadstops-nml.html">NML road stops</a> and <ahref="newgrf-additions-nml.html">NML additions</a> documents for more details.</p>
<p>NewGRFs which use this feature SHOULD use the <ahref="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 <ahref="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: <fontface="monospace">road_stops</font>, version 1.<br/>
The feature name to use for feature ID mapping is <fontface="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>
@ -37,26 +36,26 @@
<h3id="a0roadstops">Action 0 - Road Stops</h3>
<p>See the <ahref="https://newgrf-specs.tt-wiki.net/wiki/Action0/Road_Stops">Action 0 Roadstops Specification</a> for background information.</p>
<p>See the <ahref="https://newgrf-specs.tt-wiki.net/wiki/Action0">Action 0 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><th>Difference to specification</th></tr>
<tr><td><ahref="#roadstop_stop_type">09</a></td><td><ahref="#roadstop_stop_type">roadstop_stop_type</a></td><td>1</td><td>Stop type availability</td><td></td></tr>
<tr><td><ahref="#roadstop_min_bridge_height">13</a></td><td><ahref="#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><ahref="#roadstop_disallowed_bridge_pillars">14</a></td><td><ahref="#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><ahref="#roadstop_stop_type">09</a></td><td><ahref="#roadstop_stop_type">roadstop_stop_type</a></td><td>1</td><td>Stop type availability</td></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. This is reserved in the specification, but not implemented.</td></tr>
<tr><td>WAYP</td><td>57 41 59 50</td><td>This class is used for road waypoints</td></tr>
</table>
All classes except WAYP are used for bus and/or lorry stops.<br/>
This functions the same way as <ahref="https://newgrf-specs.tt-wiki.net/wiki/Action0/Stations#Station_class_.2808.29">station (feature 4) property 08</a>.<br/>
<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).<br/>
This is not in the specification.
</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>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.<br/>This is not in the specification.</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>2</td><td>4</td><td>Do not show catenary graphics.</br>This requires <fontface="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 <fontface="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 <fontface="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 <fontface="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 <fontface="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 <fontface="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 <ahref="#roadstop_draw_mode">roadstop_draw_mode</a> property.</br>This requires <fontface="monospace">road_stops</font>, version 9.<br/>This is not in the specification.</td></tr>
<tr><td>7</td><td>80</td><td>Use custom graphics for disabled road stop views.</br>This requires <fontface="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 <ahref="#roadstop_draw_mode">roadstop_draw_mode</a> property.</br>This requires <fontface="monospace">road_stops</font>, version 9.</td></tr>
</table>
The default value is 0 (no flags enabled).
</p>
<h4id="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.<br/>
This property is not in the specification.
Each height value is 1 byte, the total property length is 6 bytes.
</p>
<h4id="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 <ahref="newgrf-additions.html#bridge_pillar_flags">bridge_pillar_flags property section</a>.<br/>
This property is not in the specification.
Each set of flags has the format described in the <ahref="newgrf-additions.html#bridge_pillar_flags">bridge_pillar_flags property section</a>.
</p>
<h4id="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/>
@ -192,8 +186,7 @@
The nominal height for the road stop preview is set to at least: 32 + "value of this property" * 8.<br/>
This similar to <ahref="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 <fontface="monospace">road_stops</font>, version 6.<br/>
This property is not in the specification.
This requires <fontface="monospace">road_stops</font>, version 6.
<tr><td><ahref="#roadstop_town_zone">45</a></td><td><ahref="#roadstop_town_zone">roadstop_town_zone</a></td><td>Town zone and Manhattan distance of town</td><td></td></tr>
<tr><td><ahref="#roadstop_town_distance_squared">46</a></td><td><ahref="#roadstop_town_distance_squared">roadstop_town_distance_squared</a></td><td>Square of Euclidean distance of town</td><td></td></tr>
<tr><td><ahref="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><ahref="#roadstop_misc_info">50</a></td><td><ahref="#roadstop_misc_info">roadstop_misc_info</a></td><td>Miscellaneous info</td><td>Not in spec</td></tr>
<tr><td><ahref="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><ahref="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><ahref="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><ahref="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><ahref="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><ahref="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><ahref="#roadstop_animation_frame_nearby_tiles">66</a></td><td><ahref="#roadstop_animation_frame_nearby_tiles">roadstop_animation_frame_nearby_tiles</a></td><td>Animation frame of nearby tile</td><td></td></tr>
<tr><td><ahref="#roadstop_land_info_nearby_tiles">67</a></td><td><ahref="#roadstop_land_info_nearby_tiles">roadstop_land_info_nearby_tiles</a></td><td>Land info of nearby tiles</td><td></td></tr>
<tr><td><ahref="#roadstop_road_stop_info_nearby_tiles">68</a></td><td><ahref="#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><ahref="#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><ahref="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><ahref="#roadstop_road_stop_grfid_nearby_tiles">6A</a></td><td><ahref="#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></td><td><ahref="#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>
<tr><td><ahref="#roadstop_town_zone">45</a></td><td><ahref="#roadstop_town_zone">roadstop_town_zone</a></td><td>Town zone and Manhattan distance of town</td></tr>
<tr><td><ahref="#roadstop_town_distance_squared">46</a></td><td><ahref="#roadstop_town_distance_squared">roadstop_town_distance_squared</a></td><td>Square of Euclidean distance of town</td></tr>
<tr><td><ahref="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">48</a></td><td></td><td>Bitmask of accepted cargoes (BaseStation)</td></tr>
<tr><td><ahref="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">60</a></td><td></td><td>Amount of cargo waiting (BaseStation)</td></tr>
<tr><td><ahref="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><ahref="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">62</a></td><td></td><td>Rating of cargo (BaseStation)</td></tr>
<tr><td><ahref="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">63</a></td><td></td><td>Time spent on route (BaseStation)</td></tr>
<tr><td><ahref="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><ahref="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/BaseStation">65</a></td><td></td><td>Amount of cargo acceptance (BaseStation)</td></tr>
<tr><td><ahref="#roadstop_animation_frame_nearby_tiles">66</a></td><td><ahref="#roadstop_animation_frame_nearby_tiles">roadstop_animation_frame_nearby_tiles</a></td><td>Animation frame of nearby tile</td></tr>
<tr><td><ahref="#roadstop_land_info_nearby_tiles">67</a></td><td><ahref="#roadstop_land_info_nearby_tiles">roadstop_land_info_nearby_tiles</a></td><td>Land info of nearby tiles</td></tr>
<tr><td><ahref="#roadstop_road_stop_info_nearby_tiles">68</a></td><td><ahref="#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><ahref="#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><ahref="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><ahref="#roadstop_road_stop_grfid_nearby_tiles">6A</a></td><td><ahref="#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><ahref="#roadstop_road_info_nearby_tiles">6B</a></td><td><ahref="#roadstop_road_info_nearby_tiles">roadstop_road_info_nearby_tiles</a></td><td>Road info of nearby plain road tiles</td></tr>
</table>
<h4id="roadstop_view">Road stop view/rotation (40, or mappable variable: roadstop_view)</h4>
@ -339,8 +332,7 @@
</td></tr>
</table>
<br/>
The remaining bits are reserved for future use and should be masked.<br/>
This variable is not in the specification.
The remaining bits are reserved for future use and should be masked.
</p>
<h4id="roadstop_animation_frame_nearby_tiles">Animation frame of nearby tile (66, or mappable variable: roadstop_animation_frame_nearby_tiles)</h4>
@ -371,7 +363,7 @@
<tr><td>16 - 19</td><td>
0 - Passenger/bus stop<br/>
1 - Freight/lorry stop<br/>
2 - Road waypoint (not in specification)
2 - Road waypoint
</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>
@ -386,8 +378,7 @@
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 <fontface="monospace">road_stops</font>, version 7.<br/>
<br/>
If the <fontface="monospace">road_stops</font> feature is not tested for, this is set to 0.<br/>
This is not in the specification.
If the <fontface="monospace">road_stops</font> feature is not tested for, this is set to 0.
</td></tr>
</table>
<br/>
@ -424,14 +415,13 @@
</table>
<br/>
The remaining bits are reserved for future use and should be masked.<br/>
This requires <fontface="monospace">road_stops</font>, version 7.<br/>
This variable is not in the specification.
This requires <fontface="monospace">road_stops</font>, version 7.
</p>
<h4id="roadstop_road_stop_grfid_nearby_tiles">GRFID of nearby road stop tile (6A, or mappable variable: roadstop_road_stop_grfid_nearby_tiles)</h4>
<p>This has the same value as <ahref="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Stations#GRFID_of_nearby_station_tile_.286A.29">station (feature 4) variable 6A</a>.</p>
<h4id="roadstop_road_info_nearby_tiles">Road info of nearby plain road tiles (mappable variable: roadstop_road_info_nearby_tiles)</h4>
<h4id="roadstop_road_info_nearby_tiles">Road info of nearby plain road tiles (6B, or mappable variable: roadstop_road_info_nearby_tiles)</h4>
The returned value is 0xFFFFFFFF if the selected tile isn't a plain road tile.<br/><br/>
@ -461,17 +451,13 @@
<br/>
The remaining bits are reserved for future use and should be masked.
<br/>
This requires <fontface="monospace">road_stops</font>, version 5.<br/>
This variable is not in the specification.
This requires <fontface="monospace">road_stops</font>, version 5.
* Fix crash when sorting by capacity in autoreplace window.
* Fix non-percentage servicing interval when using wallclock mode.
* Fix road vehicles skipping orders when using implicit orders.
* Fix setting default value for industry cargo scaling mode when loading old savegames.
* Fix setting display for industry cargo scaling.
* Fix crash which could occur when using autorenew/autoreplace wagon removal with leading engines longer than the train length limit.
* Fix crash which could occur with loading certain GRFs.
* Fix multiplayer desync when joining a server after previously loading a scenario.
* Fix keyboard input issues on Linux/SDL.
* Realistic braking:
* Fix accuracy issues with realistic acceleration and braking when a train is underpowered for ascending or descending a steep slope.
* Reduce sensitivity of train brakes overheated breakdown.
* Add setting to shorten vehicle view status text.
* Bump trunk base from commit bd7120bae41b6e7ac86c664c8220b59cd57242bb to commit 88cf99017a26f887230d2c14d057a97bbf077f7c.
### v0.59.0 (2024-05-05)
* Fix loading recent vanilla savegame versions resulting in incorrect industry cargoes.
* Fix incorrect station catchment/acceptance which could occur when an oil rig/water industry completed construction, which could cause multiplayer desyncs.
* Fix AI construction of block signals when using realistic braking.
* Fix incorrect train weights being used for calculating infrastructure sharing track fees.
* Fix vehicles leaving dots behind in viewport map mode in some cases.
* Fix NewGRF train motion animations for some NewGRFs which use articulated engines.
* Fix template-based train replacement not triggering replacements for companies nominally in debt when using the infinite money setting.
* Fix text filters in dual-pane train purchase window when using NewGRFs with variable vehicle names.
* Road vehicles no longer remaining loading when the next order is for the same station if the next order has a different required direction.
* Enable the cargo capacity/running cost sort mode in the dual pane train purchase window.
* The vehicle capacity sort modes in the build vehicle windows now take into account the selected refit cargo.
* Timekeeping:
* The day length factor setting is now enabled in wallclock timekeeping mode. This scales the economy speed, but not the calendar speed.
* Fix timing of engine preview offers in wallclock timekeeping mode.
* Scheduled dispatch:
* When using scheduled dispatch and timetable automation at the same time, vehicle lateness values are no longer reset when congestion is detected.
* The number of vehicles required text is now clarified to be an estimate.
* Further increase effect size of cargo dist effect of distance on demand setting for values greater than 100%.
* Further reduce the possibility of stuttering when playing sound effects on Windows.
* Bump trunk base from commit 3e625b5b1a81b00f774ca87b48d3e4f4e9d014c3 to commit bd7120bae41b6e7ac86c664c8220b59cd57242bb.
### v0.58.3 (2024-04-10)
* Fix stuttering when playing sound effects on Windows.
* Fix incorrect cargo payment calculations for cargo in the mail compartment of aircraft and in non-first parts of multi-part ships.
* Fix path-only signal cycle mode being ignored when using realistic braking.
* Template-based train replacement:
* Fix replacement failing when using NewGRFs with complex wagon attachment and/or start/stop restrictions.
* Fix incorrect cost estimation when using NewGRFs with complex start/stop restrictions.
* Wallclock timekeeping mode:
* Fix game units (tiles/second) being shown as tiles/day.
* Fix time units shown for past production in the industry window.
* Fix cargo dist effect of distance on demand setting for values greater than 100%. (The scaling/demand allocation algorithm has been adjusted in general).
* Fix velocity units used in cargo payments graph x-axis label.
* Fix click/tooltip alignment of cargo lines in the industry chains window.
* Fix changing sprite alignments in the sprite aligner window not being applied as expected.
### v0.58.2 (2024-03-28)
* Fix crash with some GRFs when the maximum sprite resolution setting was set to 2x.
* Fix crash which could occur when clearing a crashed road vehicle from a drive-through road stop.
* Fix crash when the autosave uses real time setting and the autosave interval were both disabled.
* Fix crash which could occur after removing road from a one-way road/tram road stop.
* Fix drawing of black text in some drop-down menus.
* Fix incorrect handling of invalid or empty dispatch schedules in the departure board window.
* Fix handling of missing last or next scheduled dispatch times.
* Fix changes to the title game zoom level when changing the UI scale setting.
* Fix vehicles leaving dots behind in viewport map mode in some cases.
* Fix incorrect sprites being shown for some GRFs.
* Fix crash in the engine preview window with certain GRFs.
* Fix road vehicles not remaining loading as expected when the next order is for the same station.
* Fix train unit numbers being incorrectly marked as in use after an autoreplace operation.
* Allow manually removing/setting train speed restrictions from the vehicle details window.
* Allow removing a vehicle from slots owned by the current company from the vehicle details window.
* Show viewport route step markers for go via station orders using a different tag.
* Add setting to show purchased land using clear tile ground sprites (dirt, grass, snow, desert, etc).
* Add ctrl-click scroll-to for stations referenced by conditional orders.
* Allow industry monthly production and transported totals to be greater than 64k.
* Allow engine reliability increases but not decreases after the no vehicles expire after year setting is reached.
* Remove setting to disable script parameter randomisation, because the feature has been removed.
* Fix signature validation for social/presence plugins.
* Bump trunk base from commit a602845d0a35331f1e012cd13ca921c6bc42b58d to commit 3e625b5b1a81b00f774ca87b48d3e4f4e9d014c3.
### v0.58.1 (2024-03-02)
* Fix multiplayer desync after joining a server with the flood from edges setting enabled.
* Fix timetabled waiting in depots.
* Fix incorrect accounting of company quarterly statistics.
* Fix trains failing to load at stations in some cases after leaving a conditional order loading loop at the previous station.
* Fix the company infrastructure window not being drawn as a company window and not being removed on company deletion.
* Fix main viewport crash or only partial redraw when changing the UI scale using the slider.
* Fix display of ships entering viewports on an aqueduct.
* Allow adding plans in the scenario editor.
* Add setting for whether to show vehicle running costs per calendar year.
* Add setting for whether to show speed before destination in vehicle status bar.
* Add setting to disable script parameter randomisation.
* Add "path signals only" mode to the signal cycle setting.
* Adjust display of period numbers in wallclock time-keeping mode.
* Stop engine reliability decay once the no vehicles expire after year setting is reached, instead of when the no vehicles expire and introduced after year settings are both reached.
* Add NewGRF custom signal style flag to draw signal sprites on both sides.
* Bump trunk base from commit 8bccb5805a94eb2acb0e581185ca34090f2b1397 to commit a602845d0a35331f1e012cd13ca921c6bc42b58d.
### v0.58.0 (2024-02-24)
* Fix crash when road vehicles change length in drive-through road stops (e.g. due to refits).
* Fix crash when showing the savegame file overwrite warning for a save with no readable version.
* Fix crash when joining a network server which used GRF custom town zones.
* Fix road vehicles being deleted in a bay road stop leaving the stop marked as occupied.
* Fix handling of airport noise/count limits in local authority permissive mode.
* Fix rail toolbar layout when polyrail button is hidden.
* Fix multi-cargo ship capacity display in the autoreplace and available ships windows.
* Fix displayed speed units in station rating tooltip.
* Fix warning messages when loading very old savegames.
* Fix crash which could occur on Windows when closing the game by closing its attached debug console.
* No longer scale displayed running costs by the day length factor, show per original year.
* Fix news message durations being scaled by the day length factor.
* Add support for vanilla unbunching.
* Add setting to only spawn primary industries.
* Reduce flickering/sprite sorting problems for vehicles and catenary diagonally underneath bridges.
* Add road vehicle stop direction to the order window manage order dropdown.
* Disable company-only zoning overlay modes in spectator mode.
* Increase pathfinding limit for river generation.
* Bump trunk base from commit 6b21368bc2fdef6877ef5930f94e85719b670a76 to commit 8bccb5805a94eb2acb0e581185ca34090f2b1397.
### v0.57.1 (2024-02-04)
* Fix crashes or rendering problems which could occur in some cases when multiple viewports were active.
* Fix not being able to change both the hour and minute in the non-text timetable time dialog.
* Fix the picker tool not selecting the specific station/waypoint in a class, in the rail station, road stop and waypoint windows.
* Fix secondary colour vehicle-type default liveries not being updated when changing the company default.
* Fix vehicles leaving pixels behind on the viewport when zoomed out and moving left in some cases.
* Prevent dragging plan lines across viewports, as this causes erratic plans.
* Routing restrictions:
* Fix slot acquire on PBS reservation end on tunnel/bridge entrance signals.
* Wait at PBS signal on signals in the middle of a reservation is now only applied when reserving through the signal in the forward direction (not backwards PBS).
* Multi-cargo ships:
* Fix build and refit with multi-cargo ships only refitting the first part.
* Fix sort by total cargo in build ship window only considering the first part.
### v0.57.0 (2024-01-30)
* Fix crashes which could occur with some NewGRFs.
* Fix crash which could occur when trying to extend an invalidated reservation when using realistic braking.
* Fix crash when updating the timetable of a late train when the total timetable duration is 0.
* Fix road stops/waypoints not using road type custom one-way sprites.
* Fix incorrect time since pickup values in the station rating tooltip when using a day length other than 1.
* Fix incorrect date/time display after the year 79455.
* Fix pre-selected AIs not being loaded from the config file.
* Fix incorrect sorting of towns by distance in the scenario editor house picker town selector.
* Fix enabling the map edge water mode setting when edge tiles were not previously flat.
* Fix cargo icons not being shown in the dual-pane train purchase window.
* Fix ctrl-dragging onto the new group button in group list window not including all vehicles.
* Fix texts for the amount of rivers setting in the settings window.
* Fix various issues loading some very old savegames.
* Fix upgrading bridges partially clearing custom signal styles and routing restrictions.
* Fix cloning a train directly from the template replacement window not setting the default service interval and timetable modes.
* Fix vehicle timetables and train speed adaptation not being correctly updated in the scenario editor.
* Change town and industry cargo production scaling settings to be linear instead of exponential.
* Routing restrictions:
* No longer try to acquire slots a second time when the front of the train passes the signal, if this had already been done when reserving.
* Remove the try to acquire (on reserve) slot mode, it's now the same as try to acquire.
* Add a release on reserve slot mode.
* Reservations now support slot acquire and wait at PBS for reserve-through and backwards PBS signals in the middle of reservations (waiting happens at the reservation start signal).
* Fix prematurely acquiring slots on tunnel/bridge exit signals.
* Scheduled dispatch:
* Show when last/next departure time are more than 23 hours in the past/future.
* Add schedule and per-departure flags to allow departure slots to be used more than once.
* Allow tagging individual departure slots for testing with the last/next departure slot conditional order.
* Resetting the last dispatched time now clears it entirely instead of setting it to the start of the current schedule period.
* Orders:
* Fix duplicating orders not always preserving the order colour.
* Add order stop location to the manage order dropdown.
* Add a try to acquire slot non-conditional order.
* Improve handling of conditional orders with vehicle route lines
* Increase maximum distance from the shore for tunnels under water.
* Add setting for whether to show the rail polyline tool in the rail toolbar.
* Used a curved instead of a square area for water desert removal during map generation in tropical.
* Improve performance of drawing and scrolling when link graph lines are drawn over viewports in map mode.
* Add hotkey to toggle vehicle in tunnel transparency (ctrl-0).
* Linux: Provide a pre-built dedicated server binary. The generic linux build now uses a newer glibc, a legacy build is provided for older systems.
* Vanilla OpenTTD (and this patchpack) now requires C++20 to compile. (Minimum compiler versions: gcc 10, clang 15).
* Bump trunk base from commit feb94d233d8fdceff193a4c59298960d8148d470 to commit 6b21368bc2fdef6877ef5930f94e85719b670a76.
### v0.56.2 (2023-12-30)
* Fix signals incorrectly being considered always reserve through even after the program was modified to remove this, in some cases.
* Fix high-speed trains reversing at waypoints/behind signals failing to stop and reverse in some cases.
* Fix incorrect graphics/behaviour and blocked/wire/pylon states with certain rail station NewGRFs.
* Fix incorrect time conversions to/from minutes when using clock offsets in some cases.
* Fix infrastructure totals and road/tram type conversion behaviour when using road/tram bridges where the two ends have different road/tram owners.
* Fix online content downloads halting before completion or causing crashes in some cases.
* Add setting to allow auto-fill signal dragging to skip over stations/waypoints.
* Add setting for map edge behaviour, and whether to display the area outside map as water.
* Add a company setting to set the default dispatch schedule duration.
* Increase sign text length limit.
* Remove "Show cargo type filter in vehicle lists" setting, now always enabled.
* Enable the opt-in OpenTTD survey functionality: https://survey.openttd.org/participate.
* Bump trunk base from commit ab535c0a8665e6380c5037d7b6f0a507fc91d36a to commit feb94d233d8fdceff193a4c59298960d8148d470.
### v0.56.1 (2023-12-08)
* Fix crash which could occur when using some languages (which use grammatical gender).
* Fix crash which could occur when the config file is an older version or has missing sections.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
-1 * 0 0C "Toyland river graphics by zephyris (Richard Wheeler)"
-1 * 0 0C "Toyland river graphics by andythenorth (Andrew Parkhouse)"
-1 * 4 01 05 01 3C
-1 sprites/toyland.png 8bpp 10 10 38 19 -5 0 normal
-1 sprites/toyland.png 8bpp 58 10 38 18 -5 13 normal
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.