Can you grant a city a freshwater housing bonus with a district modifier?

Mettpawwz

Chieftain
Joined
Feb 4, 2017
Messages
73
There seem to be 2 EFFECT_TYPES that relate to water housing, namely EFFECT_ADJUST_WATER_HOUSING and EFFECT_ADJUST_CITIES_FRESHWATER_HOUSING_BONUS. The first one seems to affect the magnitude of the bonus, which I'm not interested in, and the second one seems to affect all cities, and is used by the Mohenjo-Daro city-state.

Is there any way to attach a freshwater housing bonus to a district though, and have it only act in that city?
 
Last edited:
Isn't that what the Aqueduct does? Can you use that as a base and build from there?

Alternately you could use the second effect and use a RequirementSet to make it only affect cities with the proper district (attaching the modifier to a tech/civic that unlocks the district, for example).
 
Aqueduct and baths don't seem to have any modifier associated with them. Their effects for being aqueducts appear to come straight from the Aqueduct="true" boolean and the fact that baths are directly given 2 extra Housing and 1 extra Ammenity.
Code:
<Row DistrictType="DISTRICT_AQUEDUCT" Name="LOC_DISTRICT_AQUEDUCT_NAME" Description="LOC_DISTRICT_AQUEDUCT_DESCRIPTION"
	PrereqTech="TECH_ENGINEERING" PlunderType="PLUNDER_GOLD" PlunderAmount="50" AdvisorType="ADVISOR_GENERIC"
	Cost="50" CostProgressionModel="COST_PROGRESSION_GAME_PROGRESS" CostProgressionParam1="1000" RequiresPlacement="true"
	RequiresPopulation="false" Aqueduct="true" NoAdjacentCity="false" InternalOnly="false" ZOC="false"
	CaptureRemovesBuildings="false" CaptureRemovesCityDefenses="false" MilitaryDomain="NO_DOMAIN"/>
<Row DistrictType="DISTRICT_BATH" Name="LOC_DISTRICT_BATH_NAME" Description="LOC_DISTRICT_BATH_DESCRIPTION"
	PrereqTech="TECH_ENGINEERING" PlunderType="PLUNDER_GOLD" PlunderAmount="50" AdvisorType="ADVISOR_GENERIC"
	Cost="25" CostProgressionModel="COST_PROGRESSION_GAME_PROGRESS" CostProgressionParam1="1000"
	RequiresPlacement="true" RequiresPopulation="false" Aqueduct="true" NoAdjacentCity="false"
	InternalOnly="false" ZOC="false" CaptureRemovesBuildings="false" CaptureRemovesCityDefenses="false"
	MilitaryDomain="NO_DOMAIN" Housing="2" Entertainment="1" TraitType="TRAIT_CIVILIZATION_DISTRICT_BATH"/>
 
If I recall correctly there's a City State that provides a similar bonus, so its likely there's an Effect that accomplishes this, altho my guess is the Modifier currently used in game has per-Player scope rather than per-City. You may be able to write a new Modifier with City scope and attach it to a District with the DistrictModifiers table. I haven't tested this to verify.

EDIT: NM, reading comprehension fail on my part. :) You already mentioned the city state and the modifier, so disregard above. Just take it as validation that I'd likely take the same approach. :)
 
@Magil, the issue is that as @LeeS mentioned the freshwater bonus of the aqueduct is only granted through the Aqueduct boolean, which imposes other restrictions I don't want on the district itself (such as that it can only be placed next to the city center and only if there are mountains/lakes/oases/rivers nearby). I basically want to make a district (or honestly, even a building would be fine) that grants the freshwater status to its city with regards to housing, but I guess it seems that due to hardcoding that isn't possible.

I've actually run into quite a bit of unfathomably baffling hardcoding in the last couple days (ranged attack of cities being tied to walls, there being a requirement type for some adjacent terrains like rivers, but no ..._TERRAIN_MATCHES requirement type so you can specify the terrain you want), there being no lake terrain type that you can reference in the Adjacency_YieldChanges table. I really hope they restructure some of these things in the future as it pointlessly restricts what modders can do :(
 
Last edited:
@Mettpawwz What about those:

Code:
ROUGH_RIDER_HILL_TERRAIN_REQUIREMENTS   PLOT_IS_GRASS_HILLS_TERRAIN_REQUIREMENT
ROUGH_RIDER_HILL_TERRAIN_REQUIREMENTS   PLOT_IS_PLAINS_HILLS_TERRAIN_REQUIREMENT
ROUGH_RIDER_HILL_TERRAIN_REQUIREMENTS   PLOT_IS_TUNDRA_HILLS_TERRAIN_REQUIREMENT
ROUGH_RIDER_HILL_TERRAIN_REQUIREMENTS   PLOT_IS_DESERT_HILLS_TERRAIN_REQUIREMENT
ROUGH_RIDER_HILL_TERRAIN_REQUIREMENTS   PLOT_IS_SNOW_HILLS_TERRAIN_REQUIREMENT
LONGSHIP_PLOT_IS_COAST   REQUIRES_TERRAIN_COAST
UBOAT_PLOT_IS_OCEAN_REQUIREMENTS   REQUIRES_TERRAIN_OCEAN
 
Huh, @Infixo, where did you find that PLOT_ADJACENT_TO_LAKE requirement?

I just searched for anything with "ADJACENT" in it in the Requirements table and didn't find it for some reason.

http://imgur.com/a/nhoaa

The requirements you linked above that aren't for adjacent terrains though, only for the terrain your entity is on. The only requirement types that let you check for adjacent terrains are specific ones such as REQUIREMENT_PLOT_ADJACENT_TO_RIVER or REQUIREMENT_PLOT_ADJACENT_TO_COAST. So if, for instance, I wanted to check for an adjacent Grass Mountain it would be impossible to do so as far as I know.

Admittedly, it's not probably something that is necessary too much of the time, but I still just don't understand why they hardcoded it this way.
 
Yeah, sorry, didn't realize the Aqueduct was so hard-coded. Didn't have access to the files when I posted that, and looking at it I don't think using the City-State bonus code would work either since it seems to apply to the player rather than cities. Not sure how I'd approach this, can't think of a way off-hand.
 
Top Bottom