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

Change: Rivers may start in desert when no rainforest exists #9635

Closed
wants to merge 1 commit into from

Conversation

2TallTyler
Copy link
Member

Motivation / Problem

Rivers cannot currently start in the desert. This is normally fine, but when the desert percentage is 100%, it is impossible for rivers to generate since the only non-desert surrounds ocean and isn't wide enough to fit the minimum length river starting at a higher elevation.

Description

When the desert percentage is 100, allow rivers to start in the desert. Lakes are also allowed to generate, as the game already generates inland sea as oases into which rivers can flow.

Not that OpenTTD always reflects reality, but the real-world precedent for rivers starting in the desert would be water emerging from an underground spring like those which feed qanats.

If a player wants a 100% desert map without rivers, they can set rivers to "none".

Limitations

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR touches english.txt or translations? Check the guidelines
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, gs_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')

@LordAro
Copy link
Member

LordAro commented Oct 20, 2021

I like it. Though I wonder whether it might be interesting to allow rivers in deserts at a lower percentage. Or perhaps even in proportion to the amount of desert on the map
i.e.
100% desert map - 100% rivers start in desert
50% desert map - 50% rivers start in desert
etc

@TrueBrain
Copy link
Member

Similar with #9634, I really wonder if these changes are a good idea. As why 100? Why not 90? or 99? What if I just always want to have rivers start in desert? :D

Here too, I think this would work much better if we just freely allow users to pick where/when they want rivers. It would simplify our code a lot, and removes all these special cases (basically pushing them to the user). I know it is a bit annoying, as "that isn't there". But I am afraid that all these point-solutions just add up to even less maintainable code.

But this is just my opinion. @LordAro clearly disagrees :D

@Eddi-z
Copy link
Contributor

Eddi-z commented Oct 20, 2021

100% desert map - 100% rivers start in desert
50% desert map - 50% rivers start in desert etc

that makes no sense. if 50% of the map is covered in desert, and river starting points are distributed randomly, then 50% of rivers starting in desert means the same as "no restriction at all".

@2TallTyler
Copy link
Member Author

I chose 100% to catch this edge case where rivers are truly impossible. On a tall enough heightmap, 99% desert may still have some green peaks where rivers can start.

I'm on board with adding an option for river start locations in the new map generation toolkit. In fact, I think a lot of the options @reldred added to JGRPP should be in there. Closing this until the new toolkit is created.

@2TallTyler 2TallTyler closed this Oct 20, 2021
@2TallTyler 2TallTyler deleted the desert_rivers branch November 14, 2022 02:12
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

Successfully merging this pull request may close these issues.

None yet

4 participants