View Full Version : [Map Script] LandMasses


Thedrin
Mar 24, 2007, 06:32 AM
LandMasses Version 3 (http://forums.civfanatics.com/downloads.php?do=file&id=9487)

A new BtS compatable (at least it hasn't crashed on me yet) version of LandMasses is now available.

LandMasses has been broken down into 5 lesser map scripts. Each one gives you full control over one area of the map generation previously performed by LandMasses - map size, land placement, terrain placement, features placement, and bonus placement (start placement is gone - I was never happy with it) - but the generated map will be very basic in all other respects.

By running the master Modules script you can make use of all 5 LandMasses scripts at once, or less if you prefer. Modules does not give you direct access to the options available with each of the lesser LandMasses scripts, but it is designed to run any given LandMasses script according to the parameters selected when the LandMasses script was last used.

So, for example, if you generate a 4 land mass map with Modules, using LandMasses Lands, but want to play a 3 land mass map:
1) Select LandMasses Lands script in the Custom Game Setup menu, and choose 3 land masses (and whatever other options you want).
2) Set map size to Duel (not necessary but much faster) and generate the LandMass Lands map.
3) Return to the Custom Game Setup menu and select Modules. Select LandMasses under the Lands option (and whatever other options you want).
4) Set the appropriate map size and generate the Modules map. The resulting map will be generated using the LandMass Lands script, with the no. of land masses variable set to 3.

This script is in its early days. I'm thinking about expanding the Modules options so that aspects of other maps, such as Terra, Highlands, and a few others, can be mixed and matched, and may shortly open up a new thread for that.

Any problems, questions, or issues; feel free to raise them here.

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

To make use of the customisable resources options you'll need a Python editor. I use the one found in the below link. Note that when this link was last updated Python version 2.5.2 was available. This link will take you to a page that contains multiple versions depending on what system you're using.

