The patch changes the "place river" function in the dock gui to recursively fill all adjacent land of lower or equal elevation with water. Don't do this at home. It is great to fill a specially carved out valley without clicking a million times, though.
Of course this is a most horrific single-purpose hack. It was done to get a river into the "river valley" heightmap.
Place contigous rivers
Moderator: OpenTTD Developers
Place contigous rivers
- Attachments
-
- rivers.diff
- (1.84 KiB) Downloaded 68 times
The guy on the picture is not me, it's Alonso.
Re: Place contigous rivers
maybe you can generalize this:
- placing a "river" calculates the nearest water tile, and places river tiles in a straight [or according to pathfinder] line to connect to that place.
- placing a "lake" fills all connected same-height area with river tiles
Re: Place contigous rivers
I don't think you need that stuff if you're not trying to build a 4000 tile long meandering river.
The guy on the picture is not me, it's Alonso.
Re: Place contigous rivers
why would it matter whether it's 40 or 4000 tiles?
- Simons Mith
- Transport Coordinator
- Posts: 326
- Joined: 14 Jan 2010 23:45
Re: Place contigous rivers
Can I suggest a river tool less likely to need an undo feature?
Drag a rectangle. The river goes from the first corner of the rectangle to the second, wiggling
randomly as it goes. But it won't leave the rectangle, and it won't go uphill. Possibly if it hits
_any_ slope it stops, as that would allow the designer to decide how it should flow when it meets
a slope.
You could even do diagonal rivers with a ctrl-drag.
If you want a straight river, a rectangle one unit wide will suffice.
If you provided a river width setting, the existing river tool could absorb this new functionality
reasonably easily. The main change would be that dragging an area would produce a river instead
of a lake to a river, and if you wanted a lake you'd have to adjust the width, or drag several times.
I think implementing things this way could add the feature in a way that wouldn't need an undo
facility quite so badly.
Drag a rectangle. The river goes from the first corner of the rectangle to the second, wiggling
randomly as it goes. But it won't leave the rectangle, and it won't go uphill. Possibly if it hits
_any_ slope it stops, as that would allow the designer to decide how it should flow when it meets
a slope.
You could even do diagonal rivers with a ctrl-drag.
If you want a straight river, a rectangle one unit wide will suffice.
If you provided a river width setting, the existing river tool could absorb this new functionality
reasonably easily. The main change would be that dragging an area would produce a river instead
of a lake to a river, and if you wanted a lake you'd have to adjust the width, or drag several times.
I think implementing things this way could add the feature in a way that wouldn't need an undo
facility quite so badly.
Re: Place contigous rivers
With 40 tiles you can just draw a 40x10 box with the river tool and then bulldoze the 5 tiles that don't fit.
An auto-wiggling river tool would be nice but wouldn't have solved my problem - that is filling the whole valley with water.
An auto-wiggling river tool would be nice but wouldn't have solved my problem - that is filling the whole valley with water.
The guy on the picture is not me, it's Alonso.
Who is online
Users browsing this forum: No registered users and 21 guests