Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Feature Request: Moving/Relocating/Offsetting (Certain) Industries #7939
This is rather a feature request than an issue and I would like to see if this is something other people may also be interested in.
One can prospect industries already and there are settings in the game to open or limit this feature. Likewise, it would be cool to have a feature to "slightly" move an existing industry to a nearby location (e.g. with a "Move" button in the industry window). What 'nearby' is could be definable in the settings. Industries, which have logical constraints (e.g. mines have mineshafts), should remain immutable or can be relocated considerably less than others (maybe just 1-2 squares).
One way I can imagine this is to have a "catch area" by industry type for it and you can move it inside that catch area. This relocation should really cost something (up to the price of prospecting a new industry), so that abuse would be hampered and could be scaled with the distance. If the old and new location partially overlaps it costs less, depending on the overlap. Otherwise it costs like prospecting a new company
Also, industries should not be able to be moved into another authority zone of another town, e.g. if an industry at the new location would be called "Town Z Industry" instead of "Town Y Industry", the catch area should show the border and refuse a location further in that direction.
Primary industries may produce less the further away they are being relocated from their original location to indicate that where they had been was their sweet spot. How many squares one can move an industry free of penalty could be defined in the settings, but should realistically between 0-2 squares. The catch area could be thought of as the furthest the industry is willing to be moved, so they can still produce something.
Program-wise (yes, I also think about the coders implementing stuff like this), it would mean that an industry needs to have an additional "original" location, so that moving it once does not reset its original location. It also needs a catch area (coordinates it can be moved to). A calculation could be done for the distance penalty. Industries may be marked as "building up". So, for a month or two, they are not producing anything due to the move.
Once the industry has been placed (either by the player or by itself), it is immutable.
Workaround (for singleplayer games): Enable the Magic Bulldozer in the cheats menu (Ctrl-Alt-C) and remove the industry, build a new one of the same type near the original location. Give yourself money if you think that would be more fair. Enable the option to modify industry production level for the re-built industry if required.
I think it would be difficult to implement actual moving, since it involves clearing the original tiles and then re-placing identical tiles in a different location. This kind of multi-step modification of landscape array data where the entire sequence of operations needs to be rolled back if something fails is not possible the way things are structured now, and it might not be possible to prove beforehand whether the operation would succeed.
Things can also be complicated by NewGRF industries that can have peculiar requirements on their construction location. Some of the most extreme examples are in the ECS industry set.
Hmm... Ok. Admittedly, I did not expect it to be that complicated to implement as I was more thinking along the way of using already existing features (e.g. industry closure and build-up as well as the new-industry generator). With that, I can imagine that it also scales well with other NewGRFs as they adhere to the same tactics for closing and regeneration during game play.
To detail what I meant:
Handling the target location could be either one of the two:
Properties for industries as mentioned in my initial idea:
If implementing the added properties (e.g. original location) would be too cumbersome (especially since they would be required in NewGRFs as well), they can be left out and maybe simply reduce the production of that industry multiplied by the distance it was moved (maybe after a margin of 1-2 tiles) when "generating" the new industry at the target location.
Would that be possible to implement into the game or is it likewise (next to) impossible?
Thanks for this. There's been no activity on this for some time, and as it stands, it doesn't look likely that it will go any further. I'm closing it as we try to keep the issue count low for OpenTTD, it helps us focus on things that are important and fun. Feel free to discuss in irc or request re-opening if you disagree. Thanks for contributing!