• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days. For more updates please see here.

Custom Tile Improvement, Invalid Terrain?

Tryhard Trevor

Chieftain
Joined
Feb 29, 2016
Messages
22
I'm currently working on a custom Civ, which has a custom tile improvement. I know that you can specify valid terrain with the <Improvement_ValidTerrains> tag, but is there a way to specify terrain that an improvement can not be built on? To be specific, I have an improvement that I want to only be build-able on desert tiles, and only desert tiles. I do not want players to be able to build it on flood plains (which are also desert tiles). Is there anyway I can specify that I want to disallow building here? Sorry if this is not the correct place to post questions.
 
I don't believe there's any way to restrict building along Rivers (Flood Plains, for all intents and purposes) specifically without also restricting building along all other Fresh Water sources (Lakes and Oases).

You can make the Improvement reverse its yields on Flood Plains so that it doesn't provide any benefit (this is what Petra does, actually; it just gives -1 Food/Production on specifically Flood Plains to counteract its +1 Food/Production on Desert) as a workaround to prevent it from being useful when placed on Flood Plains, but no, I don't think there's any way to prevent it from being available--at least not one that wouldn't require a lot of fancy UI scripts to prevent it from showing up as an option. Reflect it in the tooltip ("this Improvement does not provide any benefits when placed on Flood Plains", for example) for clarity's sake.
 
Unfortunately there's no Improvement_FeatureYieldChanges table like there is for buildings with the Building_FeatureYieldChanges table. So, no, you won't be able to "unyield" in a specific terrain-feature like as is done with Petra.

The closest you will be able to come to not allowing the improvement to be made on Floodplains is to specify the other features under table Improvement_ValidFeatures. But this would make it so that the improvement can only be made where there is a Marsh, Forest, or Jungle. Tiles without any of these three would be invalid for the improvement. And you would have to make the 'Build' action for the improvement not remove any of Marsh, Jungle, or Forest. And none of this would be workable for Desert Terrain, since none of these occur naturally on Desert tiles.
 
Now if only someone had modded the DLL to provide events to control improvements/builds or to unify the yield tables ...
 
Back
Top Bottom