1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[Map Script] SmartMap

Discussion in 'Civ4 - Map Scripts' started by surt, Jan 20, 2006.

  1. Sine Nomen

    Sine Nomen Chieftain

    Joined:
    Dec 22, 2004
    Messages:
    65
    I've been following this script for a while and try to use it every now and then, but have never had any luck producing maps that don't have intertwining splotches of grassland-bordered desert and jungle at seemingly random latitudes. Has anyone? If so, what settings do you use? Nothing I've tried has worked
     
  2. Thedrin

    Thedrin Chieftain

    Joined:
    Jan 24, 2002
    Messages:
    2,649
    Location:
    London
    Set terrain and features to standard. Standard uses CivIV's default terrain and feature generator which, I believe, is used by all of the map scripts that were included in CivIV's.
     
  3. Sine Nomen

    Sine Nomen Chieftain

    Joined:
    Dec 22, 2004
    Messages:
    65
    Everything on 'standard' produces this:
     

    Attached Files:

  4. Thedrin

    Thedrin Chieftain

    Joined:
    Jan 24, 2002
    Messages:
    2,649
    Location:
    London
    Well then maybe some aspect of SmartMap's land generation is having an affect on the terrain and features produced by the standard generators.
     
  5. jpinard

    jpinard Martian

    Joined:
    Jan 18, 2002
    Messages:
    760
    Location:
    Enceladus, Saturn
    Your textures look way better than mine. Are you using blue marble?
     
  6. MrPopov

    MrPopov Chieftain

    Joined:
    Jul 25, 2006
    Messages:
    985
    I am having problems now with smartmap generating ice not just north and south, but now east and west edges of the map. I have tried many changes in custom game, and they are all generating this ice.

    I have attached a few screenshots to show you what I mean.

    The first 3 are from Total Realism 2.2 mod. The last is plain Warlords.
     

    Attached Files:

  7. MrPopov

    MrPopov Chieftain

    Joined:
    Jul 25, 2006
    Messages:
    985
    Ah, I just realized. When no wrap is selected, instead of making the world "flat" it adds ice to all edges.

    I think that may be conflicting with genearting lakes.

    For example, I am attempting to create a highlands type map with only 1 big land and no wrap (like the vanilla highlands script) with lakes and peaks creating chokepoints in the land. I think, though, that since smartmap is creating this edge ocean, it won't generate any lakes in the land since enough ocean is created on the edge. Correct me if I am wrong or point me to suitable settings to have smartmap generate what I am looking for.

    The first 2 screens are my settings. The third is the result
     

    Attached Files:

  8. buddhabackpacke

    buddhabackpacke Chieftain

    Joined:
    Oct 27, 2007
    Messages:
    2
    I realize this is an older thread but I'm trying to fix this script to work on my mac. So far I've only found 2 things to change: One is the calls to _winreg to handle the folder paths. That's easy to fix as it's been done in other mods and there are clear instructions. But the other error I'm getting is the call to 'sorted'. I have no clue why the python error is 'sorted' is not defined. It should be part of the python API unless there is some python bug in the mac verision. If anyone should read this and have any guidance I would really appreciate it!!
     
  9. EmperorFool

    EmperorFool Chieftain

    Joined:
    Mar 2, 2007
    Messages:
    9,633
    Location:
    Mountain View, California
    If you enable logging* and PM me (or post) the exception stack trace, I'll take a look.

    * Edit CivilizationIV.ini:

    Code:
    ; Set to 1 for no python exception popups
    HidePythonExceptions = [B]1[/B]
    ...
    ; Enable the logging system
    LoggingEnabled = [B]1[/B]
    
    You may not have to disable python exceptions, but I do so I can see them in the file instead of on-screen.

    Then, when the error occurs, open the file "Logs/PythonErr.log".
     
  10. buddhabackpacke

    buddhabackpacke Chieftain

    Joined:
    Oct 27, 2007
    Messages:
    2
    Thanks. I'll work on it tonight, but it will be next weed mid-week before I can get online to post the log.
     
  11. Sto

    Sto Should i code today ...

    Joined:
    Dec 15, 2005
    Messages:
    1,143
    Location:
    Marseille (France)
    you can fix that this way :

    replace "import _winreg" with :
    Code:
    if (sys.platform == 'darwin'):
    	import sets
    	def set(arg):
    		return sets.Set(arg)
    else:
            import _winreg
    
    and the function "def civFilePath():" with :

    Code:
    def civFilePath():
            if (sys.platform == 'darwin'):
                    try:
                            userFolder = os.path.join(os.environ['HOME'], "Documents")
                            civFolder = "Civilization IV"
                            if (os.path.basename(os.getcwd()) == "Warlords"):
                                    civFolder = "Civilization IV Warlords"
                            finalFolder = os.path.join(userFolder, civFolder)
                            return finalFolder
                    except:
                            return ""
            else:
                    try:
                            userFolder = regRead(_winreg.HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders","Personal")
                            civFolder = os.path.basename(regRead(_winreg.HKEY_LOCAL_MACHINE,"Software\\Firaxis Games\\Sid Meier's Civilization 4","INSTALLDIR"))
                            finalFolder =  os.path.join(os.path.join(userFolder, "My Games"), civFolder)
                            return finalFolder
                    except:
                            return ""
    
    this function has been made by AlanH . Note that i don't know the name of the document folder for BtS . you should perhaps add two lines :
    Code:
                            if (os.path.basename(os.getcwd()) == "Beyond the Sword"):
                                    civFolder = [COLOR="Red"]"the document name of BtS for MAC"[/COLOR]
    
    the error comes from sorted and operator.itemgetter that are not defined with MacOS ( MAC use python 2.3 and windows python 2.4 ) .

    you can try to replace :
    Code:
    	bonusIdsAndOrder = sorted(bonusIdsAndOrder, key=operator.itemgetter(1))	
    
    with :
    Code:
    	bonusIdsAndOrderTP = [ [item[1],item[0]] for item in bonusIdsAndOrder ]
    	bonusIdsAndOrderTP.sort()
    	bonusIdsAndOrder = [ (item[1],item[0]) for item in bonusIdsAndOrderTP ]
    
    and :
    Code:
    	listsScoresPlayers = sorted(listsScoresPlayers, key=operator.itemgetter(1))	
    	listsScoresPlayers.reverse()
    
    with :
    Code:
    	listsScoresPlayersTP = [ [item[1],item[0],item[2]] for item in listsScoresPlayers ]
    	listsScoresPlayersTP.sort()
    	listsScoresPlayersTP.reverse()
    	listsScoresPlayers = [ (item[1],item[0],item[2]) for item in listsScoresPlayersTP ]
    
    There is probably a best method but this should work . In case you have a problem you can ask in this thread for map script MAC compatibility .

    Tcho !
     
  12. 75below0

    75below0 Chieftain

    Joined:
    Sep 6, 2007
    Messages:
    3
    hasn't posted in over a year...
    i love this mod, whenever i finish the latest expansion or mod
    i always come back to smartmap random generations...
    was going to inquire about adding choice for bonus resources
    have noticed a lot of different new bonuses in other mods
    also some bonuses seem tied to terrain? possible to free them?
    many thanks
     
  13. The Almighty dF

    The Almighty dF Pharaoh

    Joined:
    Mar 27, 2007
    Messages:
    2,252
    Location:
    dFland
    Been having problems with the Earth option on SmartMap.

    The maps are always stretched out either vertically or horizontally, and Africa is covered in snow.

    Does this not work for BtS?
     
  14. Victorvanwavere

    Victorvanwavere Chieftain

    Joined:
    Apr 6, 2002
    Messages:
    105
    Location:
    O.C. California
    Anyone working on an update for BtS?
     
  15. brun58

    brun58 Chieftain

    Joined:
    Dec 29, 2003
    Messages:
    148
    I use the version of SmartMap that the Visa team made for their mod and have has no problems with it in BTS
     
  16. Victorvanwavere

    Victorvanwavere Chieftain

    Joined:
    Apr 6, 2002
    Messages:
    105
    Location:
    O.C. California
    Thanks Brun58,
    I tried to get this version you spoke about, but can't seem to get it.

    Could you please point me in the right direction,
    Thanks.
     
  17. JDexter

    JDexter Chieftain

    Joined:
    Dec 18, 2003
    Messages:
    565
    Gender:
    Male
    Location:
    Germany
  18. brun58

    brun58 Chieftain

    Joined:
    Dec 29, 2003
    Messages:
    148
    Thanks for posting the link, I had looked around after he requested where it was, and thought I had gone to the right site, but I never could locate it again.
     
  19. cavvy

    cavvy Chieftain

    Joined:
    Nov 28, 2005
    Messages:
    19
    Location:
    Rancho Cucamonga, Ca - USA
    Cool mod Surt. I was just playing a game of this mod as Stalin and was kicking the Spanish, Isabella's butt till my game crashed due to a memory issue. It always seems like the game crashes when i go on a killing spree.
     
  20. nemini

    nemini Chieftain

    Joined:
    Jan 28, 2008
    Messages:
    41
    So does this script work with BTS or not? I created a map with BTS and it seems to work ... is there something I'm missing?
     

Share This Page