Python (http://www.python.org/download/)

--------------------------------------------------------------------------
Original Post:

This is a script I've been working on. My aim was to put together an alternative continents-style map generator.

As well as factors such as width, height, ocean size, no. of hills and peaks, the script allows the user to select the number of land masses, the number of continents (which form the land masses), the seperation between land masses and whether or not colliding continents produce mountain ranges.

Having had no experience of Python before I used SmartMap as a guide to the language. This script uses CivIV's standard functions for generating rivers, lakes, features, huts and starting positions. Map size and land/hill/peak placement began life as the SmartMap code but have been altered quite a lot since then. An alternative resource generator has been implemented but the user may still choose to use 'standard' resources placement.

Thedrin
Mar 24, 2007, 06:32 AM
# History.
#-----------------------------------------------------------------------------------------------#
# 1.0:
# Original version
#-----------------------------------------------------------------------------------------------#
# 1.1:
# Removed variables which weren't doing anything unique. This has resulted in slowdown in map generation - particularly
# for larger maps.
# Adjusted the percentage of land tiles that are hills and peaks.
# Increased the amount of hills and peaks possible through more options.
# fixed an error in the lake removal code which caused some lakes to be left behind. Note that lakes are added back in
# later.
# Fixed an error in the 'reduced desert' terrain option.
#-----------------------------------------------------------------------------------------------#
# 1.2:
# New way of choosing random numbers of land masses and continents implemented to allow greater flexibility.
#-----------------------------------------------------------------------------------------------#
# 2.0:
# Alternative resource generator.
# - Oil can be generated anywhere.
# - Aquatic resources can be generated anywhere within reach of land.
# - Minerals (aluminium, coal, copper, gems, gold, iron, marble, silver, stone, uranium) and incense can be generated on any land tiles (except peaks and oases).
# - Other resources can be generated on the following terrain types.
# - Ice: fur.
# - Tundra: game, fur, ivory, sheep.
# - Tundra hills: game, fur, sheep.
# - Tundra forests: game, fur, ivory.
# - Tundra forested hills: game, fur.
# - Grassland: corn, cow, dye, horse, ivory, pig, rice, sheep, spices, sugar, wheat, wine.
# - Grassland hills: dye, pig, sheep, spices, wine.
# - Grassland forest or jungle: dye, fruit, ivory, pig, silk, spices, sugar, wine.
# - Grassland forested hills or jungle hills: dye, fruit, pig, silk, spices, sugar, wine.
# - Plains: Same as grassland but may also yield game and fur.
# Some resources are unique to their landmasses. These are corn, cow, pig, rice, sheep, wheat, ivory, silk, sugar, and wine.
# The option 'LandMasses: isolate horses' will include horses in this list.
# The option 'LandMasses: no isolated resources' will allow all resources to be placed on multiple land masses.
# LandMasses resource generator may override a mod which alters the placement of the standard resources.
# When using a mod with extra resources (salt, say) the LandMasses resource generator should (hopefully) place the additional resources according to the mods standard placement rules for that resource.
# Note that the options for isolating resources - 'LandMasses' and 'LandMasses: isolate horses' - do not completely isolate all resources selected for isolation. This is most prominently, but not completely, due to resources being placed within a civs starting place.
# Resources are placed randomly taking no account of the local resource density. This can lead to some serious clumping.
#
# Other changes:
# Increased the number of possible land masses to 10.
# Increased the possible width and height to 240 tiles (from 160).
# Increased the number of ocean percentages that can be chosen. The minimum is now 5% (was 40%) and the maximum is now 95% (was 80%).
# Added min. and max. options (previously included in the land masses and continents options) to the following options:
# - Width
# - Height
# - Ocean
# - Land Mass Seperation
# One affect of this change is that the 'Sealevel' option no longer has any effect on map generation. To obtain its affects:
# - Low: set Land Mass Seperation to between 0 and 4.
# - Medium: set Land Mass Seperation to between 5 and 8.
# - High: set Land Mass Seperation to between 9 and 12.
# Note the setting Land Mass Seperation at 0 or 1 will still cause only 1 continent per landmass to be generated.
#-----------------------------------------------------------------------------------------------#
# 2.1
#
# Terrain changes:
#
# Selecting Rocky climate no longer affects the terrain.
# Introduced three new hill and peaks setting; Highlands few, Highlands normal, and Highlands many. I've only used estimates to determine the appropriate percentages in these cases. If someone has the actual figures I'd appreciate them.
#
# Resource changes:
#
# Created a master resource option, 'Resources'.
# - Standard will use the standard CivIV recourse placement code. The Resource Land Mass, Resource Tiles, and
# Resource Quantities options are rendered ineffective.
# - Custom activates the Resource Land Mass, Resource Tiles, and Resource Quantities options.
#
# Divided resources options into two:
# - Resource Land Mass
# - Resource Tiles
# Resource Land Mass determines which resources are assigned to specific land masses.
# - 'Standard' assigns health and luxury resources to specific land masses.
# - 'LandMasses' assigns the same resources to specific land masses as it did previously.
# - 'LandMasses, isolate horses' is the same as 'LandMasses' but it also assigns horses to a specific land mass.
# - 'No isolated resources' allows all resources to be placed on all land masses.
# Resource Tiles determines which tiles a resource can be assigned to.
# - 'Standard' assigns resources to normal CivIV locations.
# - 'LandMasses' assigns the same resources to the same tile types as it did previously.
# - 'Crazy' assigns a resource to any tile which can be improved to take advantage of the resource.
# Setting both options to 'Standard' will cause LandMasses to use the default resource placement code.
# Setting only one option to 'Standard' will cause LandMasses to attempt to mimic the effects of the default resource placement code.
#
# Added the option 'Resource Quantities'. This allows the number of resources to be altered.
# - 'Normal resources': the no. of resources is between half the no. of players and one short of the no. of players.
# - 'Few resources': Only half as much of each resource are generated.
# - 'Many resources': Twice as much of each resources are generated.
# Further notes on this option:
# - if 'Standard' has been set for both Resource Land Mass and Resource Tiles then Resource Quantities is ignored.
# - The script may not place all of the resources that it sets out to.
# - The fewer resources generated, the more likely that the civ starting placement code may add in resources. This will noticably reduce the effects of some of the choices for Resource Land Mass, 'LandMasses', 'LandMasses, isolate horses', and, if 'Standard' has not been selected for Resource Tiles, 'Standard'.
#
# The odds of a resource being placed on any given tile reduce as the number of that resource in the fat cross centred around that tile increase.
# The odds of a resource being placed on any given tile reduce as the number of all resources in the fat cross centred around that tile increase.
#-----------------------------------------------------------------------------------------------#
# 2.2:
#
# Beginning work on terrain options. Since my previous undocumented attempt at this (a few months ago) was a spectacular failure, I'll be going very slowly. For now only a few, unlikely-to-be-used, options are included.
#
# Terrain:
# - Standard: uses normal terrain generation. Deactivates all terrain options.
# - Custom: Activates all terrain options.
# Terrain Type:
# - all grass, all plains, all desert, all tundra, and all snow.
# - fantasy - randomly placed terrrain tiles.
#
# Resources:
# Aquatic resources will no longer be generated beneath ice.
#-----------------------------------------------------------------------------------------------#
# 2.3:
#
# Lands:
#
# Added 'Coastlines' option. A rugged coastline increses the number of islands and archipelagos.
# - Standard: Prior to the introduction of the coastlines option, this was the usual implementation.
# - Rugged: Lots of coastal islands. Lands that were narrow under the standard setting may be broken up into archipelagos.
# Notes:
# - the effectiveness of this option depends a great deal on how much space is designated towards land, ocean, and seperation between landmasses. Selecting a low ocean percentage and a high seperation between land masses will reduce the effects of the coastline option to irrelevance.
# - it is possible for large pieces of land which previously formed a single landmass to be seperated from each other. If these lands become seperated by ocean (and not just coastal tiles) then they should be treated as seperate land masses by the resource generator. In short, you may get more land masses than you intended. The odds of this happening are much more likely with coastlines set to rugged but still possible (I've never seen it) under standard coatlines.
#
# The Ocean and Distance between land masses have been swapped around on the custom menu screen. This is so that the options related to the ratio of ocean tiles to land tiles are placed in order of importance:
# 1) Seperation Between Land Masses - land will only be placed if it doesn't go to close to other land masses. If the minimum seperation is sufficiently large enough there may not be enough space to reach the ocean percentage. For example, if the minimum seperation between land masses is set to 12 and the ocean percentage is set to 20%, the code will stop placing land tiles long before 80% of the map has been assigned a land tile. This does not include Pangaeas since the land mass seperation only affects the placement of tiles from different land masses.
# 2) Ocean: If the land mass seperation leaves enough space for the ocean/land ratio to be met then it should happen.
# 3) Coasts: The ruggedness of the coast depends on how much extra space there is for land after the ocean/land ratio set by the ocean option has been met. If there is no more space the land masses will be smooth. Selecting rugged will only have a noticeable affect beyond that of standard if there is plenty of room for extra land.
#
# Resources:
#
# Added options to give control over the quantities of strategic, health, and luxury resources. Ivory, spices, sugar, and wine are classified as luxuries.
# Improved land mass placement of isolated resources. Resources selected for isolation are far less likely to appear on multiple land masses. The placement of resources on multiple land masses due to the civ placement code is unaffected.
# Aquatic resources should no longer appear on lakes.
#-----------------------------------------------------------------------------------------------#
# 2.4:
#
# Lands:
#
# Added a third choice to the Coastlines option. Rougher' produces more rugged coasts than standard but smoother coasts than rugged. Like the other two choices available, the effectiveness of the option is based on the choices selected for Land Mass Seperation and Ocean.
#
# Resources:
#
# Added 'custom' choice to all resource options which allows a Python user to much more easily edit how resources are placed. The code which needs to be edited can be found under the heading CUSTOMISING RESOURCE PLACEMENT at the top of the LandMasses.py map script. Instructions can be found there explaining how to edit the resource placement.
# Custom 'Resource LandMasses' allows the user to select the resources which will be limited to one continent. By default, custom produces the same results as LandMasses.
# Custom 'Resource Tiles' allows the user to select the tiles a resource can be placed on. By default, custom produces the same results as LandMasses.
# Custom 'Strategic Quantities' allows the user to select the number of each strategic resource. By default, custom produces the same results as normal strategic resources.
# Custom 'Health Resources' and custom 'Luxury Resources' options work in the same way as custom 'Strategic Resources.
#-----------------------------------------------------------------------------------------------#
# 2.5:
#
# Resources:
#
# Customising 'ResourceTiles' now allows the user to distinguish between coastal and ocean tiles.
# Customising 'Resource Land Masses' now allows water based resources to be assigned to particular land masses. Previously,
# customising the options so that water based resources were isolated to single land masses was ineffective.
# Introduced two new options: 'How many Land Masses' and 'Let Resources Clump'.
#
# 'How Many Land Masses':
# If a resource is selected to be isolated - not placed on all land masses - this options allows the user to determine how many the resource will be placed on.
# - Assigned to x land masses: Isolated resources are placed on x of the land masses. If x exceeds the number of land masses generated then no resources will be isolated; all resources selected for isolation may be generated on all land masses. Note that x only goes as far as 8. An alternative choice (listed below) exists if the user wants to place a resource on 9 out of 10 land masses.
# - Assigned to half the land masses: Isolated resources are placed on half of the generated land masses.
# - Assigned to all but one land mass: But for one land mass, an isolated resource may be placed anywhere.
# - Custom: Like all resource options, the ability to customise the effects of this option are available to users willing to edit this script with Python. Custom allows different resources to be isolated to different numbers of land masses (though the user must also make sure to set the appropriate resources to be isolated in the first place). Left unedited, this choice will assign isolated resources to just one land mass.
# Note that the map script is not guaranteed to generate the predefined number of landmasses so setting this option to 'assigned to x land masses' where x is a larger number may simply allow isolated resource to be generated everywhere.
#
# 'Let Resources Clump':
# This determines whether or not two of any one resource are allowed to be placed near each other.
# If clumping is disabled for a resource then a city's fat cross may only contain two of the resource in the following situations:
# 1) .......
# ..rYY..
# .YYYYY.
# .YYcYY.
# .YYYYY.
# ..YYYr.
# .......
#
# 2) .......
# ..YYY..
# .rYYYY.
# .YYcYY.
# .YYYYY.
# ..YYYr.
# .......
# where 'r' marks a resource, 'Y' marks a tile inside the city's fat cross, and 'c' marks the city tile.
# Options:
# - Standard: Attempts to approximate standard resource placement. Only luxury resources may be placed near each other.
# - Strategic: Only strategic resources may be placed near each other.
# - Health: Only health resources may be placed near each other.
# - Luxury: Only luxury resources may be placed near each other.
# - Strategic/Health: Only strategic and health resources may be placed near each other.
# - Strategic/Luxury: Only strategic and luxury resources may be placed near each other.
# - Health/Luxury: Only health and luxury resources may be placed near each other.
# - Strategic/Health/Luxury: All resources may be placed near each other.
# - Custom: The map script can be easily edited (as with other resource options) so that the user can decide which resources may be clumped. 'Custom' uses the user-edited clumped resources instead of one of the predefined options. If no editing has taken place, 'custom' uses the 'standard' option.
#-----------------------------------------------------------------------------------------------#
# 2.6
#
# Lands:
#
# Reduced the options 'Mountain Ranges:' and 'Changes in Altitude' down to a single option. There is no longer a range of options for choosing the degree to which hills and peaks congregate together, just the choice as to whether or not they should clump together.
#
# Terrain:
#
# Reworked terrain options. Fantasy option excluded, all terrain types use the standard terrain generator but apply different values to certain variables.
# Options:
# - Cool, Temperate, Warm: These determine how far from the equator ice and tundra are generated. Temperate generates both terrains at the normal latitudes. Cool generates both terrains closer to the equator. Warm generates both terrains further from the equator.
# - More desert, normal desert, less desert: How many desert tiles are generated. More desert generates roughly 50% more than usual. Less desert generates roughly 50% less than usual.
# - More plains, normal plains, less plains: How many plains tiles are generated. More plains generates roughly 50% more than usual. Less plains generates roughly 50% less than usual.
# - Fantasy: Places all land terrains randomly. Water terrain - coast or ocean - remain unchanged.
#
# Terrain Homogeneity determines how clumped each terrain type is. This option is ignored if Fantasy has been chosen.
#
# Features:
#
# An option, "Woodlands:", is now available to control the amount of forest and jungle features generated. Similar to the newly added terrain options, this works by giving the standard feature generator different values to work with.
# - More jungle, normal jungle, less juugle: More jungle generates more jungle than normal. Less jungle generates less jungle than normal.
# - More forest, normal forest, less forest: More forest generates more forests than normal. Less forest generates less forests than normal.
#
# An option, "Flood Plains:", is now available to give some control over placement of flood plains.
# - 'Normal flood plains placement' only places on flat, riverside desert tiles.
# - 'Extra flood plains' also places flood plains on flat, riverside grassland, plains, and tundra tiles.
#
# Resources:
#
# Setting both 'Resource Land Masses' and 'Resource Tiles' to 'Standard' will no longer deactivate all other resource options. Setting 'Resources' to 'Standard - ignore resource options' is now the only way to do this.
#-----------------------------------------------------------------------------------------------#
# 2.7
#
# Lands:
#
# Corrected an error which resulted in more than the selected percentage of ocean being generated. Previously, the amount of land generated was a fraction of (width - 4)*(height - 4). Now the amount of land generated is a fraction of width*height. This can lead to a lot more land being generated than previously. Since the amount of hills and peaks generated is also determined by the amount of land generated, more of these will be generated, though the percentage should be unchanged. The user may prefer to switch the ocean setting to a higher percentage.
#
# Reworked the code placing the initial tile of each continent. Alterations:
# - generating a small number of continents on a larger map size may take longer than previously.
# - generating a large number of continents should take a lot quicker than previously.
# - it is more likely that all requested continents are placed.
# - land masses should be more varied in shape.
#
# Added a new option, "Continent Placement:":
# - 'Normal continent placement' will place the initial tile of each continent randomly.
# - 'More rounded land masses' will generate land masses which tend to be more circular.
# - 'More snaky land masses' will generate land masses which tend to be longer and more stretched.
# Notes:
# 1) This option only affects land masses which contain 3 continents or more:
# - Selecting 2 land masses, 4 continents, and evenly distributed continents will leave the land mass shape unaffected by the Continent Placement options 'more rounded land masses' and 'more snaky land masses'.
# - Selecting 2 land masses, 6 continents, and evenly distributed continents will mean that the placement of the first tile of the last continent on each land mass will be affected by the Continent Placement options 'more rounded land masses' and 'more snake land masses'.
# - Selecting 2 land masses, 5 continents, and evenly distributed continents will mean that the placement of the first tile of the last continent on one land mass will be affected by the Continent Placement options 'more rounded land masses' and 'more snake land masses'.
# 2) The more continents placed on a land mass, the more noticeable the affects of the options 'more rounded land masses' and 'more snaky land masses'.
# - Selecting 2 land masses, 20 continents, and evenly distributed continents will make the affects of 'more rounded land masses' and 'more snaky land masses' more obvious than if 2 land masses, 8 continents, and evenly distributed continents, or 5 land masses, 20 continents, and evenly distributed continents had been selected.
#-----------------------------------------------------------------------------------------------#
# 2.71
#
# Lands:
#
# Since pre-2.7 LandMasses rarely produced more than 7 continents on huge maps but LandMasses 2.7 can easily generate 20 continents on a standard size map, mountain ranges in maps generated with a large numbers of continents for every land mass aren't as well defined as they were previously (which, I think, removes any point in including that feature). A new option has been added to the Mountain Ranges option called 'ranges' (what was previously called ranges has been renamed 'all ranges').
# - ranges will select between 3 and 5 continents which will increase the altitude of land plots already created by other continents.
# - all ranges will, as before, cause all continents to increase the altitude of any land plot already created by other continents.
# Note:
# 1) using ranges, a mountain range produced between two continents may not be as clearly defined as one produced in pre-2.7 LandMasses since the extra altitude may only be generated by one of the two continents.
#-----------------------------------------------------------------------------------------------#
# 2.72:
#
# Lands:
#
# Increased the likelihood of Indonesia-like continent-to-archipelago formations being generated under certain settings More specifically, when Coastlines is set to 'rougher' there is an increased chance of such formations being generated and when Coastlines is set to rugged there is a further increased chance of such formations being generated.
#-----------------------------------------------------------------------------------------------#
# 2.73:
#
# Map Size:
#
# Introduced new "Min. Height" choice; 'Normal ratio of width to height'. This allows the user to select a width and an apporpriate height will be chosen so that the ratio of the map's width and height are similar to that generated in the Continent map script.
# The height chosen will be between 3/5 (0.6) and 5/8 (0.625) of the width - the minimum and maximum ratios used by the Continent map script (the ratio changes with different sizes).
#
# Increased the maximum value for the map width to 308 (from 240). This won't generate maps with a height of 240 using the 'Normal ratio of width to height' option but it allows that option to generate maps with an area equal to that of a 240x240 map.
#
# Lands:
#
# Reworked how continent-to-archipelago formations are generated.
#
# General Map Options:
#
# Removed Sealevel option (the one that's standard with most maps) since it wasn't doing anything.
#
# Removed standard 'Random' choice from all options. Introduced an alternative set of random options:
# - Continent Distribution: 'Random' will select from all available choices.
# - Continent Placement: 'Random' will select from all available choices.
# - Coastlines: 'Random' will select from all available choices.
# - Hills: 2 random options
# 1) 'Random' chooses between 12.5% and 34.5% of land to be hills.
# 2) 'Random highlands' chooses between 40% and 50% of land to be hills.
# - Peaks: 2 random options
# 1) 'Random' chooses between 0% and 14% of land to be peaks.
# 2) 'Random highlands' chooses between 20% and 30% of land to be peaks.
# - Mountain Ranges: 'Random' will select from all available choices.
# - Terrain: 'Random' will select from all available options except 'fantasy'.
# - Terrain Homogeneity: 'Random' will seleect from all available options.
# - Woodlands: 'Random' will select from all available options.
# - Resource Land Masses: 'Random' will select from all available options except 'custom'
# - How Many Land Masses: 'Random' will isolate resources to between 1 and (actual number of land masses - 1) land masses.
# - Strategic Quantities: 'Random' will select between 'few strategic resources', 'normal strategic resources', and 'many strategic resources'.
# - Health Quantities: 'Random' will select between 'few health resources', 'normal health resources', and 'many health resources'.
# - Luxury Quantities: 'Random' will select between 'few luxury resources', 'normal luxury resources', and 'many luxury resources'.
#
# Some options - usually because they are structured so that a random option is pointless or because the user is much more likely to have a definite idea on what they want from the option - do not recieve a random option. These options are:
# - Min./Max. Width
# - Min./Max. Height
# - Min./Max. Land Masses
# - Min./Max. Continents
# - Min./Max. Land Mass Buffer
# - Min./Max. Ocean
# - Flood Plains
# - Resources
# - Resource Tiles
# - Let Resources Clump
# - Print Map Details
#
# New option 'Print Map Details' so that option choices (including random selections) may be printed.
# - No: Selected options are not printed.
# - Yes: Details about the generated map are printed to C:\Program Files\Firaxis Games\Map Options. This file can be opened with Notepad. This file is overwritten everytime a new map is generated.
# Note that the selected option for 'Let Resources Clump:' is not listed.
#-----------------------------------------------------------------------------------------------#
# 2.74:
#
# Lands:
#
# Fixed an error that arose when the number of continents selected for generating mountain ranges (using 'ranges') was one less than the number of continents generated.
#-----------------------------------------------------------------------------------------------#
# 2.75:
#
# Lands:
#
# Fixed an error that arose when only one continent was to be generated.
#
# Resources:
#
# Fixed an error that arose when 'Resources' was set to 'standard - ignore resource options'.

Thedrin
Mar 24, 2007, 07:03 AM
Screenshots:

Standard size.
2-4 landmasses.
5-8 continents.
Randomly ditributed continents.
60-70% ocean.
No overseas trade before astronomy.
Normal hills and peaks.
Mountain ranges.
Normal changes in altitude.

http://forums.civfanatics.com/uploads/11071/Civ4ScreenShot0006.JPG
http://forums.civfanatics.com/uploads/11071/Civ4ScreenShot0007.JPG
http://forums.civfanatics.com/uploads/11071/Civ4ScreenShot0008.JPG

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

Standard size.
3-6 landmasses.
6-10 continents.
Randomly ditributed continents.
40-80% ocean.
4 tiles of seperating land masses - No overseas trade before astronomy.
Normal hills and peaks.
Mountain ranges.
Normal changes in altitude.

http://forums.civfanatics.com/uploads/11071/Civ4ScreenShot0009.JPG
http://forums.civfanatics.com/uploads/11071/Civ4ScreenShot0010.JPG
http://forums.civfanatics.com/uploads/11071/Civ4ScreenShot0011.JPG

Thedrin
Mar 25, 2007, 12:20 PM
New version available at the top of the page.

Changes:

# Terrain changes:
#
# Selecting Rocky climate no longer affects the terrain.
# Introduced three new hill and peaks setting; Highlands few, Highlands normal, and Highlands many. I've only used estimates to determine the appropriate percentages in these cases. If someone has the actual figures I'd appreciate them.
#
# Resource changes:
#
# Created a master resource option, 'Resources'.
# - Standard will use the standard CivIV recourse placement code. The Resource Land Mass, Resource Tiles, and
# Resource Quantities options are rendered ineffective.
# - Custom activates the Resource Land Mass, Resource Tiles, and Resource Quantities options.
#
# Divided resources options into two:
# - Resource Land Mass
# - Resource Tiles
# Resource Land Mass determines which resources are assigned to specific land masses.
# - 'Standard' assigns health and luxury resources to specific land masses.
# - 'LandMasses' assigns the same resources to specific land masses as it did previously.
# - 'LandMasses, isolate horses' is the same as 'LandMasses' but it also assigns horses to a specific land mass.
# - 'No isolated resources' allows all resources to be placed on all land masses.
# Resource Tiles determines which tiles a resource can be assigned to.
# - 'Standard' assigns resources to normal CivIV locations.
# - 'LandMasses' assigns the same resources to the same tile types as it did previously.
# - 'Crazy' assigns a resource to any tile which can be improved to take advantage of the resource.
# Setting both options to 'Standard' will cause LandMasses to use the default resource placement code.
# Setting only one option to 'Standard' will cause LandMasses to attempt to mimic the effects of the default resource placement code.
#
# Added the option 'Resource Quantities'. This allows the number of resources to be altered.
# - 'Normal resources': the no. of resources is between half the no. of players and one short of the no. of players.
# - 'Few resources': Only half as much of each resource are generated.
# - 'Many resources': Twice as much of each resources are generated.
# Further notes on this option:
# - if 'Standard' has been set for both Resource Land Mass and Resource Tiles then Resource Quantities is ignored.
# - The script may not place all of the resources that it sets out to.
# - The fewer resources generated, the more likely that the civ starting placement code may add in resources. This will noticably reduce the effects of some of the choices for Resource Land Mass, 'LandMasses', 'LandMasses, isolate horses', and, if 'Standard' has not been selected for Resource Tiles, 'Standard'.
#
# The odds of a resource being placed on any given tile reduce as the number of that resource in the fat cross centred around that tile increase.
# The odds of a resource being placed on any given tile reduce as the number of all resources in the fat cross centred around that tile increase.

Thedrin
Mar 25, 2007, 03:07 PM
The code posted earlier today contained an error which affected the distance between land masses. The corrected map script has now been uploaded.

Thedrin
Apr 02, 2007, 08:17 AM
New version uploaded and available at the top of the page.

Changes:

# Beginning work on terrain options. Since my previous undocumented attempt at this (a few months ago) was a spectacular failure, I'll be going very slowly. For now only a few, unlikely-to-be-used, options are included.
#
# Terrain:
# - Standard: uses normal terrain generation. Deactivates all terrain options.
# - Custom: Activates all terrain options.
# Terrain Type:
# - all grass, all plains, all desert, all tundra, and all snow.
# - fantasy - randomly placed terrrain tiles.
#
# Resources:
# Aquatic resources will no longer be generated beneath ice.

Good Sauce
Apr 02, 2007, 12:34 PM
I like where you're going with this, but I've tried various options and I either CTD or get a single tile island with all the civs crammed onto it.

Thedrin
Apr 02, 2007, 02:18 PM
Edit: newly uploaded code available at the top of the thread which may fix your problem, Good Sauce. The next post after this one details the change made. If it doesn't work the problem may be listed in this post.

#-----------------------------------------------------------------------------------------------#

What options are you selecting? Is it the result of a specific set of option choices or does it always occur?

The problem seems to be in the land generation code. Going by the problems you have it could be any of the following:

1) Corrupted download.
2) I checked the generation of Pangaeas (since you said all civs were generated on a single one tile island rather than multiple single tile islands). I had problems with it as well. Pangaeas are generated using different code to multiple land mass maps. It did used to work but I haven't deliberately made an alteration to it since December. Maybe I accidently changed something in the last fortnight. Edit: More specifically the problem occurs when only 1 continent is to be generated. Generating 1 land mass with multiple continents should work fine.
3) You're selecting two of the following: too many land masses, too large a seperation between land masses, or too small a map size. Selecting a duel sized map (40x24), 10 landmasses, and 12 tiles of seperation will never work but the combinations of each of these options that can be combined succesfully are untested. It is probably never worth selecting a landmass seperation value greater than 'no overseas trade before astronomy'.
4) You're trying to create a really massive map. It's a couple of months since I last looked at the land generating code in detail but as I recall, the generation of very large maps could stand to be a lot more efficient, where very large would be (in my experience) huge (128x80) and above.

