Pirate Coves

Grey Fox

Master of Points
Joined
Dec 19, 2001
Messages
8,726
Location
Sweden
Except for its documented limitations, is there any other? Because I've built one pirate cove and now I cant build another (way further then 3 tiles away)
 
No i don't think it has to be in your border... ive built 3 out side of my border last game.
 
It ahs to be in your borders or on an unowned tile.

Code:
def reqPirateCove(caster):
	if caster.getUnitClassType() != gc.getInfoTypeForString('UNITCLASS_WORKER'):
		return False
	if not canCast(caster):
		return False
	pPlayer = gc.getPlayer(caster.getOwner())
	if pPlayer.getCivilizationType() != gc.getInfoTypeForString('CIVILIZATION_LANUN'):
		return False
	if pPlayer.isHuman() == False:
		return False
	iX = caster.getX()
	iY = caster.getY()
	pPlot = caster.plot()
	if pPlot.isWater():
		return False
	if pPlot.area().getNumTiles() == 1:
		return False
	if pPlot.isCity():
		return False
	if (pPlot.isOwned() and pPlot.getOwner() != caster.getOwner()):
		return False
	if pPlot.getImprovementType() != -1:
		return False
	bValid = False
	for iiX in range(iX-1, iX+2, 1):
		for iiY in range(iY-1, iY+2, 1):
			pPlot = CyMap().plot(iiX,iiY)
			if pPlot.isWater():
				bValid = True
	if bValid == False:
		return False
	for iiX in range(iX-2, iX+3, 1):
		for iiY in range(iY-2, iY+3, 1):
			pPlot = CyMap().plot(iiX,iiY)
			if pPlot.getImprovementType() == gc.getInfoTypeForString('IMPROVEMENT_PIRATE_COVE'):
				return False
	return True
 
wasnt sure about it, just remembered i couldnt build them in enemy lands and usually the ais have filled up all the unowned land in my games heh

i thought i remembered that they werent supposed to be building within 3 tiles of a city, but seem to recall doing so
 
K, I dont know if this was a one time incident yet, but my game crashed when I built a pirate cove next to a city on a hill. Im gonna check if its repeatable.
 
yea one of my games crashed when i built a cove in the middle of a spot were the land makes an "x"... is that a bug?
 
It didnt crash the 2nd time, but I realize I built it in the wrong spot! Although I did get a nice 4 Food 3 commerce lake. ;)

The plan was of course to make the capital able to send ships to the small sea to the east, so it could send ships through the continent (once I capture that landbridge there).

But I didnt want to put it on my gold of course, and I didnt want to obstruct my road, so I opted for the tile in the middle.. but oops, a lake, not any coast connection! :P

pirate_cove.JPG


EDIT: This time I'm actually gonna reload.
EDIT2: And this time the game crashed when building the cove again. 2 out 4 times it has crashed now.
 
Ok, this isnt good.

It crashes 100% of the time when I try to create a pirate cove on a specific tile. And I think I know why. The tile I'm refering to is the tile to the north of the cove in the screenshot below and to the south of the lake.

It is because the lake tile wouldnt be a lake anymore, but the game engine already recognizes it as a lake, and therefore the game crashes. Or something like that.

I'm gonna try some more, and see if it really always crashes.
 
Nevermind that, I now realize why it crashes. It always crashes if the tile you are trying to make a pirate cove out of has any other units in it.

Suggestion: Make these units automove to closest available landtile.
 
I was wondering what a pirate cove was, so I tried building one. The game just crashed. Lovely.

(I was trying to build it one space north of a coastal city)

Okay, tried in another place and it crashed again. Mrh. I hope AIs don't try to build these.
 
Wasnt that fixed in the patch?
 
What patch? I downloaded the mod about an hour before posting that.

[Edit: I just happened to download the mod mere hours before the patch was released. I'm trying the patch now...]
 
Back
Top Bottom