Dynamically Changing the Yield of a Tile

mikeejimbo

Chieftain
Joined
Jan 16, 2010
Messages
65
Sometimes events pop up, that add yields to tiles, such as Prairie Dogs adding a commerce to a grassland or plains tile. I would like to do something similar to this, but instead of a random event, I want it to occur when certain conditions are met. Now, checking for these conditions is easy. What I want to know is how to change the yields of a plot.
 
Can you use the event system to accomplish what you want? There is a field in the event xml, PlotExtraYields, which is how prairie dogs work. You may want to read this guide about events. It is very convenient to have python code which fires an event, and then let the existing event code do all the work.
 
I don't know if I could use events or not. The problem is that I don't want to notify the players for each tile that changes, because it would be a tediously large amount.
 
I don't see a CvPlot function exposed to Python to alter yield values, so you'll need to either do you code in the SDK or expose an existing or new CvPlot function. The latter would be pretty easy but still require SDK work.
 
Can you define a new terrain type and use CyPlot.setTerrainType()?

This is the approach I was going to try taking. If that doesn't work, I'll have to crack open the SDK, as EmperorFool suggested (and I suspected might have to do.)
 
Top Bottom