I'll look into the generation of Pangaea maps further but, as a test, would you be able to try the following please?

Size: Duel (2 civs)
Min Width: 64 - Continents Small
Max Width: no variation
Min Height: 40 - Continents Small
Max Height: no variation
Min LandMasses: 2 landmasses
Max LandMasses: no variation
Min Continents: 5 continents
Max Continents: no variation
Continent Distribution: evenly ...
Min. LandMass Buffer: No overseas trade before astronomy
Max. LandMass Buffer: no variation
Hills: normal
Peaks: normal
Mountain Ranges: Yes
Terrain: standard - ignore terrain options
Resources: standard - ignore resource options

A further question. If you generate a map with only single tile islands again could you tell me both how many landmasses and continents you had selected and how many single tile islands were generated.

Thanks.

Thedrin
Apr 02, 2007, 03:10 PM
Corrected a [really really] dumb mistake preventing the generation of single land mass, single continent pangaeas.

Good Sauce:
I like where you're going with this, but I've tried various options and I either CTD or get a single tile island with all the civs crammed onto it.

At no point in map generation should the code attempt to generate just one single tile island unless the user has tried to generate a single land mass, single continent pangaea. The problem you have with the code may lie elsewhere but I'm hoping the newly uploaded code fixes your problem.

Thedrin
Apr 04, 2007, 12:05 PM
New version uploaded and available at the top of the page.

Changes:

# Lands:
#
# Added 'Coastlines' option. A rugged coastline increses the number of islands and archipelagos.
# - Standard: Prior to the introduction of the coastlines option, this was the usual implementation.
# - Rugged: Lots of coastal islands. Lands that were narrow under the standard setting may be broken up into archipelagos.
# Notes:
# - the effectiveness of this option depends a great deal on how much space is designated towards land, ocean, and seperation between landmasses. Selecting a low ocean percentage and a high seperation between land masses will reduce the effects of the coastline option to irrelevance.
# - it is possible for large pieces of land which previously formed a single landmass to be seperated from each other. If these lands become seperated by ocean (and not just coastal tiles) then they should be treated as seperate land masses by the resource generator. In short, you may get more land masses than you intended. The odds of this happening are much more likely with coastlines set to rugged but still possible (I've never seen it) under standard coatlines.
#
# The Ocean and Distance between land masses have been swapped around on the custom menu screen. This is so that the options related to the ratio of ocean tiles to land tiles are placed in order of importance:
# 1) Seperation Between Land Masses - land will only be placed if it doesn't go to close to other land masses. If the minimum seperation is sufficiently large enough there may not be enough space to reach the ocean percentage. For example, if the minimum seperation between land masses is set to 12 and the ocean percentage is set to 20%, the code will stop placing land tiles long before 80% of the map has been assigned a land tile. This does not include Pangaeas since the land mass seperation only affects the placement of tiles from different land masses.
# 2) Ocean: If the land mass seperation leaves enough space for the ocean/land ratio to be met then it should happen.
# 3) Coasts: The ruggedness of the coast depends on how much extra space there is for land after the ocean/land ratio set by the ocean option has been met. If there is no more space the land masses will be smooth. Selecting rugged will only have a noticeable affect beyond that of standard if there is plenty of room for extra land.
#
# Resources:
#
# Added options to give control over the quantities of strategic, health, and luxury resources. Ivory, spices, sugar, and wine are classified as luxuries.
# Improved land mass placement of isolated resources. Resources selected for isolation are far less likely to appear on multiple land masses. The placement of resources on multiple land masses due to the civ placement code is unaffected.
# Aquatic resources should no longer appear on lakes.

