View Full Version : [Map Script] LandMasses
Thedrin Mar 24, 2007, 07: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, 07: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, 08: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, 01: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, 04: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, 09: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, 01: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, 03: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, 04: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, 01: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, 06: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, 09: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, 02: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, 02: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, 08: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, 09: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, 12:57 PM 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 09, 2007, 12:05 AM 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 09, 2007, 12:06 AM 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, 10: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, 07: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, 11: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, 07:37 AM Hi Thedrin, the landmasses link still seems to be to version 2.5 ?
Thedrin Apr 20, 2007, 11:17 AM Thanks. I just uploaded the correct file.
CanuckSoldier Apr 25, 2007, 09: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, 10: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, 01:44 PM FINALLY a proper map script... Instead of that continents thing. Great job :goodjob:
CanuckSoldier Apr 30, 2007, 11: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, 08: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, 01: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, 03: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, 05: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, 12:44 PM 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, 03:58 PM I looove this script :)
llib May 17, 2007, 03: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, 03:03 PM How big a map are you trying to generate? Does it work with small maps?
llib May 18, 2007, 02: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, 11: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, 12:32 PM 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, 04: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, 04: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, 05: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, 03: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, 04: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, 06:46 PM this was all I could get before I had to push the reset button
Thedrin May 21, 2007, 01:21 PM Post deleted.
Thedrin May 21, 2007, 04: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, 04: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 22, 2007, 12:45 AM 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, 01: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, 01: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, 06: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, 09: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, 01: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.
Caradoc May 25, 2007, 10: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, 06: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, 02: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, 07: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, 02: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, 05: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, 10: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, 03: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, 05: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
Caradoc Jun 12, 2007, 11: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, 04: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, 05: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, 06: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, 01: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, 02: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, 09: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, 04:16 PM Try Rugged coastlines with snaky continents.
Hyronymus Jun 17, 2007, 05: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, 09: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 18, 2007, 12:51 AM 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, 01: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, 02:11 PM Go ahead. I don't mind.
Hyronymus Jun 19, 2007, 02: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, 08: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, 06: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, 03: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, 01: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, 03: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, 01: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, 01: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, 02: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, 04: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, 06: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, 11: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, 01: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, 06: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, 06: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, 05: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 25, 2007, 12:48 AM 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, 04:01 PM Oh darn. Im getting really fed up with Custom Continents :lol:
Stonecutter Jul 27, 2007, 03: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, 04: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, 05: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, 01: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, 08: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, 01: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, 03: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, 08:58 PM Got it. I'd been confused intitisally as I'd just skimmed the thread. Thanks :)
Maestro_Innit Jul 31, 2007, 11:26 AM Can't wait until the BTS version is fixed.... bleedin' Fractals for now :rolleyes:
jpinard Aug 03, 2007, 11: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 04, 2007, 12:23 AM I would try 3 landmasses with a minimum of 9 continents and a max of 20 (or whatever is the largest it will allow). Changing to randomly distributed continents should allow for the possibility of some variation in the size and shape of your land masses. Personally I would put some variation in the land mass buffer and ocean percentage - say 6 to 10 for the first and 50% to 70% for the second.
Beware that at this map size and ocean percentage you are going to get a huge amount of habitable land and hence a large number of cities, units, etc and your performance may suffer in the late game.
Thedrin Aug 04, 2007, 02:07 AM Jpinard:
I'm starting to understand this a bit more. I have one more question. Based on my settings listed - what do I need to change to have 3 curvy landmasses instead of just 2 main continents? When I set it to 3 landmasses/1 continent per landmass - it just makes 3 triangels equidistant to each other.
These settings make the below map.
I'm not certain on the meaning of curvy so this is something of a guess. If you could post a screen shot of a 3 land mass map that you generated along with the settings and describe how you would prefer it to be different that might aloow me to be more helpful.
I'd agree that to get greater variation in landmass shape you'll want to increase the number of continents to between 9 and 20. Alternatively you could try between 6 and 9 continents and set Continent Placement to more snaky land masses.
If you are looking for a consistent level of coastal ruggedness, it'll probably take a few map generations before you can be certain that you have settings that will regularly produce maps that you like. I can only really give advice on how the different settings will affect the coasts but you'll have to experiment with it yourself.
jpinard Aug 04, 2007, 07:42 PM OK. Sorry for the huge filesize on these, but I wanted it the pics to be clear (and not fuzzy).
Exciting because I've nearly got it to where I'd like. I've got 3 dissimilar landmasses, and the proportion of ocean is good. So the only things I"m trying to tweak are:
* If you look at the red arrow. How do I get it so it's not like a giant straight canal... so the 3 landmasses look more like indepentant mega-islands?
* There's still too much jungle (and a bit too much desert for my taste). Anything else I can change so there is less?
These settings:
http://www.jeffpinard.com/almost%20perfect%202.jpg
Produce this map:
http://www.jeffpinard.com/almost%20perfect%201.jpg
Thanks! :)
Thedrin Aug 05, 2007, 12:58 AM 1) Tricky. The best bet would be to increase the ocean percentage or decrease the seperation between land masses so that land masses are less constrained and not forced to get as close to each other as possible. I'm not sure that that would work since there seems to be a fairly large ocean (top left) which could have supported more growth. But I would be very confident that making the opposite changes - decreasing ocean percentage or increasing seperation between land masses would increase the affect you are trying to avoid.
Increasing coastline ruggedness may make the situation worse depending on how you view things. The main bodies of both land masses would certainly run less parallel to each other but the fringe of islands along each coast may well become well defined enough that the canal effect is clearly visible.
2) You can make an edit to the script to reduce the amount of desert and jungle further. Between lines 2447 and 2497 are the list of options for Terrain, Terrain Homogeneity, and Woodlands, and the values which LandMasses uses for each option.
Terrain options:
[
["Warm, less desert, less plains", [0, 16, 9]],
["Warm, less desert, normal plains", [0, 16, 18]],
["Warm, less desert, more plains", [0, 16, 27]],
["Warm, normal desert, less plains", [0, 32, 9]],
["Warm, normal desert, normal plains", [0, 32, 18]],
["Warm, normal desert, more plains",[0, 32, 27]],
["Warm, more desert, less plains", [0, 48, 9]],
["Warm, more desert, normal plains", [0, 48, 18]],
["Warm, more desert, more plains", [0, 48, 27]],
["Temperate, less desert, less plains", [1, 16, 9]],
["Temperate, less desert, normal plains", [1, 16, 18]],
["Temperate, less desert, more plains", [1, 16, 27]],
["Temperate, normal desert, less plains", [1, 32, 9]],
["Temperate, normal desert, normal plains", [1, 32, 18]],
["Temperate, normal desert, more plains",[1, 32, 27]],
["Temperate, more desert, less plains", [1, 48, 9]],
["Temperate, more desert, normal plains", [1, 48, 18]],
["Temperate, more desert, more plains", [1, 48, 27]],
["Cool, less desert, less plains", [2, 16, 9]],
["Cool, less desert, normal plains", [2, 16, 18]],
["Cool, less desert, more plains", [2, 16, 27]],
["Cool, normal desert, less plains", [2, 32, 9]],
["Cool, normal desert, normal plains", [2, 32, 18]],
["Cool, normal desert, more plains",[2, 32, 27]],
["Cool, more desert, less plains", [2, 48, 9]],
["Cool, more desert, normal plains", [2, 48, 18]],
["Cool, more desert, more plains", [2, 48, 27]],
["Random", [1, 1, 1]],
["Fantasy", [-1, -1, -1]],
],
To determine the amount of desert in a map, LandMasses uses the second value in the selected vector. Less desert currently has a selected value of 16. Try setting that to a smaller figure.
Woodlands options:
[
["Less jungle, less forest", [100, 75]],
["Less jungle, normal forest", [100, 60]],
["Less jungle, more forest", [100, 45]],
["Normal jungle, less forest", [80, 75]],
["Normal jungle, normal forest", [80, 60]],
["Normal jungle, more forest", [80, 45]],
["More jungle, less forest", [60, 75]],
["More jungle, normal forest", [60, 60]],
["More jungle, more forest", [60, 45]],
["Random", [-1, -1]],
],
Here you'll need to alter the first value of a vector. Note that the value increases while the selected amount of jungle decereases. Normal jungle is 80 while less jungle is 100.
If you don't want to edit the script than you could try altering the Terrain Homogeneity option. Reducing the level of clumping will not decrease the amount of desert but it will reduce the size of each desert; each desert will be smaller but there will be fewer of them.
--------------------------------------------------------------------------
A couple of points about trying to find the settings that will consistently provide you with a map that you like.
1) Set map size to duel. This won't affect the size of the map, only factors of gameplay which you won't be making use of if you're just trying to see what each option does. It will alse reduce the number of civs to two. The map will then generate faster (but with less resources).
2) Set Print Map Details to Yes. The selected options for each map generation should be sent to C:\Program Files\Firaxis Games. The file can be opened with WordPad. It'll tell you precisely what options were used to generate a map. Here you've selected between 3 and 9 tiles as the minimum seperation between land masses. The newly created file will tell you what value was selected to generate the map. It will also tell you not only the selected percentage of ocean (somewhere between 55% and 60% here) but the actual percentage of ocean that was generated.
DragonTempest Aug 13, 2007, 09:15 PM forgive me for asking but is it availible for BTS? Everytime I have tried it, it seems to crash at the settings... # of land masses, etc.
Thedrin Aug 14, 2007, 12:45 AM This script will generate scripts in BtS but it will crash in the game set up menu after a certain number of options have been selected. The following link is to an earlier post which details ways to greatly reduce the risk of a crash occuring.
An earlier post in this thread. (http://forums.civfanatics.com/showpost.php?p=5739589&postcount=96)
I've a rough idea with why the script isn't compatable with the game set up menu and how to fix it but unfortunately I'm not expecting to complete a working version for a couple of weeks.
jpinard Aug 14, 2007, 05:18 AM Thedrin, thanks for the help. I got some excellent workking maps from this :)
jpinard Aug 14, 2007, 04:02 PM Sorry Thedrin, another question. I think I know the answer already, but I'll ask despite.
Is there a way I can get a width of 164 (wanted something in between 160 & 168). I looked through the python code and it looks like it uses a formula to come up with the available sizes in the dropdown menu. So I'm guessing I'd have to modify that? Or will that just mess things up too much?
Or can I just add this ["164",41],
to all your map size lines (under each entry for ["160",40],
http://www.jeffpinard.com/width.png
Also, do these values all have to be whole numbers, or can they be decimals too? I'm thinking 1.5 for the "fewer resource typpes"
["Few strategic resources", -1],
["Normal strategic resources", -2],
["Many strategic resources", -3],
["Random", 0],
["1 of each per civilization", -4],
["Custom", -5],
],
[
["Few health resources", -1],
["Normal health resources", -2],
["Many health resources", -3],
["Random", 0],
["1 of each per civilization", -4],
["Custom", -5],
],
[
["Few luxury resources", -1],
["Normal luxury resources", -2],
["Many luxury resources", -3],
["Random", 0],
["1 of each per civilization", -4],
["Custom", -5],
],
Thedrin Aug 14, 2007, 04:13 PM It shouldn't be too difficult to do. Width is one of the menu options whose range of choices can be altered simply be altering the list of choices. 'Coastlines' or 'Mountain Ranges' on the other hand would require altering various pieces of the code.
Available choices for each option begin around line 2096. Just add in the following line to the first two sets of choices (which represent the available choices for min. width and max. width);
["164",41],
To create a new width or height option all you need to do is assign it a name in quotation marks followed by a value four times smaller than the dimension size you want (CivIV maps dimensions are always multiples of 4).
jpinard Aug 14, 2007, 04:19 PM whoops, I edited after you posted. Can you look at the extra question right above you?
Thedrin Aug 14, 2007, 04:43 PM Jpinard:
Also, do these values all have to be whole numbers, or can they be decimals too? I'm thinking 1.5 for the "fewer resource typpes"
["Few strategic resources", -1],
["Normal strategic resources", -2],
["Many strategic resources", -3],
["Random", 0],
["1 of each per civilization", -4],
["Custom", -5],
],
[
["Few health resources", -1],
["Normal health resources", -2],
["Many health resources", -3],
["Random", 0],
["1 of each per civilization", -4],
["Custom", -5],
],
[
["Few luxury resources", -1],
["Normal luxury resources", -2],
["Many luxury resources", -3],
["Random", 0],
["1 of each per civilization", -4],
["Custom", -5],
],
I'm afraid those values are just used to tell the script what equation to use to calculate the number of resources and aren't used by any universal equation to calculate the number of resources.
If the resource quantity is set to few, normal, or many, then the 'normal' quantity will be calculated. Few halfs the value. Many doubles it. The 'normal' number of resources is:
floor(('No. of players' + 1)/2) + int(floor(rand*('No. of players'/2))
so that the number of resources is at least floor((No. of civs)/2) and at most (No of civs - 1).
To alter the number of resources generated you'll need to find the following piece of code which begins around line 1914:
# Determine how much of the resource is to be placed.
if Resource < 9:
if StrategicQuantity == -5:
ResourceCount = ResourceQuantities[Resource]
if ResourceCount <= -5:
ResourceCount = -2
elif ResourceCount == -4:
ResourceCount == Players
elif ResourceCount == -1:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
ResourceCount = ResourceCount/2
elif ResourceCount == -2:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
elif ResourceCount == -3:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
ResourceCount = ResourceCount*2
elif StrategicQuantity == -4:
ResourceCount = Players
elif StrategicQuantity > -4:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
if StrategicQuantity == -1:
ResourceCount = ResourceCount/2
elif StrategicQuantity == -3:
ResourceCount = ResourceCount*2
elif Resource < 20:
if HealthQuantity == -5:
ResourceCount = ResourceQuantities[Resource]
if ResourceCount <= -5:
ResourceCount = -2
elif ResourceCount == -4:
ResourceCount == Players
elif ResourceCount == -1:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
ResourceCount = ResourceCount/2
elif ResourceCount == -2:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
elif ResourceCount == -3:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
ResourceCount = ResourceCount*2
elif HealthQuantity == -4:
ResourceCount = Players
elif HealthQuantity > -4:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
if HealthQuantity == -1:
ResourceCount = ResourceCount/2
elif HealthQuantity == -3:
ResourceCount = ResourceCount*2
elif Resource < 32:
if LuxuryQuantity == -5:
ResourceCount = ResourceQuantities[Resource]
if ResourceCount <= -5:
ResourceCount = -2
elif ResourceCount == -4:
ResourceCount == Players
elif ResourceCount == -1:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
ResourceCount = ResourceCount/2
elif ResourceCount == -2:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
elif ResourceCount == -3:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
ResourceCount = ResourceCount*2
elif LuxuryQuantity == -4:
ResourceCount = Players
elif LuxuryQuantity > -4:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
if LuxuryQuantity == -1:
ResourceCount = ResourceCount/2
elif LuxuryQuantity == -3:
ResourceCount = ResourceCount*2
For altering the affects of the few resources options, the important parts are bolded. I guess that if you want the affects of the 'few resources' options to be halved - that the number of resource generated is somewhere between normal and the current settings for few - that you'll want to replace 'ResourceCount/2' with '3*ResourceCount/4'
DragonTempest Aug 14, 2007, 05:07 PM Appreciate all your work and sorry for the pressure. This is the best version of the game IMHO ever but the Game still sux when it comes to realistic continents and landmasses. That is why I use your script, cause it is the only one that comes close. If I could help you I would but I hate coding and I wouldnt know were to start LOL. Please keep up the good work, it is very much appreciated.
jpinard Aug 14, 2007, 09:47 PM Thedrin - what about the lines I set in red? Wouldn't I want to change those for the 75% reduction in resources (instead of the half)?
If the resource quantity is set to few, normal, or many, then the 'normal' quantity will be calculated. Few halfs the value. Many doubles it. The 'normal' number of resources is:
floor(('No. of players' + 1)/2) + int(floor(rand*('No. of players'/2))
so that the number of resources is at least floor((No. of civs)/2) and at most (No of civs - 1).
To alter the number of resources generated you'll need to find the following piece of code which begins around line 1914:
# Determine how much of the resource is to be placed.
if Resource < 9:
if StrategicQuantity == -5:
ResourceCount = ResourceQuantities[Resource]
if ResourceCount <= -5:
ResourceCount = -2
elif ResourceCount == -4:
ResourceCount == Players
elif ResourceCount == -1:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
ResourceCount = ResourceCount/2
elif ResourceCount == -2:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
elif ResourceCount == -3:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
ResourceCount = ResourceCount*2
elif StrategicQuantity == -4:
ResourceCount = Players
elif StrategicQuantity > -4:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
if StrategicQuantity == -1:
ResourceCount = ResourceCount/2
elif StrategicQuantity == -3:
ResourceCount = ResourceCount*2
elif Resource < 20:
if HealthQuantity == -5:
ResourceCount = ResourceQuantities[Resource]
if ResourceCount <= -5:
ResourceCount = -2
elif ResourceCount == -4:
ResourceCount == Players
elif ResourceCount == -1:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
ResourceCount = ResourceCount/2
elif ResourceCount == -2:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
elif ResourceCount == -3:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
ResourceCount = ResourceCount*2
elif HealthQuantity == -4:
ResourceCount = Players
elif HealthQuantity > -4:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
if HealthQuantity == -1:
ResourceCount = ResourceCount/2
elif HealthQuantity == -3:
ResourceCount = ResourceCount*2
elif Resource < 32:
if LuxuryQuantity == -5:
ResourceCount = ResourceQuantities[Resource]
if ResourceCount <= -5:
ResourceCount = -2
elif ResourceCount == -4:
ResourceCount == Players
elif ResourceCount == -1:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
ResourceCount = ResourceCount/2
elif ResourceCount == -2:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
elif ResourceCount == -3:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
ResourceCount = ResourceCount*2
elif LuxuryQuantity == -4:
ResourceCount = Players
elif LuxuryQuantity > -4:
ResourceCount = (Players + 1)/2 + dice.get(Players/2, "How many of the resource?")
if LuxuryQuantity == -1:
ResourceCount = ResourceCount/2
elif LuxuryQuantity == -3:
ResourceCount = ResourceCount*2
For altering the affects of the few resources options, the important parts are bolded. I guess that if you want the affects of the 'few resources' options to be halved - that the number of resource generated is somewhere between normal and the current settings for few - that you'll want to replace 'ResourceCount/2' with '3*ResourceCount/4'
jpinard Aug 14, 2007, 09:58 PM Oops one problem... If I wanted to edit the "fewer resources" code, don't I need to edit the -1 lines and not the -4 lines?
Thedrin Aug 15, 2007, 12:51 AM Thanks DragonTempest. Sorry that there won't be any script more suitable to BtS for a while. If you've any other issues with the script's generation at all, let me know.
Jpinard:
Oops one problem... If I wanted to edit the "fewer resources" code, don't I need to edit the -1 lines and not the -4 lines?
The edit would only be applied to the last line of each of the bolded sections (which is the only line I should have bolded);
ResourceCount = ResourceCount/2
Overall, the bolded section goes;
If few, normal, or many resources have been selected, calculate a normal amount of resources to be generated. If few resources have been selected, amend the amount of resources to be generated.
Thedrin - what about the lines I set in red? Wouldn't I want to change those for the 75% reduction in resources (instead of the half)?
If you select custom from any of the appropriate set up menu options then, yes, you'd want to edit the redded lines. If you don't use the custom options then you won't need to do so (though it wouldn't hurt for completeness).
jpinard Aug 15, 2007, 02:03 AM I'm getting some spectacular maps now. I'm concerned about shorting myself too much, so I just knocked the recource values down to 90%.
The resources changes I made... that was for the total # of resources on the whole map.... right? I got a little confused when I re-read your relase notes on resources in the fat cross.
Thedrin Aug 16, 2007, 12:47 AM Those changes determine the number of each resource - the selected forumula is applied once to each different resource. As far as I remember, the 'Let Resources Clump' option is the only options that affects resources placement relative to each other and how many can be placed within a fat cross.
hookmonkey Aug 18, 2007, 01:41 PM I played a few games with BtS and there was nothing wrong.
Now I tought lets DL the latest version, maybe it has been updated. Don't think that was the case tough..
When I get worlds with only grass :( I removed the mapscript in all folders the publicmap folder of civ4, warlords and bts. Reinstalled the script. Did that like 6 times but all i get is grass worlds. What has happened!
I cannot play BtS without this great mapscript, beautifull worlds. Tried Smart map wich generates nice worlds too but the starting locations are really bad. Some civs starting in tundra without resources and some (arabs, coincidence?) started in 1 big desert.
jpinard Aug 18, 2007, 01:58 PM I played a few games with BtS and there was nothing wrong.
Now I tought lets DL the latest version, maybe it has been updated. Don't think that was the case tough..
When I get worlds with only grass :( I removed the mapscript in all folders the publicmap folder of civ4, warlords and bts. Reinstalled the script. Did that like 6 times but all i get is grass worlds. What has happened!
I cannot play BtS without this great mapscript, beautifull worlds. Tried Smart map wich generates nice worlds too but the starting locations are really bad. Some civs starting in tundra without resources and some (arabs, coincidence?) started in 1 big desert.
For me, it's because of having the print map option checked at the bottom.
Thedrin Aug 18, 2007, 03:16 PM HookMonkey:
I played a few games with BtS and there was nothing wrong.
Now I tought lets DL the latest version, maybe it has been updated. Don't think that was the case tough..
When I get worlds with only grass I removed the mapscript in all folders the publicmap folder of civ4, warlords and bts. Reinstalled the script. Did that like 6 times but all i get is grass worlds. What has happened!
I cannot play BtS without this great mapscript, beautifull worlds. Tried Smart map wich generates nice worlds too but the starting locations are really bad. Some civs starting in tundra without resources and some (arabs, coincidence?) started in 1 big desert.
Well there hasn't bee a new version since before BtS came out, 30th of June. If that was the version that you were using previously then there shouldn't still be a problem. What does reinstalling the script include? Does it include downloading the script again? If you're only reinstalling the script from the same downloaded file - if you haven't tried to download it again - then try doing so.
For SmartMap, use the standard civ placement. This will use the civ placement code that is used by all scripts (including LandMasses) by default. In the most recent versions of SmartMap (though not older versions) the SmartMap specific civ placement options can generate civs in all tundra or all snow regions.
JPinard:
For me, it's because of having the print map option checked at the bottom.
I didn't realise that there might be an issue with this. That option is only supposed to work if you haven't altered CivIVs location in your computer. If you didn't alter the location of CivIV in your computer - if it's located in C:\Program Files\Firaxis Games - would you be able to do me a favour? Could you generate a script with Print Map Details set to Yes. After the game crashes or the script fails to proerly generate a map, open the generated file and print the results here.
hookmonkey Aug 18, 2007, 03:48 PM I did re-download landmasses (a few times hehe) but that didn't change it. Very strange. Also cleared the cache by holding shift.
Thedrin Aug 18, 2007, 04:06 PM Can you go into the CivilizationIV configuration settings in C:\Documents and Settings\XXXXX\My Documents\My Games\Beyond the Sword, and make the following changes;
HidePythonExceptions = 0
LoggingEnabled = 1
OverwriteLogs = 1
SynchLog = 1
RandLog = 1
MessageLog = 1
The values are all either 0 or 1 so it should be no trouble to switch them back when done. Generate a map. You should get a pop up telling you what's going wrong.
hookmonkey Aug 19, 2007, 04:21 AM Ok i will try that tonight, thank you.
hookmonkey Aug 20, 2007, 08:09 AM Okey i tried the settings, this is what i got:
Traceback (most recent call last):
File "LandMasses", line 2650, in getCustomMapOptionDefault
IndexError: list index out of range
Then i had to click OK for about 20 times and then the error message went away.
Also when i try to adjust the settings of landmasses, like the tiles of separation or the ocean size the game crashes. This is new. Before it would not crash it would only generate grass maps.
hookmonkey Aug 20, 2007, 10:24 AM I fixed it,
I removed landmasses in all folders except my warlord public maps folder. Now landmasses workds with BtS again. :)
LordGek Aug 24, 2007, 09:39 AM THIS MESSAGE HAS BEEN DELETED (questions already answered earlier in thread).
jpinard Aug 24, 2007, 01:53 PM Thedrin, I have Civ installed in a custom dirve and directory - so that's why!
PurpleTurtle Aug 25, 2007, 12:42 AM I am crashing everytime I try to customize a map using this in the game setup screen. When the crash happens varies, but it is consistant and I can't even start generating a map. Any ideas?
Thedrin Aug 25, 2007, 12:16 PM There's a description of how to greatly reduce the odds of a crash hidden in a post within this thread. I've updated the first post of this thread. It now contains the explanation on how to work around the problem LandMasses has with BtS.
DevilRat Oct 04, 2007, 04:42 PM Good news!
It looks like whatever was causing LandMasses to crash (for people like me) has been resolved in the new patch.
jpinard Oct 15, 2007, 07:10 PM Good news!
It looks like whatever was causing LandMasses to crash (for people like me) has been resolved in the new patch.
Sadly it's not been fixed for me (with the new official patch).
DragonTempest Oct 24, 2007, 08:38 PM sorry been a while since I have been on Thedrin, you still have the bestest Mapscript in all worlds (including the ones made with it)
I ran into a problem. whenever I use landmasses now it occasional drops out...which I can handle but, whenever I change a setting on it now it also cuts the menu in half, thus preventing me from changing settings to resources and such. Am I the only one having this particular problem?
jpinard Oct 24, 2007, 08:41 PM sorry been a while since I have been on Thedrin, you still have the bestest Mapscript in all worlds (including the ones made with it)
I ran into a problem. whenever I use landmasses now it occasional drops out...which I can handle but, whenever I change a setting on it now it also cuts the menu in half, thus preventing me from changing settings to resources and such. Am I the only one having this particular problem?
I have it too. Just make another selection and chances are the section that got cut off will re-appear.
Sto Oct 24, 2007, 09:38 PM This problem comes from BtS . If you select options too many times and/or relaunch the script many times you will have a crash due to the high number of buttons . The only way to prevent the cut off buttons , put "DisablePAKMemoryMapping = 1" into the ini file . But this is not a good option i think .
Tcho !
Thedrin Dec 04, 2007, 02:56 PM DragonTempest:
sorry been a while since I have been on Thedrin, you still have the bestest Mapscript in all worlds (including the ones made with it)
I ran into a problem. whenever I use landmasses now it occasional drops out...which I can handle but, whenever I change a setting on it now it also cuts the menu in half, thus preventing me from changing settings to resources and such. Am I the only one having this particular problem?
Yes, I'm getting this now as well. The new [official] patch hasn't fixed things for me and I've no idea how to correct the start up menu problems in a way that isn't just as complicated as the work around.
Up until recently I hadn't played CivIV in a while. I've gone back to it now but I'm finding myself put off by what caused me to stop playing it a few months back; 80 - 90% of land tiles in the starting fat cross are forest. But this time - instead of giving up and because its an issue whose solution can be contained within a map script - I'm working to improve things: the next planned version of LandMasses will contain options governing starting position.
I've only been at it since Sunday but, as far as I can tell, there's only one major coding problem I have to get past before it's ready for uploading; selecting properly spaced out starting positions for multiple civs starting on the same piece of land. I've a good idea how to do it though there are some variables in 'properly spaced out' which I'll need to test.
I'm hoping this will be done within a fortnight.
jdog5000 Dec 06, 2007, 10:00 AM This is great news! There's also been a bunch of discussion on the over forested starts (main thread here (http://forums.civfanatics.com/showthread.php?t=252429)) and some action in the unofficial patch thread recently (though no actual changes posted yet).
Thedrin Dec 06, 2007, 11:16 AM I saw that thread and it did inspired me to get to work on making changes - thanks, Seven Spirits - though I'll be doing everything through Python.
Putting together code governing start placement will also allow me to try to restrict the number of water tiles in a capital cities fat cross and to apply flood plains to rivers that are placed next to settlers. Other options that should appear include Terra maps (including multiple uninhabited land masses) and the ability to choose between inland or coastal starts.
SevenSpirits Dec 12, 2007, 07:33 PM I've only been at it since Sunday but, as far as I can tell, there's only one major coding problem I have to get past before it's ready for uploading; selecting properly spaced out starting positions for multiple civs starting on the same piece of land. I've a good idea how to do it though there are some variables in 'properly spaced out' which I'll need to test.
I'm not sure if you're still working on this, but I was working on solving the same problem for the script PerfectWorld.py. So if you haven't seen it you might want to take a look at the starting plot distribution code in the file in this post:
http://forums.civfanatics.com/showpost.php?p=6182898&postcount=197
A summary of what it does:
1) Calculate value of city on every plot.
2) From best to worst possible city, eliminate all cities within 4 spaces of it.
3) This thing:
###NOTE: Added a complicated system where we loop through cities from best to worst,
###and each city casts a vote against the worst city that is within some distance of it.
###Two votes kills a city. The voting radius grows each iteration. Loop until only the
###best remain.
###This change kind of ruined the subsystem where cities get extra points for "controlling"
###other cities, but it's totally worth it.
numPlots = len(self.plotList)
if(numPlots == 0):
return
alives = range(numPlots) #if it's equal to its index, it's alive. -1 it's dead. other number it's "on the block"
wasVote = True
countdown = range(len(self.plotList))
countdown.reverse()
votes = 0
deaths = 0
time = 0
distance = 3
leave = False
if (numPlayers >= numPlots) | (numPlayers == 1):
leave = True
while (leave==False):
distance += 1
time += 1
if time > numPlots + 10000:
raise ValueError, "numPlots: "+str(numPlots)+" deaths: "+str(deaths)+" votes: "+str(votes)
wasVote = False
for n in range(numPlots):
if leave:
break
if alives[n] == -1:
continue
if n >= len(self.plotList) - 1:
break
y = self.plotList[n].y
x = self.plotList[n].x
for m in countdown:
if leave:
break
if alives[m] == -1:
continue
dy = abs(self.plotList[m].y - y)
dx = abs(self.plotList[m].x - x)
if dx > hm.mapWidth / 2:
dx = hm.mapWidth - dx
if (m != n) & (dx <= distance) & (dy <= distance):
wasVote = True
if alives[m] == m:
alives[m] = n
votes += 1
else:
deaths += 1
alives[m] = -1
if numPlayers + deaths >= numPlots:
leave = True
if numPlayers + deaths > numPlots:
raise ValueError, "Not enough plots left! numPlots: "+str(numPlots)+" deaths: "+str(deaths)+" votes: "+str(votes)+" players: "+str(numPlayers)
break
###
#Now place all starting positions
n = 0
for m in range(len(self.plotList)):
###
if n >= numPlayers:
break
if (alives[m] != -1):
###
###if self.plotList[m].vacant == False:
sPlot = gameMap.plot(self.plotList[m].x,self.plotList[m].y)
if sPlot.isWater() == True:
raise ValueError, "Start plot is water!"
playerID = self.playerList[n]
player = gc.getPlayer(playerID)
sPlot.setStartingPlot(True)
player.setStartingPlot(sPlot,True)
###
self.plotList[m].vacant = False
###
n += 1
No worries if you don't need it of course. I'm looking forward to the updates to the script, especially new world options!
Thedrin Dec 13, 2007, 12:41 AM Thanks, I'll look into it. I've tried half a dozen different ways of placing multiple civs so far and none of them have been succesful, nevermind succesful and sufficiently fast.
Thedrin Dec 18, 2007, 12:28 PM I won't have time to get a version that is as close to complete as I would like ready before the New Year. So, in this thread (not the opening post), is an early version of LandMasses containing civ start options.
The three new (permanent) options added to the game set up menu are:
1) Starting Positions:
a) Standard placement; uses the default civ placement.
b) LandMasses placement; uses alternative placement described below and activates other starting placement options.
2), 3) Min/Max New Worlds (requires that Starting Positions be set to LandMasses placement):
Allows the minimum number and the maximum number of initially uninhabited land masses to be set. E.g. In a game with 4 land masses, the number of uninhabited land masses can be set to between 0 and 1 so that there is a 50% chance that civs will be placed on only 3 of the 4 available land masses.
LandMasses placement description:
If only one civ starts on a piece of land, that civ will be placed on the coastal tile that will have the least number of water tiles. If there are multiple choices, the civ will be placed on the tile meeting this requirement that is as close to the center of the piece of land as possible.
If multiple civs are to be placed, SevenSpirits algorithm is used. Civs will be spaced out with starting sites rated as follows: 'coastal city with 2 water tiles in the fat cross' > 'coastal city with 3 water tiles in the fat cross' > 'coastal city with 4 water tiles in the fat cross' = inland city > 'coastal city with 5 water tiles in the fat cross > etc...'. This is to ensure that it is unlikely that a civ will be placed on a peninsula. No non coastal starting site chould contain salt water tiles.
BTS Forests issue:
This has not yet been resolved. A temporary option has been included so that the function 'normaliseAddExtras', which is responsible for fat cross forest spam, is ignored. This option can be set regardless of whether or not standard placement or LandMasses placement has been selected.
Other changes:
When multiple land amsses are to be generated, there are limits on the sizes of the land mass so that it is less likely that one land mass will be reduced to insignifigance.
The fantasy terrain option has been removed.
Flood plains will now appear on the appropriate tiles next to rivers that where added to the map during civ placement.
The list of options has been expanded so that options that previously governed multiple variables (e.g. Woodlands) have been split into multiple options (Woodlands -> Forests and Jungles). This change may be reversed at a later date.
LandMasses2.90 (http://forums.civfanatics.com/uploads/11071/LandMasses.zip)
hookmonkey Jan 13, 2008, 08:02 AM Nice man, really like the 'terra' option. Have had a very nice game with it. It would be nice tough if you had a option that the largest landmass would not become the uninhabited world. Last game it was very crowded on the 2 habitated islands but the unhabitated landmass was huge! Kinda sucked for civs not starting near it because colonies were really necesarry in that game.
Maybe you should enter this script for the modding contest. If you fix the bug where it closes down I think this would win the mapscript category.
Adios
DragonTempest Apr 25, 2008, 05:49 AM Is there gonna be more with LandMasses?
I use it alot on generating worlds and find it the best one out there.
Personally I would like to see that the oceans and seas separating the continents would vary instead of looking like someone just separated them with a large knife. but I love the script and if that changes its fundamentally, then please dont change a thing
Thedrin Apr 27, 2008, 01:48 AM I've no plans for any new versions of the script at the moment. I've also given up on creating starting point generator, since I was having a great deal more difficulty with than I thought that I would.
If people want to, I don't object to alternative versions of the code being created.
Edit: I haven't been on here in a while. Anyone know if a script for generating less foresty starting poitions was created?
lord_joakim May 04, 2008, 09:00 AM Can you please reupload this? After the hack, you can't download the latest file.
Thedrin May 04, 2008, 11:17 AM Uh, what? I've been away from this site for a while so I don't know what 'the hack' is. I'm away from my computer today but I should be able to re-upload it during the week if necessary.
lord_joakim May 05, 2008, 04:31 AM The hack removed all of the uploaded files in CFC, including pics, anything.
except for the avvies-.
Thedrin May 17, 2008, 01:59 AM LandMasses (http://forums.civfanatics.com/downloads.php?do=file&id=9480)
I think that this was the trial version that contained some options governing starting positions. I'll have a rout around my machine for the last non trial version.
Thedrin May 18, 2008, 05:20 PM 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.
jdog5000 May 18, 2008, 09:18 PM Awesome, and welcome back :) This mix-n-match module idea seems like it opens a lot of cool possibilities.
Thedrin May 19, 2008, 12:44 AM Thanks. I only came up with as a method of getting LandMasses to work - like proposing the photon and discovering quantum mechanics as a result, or something less grand.
GarretSidzaka May 19, 2008, 12:50 AM checking it out
GarretSidzaka May 19, 2008, 12:59 AM can you explain to me how the modules work?
Thedrin May 19, 2008, 01:27 AM Each module within the Modules script, or the specific workings of each of the LandMass scripts?
GarretSidzaka May 19, 2008, 03:05 AM i just want to play your script, which python am i supposed to load. i would like to feature it on modcast, if i can figure it out.
Thedrin May 19, 2008, 08:08 AM To play the script you just need to download LandMasses Version 3 and extract the files to the Public Maps folder of Civlization IV.
The Python link exists for people who wish to customise resource placement to a greater degree than that offered by LandMasses. The LandMasses resource placement code - which now exists independently as the LandMasses Bonuses module - was deliberately designed to make resource placement very flexible. However, it wasn't feasible to provide access to all available options through Custom Game Setup menu, and probably still isn't, due to the large amount of options that would be required. As a result, a handful of specific configurations are available for each option in LandMasses Bonuses, as well as being able to set each of these options to "Custom".
As an example, the option "Resource Tiles" allows you to determine what resources can be placed on what tiles. The options available are:
"Standard": which follows normal resource placement rules,
"LandMasses": which can place resources on different types of specific tiles - e.g. ivory can appear on grassland, plains, and tundra, but still can't be placed on desert or snow. Mineral resources can be placed on any workable land tile.
"Crazy": Places resources on any workable tile, after taking account of whether a resource is aquatic or land based.
"Custom": By default this mimics "LandMasses".
To make use of the "Custom" choice available in each of LandMasses Bonuses options you need Python. If you use Python to enter the LandMasses Bonuses script there is, near the top, a well layed out list of resources and the custom attributes assigned to them, which can be edited. A map with the edited resource attributes can then be generated by launching LandMass Bonuses.
In the example above, if Resource Tiles had been customised using Python, you'd only need to select Custom for the Resource Tiles when setting up a map. You could continue to select predefined choices for the other options in LandMasses Bonuses.
As another example of what the "Custom" options can do, consider the "Strategic Quantities" option. This allows you to determine whether there are many of each strategic resource, a normal amount, only a few, or 1 per civilization. Using Python to edit LandMass Bonuses will allow you to alter this option so that you could generate a map with precisely 1 iron resource, many horse resources, few copper resources, and standard for all other strategic resources.
In my haste to update last night I most certainly deleted over some important information. Also the original link that was provided in the first post is most likely out of date. In fact, I downloaded a new version of Python last week, so the link could certainly stand to be updated. If you Google search Python it should take you to the homepage. The latest version, appropriate to your system, shouldn't be too difficult to track down.
If you haven't used the LandMasses method of placing bonuses, then I'd say not to use the custom options just yet. Get used to what each of the predefined choices for each of the options is meant to do first.
GarretSidzaka May 19, 2008, 11:08 PM ...
The Python link exists for people who wish to customise resource placement to a greater degree than that offered by LandMasses. The LandMasses resource placement code - which now exists independently as the LandMasses Bonuses module - was deliberately designed to make resource placement very flexible. However, it wasn't feasible to provide access to all available options through Custom Game Setup menu, and probably still isn't, due to the large amount of options that would be required. As a result, a handful of specific configurations are available for each option in LandMasses Bonuses, as well as being able to set each of these options to "Custom".
ahhh ok
As an example, the option "Resource Tiles" allows you to determine what resources can be placed on what tiles. The options available are:
"Standard": which follows normal resource placement rules,
"LandMasses": which can place resources on different types of specific tiles - e.g. ivory can appear on grassland, plains, and tundra, but still can't be placed on desert or snow. Mineral resources can be placed on any workable land tile.
"Crazy": Places resources on any workable tile, after taking account of whether a resource is aquatic or land based.
"Custom": By default this mimics "LandMasses".
this is nice. im definately playing it tonite.
To make use of the "Custom" choice available in each of LandMasses Bonuses options you need Python. If you use Python to enter the LandMasses Bonuses script there is, near the top, a well layed out list of resources and the custom attributes assigned to them, which can be edited. A map with the edited resource attributes can then be generated by launching LandMass Bonuses.
In the example above, if Resource Tiles had been customised using Python, you'd only need to select Custom for the Resource Tiles when setting up a map. You could continue to select predefined choices for the other options in LandMasses Bonuses.
As another example of what the "Custom" options can do, consider the "Strategic Quantities" option. This allows you to determine whether there are many of each strategic resource, a normal amount, only a few, or 1 per civilization. Using Python to edit LandMass Bonuses will allow you to alter this option so that you could generate a map with precisely 1 iron resource, many horse resources, few copper resources, and standard for all other strategic resources.
i personally don't like that you didn't support a gui for the python changes (mainly because im code illiterate) but i know that Ken (at modcast) is a coder at firaxis and will find this feature really cool. so, unless this is a crash fest, its going on the podcast :goodjob:
In my haste to update last night I most certainly deleted over some important information. Also the original link that was provided in the first post is most likely out of date. In fact, I downloaded a new version of Python last week, so the link could certainly stand to be updated. If you Google search Python it should take you to the homepage. The latest version, appropriate to your system, shouldn't be too difficult to track down.
If you haven't used the LandMasses method of placing bonuses, then I'd say not to use the custom options just yet. Get used to what each of the predefined choices for each of the options is meant to do first.
well if you update your python version and then update the script, will you please send me a PM so i can link it later? :)
thanks bro, i will be playing....
kivanc May 27, 2008, 03:35 AM I red many posts about this script. The features are exciting really. But when I tried it, it was not practical. As long as I understand, you select 1 of 5 scripts. And you cannot run with all features at the same time. One method is defined in your "readme" files. First creating an all greassland and then etc. etc.
Using only 1 of 5 scripts doesn't help me, create a world as i like. What do you recommend?
If there isn't a method to work all 5 features at teh same time, is it possible for you to combine all 5 in a script again?
ANd what can you say about the map generating performance/time? I have a pc not much new. Athlon 2800 and 1 GB RAM, and a mean graphics card. Normally how long should it take to generate a huge-size world?
GarretSidzaka May 27, 2008, 04:03 AM yeah bro when you combine all the subscripts under one over-script i will feature you in modcast, i promise. this method you have is impractical and you need to just do some more code work to get it nice ;)
Thedrin May 27, 2008, 01:50 PM I red many posts about this script. The features are exciting really. But when I tried it, it was not practical. As long as I understand, you select 1 of 5 scripts. And you cannot run with all features at the same time. One method is defined in your "readme" files. First creating an all greassland and then etc. etc.
Using only 1 of 5 scripts doesn't help me, create a world as i like. What do you recommend?
If there isn't a method to work all 5 features at teh same time, is it possible for you to combine all 5 in a script again?
ANd what can you say about the map generating performance/time? I have a pc not much new. Athlon 2800 and 1 GB RAM, and a mean graphics card. Normally how long should it take to generate a huge-size world?
You need to run the modules script to combine all 5 sets of features at once.
I don't know how it will perform on your computer. I personally work on the idea that you'll only be generating a huge map once per game so one long load time is acceptable. It doesn't take my machine a minute to generate maps larger than huge (but not much larger) but how it compares to yours, I don't know.
yeah bro when you combine all the subscripts under one over-script i will feature you in modcast, i promise. this method you have is impractical and you need to just do some more code work to get it nice
The single script versions exist elsewhere in this thread, I think, but are very susceptible to crashes on BtS. It'll probably be a while before I try to recombine them.
I'm at the stage where I've a rough idea how each world will look based on the settings and don't need to spend much time experimenting with different combinations. I can appreciate how it could be impractical if you don't know what settings you want to use in the first place.
beorn Jul 26, 2008, 12:42 PM Once I installed Python and reloaded the game, the options appeared correctly, and I do not see a big problem with, in effect, setting up 4 premliminary games in a row, to set parts of the map script. However, I have "more forest" checked, but I am getting little or no forest. I'm not sure why.
Thedrin Nov 27, 2009, 04:34 PM It's been brought to my attention that the seafood resources aren't being placed properly. I'm not able to run CivIV on this machine so I'd be wary of posting an updated bonuses script. Fktest PM'd me with an alternative piece of code that should fix the problem. The following code change is for the script LandMassesBonuses.
fktest:
first of let me thank you for your fantastic work with the landmasses script, me and my friends enjoy your map-script very much. However in all the games the sea resources like fish etc. we're missing. After looking at the python file, I was able to find what seems to cause the problem for us.
In line 452ff you are getting the plot indices for the plots in the cross around the current water tile but you never seemed to use it. Instead the plot type check is run against the water tile itself and therefore always failed. I changed it like this and it seems to solve the problem for us (starting from line 452):
Inew = GetNewTileIndex(I, i)
if Inew == -1:
continue
NewPlot = cymap.plotByIndex(Inew)
NewPlotType = NewPlot.getPlotType()
if NewPlotType == PlotTypes.PLOT_LAND or NewPlotType == PlotTypes.PLOT_HILLS:
...
I just wanted to let you know, maybe you can take a look at it and integrate it in case you can confirm..
The first two bolded lines are missing from the code. The last bolded line is present but needs to be adjusted to the above.
If I remember Python correctly, the indentation used in the code is purely cosmetic, but just in case it's not; all of the above lines are at the same level of indentation except for "continue" which is indented further to the right.
Thanks fktest.
Edit: I've checked this and a) seafood resources weren't being placed outside of the fat cross of starting cities (a seperate piece of code places extra resources next to starting settlers), and b) after making the above changes, maps generated do place sea resources in tiles other than those next to starting settlers.
Fuyu Jan 10, 2010, 10:13 AM If you could upload the fixed version, that would be nice. Python indentation is the only one that is NOT cosmetic, and that is probably why I have failed in my attempts to apply this change and get a working mapscript.
CivilizedTiger May 25, 2010, 02:09 PM I can't seem to figure this one out. :(
I've generated a Landmasses map, for instance, but then I don't have the Lands option in the Modules script. Is this supposed to work a different way?
I've looked a bit in the code and I've seen that the modules script has something about options and one of them is Lands, but they don't show up in the game interface.
Is there a conflict with certain mods?
|
|