[Map Script] LandMasses

Thanks for the praise that the script is getting. I appreciate it.

Jpinard:
How do I get a fresh start with this? Do you have to have python installed to generate maps with this? Or did you add functions in the script so "if" you load it up in python you'll then easily see?

Thanks!

I might be misinterpreting you so feel free to ask again.

All of CivIV's map scripts are python scripts so you don't need to install python to your machine to make use of this script. You can generate a LandMasses map in exactly the same way as you would generate a map from the custom game set up menu ... unless you're using BtS in which case there seems to be some as yet undetermined problem but there's a workaround documented in my previous post in this thread.

Python is only neccessary if you want greater customisation over the placement of resources - see the notes on options 30-36 in the readme.
 
Can't wait until the BTS version is fixed.... bleedin' Fractals for now :rolleyes:
 
I'm starting to understand this a bit more. I have one more question. Based on my settings listed - what do I need to change to have 3 curvy landmasses instead of just 2 main continents? When I set it to 3 landmasses/1 continent per landmass - it just makes 3 triangels equidistant to each other.

These settings make the below map.




 
I would try 3 landmasses with a minimum of 9 continents and a max of 20 (or whatever is the largest it will allow). Changing to randomly distributed continents should allow for the possibility of some variation in the size and shape of your land masses. Personally I would put some variation in the land mass buffer and ocean percentage - say 6 to 10 for the first and 50% to 70% for the second.

Beware that at this map size and ocean percentage you are going to get a huge amount of habitable land and hence a large number of cities, units, etc and your performance may suffer in the late game.
 
Jpinard:
I'm starting to understand this a bit more. I have one more question. Based on my settings listed - what do I need to change to have 3 curvy landmasses instead of just 2 main continents? When I set it to 3 landmasses/1 continent per landmass - it just makes 3 triangels equidistant to each other.

These settings make the below map.

I'm not certain on the meaning of curvy so this is something of a guess. If you could post a screen shot of a 3 land mass map that you generated along with the settings and describe how you would prefer it to be different that might aloow me to be more helpful.

I'd agree that to get greater variation in landmass shape you'll want to increase the number of continents to between 9 and 20. Alternatively you could try between 6 and 9 continents and set Continent Placement to more snaky land masses.

If you are looking for a consistent level of coastal ruggedness, it'll probably take a few map generations before you can be certain that you have settings that will regularly produce maps that you like. I can only really give advice on how the different settings will affect the coasts but you'll have to experiment with it yourself.
 
OK. Sorry for the huge filesize on these, but I wanted it the pics to be clear (and not fuzzy).

Exciting because I've nearly got it to where I'd like. I've got 3 dissimilar landmasses, and the proportion of ocean is good. So the only things I"m trying to tweak are:


* If you look at the red arrow. How do I get it so it's not like a giant straight canal... so the 3 landmasses look more like indepentant mega-islands?

* There's still too much jungle (and a bit too much desert for my taste). Anything else I can change so there is less?

These settings:




Produce this map:



Thanks! :)
 
1) Tricky. The best bet would be to increase the ocean percentage or decrease the seperation between land masses so that land masses are less constrained and not forced to get as close to each other as possible. I'm not sure that that would work since there seems to be a fairly large ocean (top left) which could have supported more growth. But I would be very confident that making the opposite changes - decreasing ocean percentage or increasing seperation between land masses would increase the affect you are trying to avoid.

Increasing coastline ruggedness may make the situation worse depending on how you view things. The main bodies of both land masses would certainly run less parallel to each other but the fringe of islands along each coast may well become well defined enough that the canal effect is clearly visible.

2) You can make an edit to the script to reduce the amount of desert and jungle further. Between lines 2447 and 2497 are the list of options for Terrain, Terrain Homogeneity, and Woodlands, and the values which LandMasses uses for each option.

Terrain options:

