Making Lake tiles improvable

shandelman

Chieftain
Joined
Nov 2, 2014
Messages
13
So it really bugs that me that Lakes suck. Lakes are awesome! Huge amounts of fresh water should be a major resource worth fighting wars over - not a hindrance to good agricultural land; and they don't provide the bonus trade route output that actual coastlines do.

I think the simplest way to achieve this would be to make Lake hexes:
1) Get the +1/+1 from water purification plants.
2) Be improvable.

So I tried to start with allowing improvements, but the simple/obvious modification of the xml doesn't seem to work :(
Code:
<Improvements>
		<Update>
			<Set Water="true"/>
			<Where Type="IMPROVEMENT_ARRAY"/>
		</Update>

		<Update>
			<Set Water="true"/>
			<Where Type="IMPROVEMENT_NODE"/>
		</Update>

		<Update>
			<Set Water="true"/>
			<Where Type="IMPROVEMENT_DOME"/>
		</Update>

		<Update>
			<Set Water="true"/>
			<Where Type="IMPROVEMENT_BIOWELL"/>
		</Update>
	</Improvements>

	<Improvement_ValidFeatures>
		<Row ImprovementType="IMPROVEMENT_ARRAY" FeatureType="FEATURE_LAKE"/>
		<Row ImprovementType="IMPROVEMENT_NODE" FeatureType="FEATURE_LAKE"/>
		<Row ImprovementType="IMPROVEMENT_DOME" FeatureType="FEATURE_LAKE"/>
		<Row ImprovementType="IMPROVEMENT_BIOWELL" FeatureType="FEATURE_LAKE"/>
	</Improvement_ValidFeatures>

The above code-block seems pretty damn simple (if I made some obvious mistake please let me know :)), but it doesn't work.
Is there something else I need to set?
If not, how difficult would it be to go into the lua files and add the ability for workers to improve lakes?

Thanks much --S
 
(Like in Civ V), Neither Lakes nor Rivers are actually features - the FEATURE_LAKE and FEATURE_RIVER entries are in the <FakeFeatures> table, and that exists solely for the Civilopedia entries
 
Oh.

Well, that explains that, then. Do their yield entries do anything?

So in order to change this, I would need to track down whatever lua scripts make the existing exceptions for lakes (including how it detects them, presumably something about smaller contiguous bodies of water), and then re-write the improvement lua file to make the same exception when a worker is on a lake (as opposed to other ocean) tile?
 
Not quite the same thing, but this type of codeblock *does* work:
Code:
	<Building_LakePlotYieldChanges>
		<Row BuildingType="BUILDING_WATER_PLANT" YieldType="YIELD_PRODUCTION" Yield="1"/>
		<Row BuildingType="BUILDING_WATER_PLANT" YieldType="YIELD_ENERGY" Yield="1"/>
		<Row BuildingType="BUILDING_DEPOT" YieldType="YIELD_ENERGY" Yield="1"/>
		<Row BuildingType="BUILDING_VIVARIUM" YieldType="YIELD_FOOD" Yield="1"/>
		<Row BuildingType="BUILDING_SOMA_DISTILLERY" YieldType="YIELD_CULTURE" Yield="1"/>
		<Row BuildingType="BUILDING_BOREHOLE" YieldType="YIELD_PRODUCTION" Yield="1"/>
		<Row BuildingType="BUILDING_ALIEN_PRESERVE" YieldType="YIELD_SCIENCE" Yield="1"/>
	</Building_LakePlotYieldChanges>

The above code is just something a threw together messing around, probably those are not the changes I'd actually want to make.
Although weird things happen when you change these values for a game in progress.

I have to decide what lakes *should* do, I'm thinking:
* +1 Energy / +1 Health with BUILDING_WATER_PLANT (this is the big one).
EDIT: UNFORTUNATELY, I CAN'T DO THIS BECAUSE IT'S NOT A YIELD.
EDIT2: FOR SIMPLICITY WHY NOT MAKE IT +1 Food/+1 Production? That's almost a bugfix given what the text already says!

* +1 Culture with BUILDING_SOMA_DISTILLERY (because Beer).
* +1 Production with BUILDING_BOREHOLE
* +1 Food with BUILDING_VIVARIUM
That would end you up at 3F/1C/1P/2E, and +1 Health (with a farm, tops out at 4F/1P/1S/1E without wonders). Is that better than a grassland hex? I think lake hexes should be better than grassland hexes.
 
Back
Top Bottom