Adjusting Continents Script for Contiguous Oceran

PoundedChicken

Warlord
Joined
Nov 4, 2016
Messages
126
Hi,

Hoping for some guidance from some people with experience in map scripts.

Basically the current Continents script is driving me nuts by creating generally at least two landmasses that extend from pole to pole, making circumnavigation impossible.

At this stage I'm looking at using the Island Plates as a basis and just tuning back the water % on larger islands and reducing number of smaller islands.

Cheers
 
Someone better w/ map scripts will probably have better answer, but this bit at line 210
Code:
    if iNumBiggestAreaTiles <= iNumTotalLandTiles * 0.64 then
            done = true;
            iBiggestID = biggest_area:GetID();
        end
checks the area the biggest landmass occupies, you could adjust to make smaller.

also 248

local rift_grain = args.rift_grain or -1;
could be set from 1-3 to add rifts to cut continents.
 
The "easiest" way will be to use the multilayered fractal like island plates since you can adjust region bounds. Right now even in that script land can reach all four map edges.

The best example for using regions with multilayered fractal will be Civ 5s terra map script.

I'm working on a mod that tweaks several things with world generation including cleaning up land reaching the poles. So if you can hold out a lottle longer you won't need to do anything yourself :)
 
Someone better w/ map scripts will probably have better answer, but this bit at line 210
Code:
    if iNumBiggestAreaTiles <= iNumTotalLandTiles * 0.64 then
            done = true;
            iBiggestID = biggest_area:GetID();
        end
checks the area the biggest landmass occupies, you could adjust to make smaller.

also 248

local rift_grain = args.rift_grain or -1;
could be set from 1-3 to add rifts to cut continents.

Actually had a play around with these last night as they seemed like the most obvious route. I'd make an adjustment and test it about 5 times and on the average, there was still quite a heavy bias towards making landmasses that "stretch" their way north/south to the poles, often by just some single tiles of land...

I think the 0.64 might be an error too, as above it in the comments it says target is < 58% and Civ V uses 0.58... But obviously there's a lot the devs know that I don't, so there's probably a reason.
 
I have a mod that covers this here: http://forums.civfanatics.com/threads/larger-worlds.604288/

If you'd just like to alter the continents you can either steal mine from the zip file or you need to change a few things:

First, there isn't enough water in large and huge maps to fix this on a fractal map (hence my larger worlds mod). You can increase the water percentages in the lua file but you may be too light on usable land. This starts at line 115
Code:
    local sea_level_low = 57;
    local sea_level_normal = 62;
    local sea_level_high = 66;
I run from 66 to 78 with my larger maps.

The continents will be blobs, I fixed this by using more "plates" in the fractal, line 124:
Code:
local adjust_plates = 1.0;
Change to 2.0 and the landmasses will be more interesting shapes, 1.5 if you don't want any small continents mixed in. This alone can fix the "landmasses that extend from pole to pole" in most maps, or at least make it very rare.

Finally, the previously mentioned size check. Currently the script is only checking to make sure it isn't making a pangaea. That is the only thing this line does:
Code:
if iNumBiggestAreaTiles <= iNumTotalLandTiles * 0.64 then

You can expand on that though. If you make the limit lower the largest landmass will be smaller and you can add a minimum to make sure you don't only have small continents. This is only comparing the landmass size to the total number of land tiles though so alone it won't always help. Here is what I use:
Code:
        if iNumBiggestAreaTiles <= iNumTotalLandTiles * 0.45 and iNumBiggestAreaTiles >= iNumTotalLandTiles * 0.3 then
            done = true;
            iBiggestID = biggest_area:GetID();
        end
So I want to make sure the largest landmass is at least 30% of the total land but no more than 45%. Combined with more water and more plates for the fractal it does what I wanted :)
 
Thanks for your suggestions. I used your mod a bit, but still found a few too many landmasses blocking the oceans for my personal taste. I've used some of your ideas and tweaked a few other areas to pretty much achieve what I was after:
  1. Doubled number of plates
  2. Reduced amount of ice at the poles
  3. Reduced largest continent maximum size (with no minimum)
  4. Slightly increased amount of water (just a bit less than Seven05's)
  5. Used Seven05's grain_dice idea and also reduced randomness from the rift_grain
So far, there's only about a 1 in 20 chance of getting a world that can't be circumnavigated. Some examples below:

fsnm6yg.jpg
 

Attachments

Looks good!

I usually play on my "small continents" map type but I'll give your changes a shot. Can I wrap your changes into the mod?

I still have a few issues to address before I'm happy, mainly starting plots, rivers, jungle banding and bonus resource distribution.
 
Go nuts.

I haven't even started looking at the terrain and features yet - I guess I haven't really got a handle on what I personally feel is wrong or what should be improved yet.
 
Well in your screenshot you can see the jungle banding on every map, so that's one :)

Rivers are problematic on some maps, too few and it can render huge areas almost useless, too many and it ruins the effect of having them in the first place. Most maps right now have too few in my opinion, but I don't think it will work if I simply add more.

Starting plots are a big one for me, if you have a good starting position the game goes well but if not... it kind of sucks but sometimes it's a fun challenge so this one is also pretty tough to nail down.
 
Well in your screenshot you can see the jungle banding on every map, so that's one :)

Rivers are problematic on some maps, too few and it can render huge areas almost useless, too many and it ruins the effect of having them in the first place. Most maps right now have too few in my opinion, but I don't think it will work if I simply add more.

Starting plots are a big one for me, if you have a good starting position the game goes well but if not... it kind of sucks but sometimes it's a fun challenge so this one is also pretty tough to nail down.

Is there a way to stop rivers terminating in the middle of a landmass before hitting the ocean? I like lots of rivers and hate extremely small terminating rivers.

Also, is there a way to force start on a hill?

Thank you.
 
Is there a way to stop rivers terminating in the middle of a landmass before hitting the ocean? I like lots of rivers and hate extremely small terminating rivers.

Also, is there a way to force start on a hill?
We have three controls in the default river code and the way they works doesn't give you very precise control over them. So you can make more/less rivers with the existing code but that's about it.
 
Hey Luc, long time no type! Great to see you online at CFC! Thanks for that link I have missed CDG a lot, you to I might add. ;)

I dislike the ice in the game preventing us from circumnavigating the globe, why on earth did they do this, to simulate north and south poles with the ice sheets perhaps?

Rivers and lakes need to be tweaked, rivers don't generate correctly. Usually they originate from mountains, ice melt etc, not sure what they imply in this game though. Artisan springs perhaps some rivers begins in the middle of no where. :D
 
Last edited:
I just went ahead and changed Ice to no longer spawn on coast in the features XML.

Do you have this as a mod, or did you just tweak the game files. I am pretty sure I could handle building a mod but I code all day at work and at home I just want to play. I'm down with editing the official files, with all the peril that entails, if that's the quickest way.
 
I included it in the Balancer mod, but it is a massive rewrite of the game, in-progress of course.
`
I can understand if you don't want to play a mod in progress, as it will change often right now. I n fact i am about to patch it in about 15 minutes, to fix a major flub I made (I did the SQL syntax of one of the files backwards).

If not, though I can whip up a mod just for the coasts.
 
Back
Top Bottom