[
["Warm, less desert, less plains", [0, 16, 9]],
["Warm, less desert, normal plains", [0, 16, 18]],
["Warm, less desert, more plains", [0, 16, 27]],
["Warm, normal desert, less plains", [0, 32, 9]],
["Warm, normal desert, normal plains", [0, 32, 18]],
["Warm, normal desert, more plains",[0, 32, 27]],
["Warm, more desert, less plains", [0, 48, 9]],
["Warm, more desert, normal plains", [0, 48, 18]],
["Warm, more desert, more plains", [0, 48, 27]],
["Temperate, less desert, less plains", [1, 16, 9]],
["Temperate, less desert, normal plains", [1, 16, 18]],
["Temperate, less desert, more plains", [1, 16, 27]],
["Temperate, normal desert, less plains", [1, 32, 9]],
["Temperate, normal desert, normal plains", [1, 32, 18]],
["Temperate, normal desert, more plains",[1, 32, 27]],
["Temperate, more desert, less plains", [1, 48, 9]],
["Temperate, more desert, normal plains", [1, 48, 18]],
["Temperate, more desert, more plains", [1, 48, 27]],
["Cool, less desert, less plains", [2, 16, 9]],
["Cool, less desert, normal plains", [2, 16, 18]],
["Cool, less desert, more plains", [2, 16, 27]],
["Cool, normal desert, less plains", [2, 32, 9]],
["Cool, normal desert, normal plains", [2, 32, 18]],
["Cool, normal desert, more plains",[2, 32, 27]],
["Cool, more desert, less plains", [2, 48, 9]],
["Cool, more desert, normal plains", [2, 48, 18]],
["Cool, more desert, more plains", [2, 48, 27]],
["Random", [1, 1, 1]],
["Fantasy", [-1, -1, -1]],
],

To determine the amount of desert in a map, LandMasses uses the second value in the selected vector. Less desert currently has a selected value of 16. Try setting that to a smaller figure.

Woodlands options:

[
["Less jungle, less forest", [100, 75]],
["Less jungle, normal forest", [100, 60]],
["Less jungle, more forest", [100, 45]],
["Normal jungle, less forest", [80, 75]],
["Normal jungle, normal forest", [80, 60]],
["Normal jungle, more forest", [80, 45]],
["More jungle, less forest", [60, 75]],
["More jungle, normal forest", [60, 60]],
["More jungle, more forest", [60, 45]],
["Random", [-1, -1]],
],

Here you'll need to alter the first value of a vector. Note that the value increases while the selected amount of jungle decereases. Normal jungle is 80 while less jungle is 100.

If you don't want to edit the script than you could try altering the Terrain Homogeneity option. Reducing the level of clumping will not decrease the amount of desert but it will reduce the size of each desert; each desert will be smaller but there will be fewer of them.

--------------------------------------------------------------------------

A couple of points about trying to find the settings that will consistently provide you with a map that you like.

1) Set map size to duel. This won't affect the size of the map, only factors of gameplay which you won't be making use of if you're just trying to see what each option does. It will alse reduce the number of civs to two. The map will then generate faster (but with less resources).

2) Set Print Map Details to Yes. The selected options for each map generation should be sent to C:\Program Files\Firaxis Games. The file can be opened with WordPad. It'll tell you precisely what options were used to generate a map. Here you've selected between 3 and 9 tiles as the minimum seperation between land masses. The newly created file will tell you what value was selected to generate the map. It will also tell you not only the selected percentage of ocean (somewhere between 55% and 60% here) but the actual percentage of ocean that was generated.
 
This script will generate scripts in BtS but it will crash in the game set up menu after a certain number of options have been selected. The following link is to an earlier post which details ways to greatly reduce the risk of a crash occuring.

An earlier post in this thread.

I've a rough idea with why the script isn't compatable with the game set up menu and how to fix it but unfortunately I'm not expecting to complete a working version for a couple of weeks.
 
Sorry Thedrin, another question. I think I know the answer already, but I'll ask despite.

Is there a way I can get a width of 164 (wanted something in between 160 & 168). I looked through the python code and it looks like it uses a formula to come up with the available sizes in the dropdown menu. So I'm guessing I'd have to modify that? Or will that just mess things up too much?

Or can I just add this ["164",41],

to all your map size lines (under each entry for ["160",40],





Also, do these values all have to be whole numbers, or can they be decimals too? I'm thinking 1.5 for the "fewer resource typpes"

Code:
                ["Few strategic resources", -1],
                ["Normal strategic resources", -2],
                ["Many strategic resources", -3],
                ["Random", 0],
                ["1 of each per civilization", -4],
                ["Custom", -5],
                ],
        [
                ["Few health resources", -1],
                ["Normal health resources", -2],
                ["Many health resources", -3],
                ["Random", 0],
                ["1 of each per civilization", -4],
                ["Custom", -5],
                ],
        [
                ["Few luxury resources", -1],
                ["Normal luxury resources", -2],
                ["Many luxury resources", -3],
                ["Random", 0],
                ["1 of each per civilization", -4],
                ["Custom", -5],
                ],
 
It shouldn't be too difficult to do. Width is one of the menu options whose range of choices can be altered simply be altering the list of choices. 'Coastlines' or 'Mountain Ranges' on the other hand would require altering various pieces of the code.

Available choices for each option begin around line 2096. Just add in the following line to the first two sets of choices (which represent the available choices for min. width and max. width);

["164",41],

