deep sea

Manifold

ModderProtectionAdvocate
Joined
Aug 27, 2007
Messages
1,580
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?
 

Xyth

History Rewritten
Joined
Jul 14, 2004
Messages
4,106
Location
Aotearoa
This looks fantastic! Couple questions:

Does this work with any map generator or is it premade map only?
Will this work with BlueMarble?
 

Kathy

King
Joined
May 28, 2008
Messages
685
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.
 

Kathy

King
Joined
May 28, 2008
Messages
685
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?
 

Manifold

ModderProtectionAdvocate
Joined
Aug 27, 2007
Messages
1,580
All-clear! I don´t know why, but now it works fine (typical Civ4). This modcomp is highly recommended.
 

cs91st

Chieftain
Joined
Sep 3, 2012
Messages
6
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?
 

Kathy

King
Joined
May 28, 2008
Messages
685
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.
 

cs91st

Chieftain
Joined
Sep 3, 2012
Messages
6
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?
 

Kathy

King
Joined
May 28, 2008
Messages
685
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".
 

cs91st

Chieftain
Joined
Sep 3, 2012
Messages
6
Thanks for another quick response.

Tried this code and still no luck. Guess that part isn't compatible.
 

The_J

Say No 2 Net Validations
Administrator
Supporter
Joined
Oct 22, 2008
Messages
37,427
Location
DE/NL/FR
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.
 

cs91st

Chieftain
Joined
Sep 3, 2012
Messages
6
Loads fine and generates map, with no errors reported.

Only managed to get one when I changed the file while game running.
 

cs91st

Chieftain
Joined
Sep 3, 2012
Messages
6
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