[MapScript] Erebus Continent

nice job on 1.5, the amount of hills is definitely a lot more reasonable now :)

the starting spot selection is giving very, very, very bad results though. or maybe I am just EXTREMELY unlucky :D . I only generated 2 maps so far ( duel size, first with medium sea level, second with low sea level, everything else at medium, 4 players ) , and I got THREE civs starting on a 1-tile island. ( plus one starting on a 8-tiles island, crappy but still nothing compared to these unlucky fellas ) see attached screenshots :D you might want to tell the code to never ever spawn a civ on an island that's below an acceptable size to avoid situations like this. if you do that, maybe you could also tell the code to forbid "improvements" on such tiny, tiny islands, to avoid having a lair on a 1-tile island for example.

the new way ice behaves, being more prominent in the middle of the map, looks great. kudos to the guy who came up with the idea :lol: personally I'd strengthen it a bit to make it look more "natural" ( even more in the center, less at the extremes ) . you might also do something similar with the "climate" I guess, it should look good. i.e. more snow in the center of the map, gets warmer as you move to the extremes so less snow and more tundra ;)
 
I also have had problems with the AI starting one 1 tile islands. On a small size map with 9 players 5 of the AI started on one tile islands.
 
Yeah, I haven't touched the starting plot code yet so it's using the default (e.g. worthless) Civ4 code. The only thing I have is a quick hack from the terra map that tries to put everybody on the largest landmass, unfortunately for that check it counts coast as if it were land so as far as it's concerned that one-tile island is part of the main landmass. This issue, incedentally, doesn't happen on standard maps with 12-16 civs.

I won't be able to whip up a quick fix for this but I should have improved starting plots within a week or so.
 
Actually, if you don't mind a quick xml change, go into your Fall From Heaven 2 or Fall Further 050 folder, then into assets\xml and find GlobalDefinesAlt.xml and add this block in there:

Code:
	<Define>
		<DefineName>STARTING_DISTANCE_PERCENT</DefineName>
		<iDefineIntVal>12</iDefineIntVal>
	</Define>
Change the 12 to something smaller like 8 or 10 and see if that helps. If you're not familiar with xml editing you can open the file with notepad. This needs to be inserted along with all of the other defines so just watch the tags (bits between <>'s) and put it somewher that it matches, like right below the last </Define> in the file but before all of the other tags below that with less indentation.

Edit... more ideas

1) Try running it on medium cohesion so you skip the attempt to force all players onto a single continent.

2) Alternatively, remove this entire section of code from the map script:
Code:
def findStartingPlot(argsList):
	[playerID] = argsList

	def isValid(playerID, x, y):
		map = CyMap()
		pPlot = map.plot(x, y)
		if map.getCustomMapOption(0) == 0:
			if (pPlot.getArea() != map.findBiggestArea(False).getID()):
				return False

		return True
	
	return CvMapGeneratorUtil.findStartingPlot(playerID, isValid)

I'm not possitive, but one of those is bound to help for now :)
 
well, all 3 screenshots above are from a map with medium cohesion so I doubt that matters. I'll try the other suggestions though, thanx for the hint :)
 
I will have a quick & dirty implimentation for you to test later today. It's just a copy of the starting plot code used in Perfect World so it will make better selections than the default Civ4 code. I was messing with it last night and I have it working but I need you and your bad luck to make sure it actually helps :)
 
Ok, here is a quick test version. I have some basic rules for evaluating starting plots in, they're not likely to be perfect starts, my biggest concern with this test is that they're not on islands when larger landmasses are available. If this works well I'll work on improving the actual starting plot selection based on yield values and available bonuses (the code is there, just not entirely appropriate for FfH)

This isn't in the main post yet as it's likely to change based on feedback.
 
awesome job on 1.51 ! civs are no longer spawning on tiny islands :goodjob:

another improvement I've noticed is that "default amount" of deserts is giving a reasonable amount of desert instead of just a couple tiles. only oddity I noticed was a lake in the middle of a desert that had a block of ice in it :D probably caused by the fact that deserts are usually not in the very center of the map ( equator ) , so on duel maps a desert can be north/south enough to have ice nearby. while I'm on the topic of ice, I'd like to insist that having less snow and more tundra as you move to the left/right extremes of the map ( the climate gets warmer ) would look great, the more I think about it the more I like the sounds of it :D

thanx for this great new version, keep it up ;)
 
Nice! That will save me a bit of work, most of that code was pulled straight over from my old modified version of Perfect World.

I didn't do anything to the deserts, so that part was just luck. As far as the snow placement, I'll see if I can work something into that but it won't be quite as simple as the ice feature placement since the temperature is based primarily on latitude and then affected by winds and altitude. If I try to change the base temperature it'll affect all of the terrains which may create some wierd results. I might be able to just hack something in similar to what I did with the ice... it's worth a shot.
 
Hey, just wanted to pop in and tell you that you're doing an amazing job here. You've already done scads more than I think anyone could reasonably expect from you, and generated an amazing and intelligent mapscript from the original. Even without the starting position factors, the maps are fantastic and have a very 'real' feel to them. I can only imagine how it will be once all of the civilizations start in 'flavorful' places.

