[MOD] Colonization: 2071

Wow thank you Andre, thats a great help. Do you know what's the role of the following in globaldefines.xml - does this relate only to the water-specific professions yield, or mapscript creation, river direction, ship AI, or possibly all of these? I wonder if a space terrain should be assigned to these or not.

<Define>
<DefineName>DEEP_WATER_TERRAIN</DefineName>
<DefineTextVal>TERRAIN_OCEAN</DefineTextVal>
</Define>
<Define>
<DefineName>SHALLOW_WATER_TERRAIN</DefineName>
<DefineTextVal>TERRAIN_COAST</DefineTextVal>
</Define>

This is used in a couple of functions in the map generation in the DLL. It is basically used for when a water plot is placed; if it is placed next to a non-water plot it is set to TERRAIN_COAST, and TERRAIN_OCEAN otherwise. In the Space Plot code I made I changed this so that it becomes TERRAIN_COAST only if placed next to a plot that is both non-water and non-space.

I also added a XML tag just for space terrain (which is the terrain that space plots automatically become when placed):

Code:
	<Define>
		<DefineName>SPACE_TERRAIN</DefineName>
		<DefineTextVal>TERRAIN_SPACE</DefineTextVal>
	</Define>

It wouldn't be hard to replace this with two tags: ORBITAL_SPACE_TERRAIN and DEEP_SPACE_TERRAIN, and make them function so that each is correctly chosen when a space plot is chosen.

BTW I tried to import your nif file in blender, but still couldn't get blender to import nifs on my computer :( Have you had any success with it? I've come across almost a dozen Civ4 unit nif files which seem to crash in Civ4Col for some reason.

I haven't, but I managed to get other nifs (such as a very nice nif I found of Ichthyostega) working, but I hit another problem, unfortunately: animations.
 
Thanks for the notice The_J, in not watching the news I didn't realize megaupload had closed.

Actually I have had trouble trying to host it anywhere else including civfanatics, weplayciv, or strategyinformer due to the large file size. Any recommendations of where else I should try?
 
Actually I have had trouble trying to host it anywhere else including civfanatics, weplayciv, or strategyinformer due to the large file size. Any recommendations of where else I should try?

