1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Proposal: culturally and physically appropriate starting positions.

Discussion in 'Civ4 - Map Scripts' started by lumpthing, Oct 25, 2007.

  1. lumpthing

    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?
     
  2. alireza1354

    alireza1354 Chieftain

    Joined:
    Jun 11, 2001
    Messages:
    1,023
    Would be very cool if u could choose it to be like this...
     
  3. lumpthing

    lumpthing generic lump

    Joined:
    Sep 11, 2004
    Messages:
    781
    Location:
    Lumpinium, England
    well watch this space... I have hatched upon a cunning plan for a map script which might just work!

    will post here after I have created and tested it
     
  4. Amuroray

    Amuroray Chieftain

    Joined:
    Sep 18, 2007
    Messages:
    72
    really? can t wait for it :)
     
  5. lumpthing

    lumpthing generic lump

    Joined:
    Sep 11, 2004
    Messages:
    781
    Location:
    Lumpinium, England
    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 :(
     
  6. SlightlyMad

    SlightlyMad Chieftain

    Joined:
    Sep 26, 2007
    Messages:
    474
    Location:
    Baltimore, MD
    lumpthing, that's a really cool idea, could you post your script so I can debug it and see if I can find the problem?
     
  7. lumpthing

    lumpthing generic lump

    Joined:
    Sep 11, 2004
    Messages:
    781
    Location:
    Lumpinium, England
    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.
     

    Attached Files:

  8. SlightlyMad

    SlightlyMad Chieftain

    Joined:
    Sep 26, 2007
    Messages:
    474
    Location:
    Baltimore, MD
    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?
     
  9. lumpthing

    lumpthing generic lump

    Joined:
    Sep 11, 2004
    Messages:
    781
    Location:
    Lumpinium, England
    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.
     
  10. SlightlyMad

    SlightlyMad Chieftain

    Joined:
    Sep 26, 2007
    Messages:
    474
    Location:
    Baltimore, MD
    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 ;)
     
  11. SlightlyMad

    SlightlyMad Chieftain

    Joined:
    Sep 26, 2007
    Messages:
    474
    Location:
    Baltimore, MD
    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.
     
  12. Calavente

    Calavente Richard's voice

    Joined:
    Jun 4, 2006
    Messages:
    2,574
    Location:
    France
    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...
     
  13. lumpthing

    lumpthing generic lump

    Joined:
    Sep 11, 2004
    Messages:
    781
    Location:
    Lumpinium, England
    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.
     
  14. dreiche2

    dreiche2 Chieftain

    Joined:
    Apr 9, 2003
    Messages:
    320
    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):

    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.
     
  15. lumpthing

    lumpthing generic lump

    Joined:
    Sep 11, 2004
    Messages:
    781
    Location:
    Lumpinium, England
    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.?
     
  16. dreiche2

    dreiche2 Chieftain

    Joined:
    Apr 9, 2003
    Messages:
    320
    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.
     
  17. lumpthing

    lumpthing generic lump

    Joined:
    Sep 11, 2004
    Messages:
    781
    Location:
    Lumpinium, England
    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.
     
  18. dreiche2

    dreiche2 Chieftain

    Joined:
    Apr 9, 2003
    Messages:
    320
    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.
     
  19. lumpthing

    lumpthing generic lump

    Joined:
    Sep 11, 2004
    Messages:
    781
    Location:
    Lumpinium, England
    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 :/
     
  20. Amuroray

    Amuroray Chieftain

    Joined:
    Sep 18, 2007
    Messages:
    72
    keep the good work, we will wait ^^
     

Share This Page