#-----------------------------------------------------------------------------------------------#

Screenshots to demonstrate how the effect of the coastline option changes with ocean and land mass seperation:

All of the following images are of maps with the following settings:

Standard size
3 land masses
7 continents
Evenly distributed continents

http://forums.civfanatics.com/uploads/11071/Civ4ScreenShot0015.JPG http://forums.civfanatics.com/uploads/11071/Civ4ScreenShot0012.JPG
12 tiles of seperation between land masses, 50% ocean, standard coastline on the left, rugged coastline on the right.

http://forums.civfanatics.com/uploads/11071/Civ4ScreenShot0016.JPG http://forums.civfanatics.com/uploads/11071/Civ4ScreenShot0013.JPG
12 tiles of seperation between land masses, 70% ocean, standard coastline on the left, rugged coastline on the right.

http://forums.civfanatics.com/uploads/11071/Civ4ScreenShot0017.JPG http://forums.civfanatics.com/uploads/11071/Civ4ScreenShot0014.JPG
7 tiles of seperation between land masses, 70% ocean, standard coastline on the left, rugged coastline on the right.

Seth145
Apr 06, 2007, 05:30 PM
Hi

Tried your map script through custom game and no matter what combination of continents, every start has every one starting next to each other.

Thedrin
Apr 06, 2007, 08:38 PM
Ok, thanks for letting me know.

Are no continents being generated causing all civs to be generated on a single tile or are the continents being formed with civs being placed very closely to each other?

The only two responses in this thread report a problem (which may be the same problem). Is this universal or has anyone gotten this script working? The script works fine for me so I really don't know what's going on and, for now, don't know how to go about fixing it.

Also, I did recieve positive reports on version 1.2 (at the top of the thread) back in December (at another site). But for the lack of resource options it's almost identical.

SGDave
Apr 07, 2007, 01:35 AM
The new version script is working fine for me, thanks for your hard work Thedrin! :goodjob:

A couple of requests though, is it possible to have an option where the distance between different landmasses is random (in a certain range), rather than the current fixed separation distance between all landmasses when the map is generated? Also how about a middle option for the rugged coastline, e.g not so rugged as the rugged option now? Thanks!

Thedrin
Apr 07, 2007, 01:54 AM
Thank you.

Land mass seperation:

This would be possible. Hadn't thought of that before. It would be especially useful for high land/low ocean content maps which tend to feature highly parallel coastlines. It should also allow for more rugged coastlines without requiring the use of the 'rugged' option.

Coastlines:

Rugged is only a recently concieved idea so I'm not yet sure how far I can go with that it - I think it's range is limited. It may be possible (and I will be looking into it) but for the moment the best advice I can give is to experiment with the different ocean settings. But, as I said above, adding new range choices to the land mass seperation option should increase coast line ruggedness.

Thorn
Apr 07, 2007, 07:04 AM
Hey Thedrin,

This has become my favorite map script! Awesome job! :goodjob:

Another option I think would be cool is if you could have even more control over the resource placement, especially the strategic ones. Would there be a way to specify the exact number of resources to place? For instance, set Uranium = 5 to randomly place 5 Uraniums on the map. Oil = 7, Iron = n, etc. etc. Another option would be to restrict the placement of those resources even further. Example: Of the 5 Uraniums, only put them on x of n continents. That is, Uranium = 5, then randomly place the 5 Uraniums only on 2 (of the 6) continents.

The random distance between landmasses mentioned below sounds interesting as well.

:thanx:

Thedrin
Apr 07, 2007, 08:37 AM
On resources:

I've thought about how to do these kind of thing previously and, without adding huge (really - loads and loads of options) quantities of extra options to the custom game menu, I don't think it's possible. I'm not sure I want to put in so many options but I would certainly consider adding an easy-to-find-and-edit piece of code to the beginning of the script. This would require a Python editor (I use IDLE). It's probably possible to include a Word file in the zip file. This would be much easier for the usr to take advantage of.

This applies both to setting the number of a specific resource and the continent distribution of resources. It can also apply to what type of tiles a resource can be placed upon.

Thorn
Apr 07, 2007, 11:57 AM
but I would certainly consider adding an easy-to-find-and-edit piece of code to the beginning of the script. This would require a Python editor (I use IDLE). It's probably possible to include a Word file in the zip file. This would be much easier for the usr to take advantage of.

Yes, if you could point me in the right direction I will try to customize your original .py file to add the Resource option I described above. ;)

Thedrin
Apr 08, 2007, 11:05 PM
Land Mass Seperation:

I didn't alter the way this works. I tested out the change and realised that it produced coastlines that were effectively the same.

Detailed reason. LandMasses places the required percentage of land and then fills in all lakes (but not inland seas) that have formed. This increases the amount of land above the required level so land tiles are removed from the coast. Say the change had been made and you asked the script to produce a map where continents are seperated by between 7 and 9 tiles of ocean. This would effectively be the same as asking the current script to produce a map where continents are seperated by 7 tiles of ocean. The difference would be that occasional tiles wouldn't be placed (due to some requiring a 9 tile seperation) so that there would be less land tiles to remove from the coast later on.

Thedrin
Apr 08, 2007, 11:06 PM
New version uploaded and available at the top of the page.

Changes:

# Lands:
#
# Added a third choice to the Coastlines option. Rougher' produces more rugged coasts than standard but smoother coasts than rugged. Like the other two choices available, the effectiveness of the option is based on the choices selected for Land Mass Seperation and Ocean.
#
# Resources:
#
# Added 'custom' choice to all resource options which allows a Python user to much more easily edit how resources are placed. The code which needs to be edited can be found under the heading CUSTOMISING RESOURCE PLACEMENT at the top of the LandMasses.py map script. Instructions can be found there explaining how to edit the resource placement.
# Custom 'Resource LandMasses' allows the user to select the resources which will be limited to one continent. By default, custom produces the same results as LandMasses.
# Custom 'Resource Tiles' allows the user to select the tiles a resource can be placed on. By default, custom produces the same results as LandMasses.
# Custom 'Strategic Quantities' allows the user to select the number of each strategic resource. By default, custom produces the same results as normal strategic resources.
# Custom 'Health Resources' and custom 'Luxury Resources' options work in the same way as custom 'Strategic Resources.

To make use of the customisable resource options you'll need a Python editor. I use the one found here:

Python (http://www.python.org/download/)

1) Download python from the above link.
2) Go to
C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Public Maps
or
C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Warlords\Public Maps
depending on which version of CivIV you are using. LandMasses.py should be in the folder you go to.
3) Right click LandMasses.py. Select 'Edit with IDLE'.
4) The heading CUSTOMISING RESOURCE PLACEMENT (line 18) marks the beginning of the instructions for customising resource placement.

Thorn
Apr 09, 2007, 09:55 AM
Wow, thanks again! Excellent job of commenting.:bowdown:
I'll try playing around with this after work to see if I can distribute the resources the way I want.

[Thorn goes back to watching the clock...]:(

Thedrin
Apr 11, 2007, 06:28 AM
New version uploaded and available at the top of the page.

Changes:

# Resources:
#
# Customising 'ResourceTiles' now allows the user to distinguish between coastal and ocean tiles.
# Customising 'Resource Land Masses' now allows water based resources to be assigned to particular land masses. Previously, customising the options so that water based resources were isolated to single land masses was ineffective.
# Introduced two new options: 'How many Land Masses' and 'Let Resources Clump'.
#
# 'How Many Land Masses':
# If a resource is selected to be isolated - not placed on all land masses - this options allows the user to determine how many the resource will be placed on.
# - Assigned to x land masses: Isolated resources are placed on x of the land masses. If x exceeds the number of land masses generated then no resources will be isolated; all resources selected for isolation may be generated on all land masses. Note that x only goes as far as 8. An alternative choice (listed below) exists if the user wants to place a resource on 9 out of 10 land masses.
# - Assigned to half the land masses: Isolated resources are placed on half of the generated land masses.
# - Assigned to all but one land mass: But for one land mass, an isolated resource may be placed anywhere.
# - Custom: Like all resource options, the ability to customise the effects of this option are available to users willing to edit this script with Python. Custom allows different resources to be isolated to different numbers of land masses (though the user must also make sure to set the appropriate resources to be isolated in the first place). Left unedited, this choice will assign isolated resources to just one land mass.
# Note that the map script is not guaranteed to generate the predefined number of landmasses so setting this option to 'assigned to x land masses' where x is a larger number may simply allow isolated resource to be generated everywhere.
#
# 'Let Resources Clump':
# This determines whether or not two of any one resource are allowed to be placed near each other.
# If clumping is disabled for a resource then a city's fat cross may only contain two of the resource in the following situations:
# 1) .......
# ..rYY..
# .YYYYY.
# .YYcYY.
# .YYYYY.
# ..YYYr.
# .......
#
# 2) .......
# ..YYY..
# .rYYYY.
# .YYcYY.
# .YYYYY.
# ..YYYr.
# .......
# where 'r' marks a resource, 'Y' marks a tile inside the city's fat cross, and 'c' marks the city tile.
# Options:
# - Standard: Attempts to approximate standard resource placement. Only luxury resources may be placed near each other.
# - Strategic: Only strategic resources may be placed near each other.
# - Health: Only health resources may be placed near each other.
# - Luxury: Only luxury resources may be placed near each other.
# - Strategic/Health: Only strategic and health resources may be placed near each other.
# - Strategic/Luxury: Only strategic and luxury resources may be placed near each other.
# - Health/Luxury: Only health and luxury resources may be placed near each other.
# - Strategic/Health/Luxury: All resources may be placed near each other.
# - Custom: The map script can be easily edited (as with other resource options) so that the user can decide which resources may be clumped. 'Custom' uses the user-edited clumped resources instead of one of the predefined options. If no editing has taken place, 'custom' uses the 'standard' option.

Thedrin
Apr 19, 2007, 10:59 AM
New version uploaded and available at the top of the thread:

Changes:

# Lands:
#
# Reduced the options 'Mountain Ranges:' and 'Changes in Altitude' down to a single option. There is no longer a range of options for choosing the degree to which hills and peaks congregate together, just the choice as to whether or not they should clump together.
#
# Terrain:
#
# Reworked terrain options. Fantasy option excluded, all terrain types use the standard terrain generator but apply different values to certain variables.
# Options:
# - Cool, Temperate, Warm: These determine how far from the equator ice and tundra are generated. Temperate generates both terrains at the normal latitudes. Cool generates both terrains closer to the equator. Warm generates both terrains further from the equator.
# - More desert, normal desert, less desert: How many desert tiles are generated. More desert generates roughly 50% more than usual. Less desert generates roughly 50% less than usual.
# - More plains, normal plains, less plains: How many plains tiles are generated. More plains generates roughly 50% more than usual. Less plains generates roughly 50% less than usual.
# - Fantasy: Places all land terrains randomly. Water terrain - coast or ocean - remain unchanged.
#
# Terrain Homogeneity determines how clumped each terrain type is. This option is ignored if Fantasy has been chosen.
#
# Features:
#
# An option, "Woodlands:", is now available to control the amount of forest and jungle features generated. Similar to the newly added terrain options, this works by giving the standard feature generator different values to work with.
# - More jungle, normal jungle, less juugle: More jungle generates more jungle than normal. Less jungle generates less jungle than normal.
# - More forest, normal forest, less forest: More forest generates more forests than normal. Less forest generates less forests than normal.
#
# An option, "Flood Plains:", is now available to give some control over placement of flood plains.
# - 'Normal flood plains placement' only places on flat, riverside desert tiles.
# - 'Extra flood plains' also places flood plains on flat, riverside grassland, plains, and tundra tiles.
#
# Resources:
#
# Setting both 'Resource Land Masses' and 'Resource Tiles' to 'Standard' will no longer deactivate all other resource options. Setting 'Resources' to 'Standard - ignore resource options' is now the only way to do this.

SGDave
Apr 20, 2007, 06:37 AM
Hi Thedrin, the landmasses link still seems to be to version 2.5 ?

Thedrin
Apr 20, 2007, 10:17 AM
Thanks. I just uploaded the correct file.

CanuckSoldier
Apr 25, 2007, 08:15 AM
Looks like a nice map script Thedrin, but could you do a simple readme description for each staging room function, much like the original map guide done by Sirian. Your map has alot of promise for multiplayer I think as on Cust Con, you didn't have all these options. I'm not sure if i missed it, but is there options for putting teams together on the landmasses?

CS

Thedrin
Apr 25, 2007, 09:47 AM
I haven't used multiplayer in a long time so some of the terms are a bit foreign to me.

staging room function

My guess is that a staging room function is the same as a map option in the single player custom game set up menu. Let me know if this is inaccurate. If it's accurate, as far as I'm aware all of the options are described in the read me that should be contained within the zip file that LandMasses comes in.

If I've missed an option in the read me or if an option isn't adequately described, let me know and I'll expand on it here and include further details in the next version of the read me.

I'm not sure if i missed it, but is there options for putting teams together on the landmasses?

Putting all members of a multiple-civ team on a single continent? Currently LandMasses makes use of basic civ placement code so this option isn't yet available. In the short term I could look into giving the option to use the civ placement code from custom continents but I have no idea if this will work well. Long term, Id like to be putting together a civ placement code which would allow for particular civ placement arrangements and terra style games.

The next version may not go up for a while since I'm starting a new job soon and won't have as much time to work on the map script as I've had lately. What little time I'm currently putting into LandMasses is going into reworking continent placement. I'm aiming for faster land generation, more varied continents, and to increase the number of continents that can be placed on a map (not so the requested number of continents can extend past 20 but because currently it doesn't always place all of the requested continents).

