acceptance and suppliance behaviours of waterborne cargo patch

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
xarick
Transport Coordinator
Transport Coordinator
Posts: 337
Joined: 26 Feb 2015 00:52

acceptance and suppliance behaviours of waterborne cargo patch

Post by xarick »

This patch changes the way Oil Rig industries (or other industries that provide stations) accept or supply cargo to stations nearby. It also changes how Exclusive Transport Rights function in relation to neutral stations.

Adds an expert game setting, located under Environment/Industries which allow disabling or enabling the behaviour:
- "Allow company owned stations to serve water industries" - When enabled, industries with attached stations (such as Oil Rigs) may also be served by company owned stations built nearby. When disabled, these industries may only be served by their attached stations, and any nearby company stations won't be able to serve them.

It is defaulted to enabled
Savegame conversion will treat it as being enabled whenever loading savegames before this patch. In essence, to mimic 1.7.1 behaviour, enable it.

Regarding Neutral stations, they are no longer affected by Exclusive Transport Rights, which means cargo will still be supplied to these stations, even during Exclusive Transport Rights. Previously, no cargo was ever supplied to them.

Download latest version here (v4): viewtopic.php?f=33&t=77199&p=1193646#p1193646
v4
- reduced the number of settings from 4 to 1, for simplification.
- serving cargo from one water industry when multiple water industries of the same type are within catchment radius will now only trigger the industry the attached station is attached to.
- simplified code a bit and added some comments where mostly needed.

screenshot valid for v4
Image

screenshot valid for v4, v3, v2, v1
Image
[+] Spoiler
older versions (v3, v2, v1) v3
- Moved the 4 settings from under Environment to under Environment/Industries.
- Improved english description to one of the settings
- Fixed a bug caused when there were two industries accepting the same cargo, one with its provided station, the other without. Unloading at a nearby non-industry station or industry station could trigger acceptance in the wrong industry.

screenshot valid for v3
Image
v2

- Added 4 expert settings, located under Environment, which allows enabling or disabling of these behaviours individually: "accept non-industry cargo at industry station", "accept industry cargo at non-industry station", "supply non-industry cargo at industry station" and "supply industry cargo at non-industry station". Defaulted to enabled. Also added savegame conversion, treating these settings as enabled when loading old savegames.
- Exclusive Transport Rights message is no longer displayed on stations without owners (oil rig) whenever displaying cargo ratings.
- Improved the means to detect whether industries have attached stations (oil rig) instead of looking for industries built on water.
- Fixed a would be bug regarding town cargo never being accepted on oil rig stations.

v1

This patch changes the way Oil Rig industries (or other industries built on water) accept or supply cargo to stations nearby.
- Cargo produced by Oil Rig industries are only supplied to near Oil Rig stations
- Cargo produced by anything else around the Oil Rig stations are never supplied by these stations.
- Cargo accepted by Oil Rig industries are only accepted at near Oil Rig stations
- Cargo accepted by anything else around the Oil Rig stations are never accepted by these stations.
- Oil Rig stations are excluded from Exclusive Transport Rights, which means that cargo is still supplied to these stations, even during Exclusive Transport Rights.
Last edited by xarick on 31 Oct 2017 19:42, edited 4 times in total.
Formerly known as Samu
xarick
Transport Coordinator
Transport Coordinator
Posts: 337
Joined: 26 Feb 2015 00:52

Re: acceptance and suppliance behaviours of waterborne cargo patch

Post by xarick »

Wunington Transport, 1985-05-15.sav
savegame for studying behaviours
(7.83 KiB) Downloaded 126 times
savegame example used in the screenshot
Formerly known as Samu
xarick
Transport Coordinator
Transport Coordinator
Posts: 337
Joined: 26 Feb 2015 00:52

Re: acceptance and suppliance behaviours of waterborne cargo patch

Post by xarick »

v4
- reduced the number of settings from 4 to 1, for simplification.
- serving cargo from one water industry when multiple water industries of the same type are within catchment radius will now only trigger the industry the attached station is attached to.
- simplified code a bit and added some comments where mostly needed.
Formerly known as Samu
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 14 guests