Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Moving/Relocating/Offsetting (Certain) Industries #7939

Closed
Phx01 opened this issue Jan 15, 2020 · 5 comments
Closed

Feature Request: Moving/Relocating/Offsetting (Certain) Industries #7939

Phx01 opened this issue Jan 15, 2020 · 5 comments

Comments

@Phx01
Copy link

Phx01 commented Jan 15, 2020

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.

Expected result

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.

Actual result

Once the industry has been placed (either by the player or by itself), it is immutable.

@nielsmh
Copy link
Contributor

nielsmh commented Jan 15, 2020

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.

@Phx01
Copy link
Author

Phx01 commented Jan 19, 2020

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:

  1. the player would mark the target industry to relocate to a new location and pay the amount as if prospecting a new industry
  2. the industry would announce imminent closure (or optionally an adjusted message for the impending relocation)
  3. the industry would destruct as per "imminent closure" process
  4. the industry would then start building up on the target location (this can also be after a delay of another month)

Target location:

Handling the target location could be either one of the two:

  1. have the industry buy the land (plus a good margin to accommodate for building size changes) until the new building is started to build up
  2. leave it to fate: If during that time anything else is built at the target location, which needs razing to build something else, the industry would would vanish (or optionally try building up at the original location if still possible), leaving the player with a loss (as money was paid in the beginning of this process).

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?

@nielsmh
Copy link
Contributor

nielsmh commented Jan 19, 2020

That idea would be possible to implement more or less as-is with my #7896 extension to Game Script, that lets scripts have player-initiated actions and point to a tile. I should maybe polish it a bit more and take it out of draft status.

@Phx01
Copy link
Author

Phx01 commented Jan 19, 2020

Thank you! Looking forward to it.

@andythenorth
Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants