[Religion and Revolution]: Mod Development

Status
Not open for further replies.
I already made the button. Here I show a monk and a sitting indian that smokes a pipe.

buildtest02.png

Great ! :goodjob:
(Thanks. :) )

I can make "a tomahawk and a native indian pipe crossed over each other", if you'd like.

No, the button you made is perfect. :thumbsup:
(Tomahawk would probably also be a little too specific for "North American Natives".)
 
Wow! I really like it! :goodjob:
KJ the Graphical master said:
I can make "a tomahawk and a native indian pipe crossed over each other", if you'd like.
And what about a monk with a tomahawk, could you show me that :lol: ?

But in a few days TAC 2.02c should be out ! :woohoo:
(Things will become a lot better then.)
Oh crap! In a few days I'll probably be away from home... :wallbash:
 
You are joking, I guess. I can image a monk with Bible or with large cross but not with tomahawk. Sorry :blush:

Let us stick with the button you made. ;)
 
"Ligth Green Savanna" (basically the Terrain like it was in Original Colonization)

It is in the Preview, but only available through Worldbuilder.

I never adjusted Mapgeneration, Maps / Szenarios and Mapscripts.
(I wanted to do that for Release 2.)

I think we could ignore this new Terrain for now. :dunno:

Alternatively it could be considered already now in Wild Animals.

If we want to fully integrate "Ligth Green Savanna", we would have to adjust then:
Mapgeneration, Maps / Szenarios and Mapscripts

Or we just add the Terrain now so it would be usable in Worldbuilder but never really generated. (Like in the Preview.)
In Release 2 we would do the full implementation.
(Then "Wild Animals" would not have to be readjusted ...)

What do you think ? :think:
 
Is there a difference between "light green savannah" and "savannah"? (Apparently yes, according to your "Wild Animals, Pirates, Fleeing Crimals / Indentured Servants / Slaves" post. If so, why?

Savannah

In TAC "Savannah" is what I would call "Grassland".
Tobacco can grow there.
I would see it mainly in Northern America.

"Light Green Savanna" (It is more of a working title.)

That is the "Savanna" you might know from Original Colonization. (I would also call it Savanna.)
Sugar can grow there. (Less than in Marsh but it gives more food - same as "Grassland".)
I would see it mainly in "Southern America".

It is a new Terrain I had introduced.
(Wanting to rebuild another aspect from Original Colonization.)

I gave this terrain the working-title "Light Green Savanna" because it is light green.
("Grassland" is dark green.)

You can take a look in the Preview with Worldbuilder.
(Text of Terrain is also "Savannah".)

----------------------

Maybe it is best to ignore this for Release 1. :dunno:
(Meaning ignoring it for "Wild Animals" now and eventually adjusting it in Release 2.)
 
Savannah

In TAC "Savannah" is what I would call "Grassland".
Tobacco can grow there.
I would see it mainly in Northern America.

"Light Green Savanna" (It is more of a working title.)

That is the "Savanna" you might know from Original Colonization. (I would also call it Savanna.)
Sugar can grow there. (Less than in Marsh but it gives more food - same as "Grassland".)
I would see it mainly in "Southern America".

It is a new Terrain I had introduced.
(Wanting to rebuild another aspect from Original Colonization.)

I gave this terrain the working-title "Light Green Savanna" because it is light green.
("Grassland" is dark green.)

You can take a look in the Preview with Worldbuilder.
(Text of Terrain is also "Savannah".)

----------------------

Maybe it is best to ignore this for Release 1. :dunno:
(Meaning ignoring it for "Wild Animals" now and eventually adjusting it in Release 2.)

Ok, now I understand :)

Wouldn't it be better to call Grassland by it's original name rather than "Savannah"? What was the rationale behind the TAC Team's name change of "Grassland" to "Savannah?

In any case, I imagine it wouldn't be hard to incorporate savannahs into the mapscript, we could use the code already in place for generating jungle at tropical regions, and transform all grasslands in "jungle" latitudes into savannahs.
 
I totally agree with Androrc.
We should rename "TAC's savannah" to "grassland", and your light green savannah would be names simply "savannah".

We can add the terrain whenever you like. It wont be that hard to generate it afterwards (or immediately whatever !)...