You could talk to the people of the German CivForum. :)
(Don't worry, they do understand English.)
 
Thanks thadian. More changes to 2071 such as oceanic planets are temporarily on hiatus while I'm helping out with the Religion & Revolution mod; but I'm hoping to eventually redevelop 2071 in an all-new version 2.0 using an enhanced DLL (such as TAC or even RaR) as a code base.
 
Hey welcome back thadian! :assimilate::borg::king:

I haven't accomplished a whole lot new on this mod, but I've been trying to enable an "Education" system for aliens where they melt down their citizens into new units in a Decomposition Vat. :p I put the building in for Amphibians and it's buildable, but when I try to send units to "school" there nothing happens, even for units with no penalty to Education. I'm not sure what's going on but feel free to tinker around with the XML to see if you can get it working. I am also adding a UFO Cult Leader for aliens to help them abduct more specialists from Earth.

I did have a minor breakthrough on importing difficult unit nifs into Civ4Col, so check out the new units for the Brilliant Biochemist, Brilliant Theorist, Infamous Drug Runner, Mutant, and Human Hybrid among others. Also a new version of Japanese Emperor AI, I think it could use some tweaking though.

(edit: merged graphics update into patch B at top of thread)
 
Heya, i think you removed The Lady or whoever the second Caliphate leader was? Whoever she was, i swear there is a missing leader who was female.

whats up with this leader "The Hired Gun", in fact i see a few that cannot be chosen atm?
 
Hm, both the Caliphate leaders are there when I load it; the Hired Gun and others were from a much older version and were removed until I eventually add some more Earthling civs like the Mercosur Colonies and possibly Africa or India. Are you sure you have the latest version; try erasing it and install the current version from wpc.

Anyway I still want to eventually redevelop an improved version of this mod from the ground up; though it'll probably be some months till I can really start implementing it since I'm busy with RL and also helping on the massive RaR mod which will be great. In the meantime I started a simple design outline in Excel, so hopefully some of the game features can gradually start getting well thought out and reasonably balanced before finally implementing it. Well I'll attach a sheet with some ideas for the Yields and productionlines, let me know if you or others have any suggestions.

I'm trying to modify the Planets mapscript so there can eventually be several different planet types with their own climate. If I can get it working, basically I'm hoping to use the already existing system that generates terrains (GRASS, PLAINS, MARSH etc), then when each planet is generated, try to substitute a new set of terrains for those standard ones depending on the climate type for that planet:

Spoiler :
PHP:
class DonutFractalWorld(CvMapGeneratorUtil.FractalWorld):
	def generatePlotTypes(self, water_percent=78, shift_plot_types=True, grain_amount=3):
		gc = CyGlobalContext()		#Why don't they put this at the top of ALL files?

		#init plottype fractals for hills and peaks
		self.hillsFrac.fracInit(self.iNumPlotsX, self.iNumPlotsY, grain_amount, self.mapRand, self.iFlags, self.fracXExp, self.fracYExp)
		self.peaksFrac.fracInit(self.iNumPlotsX, self.iNumPlotsY, grain_amount+1, self.mapRand, self.iFlags, self.fracXExp, self.fracYExp)
		iHillsBottom1 = self.hillsFrac.getHeightFromPercent(max((self.hillGroupOneBase - self.hillGroupOneRange), 0))
		iHillsTop1 = self.hillsFrac.getHeightFromPercent(min((self.hillGroupOneBase + self.hillGroupOneRange), 100))
		iHillsBottom2 = self.hillsFrac.getHeightFromPercent(max((self.hillGroupTwoBase - self.hillGroupTwoRange), 0))
		iHillsTop2 = self.hillsFrac.getHeightFromPercent(min((self.hillGroupTwoBase + self.hillGroupTwoRange), 100))
		iPeakThreshold = self.peaksFrac.getHeightFromPercent(self.peakPercent)
	
		#orlanth: init terraintype fractals, copied from TerrainGenerator in CvMapGeneratorUtil.py
		self.deserts.fracInit(self.iWidth, self.iHeight, self.grain_amount, self.mapRand, self.iFlags, self.fracXExp, self.fracYExp)
		iDesertTop = self.deserts.getHeightFromPercent(self.iDesertTopPercent)
		iDesertBottom = self.deserts.getHeightFromPercent(self.iDesertBottomPercent)
		self.plains.fracInit(self.iWidth, self.iHeight, self.grain_amount+1, self.mapRand, self.iFlags, self.fracXExp, self.fracYExp)
		iPlainsTop = self.plains.getHeightFromPercent(self.iPlainsTopPercent)
		iPlainsBottom = self.plains.getHeightFromPercent(self.iPlainsBottomPercent)
		self.marsh.fracInit(self.iWidth, self.iHeight, self.grain_amount, self.mapRand, self.iFlags, self.fracXExp, self.fracYExp)
		iMarshTop = self.marsh.getHeightFromPercent(self.iMarshTopPercent)
		iMarshBottom = self.marsh.getHeightFromPercent(self.iMarshBottomPercent)
		self.variation.fracInit(self.iWidth, self.iHeight, self.grain_amount, self.mapRand, self.iFlags, self.fracXExp, self.fracYExp)		

		iCoreX = int(self.iNumPlotsX / 2)
		iCoreY = int(self.iNumPlotsY / 2)
		iNumPlanets = (gc.getMap().getWorldSize() * 2)
		
		for i in range(iNumPlanets):
			iAttemptsLeft = 200
			while iAttemptsLeft > 0:
				iCenterX = CyGame().getSorenRandNum(gc.getMap().getGridWidth(), "Center X")
				iCenterY = CyGame().getSorenRandNum(gc.getMap().getGridHeight(), "Center Y")
				iRadiusMod = self.getRadius(iCoreX)
				iRadius = min((iCoreX - iRadiusMod), (iCoreY - iRadiusMod))
				iHoleRadius = int(iRadius / 2)
				
				if not (self.isValidPlanet(iCenterX, iCenterY, iRadius)):
					iAttemptsLeft -= 1
					continue

				#orlanth: choose a Climate Type for planet
				iNumClimateTypes = 3
				iClimate = CyGame().getSorenRandNum(iNumClimateTypes, "climatetypes")
				if iClimate = 1:
					#set terrain types for Earthlike planet
					terrainDry = self.gc.getInfoTypeForString("TERRAIN_DESERT")
					terrainRocky = self.gc.getInfoTypeForString("TERRAIN_PLAINS")
					terrainFertile = self.gc.getInfoTypeForString("TERRAIN_GRASS")
					terrainWet = self.gc.getInfoTypeForString("TERRAIN_MARSH")
					terrainPolar = self.gc.getInfoTypeForString("TERRAIN_TUNDRA")
					terrainCoast = self.gc.getInfoTypeForString("TERRAIN_COAST")
					terrainOcean = self.gc.getInfoTypeForString("TERRAIN_OCEAN")
				elif iClimate = 2:
					#set terrain types for Arid planet
					terrainDry = self.gc.getInfoTypeForString("TERRAIN_DESERT")
					terrainRocky = self.gc.getInfoTypeForString("TERRAIN_BADLANDS")
					terrainFertile = self.gc.getInfoTypeForString("TERRAIN_PLAINS")
					terrainWet = self.gc.getInfoTypeForString("TERRAIN_GRASS")
					terrainPolar = self.gc.getInfoTypeForString("TERRAIN_TUNDRA")
					terrainCoast = self.gc.getInfoTypeForString("TERRAIN_COAST")
					terrainOcean = self.gc.getInfoTypeForString("TERRAIN_OCEAN")
				else:
					#set terrain types for Volcanic planet
					terrainDry = self.gc.getInfoTypeForString("TERRAIN_DESERT")
					terrainRocky = self.gc.getInfoTypeForString("TERRAIN_BATHOLITH")
					terrainFertile = self.gc.getInfoTypeForString("TERRAIN_REGOLITH")
					terrainWet = self.gc.getInfoTypeForString("TERRAIN_VOLCANIC")
					terrainPolar = self.gc.getInfoTypeForString("TERRAIN_TUNDRA")
					terrainCoast = self.gc.getInfoTypeForString("TERRAIN_COAST")
					terrainOcean = self.gc.getInfoTypeForString("TERRAIN_OCEAN")

				for x in range(self.iNumPlotsX):
					for y in range(self.iNumPlotsY):
						i = y*self.iNumPlotsX + x
						if x == iCenterX and y == iCenterY:
							fDistance = 0
						else:
							fDistance = sqrt(((x - iCenterX) ** 2) + ((y - iCenterY) ** 2))
						if fDistance < iRadius:
							#generate planetary PlotType (hill peak or land, add code for coast or ocean?)
							hillVal = self.hillsFrac.getHeight(x,y)
							if ((hillVal >= iHillsBottom1 and hillVal <= iHillsTop1) or (hillVal >= iHillsBottom2 and hillVal <= iHillsTop2)):
								peakVal = self.peaksFrac.getHeight(x,y)
								if (peakVal <= iPeakThreshold):
									self.plotTypes[i] = PlotTypes.PLOT_PEAK
								else:
									self.plotTypes[i] = PlotTypes.PLOT_HILLS
							else:
								self.plotTypes[i] = PlotTypes.PLOT_LAND
								
							#orlanth: assign TerrainType to plot, using Climate variables of current planet
							#adapted from generateTerrainAtPlot in CvMapGeneratorUtil.py
							desertVal = self.deserts.getHeight(iX, iY)
							plainsVal = self.plains.getHeight(iX, iY)
							marshVal = self.marsh.getHeight(iX, iY)
							if ((desertVal >= self.iDesertBottom):
								terrainVal = self.terrainDry
							elif ((marshVal >= self.iMarshBottom) and (marshVal <= self.iMarshTop) and plot.isFlatlands()):
								terrainVal = self.terrainWet
							elif ((plainsVal >= self.iPlainsBottom) and (plainsVal <= self.iPlainsTop)):
								terrainVal = self.terrainRocky
							else:
								terrainVal = self.terrainFertile
							self.terrainTypes[i] = terrainVal
				break

		if shift_plot_types:
			self.shiftPlotTypes()

		return self.plotTypes

	def isValidPlanet(self, iCenterX, iCenterY, iRadius):
		if ((iCenterX - iRadius < 1) or (iCenterY - iRadius < 1) or (iCenterX + iRadius + 1 > self.iNumPlotsX) or (iCenterY + iRadius + 1 > self.iNumPlotsY)):
			return false
	
		for x in range(self.iNumPlotsX):
			for y in range(self.iNumPlotsY):
				i = y*self.iNumPlotsX + x
				if x == iCenterX and y == iCenterY:
					fDistance = 0
				else:
					fDistance = sqrt(((x - iCenterX) ** 2) + ((y - iCenterY) ** 2))
				if fDistance < iRadius+2:
					if self.plotTypes[i] != PlotTypes.PLOT_OCEAN:
						return false

		return true

	def getRadius(self, iCoreX):
		bValid = false
		for i in range(2000):
			iRadiusMod = (iCoreX * (CyGame().getSorenRandNum(3, "Radius")) / 2)
			if round(iCoreX * 3 / 4) < iRadiusMod < iCoreX:
				bValid = true
				break

		if bValid == false:
			iRadiusMod = round(iCoreX * 3 / 4)

		return iRadiusMod
 
now that would be wonderful - it would also be great if the water terrain could make an appearance - i got my leader back, i accidentally used a version that was on before her appearance in the mod - back when the planets were orange and green before they took on the dead world look.

Did you change the world back orange? My GF likes it better as orange, but i liked at least one planet being nice and depressive. Different planets with different climates would be incredible.

I believe that once the R&R team is done, its the beginning and not the end. There will be a whole new "framework" which to make mods with. The one thing i could really hope for is someone looks at the really nice modcomps and thinks about adding some of these comps to existing mods that do not yet have them. Merged mods for the win!

I will start poking around in the XML again to tweak the alien advance starts to include the ability to buy the first tier buildings after zigurat and some kind of combative unit. the AI isn't horrible with advance starts, it just seems to prefer tile improvements over buildings and units even when more units and buildings are enabled for advance starts.

I look forward to playing R&R and this + medieval conquests will keep me more than occupied with my downtime XD
 
An indie film is coming out about colonization in the year 2071 :scan::crazyeye: what are the chances lol

http://vimeo.com/44570870

Androrc, if you're around could you upload or email the latest version of your ocean planets mapscript you'd been working on? Eu acho q talvez posso fazer um mapscript com planetas de climas diferentes, mas primeiro queria ver o q vc já tem feito com as planetas oceânicas :king:
 
An indie film is coming out about colonization in the year 2071 :scan::crazyeye: what are the chances lol

http://vimeo.com/44570870

Androrc, if you're around could you upload or email the latest version of your ocean planets mapscript you'd been working on? Eu acho q talvez posso fazer um mapscript com planetas de climas diferentes, mas primeiro queria ver o q vc já tem feito com as planetas oceânicas :king:

Ops! I am dearly sorry, I had forgotten about it. The files that you need are in this archive: https://dl.dropbox.com/u/1732902/Colonization/Androrc Space.rar

Search for the tag "Androrc Space" and you should be able to find all necessary modifications.

If you have any trouble incorporating this code, feel free to ask me for help.
 
great, thanks for uploading that Andre :goodjob: I didn't know you had done so much custom DLL modding to make it, I guess I'll have to learn more about c++ to try and understand how it works. Would it be possible to add a TERRAIN_SPACE and DOMAIN_SPACE by using just XML? But I suppose then it would either be at land elevation or have water waves, and wouldn't look as good.

BTW I'm interested to see you started modding Civ5. I had wanted to try Civ5 modding at some point but found it hard to get going..
 
great, thanks for uploading that Andre :goodjob: I didn't know you had done so much custom DLL modding to make it, I guess I'll have to learn more about c++ to try and understand how it works. Would it be possible to add a TERRAIN_SPACE and DOMAIN_SPACE by using just XML? But I suppose then it would either be at land elevation or have water waves, and wouldn't look as good.

Unfortunately, no. A new domain requires DLL work, as does adding a new plot (PLOT_SPACE). But you could, I think, make TERRAIN_SPACE be a water terrain, and have it set to impassable, and then have spaceships be able to pass all terrain; I think that would work, and look the same graphics-wise.

BTW I'm interested to see you started modding Civ5. I had wanted to try Civ5 modding at some point but found it hard to get going..

It's actually not so hard to mod once you've learned the basic things, but there are severe shortcomings regarding what is hardcoded. It is so far not possible to add terrain or feature graphics, sounds, and there are issues when adding new improvement and resource graphics. And naturally, the DLL hasn't been released yet, which also severely limits what can be done.
 
Obrigado Andre, those are some nice ones! I now have a nice large set of scifi building and unit nifs I've been gradually accumulating from this site.. :assimilate:

BTW, a big thanks to the website InternetWars for actually writing a review of this mod! :cool: (it's in Russian, though I could read most in google translate)

http://www.internetwars.ru/CivMODS/2071/2071.htm
 
Top Bottom