Again, I just wanted to tell you: great work here.
 
Keyeth, I'm glad you like the results so far, hopefully they'll continue to get better :)

I should have some better code in today for starting plot selection, I'm just not entirely sure how I want to work that in. I'll probably end up adjusting the plot values based on terrain preferences I just need to make sure it's not quite as rigid as it is on the Erebus map script so that some civs aren't forced into poor starts. The nice thing is I can override the default normalization code as well to help boost some of the flavorful starts so none of them are crippling.
 
1.6 is uploaded with new starting plot functions based on the test version. It has some limited 'flalor' start code in it that can be expanded, I only included a few (Malakim, Lanun, Doviello, Illian, Khazad and Luchuirp).

Here's a quick run-down of the process for selecting starting locations, hopefully this method will avoid creating crippling starting location for the dwarves :)

1. I evaluate the areas (continents) to select at least 70% of the available land using areas that are preferably 13 tiles or larger. These become the available starting continents used in the following steps. As a safeguard the absolute minimum is 5 tiles per area or half of the available areas, just in case you somehow manage to get nothing but small islands for the entire map.

2. The available areas are scanned for valid city plots, each plot is then evaluated for it potential yield and natural yield. This creates a list of potential start plots based which is filtered so that they are all useable with a fairly high preferences for potential food output (so deserts, tundra and snow score natually low here). By the end of this function there shouldn't be any possible starting plots that are entirely snow, tundra or desert and the should all have at least half of their 'fat cross' full of usable land tiles. Resources are included in establishing the value of each city location so those that are full of useless tiles will have useful food resources nearby. In the end there should be at least twice as many of these possible starting plots as there are players. In addition to the yield values the distance from the closest starting position is also factored in so starting plots that give a player a lot of room to grow may not be as good initially.

3. Next I cycle through a shuffled list of the players and for each player I establish a flavor value of the starting plots. The only rule that is enforced strictly is for civs listed as requiring a coastal start (Lanun), they will have zero value for any non-coastal starting location. Since by this point all of the starting plots should be decent this value is based entirely on the civ defined values for terrain types, plot types and feature types. Currently I only evalute for hill & peak plot types (used by the dwarves) and forest & jungle features (unused) but all terrain types are used. For each player the available starting position with the highest flavor score is selected.

In the end what you should see in most cases is a starting position that will be very usable. If you have close neighbors your starting position should have several resources, if you don't have a bunch of nearby resources you probably have a lot of open land between you and your nearest neighbor on the same continent. This does scale with map size, essentially, since you have more open land on larger maps you will have fewer additional resource placed around your starting location. The current flavor start code will try to put the Illians near snow, the Doviello near tundra (but preferring grassland over plains so as nto to cripple them) and the Malakim near desert (but not always IN the desert depending on the quality of the location). The Lanun will take a coastal start if one is available, if there are none available they get stuck with whatever happens to be available. The two dwarven races will prefer hills and peaks over starts with fewer of either.

I tried to put this in place in such a way as to NOT interfere with FlavourMod. It should actually work very well with it as it will then only try to ensure there is an appropriate start available for some specific civs.

If you want to add flavor preferences for all of the civs you can find the definitions near the end of the file. The value for each terrain, plot or feature is a simple score, each plot that matches will add that value to the starting locations total value (negative values will work as well). Terrains, features and plot types are calcualted separately so if you give them a value of 1 for grassland, 1 for hills and 1 for forest a grassland hill with a forest will be worth 3. I do not evaluate resources at all beyond determining their yield values so there are currently no prefenses for them.

Enjoy :)
 
Oh, and on that note, aside from a few tweaks and fixes for any bugs you guys find the script at this point is basically done.

I would like to do some work on snow & tundra for the Toridal maps that Gekko loves so much. I'm also still messing with the concept of more specific control over the landmass type so this script can be used to generate inland sea or coastal maps as well but I don't expect anything soon for that.
 
Ok, so the moral of the story is: don't work on complicated code while helping your daughter with her homework.

I'll have an update up in a little bit which fixes the entire section of code the was being ignored and resulted in starting plots right on top of each other in many cases.

Oops :)
 
1.61 has been uploaded, the distance calculations are being used now. I actually replaced a large section of the starting plot with some code that SevenSpirits had written for PerfectWorld.py a while back that evaluates plots slightly differently.
 
Thanks :)

I guess by Gekko's silence I can assume the starting plot code is working better now. I'd still like to do some work on it just to fine tune a few aspects of it but the starts I've been seeing with it have been good overall so I'm not sure I want to mess with something that isn't broken.
 
my silence was due to the fact that I was in a place with a crappy crappy connection for the weekend, so my time online was very limited :D

now that I'm back home I can safely say that version 1.61 rocks :goodjob:
 
Well that's good to hear... about the map script that is, not the crappy internet connection :)

I have a busy week ahead of me but I'm going to try to get a minute to hop in there and see what i can do about tweaking the snow/tundra a bit more for you.
 
Back
Top Bottom