CAT 3.4.2 (without CEG): Glitch in terrain restriction tooltip for Stone Works

lockstep

Prince
Joined
Jan 15, 2004
Messages
399
Location
Vienna, Austria
Using CAT 3.4.2 (without CEG), the terrain restriction tooltip for Stone Works reads "Must not be on TERRAIN_PLAINS" instead of "on Plains". (In contrast, the tooltip for the Workshop/Windmill correctly reads "Must not be on a hill".)
 
@lockstep

Could tell us what the underlying terrain is? Tundra, Grass, Desert, Plains?

As Stone and Marble may be found on those four terrain types a change from a negative check to a positive check may be needed.
 
I was talking about Stone Works (the city building), not quarries (the tile improvement). Without CEG, Stone Works can be built in any city not located on plains (provided an improved stone or marble resource is nearby). The tooltip info is correct, but uses "TERRAIN_PLAINS" instead of "Plains".
 
Ahh, of course you are. My bad.

Simple fix, we just need a TXT_KEY for PLAINS.

Although the underlying problem is the Windmill checks for POSITIVE = "is the terrain flat?" whereas the Stone Works checks for a NEGATIVE = "is the terrain prohibited?"

Firaxis logic again. Why reuse a piece of code when you can do something completely different?

And yes, I do know why they did it that way. I just like bagging them. :evil:
 
That's strange... this should have worked. I changed the data from this:

cepObjectInfo.NearbyTerrainRequired​

to this:

cepObjectInfo.NearbyTerrainRequired and Locale.ConvertTextKey(cepObjectInfo.NearbyTerrainRequired)

This should have displayed...

Oh wait, I needed to fetch the description of the terrain. Try this in Tools/TooltipWriter/TW_BuildingStats.sql and see if it works:

cepObjectInfo.NearbyTerrainRequired and Locale.ConvertTextKey(GameInfo.Terrains[cepObjectInfo.NearbyTerrainRequired].Description)​

Edit: Hmm wait no that won't work... the lua file should have already converted it from terrain type to a description. Hmm... :think:

Edit: Oh duh silly me! I was changing NearbyTerrainRequired, which has a bug, but the one you're talking about is ProhibitedCityTerrain, which was also bugged. I've fixed both of these for v3.5.2. I missed this because of a third bug: I placed ProhibitedCityTerrain in the Abilities section, but it belongs in the Requirements section, so I was looking in the wrong place. :crazyeye:
 
Top Bottom