dnewhous
Sep 01, 2010, 06:57 PM
I want to have the Pool of Tears act as a fresh water source for adjacent tiles, and someone suggested that I use python to give the Pool of Tears the effects of an oasis. But after looking at the issue a little bit, my inference is that unless there is an appropriate function for the Pool of Tears in the API, there is no way to do this without recompiling the game. There isn't any such function being used in the game, and I really doubt a function would be in the API unless it were going to be used. But I wanted to come here and verify my tentative conclusion.
MagisterCultuum
Sep 01, 2010, 07:49 PM
1. Open up CvEventManager.py
2. Scroll down to the function def onImprovementBuilt(self, argsList):
3. Add these 2 lines of code:
if iImprovement == gc.getInfoTypeForString('IMPROVEMENT_POOL_OF_TEARS '):
pPlot.setFeatureType(gc.getInfoTypeForString('FEAT URE_OASIS'),-1)
If hell terrain spreads to the tile the feature will probably be destroyed, but otherwise you're fine. I was about to suggest editing the doHell function in CustomFunctions.py, but then I remembered that that python and the SDK handled terrain changes tend not to line up properly and you'd have to make Oases valid on hell terrains for it to work. You could do that and then made doHell change the feature to something else in hell if you like though.
If you don't want the Pool to have the extra yields of an Oasis, you can give the improvement the opposite yield changes as the feature.
dnewhous
Sep 01, 2010, 11:03 PM
The effect is to make the tops of a couple of palm trees stick out of the Pool of Tears. Nothing more.
Thanks for the help, even though it didn't work.