And of course I like the idea (I can't remember if I already told you or not...:think: )
 
Wouldn't it be better to call Grassland by it's original name rather than "Savannah"? What was the rationale behind the TAC Team's name change of "Grassland" to "Savannah?

It was a decision the TAC team made before my times.
They simply said that "Savannah" ist the more correct naming than "Grassland". :sz:

I would like to rename that too. :thumbsup:

So we would have later on:

Grassland (dark green, Tobacco)
Savanna (light green, Sugar)

And of course I like the idea (I can't remember if I already told you or not...:think: )

You did tell me. :)

In any case, I imagine it wouldn't be hard to incorporate savannahs into the mapscript, we could use the code already in place for generating jungle at tropical regions, and transform all grasslands in "jungle" latitudes into savannahs.

Correct, in Mapscripts it would not be hard to do. :)
But adjusting Maps and Scenarios would be a lot of work. :dunno:

The question is simply:

When should we do "New Terrain Savanna like in Original Colonization" ?
(Release 1 or Release 2)
 
Release 1 would be best is my opinion. I think having all terrains and goods added as early as possible. Maps and scenarios should be put on hold but mapscripts made a priority.
 
Release 1 would be best is my opinion.

Would be ok for me. :)

I think having all terrains and goods added as early as possible.

Adding "Savanna" is ok for Release 1.

Goods / Productionlines / ..., a definite No from my side for Release 1.
"Economy" is a real huge monster !
There are too many things that need to be done.
(Especially Balancing.)

We need time for that.
("Quality" is really important for a good mod.)

Maps and scenarios should be put on hold but mapscripts made a priority.

I think we should better do it all correctly.
So if we add "Savanna" we should do Maps, Scenarios and Mapscripts.

So I suggest:

"Savanna like in Original Colonization" in Release 1.

I will build up the "base feature" once we have TAC 2.02c.

Androrc (or myself) could adjust the Mapscripts then.

The rest of the team could do the adjustment of Maps and Scenarios.
(I will explain a few things about doing that correctly then.)

Agree ? :)
 
I changed the code of CvMapGeneratorUtil.py as follows to make Savannahs be generated when using mapscripts (changes in red):

Code:
class TerrainGenerator:
	"If iDesertPercent=35, then about 35% of all land will be desert. Plains is similar. \
	Note that all percentages are approximate, as values have to be roughened to achieve a natural look."

	def __init__(self, iDesertPercent=20, iPlainsPercent=15, iMarshPercent=10,
	             fSnowLatitude=0.7, fTundraLatitude=0.6,
[COLOR="Red"]#	             fGrassLatitude=0.1, fDesertBottomLatitude=0.2,
	             fGrassLatitude=0.1, fDesertBottomLatitude=0.2, fSavannahLatitude=0.25,
[/COLOR]	             fDesertTopLatitude=0.5, fracXExp=-1,
	             fracYExp=-1, grain_amount=4):

		self.gc = CyGlobalContext()
		self.map = CyMap()

		grain_amount += self.gc.getWorldInfo(self.map.getWorldSize()).getTerrainGrainChange()

		self.grain_amount = grain_amount

		self.iWidth = self.map.getGridWidth()
		self.iHeight = self.map.getGridHeight()

		self.mapRand = self.gc.getGame().getMapRand()

		self.iFlags = 0  # Disallow FRAC_POLAR flag, to prevent "zero row" problems.
		if self.map.isWrapX(): self.iFlags += CyFractal.FracVals.FRAC_WRAP_X
		if self.map.isWrapY(): self.iFlags += CyFractal.FracVals.FRAC_WRAP_Y

		self.deserts=CyFractal()
		self.plains=CyFractal()
		self.marsh=CyFractal()
		self.variation=CyFractal()

		iDesertPercent += self.gc.getClimateInfo(self.map.getClimate()).getDesertPercentChange()
		iDesertPercent = min(iDesertPercent, 100)
		iDesertPercent = max(iDesertPercent, 0)

		self.iDesertPercent = iDesertPercent
		self.iPlainsPercent = iPlainsPercent
		self.iMarshPercent = iMarshPercent

		self.iDesertTopPercent = 100
		self.iDesertBottomPercent = max(0,int(100-iDesertPercent))
		self.iMarshTopPercent = 100
		self.iMarshBottomPercent = max(0,int(100-iDesertPercent-iMarshPercent))
		self.iPlainsTopPercent = 100
		self.iPlainsBottomPercent = max(0,int(100-iDesertPercent-iMarshPercent-iPlainsPercent))

		self.iMountainTopPercent = 75
		self.iMountainBottomPercent = 60

		fSnowLatitude += self.gc.getClimateInfo(self.map.getClimate()).getSnowLatitudeChange()
		fSnowLatitude = min(fSnowLatitude, 1.0)
		fSnowLatitude = max(fSnowLatitude, 0.0)
		self.fSnowLatitude = fSnowLatitude

		fTundraLatitude += self.gc.getClimateInfo(self.map.getClimate()).getTundraLatitudeChange()
		fTundraLatitude = min(fTundraLatitude, 1.0)
		fTundraLatitude = max(fTundraLatitude, 0.0)
		self.fTundraLatitude = fTundraLatitude

		fGrassLatitude += self.gc.getClimateInfo(self.map.getClimate()).getGrassLatitudeChange()
		fGrassLatitude = min(fGrassLatitude, 1.0)
		fGrassLatitude = max(fGrassLatitude, 0.0)
		self.fGrassLatitude = fGrassLatitude

