Can city work Peaks with trait?

Ploeperpengel

academic precarity
Joined
Feb 2, 2006
Messages
4,748
Location
Berlin
I want to make peaks workable if a player has a special trait and change the yields of the Peak for the player while ignoring the baseterrain yields on that plot.

Can anything be done with these functions in onCitydoTurn to achieve this?:
int setBaseYieldRate
bool canWork (CyPlot pPlot)

Would that require SDK changes or could it be done with python only? Can it be done at all?

I wanted to start like this but don't have an idea how I could go on:
Code:
	def onCityDoTurn(self, argsList):
		'City Production'
		pCity = argsList[0]
		iPlayer = argsList[1]
		pPlot = pCity.plot()
		pPlayer = gc.getPlayer(pCity.getOwner())

		if pPlayer.hasTrait(gc.getInfoTypeForString('TRAIT_SUBTERRANEAN')) and pPlot.isPeak():
 
I have seen a few places in the DLL in regards to AI behavior that call the CvPlot::isPeak() function. I'm not sure, but some of that stuff might be in your way. Do a text search in the code for isPeak() and also isImpassable(), to see if any of those will interfere with something. Peaks are kindof a hard coded thing in Civ.
 
Back
Top Bottom