1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[BTS] Generating a map with many,many long Rivers?

Discussion in 'Civ4 - Creation & Customization' started by Grandpa Troll, Nov 18, 2018.

  1. Grandpa Troll

    Grandpa Troll Ronin

    Joined:
    Dec 31, 2001
    Messages:
    228
    Location:
    Jacksonville North Carolina USA
    Is this possible without manually adding Rivers with World Builder?

    Thanks again for any/all assistance!

    Grandpa Troll
     
  2. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,117
    I honestly don't know if world builder is able to add rivers, but it sounds like a good idea. If we can get verified that it isn't possible, then it should be added to the TODO list. Considering how rivers are stored in the map and how the wb interface works, adding a river building tool should be possible.
     
  3. Grandpa Troll

    Grandpa Troll Ronin

    Joined:
    Dec 31, 2001
    Messages:
    228
    Location:
    Jacksonville North Carolina USA
    Yes it is possible under Map Mode/Terrain/ then toward bottom click and add a river tile.

    -However-

    I want to do WITHOUT using the WorldBuilder and was wondering if a file existed where you can alter/edit parameters to make more rivers and make them longer.

    Thanks

    Gramps
     
  4. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,117
    Ohh you want to tweak the map generator to make longer rivers. The code for this is in CvMapGenerator::addRivers(). It relies on the following values from GlobalDefineALT: RIVER_SOURCE_MIN_RIVER_RANGE and RIVER_SOURCE_MIN_SEAWATER_RANGE. If they aren't there already, copy them from vanilla GlobalDefines.xml. River generation also relies on PLOTS_PER_RIVER_EDGE, though I'm not sure you should touch that one.

    It looks like it adjusts how far from the coast a river can start. How the river is formed based on that seems to be some rather lengthy code, which I'm not going to study right now. You can play around with this and see if you can find values, which fits better with what you want.

    Note: those values do not scale with map size. Oddly enough gigantic maps will not have longer rivers than tiny maps.
     
    Grandpa Troll likes this.
  5. Yoda Power

    Yoda Power ✫✫✫✫✫✫✫

    Joined:
    Sep 24, 2002
    Messages:
    13,866
    On random generated maps, more massive continents will usually result in longer rivers.
     
    Grandpa Troll likes this.
  6. Sto

    Sto Should i code today ...

    Joined:
    Dec 15, 2005
    Messages:
    1,143
    Location:
    Marseille (France)
    the trouble if you change these settings is that random generated maps don't override them. PLOTS_PER_RIVER_EDGE define the number of rivers (% river edge / plots). So if you decide to change that, you have to do it in all map script you use. With Full of Resources i generate the long rivers with default impl (not manual with lots of curves), then i reduce RIVER_SOURCE_MIN_RIVER_RANGE and RIVER_SOURCE_MIN_SEAWATER_RANGE and redo the impl until nb of rivers is done.
     
  7. Sto

    Sto Should i code today ...

    Joined:
    Dec 15, 2005
    Messages:
    1,143
    Location:
    Marseille (France)
    sry for misunderstanding. when i say the map script doesn't override the value, that mean if the default implementation is done. It is done only once with the 3 settings. So if you put RIVER_SOURCE_MIN_RIVER_RANGE and RIVER_SOURCE_MIN_SEAWATER_RANGE too high, you may result with not a lot of rivers or even no river at all. with FoR, i do several impl by changing these values and reducing them until you get PLOTS_PER_RIVER_EDGE done. this garanty the longuest rivers possible with default impl. (you can see that in the script as a medium solution). An ultimate solution, would be to change the default impl, preferably in each script with your own custom generation.
     

Share This Page