Proposal: culturally and physically appropriate starting positions.

lumpthing

generic lump
Joined
Sep 11, 2004
Messages
781
Location
Lumpinium, England
Anyone know of a a map script that causes civs to start in appropriate locations? e.g. East Asian civs start close to one another, European civs start in a cold/temperate region etc.

If not, could anyone give me any pointers to getting started on creating one myself?
 
Update time:

My not particularly cunning plan was to modify dreiche2's Fall From Heaven 'flavor map' script for the standard Earth civs instead of Fall From Heaven's fantasy civs.

Unfortunately I can't seem to get it to work for me, as you can read here: http://forums.civfanatics.com/showpost.php?p=6115852&postcount=176

So I'm waiting for someone to enlighten me as to what the problem is. Otherwise I'm going to have to give up :(
 
Here you go. Good luck!

I haven't edited any of dreiche2's text, so some of it is misleading since it refers to his original Fall from Heaven file. But it should be perfectly obvious where this is the case. The only thing I have modified is the information referring to specific civs, and the file name itself.

To get the mod to work, you need to place it within the publicMaps folder and then paste in the following line of code into the top of any map script you want to be affected by it:

from flavourStartsMapMod import normalizeStartingPlotLocations

NB: I've included a bunch of text files which contain my notes on things like which resources appear at what latitudes etc. They shouldn't have any effect on the problem at hand but might be helpful if you decide to take the mod further. One useful bit of info I didn't include in my notes is the fact that luxury appear less frequently and in much more concentrated patterns than food resources.
 

Attachments

  • flavourStartsMapMod.zip
    14 KB · Views: 153
Very cool, I'd love to experiment with this in my PerfectWorld variant I've been using. I'll add it in, and add some debugging output to see if I can figure out the issue.

What script were you using it with?
 
I've been testing it with tectonics (my favourite user-made script) and the default continents script (huge size in both cases). Didn't seem to work with either script.

By the way I updated my download file to include my notes, see my previous post in this forum.
 
Okay, I'm still at work so I haven't had a chance to actually test this yet, but it looks like a lot of the civs you've set up have some of their conditions commented out, and there's not a whole lot of consistency in your groupings. When I get home, I'm going to simplify the script as a test. It's possible that it is working, but the way you have it set up, it's just not that meaningful.

edit: I think it might be wise as well, to tighten up the groupings into fewer more cohesive arrangements. Is it really that important that South Asia and East Asia, or North America and South America be separate? I'd rather have them together in an ahistorical arrangement than on separate continents altogether. It's also worth considering adjusting for resources that are specific to a civ. Like giving ivory a bonus for the Khmer start, and ocean and coast a bonus for Vikings and Dutch. Of course, there are some serious pros and cons to that one ;)
 
Okay, I found two problems that were preventing the code from running at all. First, you have to change "FfH_flavor_mapmod" to the name of your new script, "flavourStartsMapMod" in the import statement. I'm guessing that was just a typo in your post though. Second, there was a typo on line 479 that I discovered when I checked the PythonErr.log file. It says just "info" where it should say "infoMongol".

If you then set the FFH_DEBUG variable to "True" in the script, you can check the PythonDbg.log file and see all the debug output. In looking at this, I could see that your script appears to be working fine at that point. I'm still a little dubious about how meaningful the results will be with the rules as you have them set, though.

Thanks for putting this together, I'm going to keep working with it a bit for a much more simplified version and see if that's more to my liking, as we seem to have different goals in a script like this.
 
dreiche 2 reported some reasons yesterday...
the script will look at all 'starting points' then count a grid of N in all direction. then add : +x for this, -y for that... and no notion of distance. so, if sheep is important, give them a factor 10. thus, 3 jungle w10 tiles south will not negate a sheep in the fat cross and declare the site invalide.

so his advices are :
-reduce the grid size.
-change impact of ressources compared to terrain

I would add :
-use less -x bonus...
 
