Require Specific Tile Yield For Improvement

I've been trying to create an improvement that will give a city an extra essence, but can only be built in cities where the original essence tile yield was 1 or 2.  You can put a resource requirement for TileYieldEssence with a value of 1 or 2, but that allows any city with that value or greater to build the improvement.  I tried making the prereq value be the result of the calculation [[TileYieldEssence] + [TileYieldEssence] - 2] to prevent 3 or higher, but that didn't seem to work.

 

Could anyone tell me how to do this or point me to a thread that already answered this question?

 

Thanks!

3,082 views 8 replies
Reply #2 Top

I didn't realize a value of 0 wouldn't work, though I'd be fine with it only being available on tiles with starting essence of 2.

Naturally I could use your code to prevent the AI from using it and then be on the honor system myself, but I'm the kind of person who wants to build everything they can.  Once I was in a game, I know it would be hard not to build the improvement everywhere.  I was hoping to remove that temptation and just only have the option when the essence started low.

Thanks though!

Reply #5 Top

Wow, incredibly comprehensive answer.  Thanks so much for putting in so much effort!  Quick followup question.  Wouldn't the calculations mean that building a scrying pool or choosing oracle in a conclave would render the improvement ineffective since they'd change the TileYieldEssence?

Thanks!