[COLOR="Red"]		fSavannahLatitude = min(fSavannahLatitude, 1.0)
		fSavannahLatitude = max(fSavannahLatitude, 0.0)
		self.fSavannahLatitude = fSavannahLatitude[/COLOR]

		fDesertBottomLatitude += self.gc.getClimateInfo(self.map.getClimate()).getDesertBottomLatitudeChange()
		fDesertBottomLatitude = min(fDesertBottomLatitude, 1.0)
		fDesertBottomLatitude = max(fDesertBottomLatitude, 0.0)
		self.fDesertBottomLatitude = fDesertBottomLatitude

		fDesertTopLatitude += self.gc.getClimateInfo(self.map.getClimate()).getDesertTopLatitudeChange()
		fDesertTopLatitude = min(fDesertTopLatitude, 1.0)
		fDesertTopLatitude = max(fDesertTopLatitude, 0.0)
		self.fDesertTopLatitude = fDesertTopLatitude

		self.fracXExp = fracXExp
		self.fracYExp = fracYExp

		self.initFractals()

Code:
	def initFractals(self):
		self.deserts.fracInit(self.iWidth, self.iHeight, self.grain_amount, self.mapRand, self.iFlags, self.fracXExp, self.fracYExp)
		self.iDesertTop = self.deserts.getHeightFromPercent(self.iDesertTopPercent)
		self.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)
		self.iPlainsTop = self.plains.getHeightFromPercent(self.iPlainsTopPercent)
		self.iPlainsBottom = self.plains.getHeightFromPercent(self.iPlainsBottomPercent)

		self.marsh.fracInit(self.iWidth, self.iHeight, self.grain_amount, self.mapRand, self.iFlags, self.fracXExp, self.fracYExp)
		self.iMarshTop = self.marsh.getHeightFromPercent(self.iMarshTopPercent)
		self.iMarshBottom = self.marsh.getHeightFromPercent(self.iMarshBottomPercent)

		self.variation.fracInit(self.iWidth, self.iHeight, self.grain_amount, self.mapRand, self.iFlags, self.fracXExp, self.fracYExp)

		self.terrainDesert = self.gc.getInfoTypeForString("TERRAIN_DESERT")
		self.terrainPlains = self.gc.getInfoTypeForString("TERRAIN_PLAINS")
		self.terrainIce = self.gc.getInfoTypeForString("TERRAIN_SNOW")
		self.terrainTundra = self.gc.getInfoTypeForString("TERRAIN_TUNDRA")
		self.terrainGrass = self.gc.getInfoTypeForString("TERRAIN_GRASS")
[COLOR="Red"]		self.terrainSavannah = self.gc.getInfoTypeForString("TERRAIN_SAVANNAH")
[/COLOR]		self.terrainMarsh = self.gc.getInfoTypeForString("TERRAIN_MARSH")

