Any way of increasing rivers?

skodkim

Deity
Joined
Jan 16, 2004
Messages
2,497
Location
Denmark
Is there any way of increasing how many river tiles are in the game, e.g. say that one in ten tiles should have a river next to it? Preferably though sql/xml as I'm not familiar with the map scripts.

\Skodkim
 
There are some global parameters in GlobalParameters (all starting with "RIVER_").

But looking in the related LUA file responsible for rivers on map creating (\base\assets\maps\utility\riverslakes.lua) makes me think they are mostly ignored or capped.
So I suggest you to play a bit with the mentioned LUA file itself, especially this part here:

Code:
function AddRivers()
    --GlobalParameters.RIVER_SEA_WATER_RANGE_DEFAULT or
    local riverSourceRangeDefault = GlobalParameters.RIVER_SOURCE_RANGE_DEFAULT or 4;
    local seaWaterRangeDefault = 3;
    local plotsPerRiverEdge = GlobalParameters.RIVER_PLOTS_PER_RIVER_EDGE_DEFAULT or 12;
   
    print("Map Generation - Adding Rivers");
   
...
 
I had a bit of a play with this. Settings I used:
Code:
   local riverSourceRangeDefault = 4;
   local seaWaterRangeDefault = 4;
   local plotsPerRiverEdge = 7;

Outcome:
WhatARiver.jpg

RiverA.jpg

RiverB.jpg

RiverC.jpg


That was on a Small Continents map. Pangea was plain crazy :)
 
I haven't noticed any kind of changes though. What do the higher and lower values mean anyway on those lines?
 
As far as I can read the code, the numbers define certain conditions, where a river source can be put.

The values seems to have the followin meaning:

- riverSourceRangeDefault = distance in plots to the any other river source.
- seaWaterRangeDefault = distance in plots to ocean coast.
- plotsPerRiverEdge = max number of river tiles in the vincinity of the source.

I'm pretty unsure about the last value, as I don't now the method plot:GetArea() and whqt it excactly does.

Anyway, I would rather decrease the first two values, and increase the last one. Something like this:

Code:
   local riverSourceRangeDefault = 2;
   local seaWaterRangeDefault = 2;
   local plotsPerRiverEdge = 24;

should somehow double the chance of a river source.
 
Increaseing this:
local plotsPerRiverEdge = 24;

Resulted in less but longer rivers in my tests, decreasing it resulted in more rivers in general, small medium and large. (its used as a divider in the code)
 
Yes, I think can confirm.

The below values lead to lots of rivers of all length.

Code:
   local riverSourceRangeDefault = 2;
   local seaWaterRangeDefault = 2;
   local plotsPerRiverEdge = 6;
 
How are you guys doing this? Are you editing the XML or are you loading it through LUA with modinfo?
 
Plot:GetArea()

if it works anything at all like Civ5's Plot:GetArea() it returns an integer ID# for the "area" the plot belongs to. This is essentially the landmass or seamass the plot is part of. However since in civ6 multiple continents can be part of the same landmass, it is possible each of these continents is assigned its own "area" ID#. I have not played with the function as yet in Civ6 so cannot confirm it works in the same way exactly as did Civ5's Plot:GetArea()

Civ5 could also be a little confusing in that there were Plot:Area(), Plot:WaterArea(), and Plot:GetArea().

Plot:Area() and Plot:WaterArea() gave the Area "object" for the Area the plot was part of, whereas Plot:GetArea() returned the ID# which you could then use to get the Area Object.
 
Back
Top Bottom