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

The Total Map Conversion Project

Discussion in 'Maps & Scenarios' started by GreatLordofPie, May 16, 2012.

  1. GreatLordofPie

    GreatLordofPie Warlord

    Joined:
    Nov 20, 2009
    Messages:
    209
    Gender:
    Male
    This is the official Total Map Conversion Project (TMCP) thread!
    The goal of the TMCP is to convert every unique and non-mod reliant map available for download for Civ 4 (although it would be cool if those were included as well). This thread isn't to document maps for downloading, as there is already one for that (though it's been inactive for a while), but rather, for WorldBuilders to post the maps they wish to convert to C2C, and to discuss their map's specs when they're done.

    Rules of TMCP:
    1. Post in this thread saying what map you're converting (though it's probably better to post the map file somewhere else, but that's your call)
    2. Maps that have more than one copy of themselves are the exception to the project's main goal; only the most current version of all maps should be converted, for simplicity's sake.
    3. Don't forget to credit the creator
    4. Have Fun :crazyeye:

    List of already converted maps:
    "Giant Earth Map" converted by Acularius, original by Genghis_Kai
    "Earth 18 Civs" from the unmodded game, converted by GreatLordofPie, original by Rhye
    "Standard Earth Pack (Beta)", converted by RidetheSpiral, original by ???
    "Spain to Caspian" (edited GEM), converted by Hanny, original by Genghis_Kai
    "Atlantica", converted by GreatLordofPie, original by el_hidalgo (this map is actually the "Europa Ultima" and "Eastern North America",maps combined, both by el_hidalgo, so both apply to rule 2)

    If I forgot anyone, I'm sorry.
    Happy WorldBuilding!
     
  2. GreatLordofPie

    GreatLordofPie Warlord

    Joined:
    Nov 20, 2009
    Messages:
    209
    Gender:
    Male
    reserved for new maps in the future
     
  3. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,552
    Gender:
    Male
    Location:
    MN
    If your going to do a project this BIG, it best you look at how DH did his Terrain Add-On's, it would be 100 times easier for anyone then to do any map they want using any terrain the mod has. Trouble is, its not a correct way of Earth Maps, just any other type of map. That is if you know a little about python that is.

    I have been asking anyone to do this, it would be fantastic with the Terrain Add-On's done.

    Spoiler :
    Code:
    ## Sid Meier's Civilization 4
    ## Copyright Firaxis Games 2005
    ##
    ## C2C Terrain Features and special resource placement.
    ## A post map script so that these will appear in game no matter which map script is used.
    ##
    ##	by Dancing Hoskuld
    ##
    ##   Resources
    ##    1. Place of Sea Lion(Seal) and Walrus resource only on coastal plots in tundra regions.
    ##    2. Place of Sea Lion(Seal) on some single plot islands.
    ##
    ##  Terrain Features
    ##	For terrain marsh
    ##	    polar regions 75% marsh has peat bog feature
    ##	    cool temperate 25% peat bog, 40% sword grass representing the tall grasses you make thatch from eg Fens in the UK
    ##	    warm temperate 25% sword grass, 40% swamp
    ##	    tropical 50% swamp and 15% papyrus
    ##
    ##	    All this modified with "mangrove swamp" for coastal swamps. If I can get the graphic - I was thinking the ground water one from DuneWars as a place holder
    ##		Polar and cool temperate - no chance
    ##		Warm temperate 50%
    ##		Tropical 90%
    ##
    ##	For Tundra
    ##	    one in ten plots get one of the polar rock formations
    ##
    ##	For Desert
    ##	    one in ten plots get one of
    ##		one of the desert rock formations
    ##		one of the plant features (not dates or coconut)
    ##
    ##		Modified by coastal deserts getting dates or coconut instead.
    ##
    ##	For Forest next to a desert
    ##		Replace with savanna
    ##
    ##	For single plot islands in the warm temperate to tropical
    ##		If no other feature get coconuts.
    
    from CvPythonExtensions import *
    
    import CvUtil
    import sys
    
    # globals
    gc = CyGlobalContext()
    
    def isNextToFeature(pPlot, iFeature):
    	iPlotX = pPlot.getX()
    	iPlotY = pPlot.getY()
    	
    	iX = iPlotX - 1
    	while iX < iPlotX + 2:
    		iY = iPlotY - 1
    		while iY < iPlotY + 2:
    			if not ( iX == iPlotX and iY == iPlotY):
    				testplot = CyMap().plot(iX, iY)
    				if  testplot.getFeatureType()  == iFeature: 
    					return True
    			iY = iY + 1
    		iX = iX + 1
    
    	return False
    
    def isNextToTerain(pPlot, iTerrain):
    	iPlotX = pPlot.getX()
    	iPlotY = pPlot.getY()
    	
    	iX = iPlotX - 1
    	while iX < iPlotX + 2:
    		iY = iPlotY - 1
    		while iY < iPlotY + 2:
    			if not ( iX == iPlotX and iY == iPlotY):
    				testplot = CyMap().plot(iX, iY)
    				if  testplot.getTerrainType()  == iTerrain: 
    					return True
    			iY = iY + 1
    		iX = iX + 1
    
    	return False
    
    def isSinglePlotIsland(pPlot):
    	# check that each plot around this plot is sea/coast
    	iPlotX = pPlot.getX()
    	iPlotY = pPlot.getY()
    	
    	iX = iPlotX - 1
    	while iX < iPlotX + 2:
    		iY = iPlotY - 1
    		while iY < iPlotY + 2:
    			if not ( iX == iPlotX and iY == iPlotY):
    				testplot = CyMap().plot(iX, iY)
    				#~ if testplot.isFlatlands () or testplot.isHills():  # allow peaks for isolated beaches?? 
    				if not testplot.isWater (): 
    					return False
    			iY = iY + 1
    		iX = iX + 1
    	
    	return True
    
    def isSeaCoastalLand(pPlot):
    	# check that at least one plot around this plot is sea/coast
    	if not pPlot.isCoastalLand():
    		return False
    		
    	iPlotX = pPlot.getX()
    	iPlotY = pPlot.getY()
    	
    	iX = iPlotX - 1
    	while iX < iPlotX + 2:
    		iY = iPlotY - 1
    		while iY < iPlotY + 2:
    			if not ( iX == iPlotX and iY == iPlotY):
    				testplot = CyMap().plot(iX, iY)
    				if testplot.isWater () and not testplot.isLake(): 
    					return True
    			iY = iY + 1
    		iX = iX + 1
    	
    	return False
    
    def placeSealOrWalrus(iPlot, iSeaLion, iWalrus):
    	
    	if CyGame().getSorenRandNum(3, 'SealionResource') == 0:
    		iPlot.setBonusType(iWalrus)
    	else:
    		iPlot.setBonusType(iSeaLion)
    	return
    
    def placeMarshFeature(iPlot, featurePeatbog, featureGrass, featureSwamp):
    	
    	if iPlot.getLatitude() >= 60: # Polar
    		if CyGame().getSorenRandNum(99, 'TerrainFeature') < 74:
    			iPlot.setFeatureType(featurePeatbog, 0)
    		return
    	elif iPlot.getLatitude() >= 40: # Cool temperate
    		iChance = CyGame().getSorenRandNum(99, 'TerrainFeature')
    		if iChance < 24:
    			iPlot.setFeatureType(featurePeatbog, 0)
    		if iChance < 64:
    			iPlot.setFeatureType(featureGrass, 0)
    		return
    	elif iPlot.getLatitude() >= 25: # Warm temperate
    		iChance = CyGame().getSorenRandNum(99, 'TerrainFeature')
    		#~ if iPlot.isCoastal():
    			#~ if iChance < 49:
    				#~ iPlot.setFeatureType() = gc.getInfoTypeForString("FEATURE_MANGROVE")
    				#~ return
    		if iChance < 24:
    			iPlot.setFeatureType(featureGrass, 0) 
    		elif iChance < 64:
    			iPlot.setFeatureType(featureSwamp, 0)
    		return
    	else: # Tropical
    		iChance = CyGame().getSorenRandNum(99, 'TerrainFeature')
    		#~ if iPlot.isCoastal():
    			#~ if iChance < 89:
    				#~ iPlot.setFeatureType() = gc.getInfoTypeForString("FEATURE_MANGROVE")
    				#~ return
    		#~ if iChance < 49:
    			#~ iPlot.setFeatureType(featureSwamp, 0)
    		#~ elif iChance < 64:
    			#~ iPlot.setFeatureType() = gc.getInfoTypeForString("FEATURE_PAPYRUS")
    		iPlot.setFeatureType(featureSwamp, 0)
    		return
    	return
    
    def placePolarRockFeature(iPlot):
    
    	if CyGame().getSorenRandNum(99, 'TerrainFeature') < 90: # 10% percent chance of a rock from
    		return 
    
    	iFormNumber = CyGame().getSorenRandNum(5, 'TerrainFeature')
    	
    	if iFormNumber == 0: 
    		iPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_POLAR_ROCK_ARCH"), 0)
    	elif iFormNumber == 1: 
    		iPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_POLAR_ROCK_ARCH2"), 0)
    	elif iFormNumber == 2: 
    		iPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_POLAR_ROCK_FORM1"), 0)
    	elif iFormNumber == 3: 
    		iPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_POLAR_ROCK_FORM2"), 0)
    	elif iFormNumber == 4: 
    		iPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_POLAR_ROCK_FORM3"), 0)
    	else: # iFormNumber == 5: 
    		iPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_POLAR_ROCK_FORM4"), 0)
    
    def placeDesertPlantFeature(iPlot):
    
    	if CyGame().getSorenRandNum(99, 'TerrainFeature') < 90: # 10% percent chance of a rock from
    		return 
    
    	iFormNumber = CyGame().getSorenRandNum(1, 'TerrainFeature')
    	
    	if iFormNumber == 0: 
    		iPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_BARREL_CACTUS"), 0)
    	else: # iFormNumber == 1: 
    		iPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_PRICKLY_PEAR"), 0)
    
    def placeDesertRockFeature(iPlot):
    
    	if CyGame().getSorenRandNum(99, 'TerrainFeature') < 90: # 10% percent chance of a rock from
    		return 
    
    	iFormNumber = CyGame().getSorenRandNum(11, 'TerrainFeature')
    	
    	if iFormNumber == 0: 
    		iPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_ROCK_ARCH"), 0)
    	elif iFormNumber == 1: 
    		iPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_ROCK_ARCH2"), 0)
    	elif iFormNumber == 2: 
    		iPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_ROCK_FORM1"), 0)
    	elif iFormNumber == 3: 
    		iPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_ROCK_FORM2"), 0)
    	elif iFormNumber == 4: 
    		iPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_ROCK_FORM3"), 0)
    	elif iFormNumber == 5: 
    		iPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_ROCK_FORM4"), 0)
    	elif iFormNumber == 6: 
    		iPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_DARK_ROCK_ARCH"), 0)
    	elif iFormNumber == 7: 
    		iPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_DARK_ROCK_ARCH2"), 0)
    	elif iFormNumber == 8: 
    		iPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_DARK_ROCK_FORM1"), 0)
    	elif iFormNumber == 9: 
    		iPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_DARK_ROCK_FORM2"), 0)
    	elif iFormNumber == 10: 
    		iPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_DARK_ROCK_FORM3"), 0)
    	else: # iFormNumber == 11: 
    		iPlot.setFeatureType(gc.getInfoTypeForString("FEATURE_DARK_ROCK_FORM4"), 0)
    
    
    def onGameStart(argsList):
    	'Called at the start of the game'
    	gb_GoodyHuts = True
    	if CyGame().isOption(GameOptionTypes.GAMEOPTION_NO_GOODY_HUTS):
    		gb_GoodyHuts = False
    	
    	iSeaLion = gc.getInfoTypeForString("BONUS_SEA_LIONS")
    	iWalrus = gc.getInfoTypeForString("BONUS_WALRUS")
    
    	terrainCoast = gc.getInfoTypeForString("TERRAIN_COAST")
    	terrainMarsh = gc.getInfoTypeForString("TERRAIN_MARSH")
    	terrainTundra = gc.getInfoTypeForString("TERRAIN_TUNDRA")
    	terrainDesert = gc.getInfoTypeForString("TERRAIN_DESERT")
    	
    	featureIce = gc.getInfoTypeForString("FEATURE_ICE")
    	featureReef = gc.getInfoTypeForString("FEATURE_REEF")
    	featureKelp = gc.getInfoTypeForString("FEATURE_KELP")
    	
    	featureFossil = gc.getInfoTypeForString("FEATURE_BONES")
    	featureCrater = gc.getInfoTypeForString("FEATURE_CRATER")
    	featureTarPit = gc.getInfoTypeForString("FEATURE_TAR_PIT")
    	featureCoconut = gc.getInfoTypeForString("FEATURE_COCONUT")
    	featurePeatbog = gc.getInfoTypeForString("FEATURE_PEAT_BOG")
    	featureGrass = gc.getInfoTypeForString("FEATURE_SWORD_GRASS")
    	featureSwamp = gc.getInfoTypeForString("FEATURE_SWAMP")
    	
    	improvementGoodyIsland = gc.getInfoTypeForString("IMPROVEMENT_GOODY_ISLAND")
    
    	for i in range(CyMap().numPlots()):
    		iPlot = CyMap().plotByIndex(i)
    		iLatitude = iPlot.getLatitude()
    		iTerrain = iPlot.getTerrainType()
    		#~ iFeature = iPlot.getFeatureType()
    		
    		if iPlot.isWater():
    			if iTerrain == terrainCoast:
    				if not (iPlot.getFeatureType() == featureIce or iPlot.isLake() ):
    					if CyGame().getSorenRandNum(99, 'TerrainFeature') < 5:
    						iPlot.setFeatureType(featureKelp, 0) 
    					elif CyGame().getSorenRandNum(99, 'TerrainFeature') < 5:
    						iPlot.setFeatureType(featureReef, 0)
    							
    					if gb_GoodyHuts and CyGame().getSorenRandNum(19, 'IrgendeinTextAusDemDieZahlBerechnetWird') == 0:
    						iPlot.setImprovementType(improvementGoodyIsland)
    
    		else:
    			if (iTerrain == terrainMarsh):
    				placeMarshFeature(iPlot, featurePeatbog, featureGrass, featureSwamp)
    				
    			if iPlot.isFlatlands() and (iPlot.getFeatureType() == -1) and (iPlot.getBonusType(-1) == -1):
    				if CyGame().getSorenRandNum(99, 'Fossils') == 0:
    					iPlot.setFeatureType(featureFossil, 0)
    				elif CyGame().getSorenRandNum(99, 'TarPit') == 0:
    					iPlot.setFeatureType(featureTarPit, 0)
    				elif CyGame().getSorenRandNum(990, 'Crater') == 0:
    					iPlot.setFeatureType(featureCrater, 0)
    				
    			if (iPlot.getFeatureType() == -1) and (iTerrain == terrainDesert) and not iPlot.isPeak():
    					placeDesertPlantFeature(iPlot)
    					
    			if (iPlot.getFeatureType() == -1)  and not iPlot.isPeak():
    				if (iTerrain == terrainTundra):
    					placePolarRockFeature(iPlot)
    				if (iTerrain == terrainDesert):
    					placeDesertRockFeature(iPlot)
    
    			if iPlot.isPeak():
    				continue
    			elif isSinglePlotIsland(iPlot):
    				if (iPlot.getBonusType(-1) == -1): # coastal plot without any resources
    					if (iLatitude < 64):
    						if CyGame().getSorenRandNum(2, 'SealionResource') == 0:
    							iPlot.setBonusType(iSeaLion)
    					else:
    						placeSealOrWalrus(iPlot, iSeaLion, iWalrus)
    						
    				if (iPlot.getFeatureType() == -1) and (iLatitude < 25):  # No feature in the tropics
    					iPlot.setFeatureType(featureCoconut, 0)
    			else:
    				if isSeaCoastalLand(iPlot) :
    					if (iPlot.getBonusType(-1) == -1) and (iLatitude >= 65): # coastal plot without any resources
    						if CyGame().getSorenRandNum(19, 'SealionResource') == 0:
    							placeSealOrWalrus(iPlot, iSeaLion, iWalrus)
    							
    					if (iPlot.getFeatureType() == -1) and (iLatitude < 25):  # Tropics
    						if (iTerrain == terrainDesert):
    							if CyGame().getSorenRandNum(4, 'Coconuts') == 0:
    								iPlot.setFeatureType(featureCoconut, 0)
    						else:
    							if CyGame().getSorenRandNum(2, 'Coconuts') == 0:
    								iPlot.setFeatureType(featureCoconut, 0)
    				else:
    					continue
    
    					
    
     
  4. Acularius

    Acularius King

    Joined:
    Jan 22, 2012
    Messages:
    794
    Location:
    Ontario, Canada
    You are a busy man. :D

    Keep up the good work!
     
  5. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    As an FYi once we get viewport and very large map support working, I plan to write a map scaling tool, to allow existing maps to be expanded to larger scale automatically. This will be intended t provide a reasonable (and indeed playable) base for further details editing, rather than having to start from scratch.
     
  6. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,552
    Gender:
    Male
    Location:
    MN
    Now thats just plain scaling correct, ie: 124X96 to make it bigger or smaller? But i hope its alot later than the more useful Multi-Map project:please:
     
  7. GreatLordofPie

    GreatLordofPie Warlord

    Joined:
    Nov 20, 2009
    Messages:
    209
    Gender:
    Male
    This is cool, but how does it work? Do I copy it into a notepad and put it into the python folder or something?
     
  8. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,552
    Gender:
    Male
    Location:
    MN
    Well it needs to be DRASTICALLY updated with all the NEW resources, it only has a few of them, from months ago. So someone would have to go through the python and update all of it, but it works great on any regular/fantasy map, just not Earth Maps.
     
  9. GreatLordofPie

    GreatLordofPie Warlord

    Joined:
    Nov 20, 2009
    Messages:
    209
    Gender:
    Male
    Well, unfortunately, I only "know" basic XML, which is why I'm sticking with maps. Sorry:(
     
  10. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,552
    Gender:
    Male
    Location:
    MN
    I hear that, i have made over 200 of them from scratch, and some off the wall one also, even a nude of Pam Anderson :eek::lol::lol::p Actually isn't a bad map.:) The best one i made was of the Mona Lisa, actually looks as good as the pic of her.
     
  11. Faustmouse

    Faustmouse Deity

    Joined:
    Jan 31, 2012
    Messages:
    3,509
    I'd love to see a giant earth map version of the worldmap from the "next war" mod because I never get that late in my games :(
     
  12. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,552
    Gender:
    Male
    Location:
    MN
    Why not, old PC:old:or something?
     
  13. GreatLordofPie

    GreatLordofPie Warlord

    Joined:
    Nov 20, 2009
    Messages:
    209
    Gender:
    Male
    Probably wouldn't be too hard, it would just be tedious to add HUNDREDS of buildings to HUNDREDS of cities:eek:
     
  14. Acularius

    Acularius King

    Joined:
    Jan 22, 2012
    Messages:
    794
    Location:
    Ontario, Canada
    The tedium of that makes me cry inside.
     
  15. GreatLordofPie

    GreatLordofPie Warlord

    Joined:
    Nov 20, 2009
    Messages:
    209
    Gender:
    Male
    Starting the first (official) conversion of the project, which is incidentally what seems to be Strategyonly's first map, Caladan, from Dune!

    EDIT: Never mind, not his first map, but still gonna do it
     
  16. GreatLordofPie

    GreatLordofPie Warlord

    Joined:
    Nov 20, 2009
    Messages:
    209
    Gender:
    Male
    Alright, so the Caladan map is just about done (sorry for the wait; I'm moving and the lack of variety of terrain made it difficult to change)
     
  17. rightfuture

    rightfuture Emperor

    Joined:
    Mar 11, 2008
    Messages:
    1,649
    This is awesome, hope you get to the Accurate Earth Map soon (alas I have so little time right now), I do love GEM very much and would really really like you helping to improve the good C2C version we already have. :)
     
  18. Faustmouse

    Faustmouse Deity

    Joined:
    Jan 31, 2012
    Messages:
    3,509
    Note, not a hardware problem ;) The problem is, that in my last GEM Games I conquered Europe AND Africa before I even researched Railsroads... I was miles ahead of all the other civs while playing on deinty. I know, I could try another civ but I just want to start a game in 2030 or something ;)


    Is it possible to add a "add [buildingname] in all cities" function?
     
  19. GreatLordofPie

    GreatLordofPie Warlord

    Joined:
    Nov 20, 2009
    Messages:
    209
    Gender:
    Male
    Okay, the Caladan map is done! You can find it in the below attachment.
    Also, I'll be on hiatus in terms of building the maps for the next couple of weeks because of exams, so happy modding!

    I wish!
     

    Attached Files:

  20. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,552
    Gender:
    Male
    Location:
    MN
    Got this error message: see later post, i had wrong pic here.:blush:
     

Share This Page