lord_joakim
Apr 30, 2007, 12:44 PM
FINALLY a proper map script... Instead of that continents thing. Great job :goodjob:

CanuckSoldier
Apr 30, 2007, 10:45 PM
Well hopefully you get the chance to add team start options for this map, that is the only thing keeping it from being a good MP map.

CS

Thedrin
May 05, 2007, 07:03 AM
New version uploaded and available at the top of the thread:

Changes (no civ placement options added in so far):

# Lands:
#
# Corrected an error which resulted in more than the selected percentage of ocean being generated. Previously, the amount of land generated was a fraction of (width - 4)*(height - 4). Now the amount of land generated is a fraction of width*height. This can lead to a lot more land being generated than previously. Since the amount of hills and peaks generated is also determined by the amount of land generated, more of these will be generated, though the percentage should be unchanged. The user may prefer to switch the ocean setting to a higher percentage.
#
# Reworked the code placing the initial tile of each continent. Alterations:
# - generating a small number of continents on a larger map size may take longer than previously.
# - generating a large number of continents should take a lot quicker than previously.
# - it is more likely that all requested continents are placed.
# - land masses should be more varied in shape.
#
# Added a new option, "Continent Placement:":
# - 'Normal continent placement' will place the initial tile of each continent randomly.
# - 'More rounded land masses' will generate land masses which tend to be more circular.
# - 'More snaky land masses' will generate land masses which tend to be longer and more stretched.
# Notes:
# 1) This option only affects land masses which contain 3 continents or more:
# - Selecting 2 land masses, 4 continents, and evenly distributed continents will leave the land mass shape unaffected by the Continent Placement options 'more rounded land masses' and 'more snaky land masses'.
# - Selecting 2 land masses, 6 continents, and evenly distributed continents will mean that the placement of the first tile of the last continent on each land mass will be affected by the Continent Placement options 'more rounded land masses' and 'more snake land masses'.
# - Selecting 2 land masses, 5 continents, and evenly distributed continents will mean that the placement of the first tile of the last continent on one land mass will be affected by the Continent Placement options 'more rounded land masses' and 'more snake land masses'.
# 2) The more continents placed on a land mass, the more noticeable the affects of the options 'more rounded land masses' and 'more snaky land masses'.
# - Selecting 2 land masses, 20 continents, and evenly distributed continents will make the affects of 'more rounded land masses' and 'more snaky land masses' more obvious than if 2 land masses, 8 continents, and evenly distributed continents, or 5 land masses, 20 continents, and evenly distributed continents had been selected.

Thedrin
May 06, 2007, 12:55 AM
New version uploaded and available at the top of the thread:

Changes:

# Lands:
#
# Since pre-2.7 LandMasses rarely produced more than 7 continents on huge maps but LandMasses 2.7 can easily generate 20 continents on a standard size map, mountain ranges in maps generated with a large numbers of continents for every land mass aren't as well defined as they were previously (which, I think, removes any point in including that feature). A new option has been added to the Mountain Ranges option called 'ranges' (what was previously called ranges has been renamed 'all ranges').
# - ranges will select between 3 and 5 continents which will increase the altitude of land plots already created by other continents.
# - all ranges will, as before, cause all continents to increase the altitude of any land plot already created by other continents.
# Note:
# 1) using ranges, a mountain range produced between two continents may not be as clearly defined as one produced in pre-2.7 LandMasses since the extra altitude may only be generated by one of the two continents.

hookmonkey
May 08, 2007, 02:20 PM
Wow. What a great script. This makes me play more Civ. I like this game but im always annoyed by the square, unsurprising maps. I've been using this for the last month and I will never use something else. This new version will make this even better :)

I especially like the way the landmasses are formed. In CIV 99 out of 100 map generations are always blocks and very structured.

Thank you and firaxis should contact you :P

On thing I would like that there would be something like 1 indonesia per map. I've had it once and that was cool. There were like 5 landmasses and 2 of them were connected with small 2~4 square islands. The rest was not connected untill caravels. Maybe you an idea for the future is to divide the map in to pieces (like 4 or something) and have different generation for each piece. Or maybe im going to far and would this idea make the script worse because as it is it is great.


Hehe. Bye

Thedrin
May 08, 2007, 04:03 PM
I especially like the way the landmasses are formed. In CIV 99 out of 100 map generations are always blocks and very structured.

Thank you and firaxis should contact you :P

Thanks, but the general shape of each land mass is still based on two pieces of code written by Surt for SmartMap.

On thing I would like that there would be something like 1 indonesia per map. I've had it once and that was cool. There were like 5 landmasses and 2 of them were connected with small 2~4 square islands. The rest was not connected untill caravels. Maybe you an idea for the future is to divide the map in to pieces (like 4 or something) and have different generation for each piece. Or maybe im going to far and would this idea make the script worse because as it is it is great.

Unfortunately, that idea is too far removed from how LandMasses works. But I've seen the Indonesia affect a couple of times and I like it. I don't know how to go about forcing continent-to-archipelago features to appear and if I do figure out a way I'll probably just slip it into the existing coastline options. For the moment the best you can do is use settings which are more likely to generate such features - 'no overseas trade before astronomy', high ocean, and 'rugged' would probably have the best chances of producing it.

Thedrin
May 12, 2007, 11:44 AM
New version uploaded and available at the top of the page.

Changes:

# Lands:
#
# Increased the likelihood of Indonesia-like continent-to-archipelago formations being generated under certain settings More specifically, when Coastlines is set to 'rougher' there is an increased chance of such formations being generated and when Coastlines is set to rugged there is a further increased chance of such formations being generated.

(Note: there's a lot more to starting positions than I realised at first. Such changes may not happen for a while)

lord_joakim
May 13, 2007, 02:58 PM
I looove this script :)

llib
May 17, 2007, 02:00 PM
Hi guys.
I tried to find some way to get really big map and here I am. However, it seems to constantly fail for me.
I have Warlords 2.08.
Might it be related to fact that I have 64bit Vista's(but vanilla warlords seems to work fine so far)?
Initialization seems to pass, but I never get to phase to press the begin button.

Thedrin
May 17, 2007, 02:03 PM
How big a map are you trying to generate? Does it work with small maps?

llib
May 18, 2007, 01:58 AM
Hi.
I tried some smaller maps yesterday and finally it worked. Originally I was trying maps with width 220-240 and height 200-240.
I tried changing some local settings as it was suggested some versions of vista might have troubles with some versions of civ with some delimiters, on next attempt it worked once, but as I left auto leader it was Korea and I wanted Seals later, so tried again and not any luck with Roosevelt until I lowered settings.
I tried it on notebook with XP's but it was same.
However it appears maps are big enough even so...
In fact it appears rebels have viped out quite some ammount of civs(lot big continents with raging barbarians).

Thedrin
May 18, 2007, 10:52 PM
Sorry, but I'm uncertain about what you're saying. Are you able to create maps that are large enough for your liking, and it's just larger maps that don't work? Or are you still unable to create any maps at all? If it's the first then you probably can't create maps over a certain size due to the limits of your computer. If it's the second then I have no idea what the problem is.

DragonTempest
May 19, 2007, 11:32 AM
hI I love your scripts, but with this latest one I can only get it to run one time before it stales my computer. it will show the initialization screen and the Civilization4 paper backdrop but it wont do anything from there... I can here Nimoy's voice but even when I try to do Ctrl+Alt+Del it doesnt do anything.

I have 2 gigs of ram and an AMD 64 x2 4200.

I have triied all configurations and it always happens the second time. is there a reason for this?
Thx

Thedrin
May 19, 2007, 03:03 PM
Latest version? Do you mean that it was working fine with versions available before May 12th (the last time the script was updated) or did you begin to experience problems before that?

