deep sea

Thank you for open this thread. I fit the deep sea modcomp into my mod, but now i notice a graphic problem. perhaps i am just silly. Any suggestions?
 
This looks fantastic! Couple questions:

Does this work with any map generator or is it premade map only?
Will this work with BlueMarble?
 
Here a little description.
This modcomp generates a new Terrain "deep Sea" on that replaces every ocean that is not next to coast, when the map is created. This happens with a function in python, after map generation. It should work with every map generator.

I made this terrain to make mediaval sailing ships (hanseatic Cog and Viking Longboat) better in my mod, but do not allow them to sail to america.

I think it will work with Blue Mable, too, but I think that you will have to check whether the art of my deep see fits to the other ocean.
 
maybe change mesh level and add transparency to texture?

P.S. good idea I will see on

I am not sure if I understood what you mean. Where can I find the mesh level and the transpoarency of this texture? In the nif or in the xml?
 
All-clear! I don´t know why, but now it works fine (typical Civ4). This modcomp is highly recommended.
 
Wonder if anyone could help.
I have Civ IV with 1.74 patch and I'm trying to get deep sea working.

Tried adding bits from first version and loading second version but I can't generate a map with the new terrain on. I can add it via World Builder.

Do I need to make changes in CvMapGeneratorUtil.py as well?
 
Yes, the mod is made for bts only (I think, it does not matter whether it is 3.03 or a later version), about the former versions of Civ (Vanilla or Warlords) I can not say anythink, I do not know the differences.
 
Thanks for the quick response.

I can confirm that the terrain can be added to Civ (Vanilla). The only part I'm having issues with is getting a map to generate with it in and not go through World Builder.

Any thoughts?
 
The important part of the python code is this:

PHP:
###Tiefsee start###
		for i in range(CyMap().numPlots()):
			iPlot = CyMap().plotByIndex(i)
			if iPlot.getTerrainType() == gc.getInfoTypeForString("TERRAIN_OCEAN"):
				StartX=iPlot.getX()-1
				EndX=iPlot.getX()+2
				StartY=iPlot.getY()-1
				EndY=iPlot.getY()+2
				bTrue = True
				for j in range(StartX, EndX):
					for k in range(StartY,EndY):
						lPlot = CyMap().plot(j,k)
						if lPlot.isNone():continue
						if lPlot.getTerrainType() == gc.getInfoTypeForString("TERRAIN_COAST"):
							bTrue = False
							break
				if (bTrue == True):
					iPlot.setTerrainType(gc.getInfoTypeForString("TERRAIN_TIEFSEE"),False,False)
###Tiefsee end###

If you copy it (from the downloaded file "CvEventManager.py", .py-files can be opened with a normal text editor), it may be enough to add it to the CvEventManager from your version. (Please always create a new mod folder for such changes, do not edit the original files!). The lines have to be add beyond this block:
PHP:
	def onGameStart(self, argsList):
		'Called at the start of the game'
		if (gc.getGame().getGameTurnYear() == gc.getDefineINT("START_YEAR")):
			for iPlayer in range(gc.getMAX_PLAYERS()):
				player = gc.getPlayer(iPlayer)
				if (player.isAlive() and player.isHuman()):
					popupInfo = CyPopupInfo()
					popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
					popupInfo.setText(u"showDawnOfMan")
					popupInfo.addPopup(iPlayer)
					
		if gc.getGame().isPbem():
			for iPlayer in range(gc.getMAX_PLAYERS()):
				player = gc.getPlayer(iPlayer)
				if (player.isAlive() and player.isHuman()):
					popupInfo = CyPopupInfo()
					popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_DETAILS)
					popupInfo.setOption1(true)
					popupInfo.addPopup(iPlayer)
but before "def OnGameEnd".
 
Thanks for another quick response.

Tried this code and still no luck. Guess that part isn't compatible.
 
Please activate the Python exceptions in your main ini file (Documents\My Games\Civ4\Civ4.ini), change there
PHP:
; Set to 1 for no python exception popups
HidePythonExceptions = 1

to 0.
Then try it again and report back what errors you get.
 
Loads fine and generates map, with no errors reported.

Only managed to get one when I changed the file while game running.
 
I got the HAP debugger out and set some break points.

After this section of code it doesn't execute anymore. The game just starts.

Code:
	def onGameStart(self, argsList):
		'Called at the start of the game'
		if (CyGame().getGameTurnYear() == gc.getDefineINT("START_YEAR")):
			for iPlayer in range(gc.getMAX_PLAYERS()):
				player = gc.getPlayer(iPlayer)
				if (player.isAlive() and player.isHuman()):
					popupInfo = CyPopupInfo()
					popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
					popupInfo.setText(u"showDawnOfMan")
					popupInfo.addPopup(iPlayer)

I set breakpoints at the next bit

Code:
		if CyGame().isPbem():
			for iPlayer in range(gc.getMAX_PLAYERS()):
				player = gc.getPlayer(iPlayer)
				if (player.isAlive() and player.isHuman()):
					popupInfo = CyPopupInfo()
					popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_DETAILS)
					popupInfo.setOption1(true)
					popupInfo.addPopup(iPlayer)

but it never stopped. So it isn't reaching the code to change the terrain, very strange.
 
Top Bottom