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: Permanent rivers #8461
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think most of the
bool river = HasTileCanalOnRiver(tile_cur);
variables are unnecessary becuase you only use them once.
They are getting the state of the tile before a clear command is issued. The state of the tile is different afterwards. |
If I turn off the |
I see. :) |
Hmm, is it really needed that a message shows up? I'm unsure if I can do this for a single river tile. For multi-tile demolish, it seems better not to display anything. I'll see what I can do. |
d44cd53
to
8469ab0
Compare
I renamed to |
Update: I am unable to show up an error message. Couldn't figure out how to do it. Main issue is that I can't tell where the clear command was originally issued. A clear landscape command can be issued by a lot of things, like terraforming, building other infrastructure, objects, and not just demolishing. ClearTile_Water has always returned true for river and sea, and even with the changes in this PR, it still returns true, but the difference is that it may or may not remove the river. If I were to make it return an error, then many of the other commands that expect it to behave as it previously did, would simply not work. Like for example, building a ship depot, incurs in a clear landscape command. If it's built upon a river, the command has to return true, and not false with an error. This limitation prohibits me to make it come up with an error. Or it could be that I just don't know better. |
I am not sure about this feature. It solves only a tiny portion of the issues with ships, while completely ignoring the others. You can still terraform sea, and just land-block a dock of a competitor. I do not see why rivers have to be more special that they require protection. Can you elaborate on the choice to only protect rivers? |
So what I understand from talking to people, there are two issues:
So by making them indestructible, we kinda solve those issues. But I keep wondering how that effects gameplay. All of a sudden a huge part of the map cannot be changed at all. This is not what the game currently is and does. You can terraform almost everything (exceptions are industries and transmitters/lighthouses; the latter everyone hates). So I am afraid people will, after 1 game being annoyed by this mechanic, just disable it and still run into the same problems they run into now. So I keep wondering if this is the right solution for the problem. It sounds like this is the easy way out. An alternative I can imagine, is that we do some fluid-mechanics. Make the start of the river a "source" block, which can be indestructible for all I care, and make it flow through "trenches" to the sea. Now if you destroy a river, you can place back such "trench", and it will flow back through it again. It even allows you to move rivers, etc. This would also solve 1) and 2), but in a far less disruptive way. I am still not sure if that was the intention of this PR btw; I just extrapolated this from what other people have been telling me. tl;dr: I think this solution is way too disruptive for the gameplay for how most people play the game. But this is a very subjective opinion :) |
Issue is solved (differently) in JGR by providing river building tool usable in game, not just scenario editor. |
We once had a patch for that, but in general, it feels weird from a gameplay mechanic. It is an easy solution, but not one that really fits in the game, in my opinion. Of course, realism is a relative thing in OpenTTD, so meh :) |
That feature is off by default in my branch. It's mainly there for the world-building/decoration players. |
Another thought came to mind: Rivers currently appear not to be linked to town rating. What if we make destruction and construction of rivers based on town rating of the closest town? That might be a balance between all this: you cannot destroy endless amounts of rivers (so grieving etc is less likely), doing it by accident is okay-ish, and you can rebuild it, and you can't just drag&drop a full new river through the landscape as you ever so felt like it? No clue if this is a good idea, just thinking out loud really :P |
I've also got a setting which disables removing rivers and sea/ocean tiles, but this is mainly to increase the difficulty and prevent silly ocean terraforming. The default is to allow removing, as otherwise most players really would be annoyed.
Having town local authorities block actions outside of their authority zone would be inconsistent with the usual behaviour of towns, where egregious destruction outside of the authority zone is ignored. As an aside, a large fraction of players already find town authorities quite constricting, and are quite happy to demolish rivers, towns, mountains, etc. to fit perfectly flat and straight mainlines. I think that such a change would not be well appreciated by such players. |
You make valid points :) And you confirm basically what I am afraid with if a PR like this hits without having it off by default. Hmm .. this is more tricky than it looks :D |
Random Idea: (might be unrelated to this PR)
|
8469ab0
to
8d9b80c
Compare
src/water_cmd.cpp
Outdated
/* Canals can't be terraformed */ | ||
if (IsWaterTile(tile) && IsCanal(tile)) return_cmd_error(STR_ERROR_MUST_DEMOLISH_CANAL_FIRST); | ||
/* Canals and rivers can't be terraformed */ | ||
if (IsWaterTile(tile)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change feels a bit weird. might be better restructured as:
if (water) {
if (!cheat) return error;
if (canal) return error;
if (river) return error;
}
a289dd0
to
4066eb9
Compare
Gameplay-wise, canals and flat rivers are identical, and locks are just sloped rivers that boats can pass through. How about this (just a suggestion):
So this means in practice that the player has to build an alternative route for the river before demolishing the original one. As for whether the player should be able to build rivers or canals: It doesn't really matter since they behave in exactly the same way. We could leave it as it is currently, where players can only build canals. Or we could simply merge them and use the canal sprite for rivers within cities and the river sprite for everywhere else (we would need a new sloped canal sprite for this though). I like the latter way better though - this makes waterway networks become more similar to road networks - the city owns some rivers/canals at first, but you can build more of them for your ships to use. The canal vs river sprites are paralleled by the road sprites with pavement vs without pavement. |
4066eb9
to
7488d7e
Compare
7488d7e
to
150d825
Compare
150d825
to
ab876ab
Compare
5ebf642
to
3da8440
Compare
- Rivers are indestructible, unless cheating or in the scenario editor. - Added a game setting that can turn on or off this feature. - Savegame conversion. Other changes: - Demolishing a canal that was built on rivers will restore the river, regardless of setting value. - Can no longer use terraform tool to remove rivers, must demolish them first, regardless of setting value.
3da8440
to
1459836
Compare
From the discussion above it's clear that there's a legitimate problem here to solve and many good ideas about how to do so. Unfortunately, making rivers optionally permanent doesn't seem to have the consensus needed and nobody has discussed it in 18 months. Since this PR can't be merged as-is and doesn't seem to be a draft going another route, I'm going to close it. If anyone wants to make a PR implementing one of the proposed solutions I'd be quite interested to see (and review) it. 😃 |
Motivation / Problem
Players that make use of rivers for their ships can have another player come in and easily destroy the river just to lay their rail tracks or terraforming terrain without caring if there was any river there. The current solution is to build canals over the river to make them unclearable.
Accidental or not, terraforming rivers clears them. When it's not intentional, there's no way to bring the river back.
Some servers like citybuilders create an area that is exclusive to a player, and whenever another player tries to build something there, the server undoes it immediately. If it happens to be a canal being placed on a river, this would result in the canal being demolished and leave bare land instead of restoring the river.
Description
Other changes:
Limitations
I intentionally made terraforming rivers to come up with an error, warning the player that the river must be demolished first, assuming the setting allows demolishion of rivers.
Probably not complete, as there are things that could be added in the future. I suppose there could be added graphics for canalized river, extended to NewGRF support.
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.