To create a new width or height option all you need to do is assign it a name in quotation marks followed by a value four times smaller than the dimension size you want (CivIV maps dimensions are always multiples of 4).
 
Jpinard:
Also, do these values all have to be whole numbers, or can they be decimals too? I'm thinking 1.5 for the "fewer resource typpes"

Code:
                ["Few strategic resources", -1],
                ["Normal strategic resources", -2],
                ["Many strategic resources", -3],
                ["Random", 0],
                ["1 of each per civilization", -4],
                ["Custom", -5],
                ],
        [
                ["Few health resources", -1],
                ["Normal health resources", -2],
                ["Many health resources", -3],
                ["Random", 0],
                ["1 of each per civilization", -4],
                ["Custom", -5],
                ],
        [
                ["Few luxury resources", -1],
                ["Normal luxury resources", -2],
                ["Many luxury resources", -3],
                ["Random", 0],
                ["1 of each per civilization", -4],
                ["Custom", -5],
                ],

I'm afraid those values are just used to tell the script what equation to use to calculate the number of resources and aren't used by any universal equation to calculate the number of resources.

If the resource quantity is set to few, normal, or many, then the 'normal' quantity will be calculated. Few halfs the value. Many doubles it. The 'normal' number of resources is:

floor(('No. of players' + 1)/2) + int(floor(rand*('No. of players'/2))

so that the number of resources is at least floor((No. of civs)/2) and at most (No of civs - 1).

To alter the number of resources generated you'll need to find the following piece of code which begins around line 1914:

Code:
# Determine how much of the resource is to be placed.

        if Resource < 9:
                if StrategicQuantity == -5:
                                ResourceCount = ResourceQuantities[Resource]
                                if ResourceCount <= -5:
                                        ResourceCount = -2
                                elif ResourceCount == -4:
                                        ResourceCount == Players
                                elif ResourceCount == -1:
                                        ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
                                        ResourceCount = ResourceCount/2
                                elif ResourceCount == -2:
                                        ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
                                elif ResourceCount == -3:
                                        ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
                                        ResourceCount = ResourceCount*2
                        elif StrategicQuantity == -4:
                                ResourceCount = Players
                        [b]elif StrategicQuantity > -4:
                                ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
                                if StrategicQuantity == -1:
                                        ResourceCount = ResourceCount/2[/b]
                                elif StrategicQuantity == -3:
                                        ResourceCount = ResourceCount*2
                elif Resource < 20:
                        if HealthQuantity == -5:
                                ResourceCount = ResourceQuantities[Resource]
                                if ResourceCount <= -5:
                                        ResourceCount = -2
                                elif ResourceCount == -4:
                                        ResourceCount == Players
                                elif ResourceCount == -1:
                                        ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
                                        ResourceCount = ResourceCount/2
                                elif ResourceCount == -2:
                                        ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
                                elif ResourceCount == -3:
                                        ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
                                        ResourceCount = ResourceCount*2
                        elif HealthQuantity == -4:
                                ResourceCount = Players
                        [b]elif HealthQuantity > -4:
                                ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
                                if HealthQuantity == -1:
                                        ResourceCount = ResourceCount/2[/b]
                                elif HealthQuantity == -3:
                                        ResourceCount = ResourceCount*2
                elif Resource < 32:
                        if LuxuryQuantity == -5:
                                ResourceCount = ResourceQuantities[Resource]
                                if ResourceCount <= -5:
                                        ResourceCount = -2
                                elif ResourceCount == -4:
                                        ResourceCount == Players
                                elif ResourceCount == -1:
                                        ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
                                        ResourceCount = ResourceCount/2
                                elif ResourceCount == -2:
                                        ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
                                elif ResourceCount == -3:
                                        ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
                                        ResourceCount = ResourceCount*2
                        elif LuxuryQuantity == -4:
                                ResourceCount = Players
                        [b]elif LuxuryQuantity > -4:
                                ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
                                if LuxuryQuantity == -1:
                                        ResourceCount = ResourceCount/2[/b]
                                elif LuxuryQuantity == -3:
                                        ResourceCount = ResourceCount*2

For altering the affects of the few resources options, the important parts are bolded. I guess that if you want the affects of the 'few resources' options to be halved - that the number of resource generated is somewhere between normal and the current settings for few - that you'll want to replace 'ResourceCount/2' with '3*ResourceCount/4'
 
Appreciate all your work and sorry for the pressure. This is the best version of the game IMHO ever but the Game still sux when it comes to realistic continents and landmasses. That is why I use your script, cause it is the only one that comes close. If I could help you I would but I hate coding and I wouldnt know were to start LOL. Please keep up the good work, it is very much appreciated.
 
Thedrin - what about the lines I set in red? Wouldn't I want to change those for the 75% reduction in resources (instead of the half)?

If the resource quantity is set to few, normal, or many, then the 'normal' quantity will be calculated. Few halfs the value. Many doubles it. The 'normal' number of resources is:

floor(('No. of players' + 1)/2) + int(floor(rand*('No. of players'/2))

so that the number of resources is at least floor((No. of civs)/2) and at most (No of civs - 1).

To alter the number of resources generated you'll need to find the following piece of code which begins around line 1914:

Code:
# Determine how much of the resource is to be placed.

        if Resource < 9:
                if StrategicQuantity == -5:
                                ResourceCount = ResourceQuantities[Resource]
                                if ResourceCount <= -5:
                                        ResourceCount = -2
                                elif ResourceCount == -4:
                                        ResourceCount == Players
                                elif ResourceCount == -1:
                                        ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
[COLOR="Red"]                                        ResourceCount = ResourceCount/2[/COLOR]
                                elif ResourceCount == -2:
                                        ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
                                elif ResourceCount == -3:
                                        ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
                                        ResourceCount = ResourceCount*2
                        elif StrategicQuantity == -4:
                                ResourceCount = Players
                        [b]elif StrategicQuantity > -4:
                                ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
                                if StrategicQuantity == -1:
                                        ResourceCount = ResourceCount/2[/b]
                                elif StrategicQuantity == -3:
                                        ResourceCount = ResourceCount*2
                elif Resource < 20:
                        if HealthQuantity == -5:
                                ResourceCount = ResourceQuantities[Resource]
                                if ResourceCount <= -5:
                                        ResourceCount = -2
                                elif ResourceCount == -4:
                                        ResourceCount == Players
                                elif ResourceCount == -1:
                                        ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
[COLOR="red"]                                        ResourceCount = ResourceCount/2[/COLOR]
                                elif ResourceCount == -2:
                                        ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
                                elif ResourceCount == -3:
                                        ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
                                        ResourceCount = ResourceCount*2
                        elif HealthQuantity == -4:
                                ResourceCount = Players
                        [b]elif HealthQuantity > -4:
                                ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
                                if HealthQuantity == -1:
                                        ResourceCount = ResourceCount/2[/b]
                                elif HealthQuantity == -3:
                                        ResourceCount = ResourceCount*2
                elif Resource < 32:
                        if LuxuryQuantity == -5:
                                ResourceCount = ResourceQuantities[Resource]
                                if ResourceCount <= -5:
                                        ResourceCount = -2
                                elif ResourceCount == -4:
                                        ResourceCount == Players
                                elif ResourceCount == -1:
                                        ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
[COLOR="red"]                                        ResourceCount = ResourceCount/2[/COLOR]
                                elif ResourceCount == -2:
                                        ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
                                elif ResourceCount == -3:
                                        ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
                                        ResourceCount = ResourceCount*2
                        elif LuxuryQuantity == -4:
                                ResourceCount = Players
                        [b]elif LuxuryQuantity > -4:
                                ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
                                if LuxuryQuantity == -1:
                                        ResourceCount = ResourceCount/2[/b]
                                elif LuxuryQuantity == -3:
                                        ResourceCount = ResourceCount*2

For altering the affects of the few resources options, the important parts are bolded. I guess that if you want the affects of the 'few resources' options to be halved - that the number of resource generated is somewhere between normal and the current settings for few - that you'll want to replace 'ResourceCount/2' with '3*ResourceCount/4'
 
Thanks DragonTempest. Sorry that there won't be any script more suitable to BtS for a while. If you've any other issues with the script's generation at all, let me know.

Jpinard:
Oops one problem... If I wanted to edit the "fewer resources" code, don't I need to edit the -1 lines and not the -4 lines?

The edit would only be applied to the last line of each of the bolded sections (which is the only line I should have bolded);

Code:
ResourceCount = ResourceCount/2

Overall, the bolded section goes;

If few, normal, or many resources have been selected, calculate a normal amount of resources to be generated. If few resources have been selected, amend the amount of resources to be generated.

Thedrin - what about the lines I set in red? Wouldn't I want to change those for the 75% reduction in resources (instead of the half)?

If you select custom from any of the appropriate set up menu options then, yes, you'd want to edit the redded lines. If you don't use the custom options then you won't need to do so (though it wouldn't hurt for completeness).
 
I'm getting some spectacular maps now. I'm concerned about shorting myself too much, so I just knocked the recource values down to 90%.

The resources changes I made... that was for the total # of resources on the whole map.... right? I got a little confused when I re-read your relase notes on resources in the fat cross.
 
Top Bottom