[Map Script] Planet Generator

best mapscript ever.

PLEASE PICK UP WORKING ON IT! I'm sure you'll get into the fun again once you try;)

only stuff that still bugs it:

-too much forest: needs to be a little more flocked up, like with lots of 1square no-forest areas spreaded

-too few jungle areas: basicaly i miss real dense jungle areas in the zones where they should be. this is mainly because of altitude-simulations that drop the temperature. but as a player, i don't recognize that. i find lands that should be like amazonas but are not. like deserts areas are mostly only cpnnected to medium-climate-forests.

The thing would be to decrease the forest density in general, and to increase the jungle density.

if I try to do this with climate/humidity settings, i always either get too large patches of jungle, and too small "northern climate zones" or the opposite.

this is really one key point for me.

-and the missing ressources. crab, whine, etc.

otherwise this mapscript should be THE standart for everything. simply just kicks ass.




please update this! none of us is as able as you:)
 
I agree that this is the best mapscript ever. I have a issue with it though. I cannot find "Horse" nomatter what I do. Tried 50 times and not a single horse. I use it with Rise of Mankind mod. Can anyone help?
 
I have been trying to run a very large game of RI using RI_planet_generator that came with the RI SVN. I figure this comment is more relevant here because I am attempting to make a simple mod of the planet generator script so that it makes more balanced maps in RI.

So, planet generator (PG) works great and makes the kind of map I want very well; I want to play a 50 civ, 172x108 map with ~10 ~5 civ continents. The idea being that I want to have the feeling of a large unknown world, that I could never dominate.

The trouble is that PG seems to use the default implementation of bonus resource allocation that broadly divides resources by continent. This means that one continent gets all the gold, and by mid game typically one civ controls 10+ gold resources and has run away with the game. This continent also tends to dominate the religion foundings at least early on due to their gold boost.

So I want to ensure that at least some of the resources get shared evenly between all continents. Does anyone have any ideas?
 
The trouble is that PG seems to use the default implementation of bonus resource allocation that broadly divides resources by continent. This means that one continent gets all the gold, and by mid game typically one civ controls 10+ gold resources and has run away with the game. This continent also tends to dominate the religion foundings at least early on due to their gold boost.

So I want to ensure that at least some of the resources get shared evenly between all continents. Does anyone have any ideas?

There are two ways:
- Rolling your own resource generator, overwriting the default one. This way you have total control of all resource placement. However, I found that this requires some overwhelming work if you want the map script to be compatible with all these mods and include all the resources based on the definitions in their XML files.
- Somewhat easier way would be just doing what you want: removing the unbalanced resources and adding them again, based on the player start locations (if I remember correctly, they should already exist at this moment). This is similar to the default resource normalization functions which add various bonuses to make hostile snow and desert tiles more workable.
 
All right, I looked at the script and it seems that fair resource generation was already attempted in "def normalizeAddExtras():" function. Actually, there is even choices for them if you uncomment options at line 386 - 389.
Ok, looks like I was able to collect proximity information for all the land tiles (it is already in the script, just not used). It is likely possible to use this info for adjusting resource placement or maybe even overwrite them.
 
Best script ever, thanks for this. Been playing with it exclusively for sevesl years now. The only thing I don't really like is that in 9 out of 10 times you start near water with crab/fish ressources. Is there a way to force an inland start?
 
While this is the best script for creating relatively predictable maps for civ4, I noticed that I wanted to have more variation in relative continent size. The only option aimed for this was the "May vary" option, but I felt it was both a bit too insignificant and random. I managed to hardcode a different behaviour for it: To create a few double-sized continents. It is a very crude change as I didn't read the TileBuilder details at all, so I suppose it might break with some settings. If someone wants to do something similar, here is an example:

Old code:
Code:
		while size < maxLandTiles and grows:
		#if size < maxLandTiles and grows:
			for continent in contList:
				while getRand(dice) > 0.6:
					if continent.grow() and size < maxLandTiles:
						size += 1
					else:
						grows = False
						break

New code:
Code:
		while size < maxLandTiles and grows:
			doubleSizeContinents = 3
			for continent in contList:
				doubleSizeContinents -= 1
				grows = continent.grow()
				if not grows:
					continue
				size += 1
				if size == maxLandTiles:
					break
				if doubleSizeContinents > -1:
					grows = continent.grow()
					if not grows:
						continue
					size += 1
					if size == maxLandTiles:
						break

With 18 players and 6 continents this should generate a map with 3x 4 player and 3x 2 player continents. Hardcoded, so you have to change the code to change the behaviour.

Thanks Nercury for a readable enough script and thanks Firaxis for using python.

edit: hmm, now that i look at it, it seems that "by player count" offers a lot of the variation i wanted. well, doing it in code still allows me to more precisely determine the output. for some reason i always thought that "by player count" meant something else.. oh well.

Is there a way to force an inland start?

I believe this script does not decide the starting locations, and simply lets firaxis default code insert players to the generated map. You do get inland starts sometimes as-is, so it shouldn't be a big problem.
 
Top Bottom