Is there a way we could enable Levees for lakes?

Bibor

Doomsday Machine
Joined
Jun 6, 2004
Messages
3,128
Location
Zagreb, Croatia
Hi there. This one has been bugging me for a long time. Netherlands has the ability to build a dike. Levee replacement that works on lake and coastal tiles, alongside the usual riverside tiles, providing+1 production on each. No need pointing out how insanely powerful this is during golden ages (up to +40 base production yes please).

The BTS spawn generator treats lakes as valid fresh water starts, and we can (and usually do) end up with a capital that can't build a levee – although it's often very close to rivers.

My question is this: could we change something in XML code to enable levees being able to be built on Lakes?
 
Moderator Action: Moved to C&C. cheers-lymond
 
There are two XML tags related to coastal buildings. <bWater>1</bWater> means that the building requires a coastal city, and <iMinAreaSize>-x</iMinAreaSize> means that the building requires an adjacent body of water of at least size x. Some buildings set a minimum value here that ensures they cannot be built adjacent to merely a lake. But you can also set it to -1 to make any body of water enable the building.

Note that you can combine this with <bRiver>1</bRiver> to require coastal access OR river access (i.e. one of them is sufficient). You can compare the levee vs. dike attributes to see this.
 
Note that you can combine this with <bRiver>1</bRiver> to require coastal access OR river access (i.e. one of them is sufficient). You can compare the levee vs. dike attributes to see this.
Really? These booleans work as OR prerequisites? Are you 100% sure (I know, it's a rhetorical question)? Then I should have a look at this after my holiday - thank you!
 
I checked the C++ code for this (it's in CvCity::isValidBuildingLocation) and there is even a comment that states that:
Code:
// if both the river and water flags are set, we require one of the two conditions, not both

It makes sense because that is how the Dike building works: you can build it on coast without river and on river without coast. But it's true that this is unexpected because usually all requirements in the building XML must be met for a building to be available.
 
Top Bottom