llib
May 19, 2007, 03:10 PM
Sorry, but I'm uncertain about what you're saying. Are you able to create maps that are large enough for your liking, and it's just larger maps that don't work? Or are you still unable to create any maps at all? If it's the first then you probably can't create maps over a certain size due to the limits of your computer. If it's the second then I have no idea what the problem is.
Well, I can create map big enough for my liking (for now ;) , but can't create biggest ones.
About limits of my computer, I don't know. If it depends on video memory, it might be that civ developers did not expect 320MB cappacity. But ram(2GB) and CPU(c2d 6420) should be enough I believe. Also it might have something with OS on my desktop.
My laptop has much less resources, so lack of them is probably cause there.
So generally thanks for nice script :-)
Feel free to remove my posts, as they are not much contributing.

Thedrin
May 20, 2007, 04:34 AM
DragonTempest:

The problem you were having may now be fixed.

New version uploaded and available at the top of the thread.

Changes:

# Map Size:
#
# Introduced new "Min. Height" choice; 'Normal ratio of width to height'. This allows the user to select a width and an apporpriate height will be chosen so that the ratio of the map's width and height are similar to that generated in the Continent map script.
# The height chosen will be between 3/5 (0.6) and 5/8 (0.625) of the width - the minimum and maximum ratios used by the Continent map script (the ratio changes with different sizes).
#
# Increased the maximum value for the map width to 308 (from 240). This won't generate maps with a height of 240 using the 'Normal ratio of width to height' option but it allows that option to generate maps with an area equal to that of a 240x240 map.
#
# Lands:
#
# Reworked how continent-to-archipelago formations are generated.
#
# General Map Options:
#
# Removed Sealevel option (the one that's standard with most maps) since it wasn't doing anything.
#
# Removed standard 'Random' choice from all options. Introduced an alternative set of random options:
# - Continent Distribution: 'Random' will select from all available choices.
# - Continent Placement: 'Random' will select from all available choices.
# - Coastlines: 'Random' will select from all available choices.
# - Hills: 2 random options
# 1) 'Random' chooses between 12.5% and 34.5% of land to be hills.
# 2) 'Random highlands' chooses between 40% and 50% of land to be hills.
# - Peaks: 2 random options
# 1) 'Random' chooses between 0% and 14% of land to be peaks.
# 2) 'Random highlands' chooses between 20% and 30% of land to be peaks.
# - Mountain Ranges: 'Random' will select from all available choices.
# - Terrain: 'Random' will select from all available options except 'fantasy'.
# - Terrain Homogeneity: 'Random' will seleect from all available options.
# - Woodlands: 'Random' will select from all available options.
# - Resource Land Masses: 'Random' will select from all available options except 'custom'
# - How Many Land Masses: 'Random' will isolate resources to between 1 and (actual number of land masses - 1) land masses.
# - Strategic Quantities: 'Random' will select between 'few strategic resources', 'normal strategic resources', and 'many strategic resources'.
# - Health Quantities: 'Random' will select between 'few health resources', 'normal health resources', and 'many health resources'.
# - Luxury Quantities: 'Random' will select between 'few luxury resources', 'normal luxury resources', and 'many luxury resources'.
#
# Some options - usually because they are structured so that a random option is pointless or because the user is much more likely to have a definite idea on what they want from the option - do not recieve a random option. These options are:
# - Min./Max. Width
# - Min./Max. Height
# - Min./Max. Land Masses
# - Min./Max. Continents
# - Min./Max. Land Mass Buffer
# - Min./Max. Ocean
# - Flood Plains
# - Resources
# - Resource Tiles
# - Let Resources Clump
# - Print Map Details
#
# New option 'Print Map Details' so that option choices (including random selections) may be printed.
# - No: Selected options are not printed.
# - Yes: Details about the generated map are printed to C:\Program Files\Firaxis Games\Map Options. This file can be opened with Notepad. This file is overwritten everytime a new map is generated.
# Note that the selected option for 'Let Resources Clump:' is not listed.

DragonTempest
May 20, 2007, 02:06 PM
HAte to do this again, but I t did it again.. I created a standard world and it work but it wasnt to my likeing... so I went back and did a Huge world (120x80) and it stalled out again.. sorry about being a pain.

Thedrin
May 20, 2007, 03:21 PM
What options do you use? If you're selecting any random options switch on Print Map Details to see what options have been selected.

Would you mind doing a test?
1) Can you switch CivIV over to windowed mode. I'm used to debugging in that form so that I can x out of it if it stalls.
2) Go to the Civilization IV, configuration settings file found in either
C:\Documents and Settings\x\My Documents\My Games\Civilization IV
C:\Documents and Settings\x\My Documents\My Games\Warlords
Make the following edits:
HidePythonExceptions = 0
LoggingEnabled = 1
OverwriteLogs = 1
SynchLog = 1
RandLog = 1
MessageLog = 1
(These options are either 0 or 1 so you shouldn't have any problem switching back).
3) Run LandMassestest found here (http://forums.civfanatics.com/uploads/11071/LandMassestest.zip). It works exactly the same as the current version of land masses but it should give a decent idea of where your game is stalling.
4) If the game stalls while generating a map, use the upload account that comes with your civfanatics username to upload the Pythondbg file found in either
C:\Documents and Settings\x\My Documents\My Games\Civilization IV\Logs
C:\Documents and Settings\x\My Documents\My Games\Warlords\Logs
5) If Pythondbg is too large to upload enter it. If most of the file is made up of
'j =
integer'
then don't bother about uploading - just say so.

DragonTempest
May 20, 2007, 05:46 PM
this was all I could get before I had to push the reset button

Thedrin
May 21, 2007, 12:21 PM
Post deleted.

Thedrin
May 21, 2007, 03:01 PM
I have no idea what's going wrong for you DragonTempest. The map generation stalled a lot earlier in the process than I expected it to. If you wished I could ask you to do a series of tests like the above one to pin down the exact point where the problem occurs but I couldn't guarantee that knowing where the problem was would mean that I would be able to fix it.

