• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days (this includes any time you see the message "account suspended"). For more updates please see here.

How to flip the Tilted Axis map?

Adam7Eight

Emperor
Joined
Jun 19, 2002
Messages
1,262
Location
Wisconsin, USA
I want to play on Titled Axis maps since you get a greater variation with random map types. But does anyone know how exactly to flip the climate latitudes back to normal so the poles are north and south, and not east and west?

I see this in the Python file:

Code:
# subclass TerrainGenerator to make the climate "latitudes" run west to east
class TiltedAxisTerrainGenerator(CvMapGeneratorUtil.TerrainGenerator):
	def getLatitudeAtPlot(self, iX, iY):
		# Latitudes run vertically for a world with a tilted axis.
		lat = abs((self.iWidth / 2) - iX)/float(self.iWidth/2) # 0.0 = equator, 1.0 = pole

		# Adjust latitude using self.variation fractal, to mix things up:
		lat += (128 - self.variation.getHeight(iX, iY))/(255.0 * 5.0)

		# Limit to the range [0, 1]:
		if lat < 0:
			lat = 0.0
		if lat > 1:
			lat = 1.0

		return lat

...but don't know what to do with it. If anyone could help I'd appreciate it.
 
low said:
I want to play on Titled Axis maps since you get a greater variation with random map types. But does anyone know how exactly to flip the climate latitudes back to normal so the poles are north and south, and not east and west?

I see this in the Python file:

Code:
# subclass TerrainGenerator to make the climate "latitudes" run west to east
class TiltedAxisTerrainGenerator(CvMapGeneratorUtil.TerrainGenerator):
	def getLatitudeAtPlot(self, iX, iY):
		# Latitudes run vertically for a world with a tilted axis.
		lat = abs((self.iWidth / 2) - iX)/float(self.iWidth/2) # 0.0 = equator, 1.0 = pole

		# Adjust latitude using self.variation fractal, to mix things up:
		lat += (128 - self.variation.getHeight(iX, iY))/(255.0 * 5.0)

		# Limit to the range [0, 1]:
		if lat < 0:
			lat = 0.0
		if lat > 1:
			lat = 1.0

		return lat

...but don't know what to do with it. If anyone could help I'd appreciate it.

With absolutely no experience with python whatsoever, I would suggest copy-pasting the latitude section of one of the other map types, or if those don't have any, delete that part altogether.:)
 
I tried deleting it first, but didn't work. I also scoped-out the other map script files and didn't see anything related to climate latitudes. Thanks anyways for the suggestions though. I certainly didn't think of 'em. :)

I'm abandoning this idea though. I'm going to make an entirely new map script. Hopefully, with enough patience and time I can pull off what I want.
 
The only other thing I could suggest would be to try switching the references to "Width" to "Height", and visa versa.
 
Back
Top Bottom