thanks

The way I sorted out the different civ groupings is a work in progress. I've shuffled them around a few times trying to get things to work, so how it happens to be now only partially reflects how I envision it work out in the end. Right now, my primary concern is getting it to work at all!

Needless to say you should work things out exactly how you like, I just want to see if any kind of cultural grouping is possible.

But as an interesting point of dicussion I do see South Asia and East Asia as significantly different. I mean, Indian and East Asian civilization have very separate origins, as separate as any you can expect while still being on the same landmass. Indian cultural origins are in my opinion closer to that of European and Middle Eastern civilizations. The people who laid the foundations Indian culture in the form of Hinduism are very related to Europeans and this is especially evident in their language. But India was still historically very different to the Middle East and Europe so I tend to see it as more of a 'free-floating' civilization, not tied to any other.

I can't remember who the Khmer are grouped with in the file I sent you but I would certainly now consider them part of the East Asian grouping rather than the South Asian group.

And yes the import line of code was just (shockingly glaring!) typo. I'll correct it in my post in case anyone else has a go. I know that the code is being imported because I get the all-grassland map of error if I make a mistake in the syntax.

Cheers for the Mongol typo.
 
Hi all, probably it makes more sense to discuss this stuff in this thread, so for completeness' sake I quote my answer from the other thread (although Calavente reported it already):

First of all, you could try to reduce regionSize further, if just for testing purposes. That makes it easier to see what's really close to the starting position. I recommend 6 or something.

Secondly, you could play around with the values a little bit. In particularly, you should set the value for boni higher than that for terrains, because they appear less often. What the algorithm does is to count all the things withing range, multiply each count with it's corresponding value, and add everything up. With your setting, a single jungle tile withing range will basically negate one sheep resource within range...

So if you really want to know if the sheep thing works, make it the only flavor setting for that civ, and then look at what you get...

And btw, just because Calavente mentioned the "notion of distance": there is actually another setting that let's you give closer tiles a higher weight (though not specifically for certain terrains or features). You can define the size of a "close" region and assign an additional weight factor to it.

But as mentioned before, to have an observable effect you should probably make the overall regionSize small to begin with.
 
Oops, I just noticed that in dreiche2's explanatory notes, it says SetPriority. I had been spelling it setPriority ('s' instead of 'S'). I'm pretty certain this was the problem. Bloody syntax. Don't have time to make 100% sure tonight but I'm optimistic.

In the meantime, dreiche2: do you know if its possible to have decimal values for SetPriority, e.g. 1.5, 2.5.?
 
Looked into the file, setPriority is correct. The notes are wrong in that regard. I suspect it should give an error if you try otherwise.

Priority can only have 1, 2, or 3 as value the way it is currently implemented.
 
oh :( In that case I'll report on my latest attempts...

i tried reducing the regionSize to 6 and increased the value for sheep to 10, but to no avail.

I then tried commenting out all the code for non-European civs - so the Europeans all desperately wanted sheep and had priority 1, and all the other civs didn't care. Three out of my three trials worked perfectly - for the first time all the European civs had sheep in their region! I'll have to do more tests to make sure of course, but it seems like a step closer towards identifying the problem.
 
hm... oops. Just had another look at the script; possibly the whole priority thing is bugged. Well, very possibly, that is.

Could you test that: In the following code segment,

Code:
	def setPriority(self,priority): # the lower the earlier

		if priority < 1:

			priority = 1

		if priority > 3:

			priority = 3

		self.priority_ = priority

replace "self.priority_" with "self._priority". The underscore is on the wrong spot, a typo it seems. :mischief:

Apart from that, the above argument with the regionSize and Bonus value still applies, though.
 
just to give an update: I have been doing more testing, with that bit of code correct. The results are encouraging but I need to do more. I'm just very busy at the moment and its difficult to find even a spare half hour :/

keep the good work, we will wait ^^
 
Top Bottom