If you want I can put back up an earlier version of the script (the last few updates haven't added a great deal in terms of what maps look like). Alternatively - you say that it will generate a single map but won't generate a second map in a single CivIV session - you could continue to end and restart CivIV.

Edit: As an aside for any maps that you happen to generate in the future; you were selecting 3 continents and 6 land masses. This is equivalent to selecting 6 continents and 6 land masses since the map generated will always have at least as many continents as land masses.

Hyronymus
May 21, 2007, 03:28 PM
I find the land masses and continents confusing altogether, mainly because you cannot set the resource spread accurately enough in my opinion. Wouldn't it be easier if you introduced a Continents setting where players choose the amount of continents and then introduce an option to either have "solid continents" (1 landmass per continent) or "random continents" (1 or more landmass per continent).

Thedrin
May 21, 2007, 11:45 PM
I think that you (and you may be the second person to do this so it may not be clearly expressed in the early posts of this thread and in the read me) have mixed up what continents and land masses do.

Land masses are formed when multiple continents are close to each other. It is not the other way around. A land mass is a body which is, assuming a large enough seperation, isolated from all other land. A continent can be placed right next to another continent so that it may be impossible to tell how many continents have been generated on a particular map. The decision for this naming scheme is that Europe, Africa, and Asia are all considered to be continents but the three combined are considered to be a land mass.

However, I'm not sure if this explains away your dislike of the resource spread. I'm quite happy to include ideas suggested by other people. Custom resources options and the increased likelihood of continent-to-archipelago formations were both originally suggested to me in this thread.

Hyronymus
May 22, 2007, 12:06 AM
I think I get the gist now but it remains confusing as there seems to be a possible overlap between continents and landmasses. If you just had a continents option together with an option to "clump continents (randomly)", would that result in the same generated maps?

Thedrin
May 22, 2007, 12:13 PM
Yes*. The option to determine the number of landmasses is essentially the option to determine how many clumps of continents are generated.

*Assuming that for 'Continent Distribution' the user selected 'randomly distributed continents'.

Hyronymus
May 23, 2007, 05:27 AM
Yes*. The option to determine the number of landmasses is essentially the option to determine how many clumps of continents are generated.
You see, that's the confusing part ;). The maps look beautiful, they really do, but I'm not always sure if what I specified is what I thought of.

alms66
May 23, 2007, 08:32 AM
I'm with you Thedrin, I don't understand the confusion...

Landmasses are just that, masses of land, made up of continents. For example, Europe and Asia are continents - but they're joined into a single landmass = Eurasia. And in reality, Africa is also joined, while Indonesia and Austrailia are close enough to count as the same landmass, so you could say that there are only two inhabitable landmasses on Earth.

Thedrin
May 23, 2007, 12:00 PM
In fairness, I'm sure most people are used to each isolated mass of land being refered to as continents since thats the standard [and long running] name of such land types in the Civ series.

I'll see if I have time at the weekend to go back over some of the notes. In particular, the opening post of this thread has very little information.

The maps look beautiful, they really do

Thanks you.

charleswatkins
May 25, 2007, 09:37 PM
Nicely done! If you might consider an enhancement request, I would like to see better defined ocean basins with rounded coastlines and a scattering of islands.

Thedrin
May 26, 2007, 05:44 PM
What's an ocean basin exactly? As far as I can tell (from a brief check on wikipedia) it's simply a region of deep ocean with no predefined surface shape. Would you be able to give me more detail? The same goes for rounded coastlines; would you have an example of what you are interested in seeing?

Islands:

I'm assuming you mean islands placed in the middle of oceans and distant from all other land - not the type of islands that are generated off the coasts in one and twos or whole archipelagos but completely isolated regions which are not large enough to host a starting civ.

Such islands would be a difficult inclusion to make while keeping other important features. Oceans are generated by building up land masses while ensuring a minimum seperation between land masses is maintained - oceans are the left over gaps between land masses. I consider the minimum distance very important because it has a strong affect on how a game plays out - when trade between land masses can begin - and I want the user to be able to maintain control over this aspect of map generation. Placing islands in the middle of oceans would take that control away from the user.

Alternatively, creating islands in the middle of ocean and then enlarging the ocean so that the minmum distance between lands is maintained would greatly restrict the variation in land mass shapes that are generated. The map script's more varied land mass shapes (if I may be so arrogant as to make that claim) are the result of land masses growing into more territory than they will finally occupy and then removing coastal tiles until the required land percentage has been met (the coastline setting defines the amount of extra growth). By creating enlarged oceans to shelter isolated islands from too-early expansion, the land masses will have less tiles to move into and the variation in land mass shape will be greatly reduced.

However, there may be a way to introduce uninhabited, isolated island groups using existing options. The following is untested and may prove to be inaccurate:

[Edit: I've done some testing and the resulting comments are included in the next post]

Select a large number of land masses and a large number of continents - possibly as much as possible of each. Then select 'randomly distributed continents'. Lastly, set coastlines to 'rugged'.

Two of the options selected; 'randomly distributed continents' and 'rugged' will give very differing results over multiple map generations so the final map may not always be to your liking. 'Randomly distributed continents' will often see the generated land masses range in size from very small to very large with a few middle sized land masses. Rugged coastlines should often reduce the smallest land masses to tiny island groups but what happens to the other land masses is more difficult to predict.

Depending on what other options are selected, this should often result in a number of inhabited land masses at the beginning of the game, some uninhabited archipelagos, and some uninhabited land masses of significant size. The problem will then be to figure out specific settings that reduce the number of uninhabited settings of significant size to the desired amount (though I'll suspect that to frequently generate isolated archipelagos you'll need to select a large number of land masses).

If you make your way back to the tenth post in this thread you'll find a number of images. The bottom right hand image shows an archipelago formed from a large land mass. This was achieved with 3 land masses and 7 continents and only a slight unevenness in the distribution of continents ('evenly distributed continents' was selected but the continents could not be divided equally among the land masses resulting in one larger land mass).

Thedrin
May 27, 2007, 01:13 AM
The above suggestion for generating isolated island chains doesn't work as well as I thought [when a minimum seperation of 7 tiles is selected]. Generating a large amount of land masses drastically reduces the ruggedness possibilites of a map. Since the entire idea is based on using the increasingly more rugged coastline options that proves to be a major problem.

The results are improved for smaller land mass numbers, say 3 to 5, while keeping the continent number high.

alms66
May 28, 2007, 06:40 PM
In fairness, I'm sure most people are used to each isolated mass of land being refered to as continents since thats the standard [and long running] name of such land types in the Civ series.
No reason to encourage such behavior though ;) :goodjob:

DragonTempest
Jun 06, 2007, 01:06 PM
I was able to get another copy of Civilization 4 and after all the installation and removal of the previous installation, it worked. in context, Iam now able to play your map scripts, and I love it!.. Only problem now is that my machine is soo slow while playing, or rather calculating the moves of the computer players. I have posted this in another forum but no one has replied back to me. Sad.

Thedrin
Jun 06, 2007, 04:29 PM
How much RAM do you have?

Up until recently RAM (512MB - minimum requirements I believe) was the main problem I had with playing CivIV. Using this map script would take up a lot of my RAM meaning that the game would be slow from the start. I installed FreeRAM XP Pro which automatically clears RAM everytime more is needed. If the slowness is due to a lack of RAM then FreeRAM would automatically activate as required - briefly making the game extremely slow but soon returning it to a faster speed than when it initiated.

Hyronymus
Jun 11, 2007, 09:03 AM
TheDrin, I believe your latest version has some problems. I've created 4 maps and took 3 screenshots because my starting position was "at the end of the world". The script also takes ages to finish. It used to be somewhat slower than Firaxis' map script but now it takes >1 minute. During that minute it eats ~1MB of memory per second (which it nicely gives back when going to the main menu). Even going back to the main menu takes time now though!

Time for some screenshots I think.

http://img512.imageshack.us/img512/3299/itstheendoftheworldcg3.jpg
http://img512.imageshack.us/img512/352/itstheendoftheworld2uj3.jpg
http://img512.imageshack.us/img512/2114/itstheendoftheworld3bu2.jpg

Thedrin
Jun 11, 2007, 02:06 PM
If anyone else is getting the same problem - specifically generated maps containing only flat grassland - could they report it.

I downloaded the file that's uploaded to the civfanatics and ran it myself. There was no problem with it. It might be that the version you downloaded is corrupted in some way. What settings are you using? It might be that there are settings which don't work well together. Out of curiosity, when did you download this version? There hasn't been a new version since your previous posts in the thread.

Hyronymus
Jun 11, 2007, 04:16 PM
I just downloaded it today, I didn't play Civ4 for a while (forgive me Lord :D).

The settings I have are:

Map: LandMasses
Size: Huge
Climate: Temperate
Sealevel: Medium
Era: Ancient
Speed: Epic
Min. Width: 128 Continents Huge
Max. Width: No variation
Min. Height: Normal ratio of width to height
Max. Height: No variation
Min. Land Masses: 2
Max. Land Masses: 4
Min. Continents: 1 continent per landmass
Min. Continents: 5
Continent Distribution: Randomly distributed continents
Continents Placement: Normal continent placement
Min. Land Mass Buffer: No overseas trade before Astronomy
Max. Land Mass Buffer: 12 tiles seperation
Min. Ocean: 50%
Min. Ocean: 70%
Coastline: Rugged
Hills: Normal
Peaks: Few
Mountain Ranges: Ranges, clumped hills and peaks
Terrain: Temperate, normal desert, normal plains
Terrain Homogenity: Normal
Woodlands: Normal jungle, normal forest
Flood plains: Normal flood plains placement
Resources: Standard - ignore resource options
Resource Land Masses: Standard
How Many Land Masses: Assigned to 4 land masses
Resource Tiles: Standard
Strategic Quantities: Normal strategic resources
Health Quantities: Normal health resources
Luxury Quantities: Normal luxury resources
Let Resources Clump: Standard
Print Map Details: No

charleswatkins
Jun 12, 2007, 10:46 PM
I've been away for a bit but want to get back to you on a couple of things. First off, ocean basins have a topography of their own -- they aren't just what's left over after the continents have been built. In plate tectonics, the oceans sit on their own plates, which are shaped about the same as the continental plates but are not as high. Looking back at post #10, you can see how phony the maps at the top and middle look.

On the other hand, using rugged coastlines I have been able to get the offshore islands I've been looking for.

Thedrin
Jun 15, 2007, 03:58 PM
Hyronymous:
TheDrin, I believe your latest version has some problems. I've created 4 maps and took 3 screenshots because my starting position was "at the end of the world". The script also takes ages to finish. It used to be somewhat slower than Firaxis' map script but now it takes >1 minute. During that minute it eats ~1MB of memory per second (which it nicely gives back when going to the main menu). Even going back to the main menu takes time now though!

I attempted to generate maps with the above settings. It did stall sometimes requiring CivIV to be closed. When it didn't stall the all-grassland maps weren't replicated but I expect that if I'd let any of the stalls play out that's what would have happened.

I found a problem. It may not be the problem that you experienced - it doesn't always happen - but it certainly is a problem that could arise when using the settings that you've selected. It's also the only problem that I experienced:

Selecting 'ranges' picks a number of continents to act as range generators instead of all continents or no continents. If the selected number is exactly 1 less than the number of generated continents the code enters an infinite loop.

This has been corrected and the fixed map script will be uploaded shortly.

I'd like to make a comment about a settings that you're using. This has no bearing on the problem that you experienced (or, at least, no bearing on the problem that I found).

Min. Continents: 1 continent per landmass
Max. Continents: 5

Setting 'Min. Continents' to '1 continent per land mass' means that the generator ignores the selection for 'Max. Continents' - there will never be more than 1 continent per land mass. This also rules out the possibility of mountain ranges being generated since they rely on land masses containing more than one continent.

Thedrin
Jun 15, 2007, 04:09 PM
New version uploaded and available at the top of the thread.

Changes:

# Lands:
#
# Fixed an error that arose when the number of continents selected for generating mountain ranges (using 'ranges') was one less than the number of continents generated.

Thedrin
Jun 15, 2007, 05:08 PM
Charles Watkins:
First off, ocean basins have a topography of their own -- they aren't just what's left over after the continents have been built. In plate tectonics, the oceans sit on their own plates, which are shaped about the same as the continental plates but are not as high. Looking back at post #10, you can see how phony the maps at the top and middle look.

LandMasses doesn't create tectonic plates and move them around. It begins with pure ocean worlds and grows each continent from a single tile. To implement oceanic plates would be to write a completely different map script. Sorry, but LandMasses will probably never contain this idea - I really can't think of a way to implement it. I believe Tectonics does this (though I've never looked into that script in detail so amn't certain).

All the screen shots in post 10 were generated so as to more easily explain the affects of the different coast defining options - not to provide a representative sample of the types of maps that could be generated. More specifically the first four chose '12 tiles of seperation between land masses' for 'Land Mass Seperation'. I never play with this setting; it's only there for a form of completeness and results in great restrictions being placed on land mass shapes. The final two images were generated using 'no overseas trade before astronomy' (7 tiles of seperation) which provides far greater freedom for land mass shapes and - should I ever get around to overhauling the opening post - will be classified as my recommended setting for people who want to play with isolated continents.

Hyronymus
Jun 16, 2007, 12:05 PM
I'm happy to see you were able to isolate an error from my report, Thedrin. Also thanks for the tip on the settings I use, as you see I'm still confused by the land masses / continents stuff :p.

Thedrin
Jun 16, 2007, 01:18 PM
No problem. If there are further issues let me know.

One thing I forgot to mention about your choice of settings:

Resources: Standard - ignore resource options

Selecting this causes land masses to ignore all further resource options. You'll need to select 'Custom - activate resource options' to make use of the following (though you've set the majority of them to mimic standard settings);

Resource Land Masses: Standard
How Many Land Masses: Assigned to 4 land masses
Resource Tiles: Standard
Strategic Quantities: Normal strategic resources
Health Quantities: Normal health resources
Luxury Quantities: Normal luxury resources
Let Resources Clump: Standard

Specifically, 'assigned to 4 land masses' will have no affect. Since you set a maximum of 4 land masses I assume you wanted resources to appear on all land masses. Setting 'Resource Land Masses' to 'No isolated resources' (after activating the resource options) would be a more effective way of doing this.

OctopusOverload
Jun 17, 2007, 08:35 AM
What options should be used to create realistic and atleast explicit archipelagos? I keep getting boxy coastlines, even with rugged.

BobTheTerrible
Jun 17, 2007, 03:16 PM
Try Rugged coastlines with snaky continents.

Hyronymus
Jun 17, 2007, 04:30 PM
Try Rugged coastlines with snaky continents.
He wrote "even with rugged". Please try reading properly before commenting in a somewhat harsh way.

BobTheTerrible
Jun 17, 2007, 08:54 PM
He wrote "even with rugged". Please try reading properly before commenting in a somewhat harsh way.

I know he already said rugged, I was restating to use the rugged option and to also include 'snaky continents'; in my experience that tends to produce more archipelagos than just "rugged" with, say, 'normal continents.'

And I don't see how you took my comment as harsh? I was only trying to help him.


To OctopusOverload: I should also add, that you also need to make sure that the # of sea tiles between landmasses should be relatively low, probably between 4 and 7 (or less than 4, if you don't mind having some very ill-defined continents). If you have too many sea tiles between the landmasses, islands tend not to form off the coast of continents, because they have nowhere to form while keeping the "x tiles between landmasses" rule.

Thedrin
Jun 17, 2007, 11:51 PM
Octopus Overload:
What options should be used to create realistic and atleast explicit archipelagos? I keep getting boxy coastlines, even with rugged.

How large a map are you creating, how many land mass do you want to fill out this map, and how much ocean do you select?

Rugged (and rougher) coastlines are only designed to make use of unused water tiles - water tiles that are not required to form barriers betwwn land masses. If you want more archipelago like forms you'll need to increase the amount of water tiles that aren't required for forming barriers between land masses. There are at least 4 ways you can do this:

1) Increase map size - larger map means more water,
2) Decrease distance between land masses - less water required to seperate land masses,
3) Decrease the number of land masses - less water barriers required,
4) Increase the percentage of ocean - more water.

