distance from edge
Moderator: Graphics Moderators
-
- Engineer
- Posts: 37
- Joined: 24 Feb 2016 16:40
distance from edge
Hello
is there any posibility to say Industry XY max distance to (map) edge?
there is a option in the settings: Maximum distance from edge for Oil industrys. It has a range from 12 to 128 tiles
but It won't work.
Thanks for help
is there any posibility to say Industry XY max distance to (map) edge?
there is a option in the settings: Maximum distance from edge for Oil industrys. It has a range from 12 to 128 tiles
but It won't work.
Thanks for help
Re: distance from edge
There actually isn't any way to replicate that functionality in NewGRF, no. There is no way to request using one of the original check functions, the game setting isn't available to read from NewGRF, and industry callbacks don't have any way of getting distance from map edge.
However the game setting does work, just only for the built-in industries.
What you can do in NewGRF is check property 43 (in NML called water_distance) to test the distance from water/land, if you want to make coastal or non-coastal industries.
However the game setting does work, just only for the built-in industries.
What you can do in NewGRF is check property 43 (in NML called water_distance) to test the distance from water/land, if you want to make coastal or non-coastal industries.
Re: distance from edge
well, you can sorta do this, by checking industry var 0x62 (or industrytile var 0x60) for tile type MP_VOID
-
- Engineer
- Posts: 37
- Joined: 24 Feb 2016 16:40
Re: distance from edge
hey jfs
and "build many random industrys" place the refinerys far away form the edge
so the game settings dosn't work.
i like to have the port etc on the coast not in the "lakes" but sea and lake water is the same.
property 43 check only the next land tile.
i hope that some day the edge function return to the game.
thanks for the answer
i try it with a vanilla 1.11 and i can place a refinery everwhereHowever the game setting does work, just only for the built-in industries.
and "build many random industrys" place the refinerys far away form the edge
so the game settings dosn't work.
i like to have the port etc on the coast not in the "lakes" but sea and lake water is the same.
property 43 check only the next land tile.
i hope that some day the edge function return to the game.
thanks for the answer
Re: distance from edge
Check you don't have any NewGRF loaded that overrides the default industries, such as OpenGFX+.
It works perfectly well when I tested just now.
Version 20210225-master-gd4583fa64c067c (you probably won't find a binary of this exact version, it's my own build)
No NewGRF loaded.
512x512 map
Maximum distance from edge for Oil industries: 32 tiles
With this setup I can build oil refineries at the edge of the map, but not away from the edge.
Remember that oil wells don't have the restriction, they can be built anywhere. Only oil rigs and refineries have the restriction.
It works perfectly well when I tested just now.
Version 20210225-master-gd4583fa64c067c (you probably won't find a binary of this exact version, it's my own build)
No NewGRF loaded.
512x512 map
Maximum distance from edge for Oil industries: 32 tiles
With this setup I can build oil refineries at the edge of the map, but not away from the edge.
Remember that oil wells don't have the restriction, they can be built anywhere. Only oil rigs and refineries have the restriction.
- Attachments
-
- Unnamed, 1994-04-30.sav
- (91.27 KiB) Downloaded 111 times
-
- Engineer
- Posts: 37
- Joined: 24 Feb 2016 16:40
Re: distance from edge
there is no active GRF
Re: distance from edge
Okay you left out one important detail: Scenario editor.
When in the scenario editor, apparently this setting is ignored. I'm not sure why, and that does seem like a bug.
During gameplay, the setting/restriction is fully functional.
Edit: No this restriction has been ignored (for oil refineries) in the scenario editor since the earliest available version of OpenTTD source code. You can test the same thing in version 0.4.5 of OpenTTD if you will, and find the same behaviour. It's not a bug, it's intentional that the restriction is ignored in the scenario editor.
When in the scenario editor, apparently this setting is ignored. I'm not sure why, and that does seem like a bug.
During gameplay, the setting/restriction is fully functional.
Edit: No this restriction has been ignored (for oil refineries) in the scenario editor since the earliest available version of OpenTTD source code. You can test the same thing in version 0.4.5 of OpenTTD if you will, and find the same behaviour. It's not a bug, it's intentional that the restriction is ignored in the scenario editor.
Who is online
Users browsing this forum: No registered users and 9 guests