Code:
	def generateTerrainAtPlot(self,iX,iY):
		lat = self.getLatitudeAtPlot(iX,iY)

		plot = self.map.plot(iX, iY)

		if (plot.isWater()):
			return self.map.plot(iX, iY).getTerrainType()

		terrainVal = self.terrainGrass

		if lat >= self.fSnowLatitude:
			terrainVal = self.terrainIce
		elif lat >= self.fTundraLatitude:
			terrainVal = self.terrainTundra
		elif lat < self.fGrassLatitude:
			terrainVal = self.terrainGrass
		else:
			desertVal = self.deserts.getHeight(iX, iY)
			plainsVal = self.plains.getHeight(iX, iY)
			marshVal = self.marsh.getHeight(iX, iY)
			if ((desertVal >= self.iDesertBottom) and (desertVal <= self.iDesertTop) and (lat >= self.fDesertBottomLatitude) and (lat < self.fDesertTopLatitude)):
				terrainVal = self.terrainDesert
			elif ((marshVal >= self.iMarshBottom) and (marshVal <= self.iMarshTop) and plot.isFlatlands() and (lat >= self.fDesertBottomLatitude) and (lat < self.fDesertTopLatitude)):
				terrainVal = self.terrainMarsh
			elif ((plainsVal >= self.iPlainsBottom) and (plainsVal <= self.iPlainsTop)):
				terrainVal = self.terrainPlains

[COLOR="Red"]		if ((lat < self.fSavannahLatitude) and (terrainVal == self.terrainGrass)):
			terrainVal = self.terrainSavannah
[/COLOR]
		if (terrainVal == TerrainTypes.NO_TERRAIN):
			return self.map.plot(iX, iY).getTerrainType()

		return terrainVal

And it works :) It changes grassland into savannah in tropical regions.
 
Then the Mapscripts itself do not need to be adjusted ? :wow:
(I thought about adjusting the Mapscripts itself ...)

Great solution ! :goodjob:

Edit:
Could you do some Commenting (Project, Implementer, Feature) on your changes in CvMapGeneratorUtil.py
and check in the file into the Preview in SVN ?

Something like:
# RaR, Androrc, Generation of Savanna
 
Then the Mapscripts itself do not need to be adjusted ? :wow:
(I thought about adjusting the Mapscripts itself ...)

Great solution ! :goodjob:

Edit:
Could you do some Commenting (Project, Implementer, Feature) on your changes in CvMapGeneratorUtil.py
and check in the file into the Preview in SVN ?

Something like:
# RaR, Androrc, Generation of Savanna

I did the commenting, but couldn't add the file to the Preview (how do I do it?). Here it is though:
http://dl.dropbox.com/u/1732902/Colonization/Religion and Revolution/CvMapGeneratorUtil.py

The "A New World" mapscript doesn't need to be changed, because it uses the default functions. The Caribbean one does though, and this is the altered file for it:

http://dl.dropbox.com/u/1732902/Colonization/Religion and Revolution/Caribbean.py

The Caribbean map scripts used a very high degree of marshes in the map (70% marshes rather than the usual 10%), apparently to emulate the sugar production capability of the Caribbean. But, since we have savannahs, they are a more appropriate terrain for much of the Caribbean, so I have reduced marshes to normal levels, replacing the "excess" marshes with savannahs.
 
What about "FaireWeather"-Mapscript ? :think:
(The others in the Preview are just experiments, so don't bother with them. :) )

FaireWeather is really great and it would be very cool, if it would be generating "Savannah", too.

I did the commenting, but couldn't add the file to the Preview (how do I do it?).

Sorry, I had forgotten to upgrade your SVN -user from "Watcher" to "Member" when you joined the team. :blush:

Now you could add it by:

1. Putting the files into the right location in the folder, where you have checked out our repository from SVN.

2. Right-Click Folder -> SVN Commit.

3. Select the files you want to commit and write some comment for the commit action.

4. Click "Ok".
 
Ok :)

As for FaireWeather, it seems rather complex (and yes apparently would need to be edited to have savannahs generated), but it would be fairly easy to transform grasslands in tropical latitudes into savannahs.

EDIT: I still can't seem to add files. Do I need to download their client?
 
Status
Not open for further replies.
Back
Top Bottom