Don't put distance between land masses to any greater than 7 (what I would use). It can be less if you don't mind trade between land masses before astronomy. Even if you set it only to 6 tiles between land masses I suspect that only some technological trade between land masses would occur.

Also, the current implementation of the coastline options is very crude. I don't believe that completely archipelago maps can be formed. I'm currently working on an idea (haven't begun the implementation yet) to increase the versatility of these options so that (hopefully) complete archipelago maps can be formed.

dreiche2
Jun 18, 2007, 12:21 PM
Hey,

would you mind if I make a version of your map script that imports my FhF flavor module and post it into my thread (see my sig)?

Thedrin
Jun 18, 2007, 01:11 PM
Go ahead. I don't mind.

Hyronymus
Jun 19, 2007, 01:15 AM
And I don't see how you took my comment as harsh? I was only trying to help him.
Bad day at the home office, sorry.

Jean Elcard
Jun 27, 2007, 07:42 AM
As promised in the fall from heaven flavour mapscript mod thread, here is my error report. Mad you some nice screenshots with my settings and the two python exceptions I got. After map generation I'm able to play, but there is no water at all on the map.

Another thing I noticed. If you activate "Print Map Details" I'm getting a lot more Python Exceptions. Seems your script is looking for some folder on my computer in the standard civ4 path, which doesn't exist.

Thedrin
Jun 29, 2007, 05:19 PM
Thanks Jean Elcard. I found the sources of those problems.

As for 'Print Map Details'; it does work for me - it's supposed to create the file if it's not there in the first place. The only reason I can suppose for why it's not working is that you have moved CivIV from its standard location meaning that it might not be able to create file but that is only a guess. I don't know enough about reading and writing files to be able to talk about them confidently.

New version uploaded and available at the top of the thread.

Changes:

# Lands:
#
# Fixed an error that arose when only one continent was to be generated.
#
# Resources:
#
# Fixed an error that arose when 'Resources' was set to 'standard - ignore resource options'.

+Cleric+
Jul 04, 2007, 02:41 AM
thedrin,
i've a problem with the newest version (30/06) of landmasses: everytime (i tried several times with different settings) i create a map, only grassland with small lakes is created. i know this error has been reported before, but i thought you've fixed it. perhaps you can take another look?

btw.: i use your script a lot and like it very much. thank you for your efforts.

Thedrin
Jul 04, 2007, 12:30 PM
All-grassland maps are the general result when a serious problem arises in the section of the code which governs where land, hills, peaks, and oceans are placed. Fixing one problem which leads to this result may leave other problems unfixed or create other problems leading to the result.

Anyway, could you give me the details of the selected options that are generating the problem?

Thanks.

+Cleric+
Jul 05, 2007, 02:49 AM
here they are:

Landmasses, Large, Temperate
Width: 104 Height: 64 (both no variation)
Min. Landmasses: 4 Max. landmasses: 8
(also tested with 10 landmasses, no variation)
Continents: 1 per landmass
(also tested with 20, no variation)
Continental Placement: more snaky
(also tested with normal & more rounded)
Landmass Buffer: No oversea ... (no variation)
Coastlines: rugged
(also tested with normal rounded)
Hills, Peaks: normal Mountain ranges: none
temperate, normal deserts, normal plains
Homogenity: normal
Woodlands: normal forest, normal jungles
Flood plains: normal
Ressources: standard
(also tested with some customized settings)

30/06 version of your script (older one worked).
version 2.5.1. of the python editor in your op installed (installed at the same time than 30/06 - none installed before).
i run around 20 tests with slightly different settings: always grassland.

Thedrin
Jul 07, 2007, 12:39 AM
Sorry, but so far those settings have succesfully produced completed maps without any errors for me. Could you tell me what you're selecting for 'Continent Distribution:' and 'Min/Max. Ocean:'? Have you tried redownloading the script?

Side note: your choice of snaky continents (or any other selection for the option 'Continent Placement:') would make no difference if maps were being succesfully generated since this option only affects land masses which contain 3 or more continents.

+Cleric+
Jul 10, 2007, 12:34 AM
sorry, i was away over the weekend. i redownloaded the file and it's working now (strange, since it's compressed). sorry for bothering you and thank you for your support.

i could suggest a feature, if you're interested: "number of unpopulated landmasses" - no starting positions on a choosen amount of landmasses, so they can be explored and settled later (even if the number of civs is even or higher than the number of landmasses).

Thedrin
Jul 10, 2007, 01:31 PM
Don't worry about it.

That's an idea I've had at the back of my mind for a while - expanding upon the idea of a terra map - but it requires code for placing civs. I had a go at a simple placement code back before Christmas (when this script was only up at Apolyton) and it went badly. It's still on the to-do list.

Thrasybulus
Jul 20, 2007, 03:38 PM
Thedrin, do you have BTS yet? I picked it up today and I've just realised how spoiled how I was by this map script. Can't seem to get into the Fractal, Continents, etc scripts anymore and the new Hemisphere maps seem pretty lame compared to this one.

Anyway, this doesn't work with BTS and I'm wondering if you plan to make it compatible. This is the best I've yet seen at making a truly random world.

Thedrin
Jul 20, 2007, 05:03 PM
I won't have BtS for a few days yet. What's going wrong exactly? Is there no option to select LandMasses, does the game fail/crash when asked to use the script, or is it that the generated maps seem different in some way?

I do plan on getting BtS. I haven't made any significant changes to the script lately because I was specifically waiting for BtS to be released in case the script needed an overhaul after the expansion was released.

Thrasybulus
Jul 20, 2007, 10:33 PM
I can select LandMasses, but when I start to change some of the parameters - I think its ocean percentage specifically - the game crashes to the desktop. I've only tried it twice since I wanted to check out the game. I have no problems (so far) with anything else in BTS.

Thedrin
Jul 21, 2007, 12:24 AM
I probably won't have the game for a few days so in the mean time try reinstalling the map script to your BtS Public Maps folder. To be honest, if the game crashes while you are selecting options but before the map begins to generate then I suspect that it may not be a problem with the code.

If anyone else is having a problem - similar or otherwise - can they post about it?

Gaius Octavius
Jul 21, 2007, 05:21 AM
I really like this map script! Some of your screenshots remind me of the Civ III continents/archipelago maps--much more interesting. Can't wait for the BtS version.

Thedrin
Jul 22, 2007, 05:21 AM
Thanks. Whatever else I may say about CivIII, I did love its continent maps. The screenshots are, I think, a bit outdated. The opening posts could badly do with some editing when I get back into making large changes to the script beyond BTS compatability. Certain aspects of the way landmasses and continents are placed have been altered since those shots.

BtS updates won't happen til next weekend at the earliest. Potter takes precedence.

PullMeUnder
Jul 22, 2007, 04:07 PM
BtS updates won't happen til next weekend at the earliest. Potter takes precedence.

Good priorities. And, btw, a fantastic map script. My gf and like playing hotseat games in resource-rich worlds, and your script is brilliant for that.

I second the problems with LandMasses and BTS, though. Crashed for me after selecting max. ocean, but I've tried only once.

Thedrin
Jul 24, 2007, 11:48 PM
I haven't found the game yet in this country (it was supposed to be released here on Friday) so a BtS compatable version of LandMasses may take longer than hoped.

OctopusOverload
Jul 25, 2007, 03:01 PM
Oh darn. Im getting really fed up with Custom Continents :lol:

Stonecutter
Jul 27, 2007, 02:23 PM
I registered just to add how much I enjoy this Script. Its painfull not being able to use it in BTS! :)

Thedrin
Jul 27, 2007, 03:28 PM
Got the game.

The problem I experienced is a crash to desk top when selecting map options. It can occur when selecting any number of map options - not just the oceans options. It doesn't occur immeadiately. You can select some map options though it's unlikely that you'd make it through the entire list. Starting from the top and selecting items from most options, I most frequently generated the crash at 'Continent Placement'. I have not noticed this problem in any other script.

I have no idea what's going wrong with the script. No python errors are generated that I can see or am informed of. If anyone has any ideas, I'd be grateful to hear them.

The script is capable of generating maps. The problem arises in the custom game menu, not beyond it.

For those that consistently use the same settings, there is a way to get around the crash:

Go into your CivIV or Warlords folder (depending on which version you used before BtS) and copy the file 'LandMasses.cfg'. Paste this file in the Beyond the Sword folder, copying over any file of that name which already exists. This file contains the options which were selected the last time you generated a map using LandMasses in Vanilla or Warlords. Selecting LandMasses in BtS will use these options as default.

Alternatively if no 'LandMasses.cfg' file exists in either the CivIV or Warlords folders then generating maps in either of these games will produce one though, since this requires changing discs, that seems like a lot of trouble.

Alternatively, again, generate a series of very small (so that the loading times are as short as possible) LandMasses maps in BtS, changing a few settings at a time. Each generated map will update the newly generated 'LandMasses.cfg' file so that eventually the default will be the prefered setting.

If you don't use the same settings consistently, but keep most of the options the same, then using any of the above should still be fine. In my experience the game allows you to make some changes to the map options before it crashes.

Stonecutter
Jul 27, 2007, 04:23 PM
Thanks for the workaround Thedrin. Even though there are more steps involved, I find the maps generated by this script well worth the effort.

Thrasybulus
Jul 28, 2007, 12:45 AM
Yeah thanks for that Thedrin. Its a strange problem. I must admit, though, I've been having fun with the new Big and Small maps with a low sea level so that I can get colonies set up early. I'm sure it isn't adding to my victory chances but its good for a laugh.

Once I get bored with that I'll be back on LandMasses. What's best is not knowing whether I'm starting on a pangaea or one of four wildly separated continents or...well you get the picture.

jpinard
Jul 30, 2007, 07:55 AM
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!

robbocroft
Jul 30, 2007, 12:24 PM
Thedrin, thank you very, very, very much for this awesome script!
I recently got BTS expansion and got really frustrated with the default custom continents script. It kept placing me in small, fuzzy and ultimately unrealistic continents. I was already chewing the manual cursing firaxis when i stumbled on your script.

Now i'm happily headed to modern era when i'll be able to nuke every other civ in an organic world with strongly believable landmasses. Billions will die in a nuclear winter. All thanks to you :D

P.S. in order to use the script in beyond the sword i'm coping the .cfg file like you described in you workaround. If i can provide with some usefull information to help you solve the crash issure please feel free to ask

Thedrin
Jul 30, 2007, 02:00 PM
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.

jpinard
Jul 30, 2007, 07:58 PM
Got it. I'd been confused intitisally as I'd just skimmed the thread. Thanks :)

Maestro_Innit
Jul 31, 2007, 10:26 AM
Can't wait until the BTS version is fixed.... bleedin' Fractals for now :rolleyes:

jpinard
Aug 03, 2007, 10:24 PM
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.

http://www.jeffpinard.com/Civ%20Settings%201.jpg


http://www.jeffpinard.com/Civ%20Settings%202.jpg

Thrasybulus
Aug 03, 2007, 11:23 PM
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