building prevention/spread

micmc

Warlord
Joined
Apr 17, 2004
Messages
179
Location
atlanta ga usa
Is there a way I'm not thinking of to prevent a building (or building class) to be be built within a city (as opposed to a civ) without having a prereq to only enable the building?

meaning. I want to put in a 'wizard's school' 'warrior's sensai' and 'druid hash shop' (for examples) but I don't want all three to be able to be shared within a city (in any combination) (the reasoning is as the buildings progress and gives better promotions/abilities I don't want them overlapping...um, to put it another way, I don't want the warriors giving swirlies to the adepts in the hallways)
 
It isn't hard to do in python. You could either block the construction of each building if the others are present (under def canBuild(self,argsList): in CvGameUtils.py), or remove the old ones when a new one is built (under def onBuildingBuilt(self, argsList): in CvEventManager.py)


Hmm..It been a while since I played vanilla/BtS, but I think that there may be an xml only way to do the second option. Power plants were mutually exclusive, right? You could look into how they are handled.
 
Not sure they were actually - the effects of lesser ones were just ignored, so you didn't get the unhealthiness from coal or the meltdown chance from nuclear if you had hydro, but they still existed in the city.
 
Not sure they were actually - the effects of lesser ones were just ignored, so you didn't get the unhealthiness from coal or the meltdown chance from nuclear if you had hydro, but they still existed in the city.

BeefontheBone's right, although I didn't know about the removal of negative effects.
 
That said, I can't remember if you can still build coal when the others are available - I think so, so that it's there as a backup if you have a meltdown, but it's been a good while since I played vanilla too :)
 
Back
Top Bottom