[BTS] [Resolved] Flood plain & Jungle Unhealthiness Calculation (is Fandom wiki incorrect?)

comrizen

Chieftain
Joined
Sep 20, 2022
Messages
6
From https://civilization.fandom.com/wiki/Health_(Civ4):
Both floodplains and jungle in the city's big fat cross cause unhealthiness, as follows:
  • Jungle: 0.25 per tile
  • Floodplains: 0.4 per tile
The total unhealth caused must be an integer, and is computed by summing each individual factor, rounding down each result. Thus, a city with two floodplain tiles and three jungle tiles has no health malus, because the 0.8 from floodplains rounds down to zero, as does the 0.75 from jungle.
In the game i'm currently playing, i had a city with 2 floodplain tiles (the city was founded on a third, but that was transformed into desert), and 5 jungle tiles in the Big Fat Cross.
Expectation according to wiki info was unhealth of Floor(0.4 * 2) + Floor(0.25 * 5) = 0 + 1 = 1.
Observed was 2 unhealth.
Upon removal of one jungle, observed unhealth was reduced from 2 to 1.

Hypothesis: Rounding down actually occurs after summing, not for each summand. Correct formula is Floor (0.4 * # of floodplain tiles + 0.25 * # of jungle tiles), not Floor (0.4 * # of floodplain tiles) + Floor (0.25 * # of jungle tiles) as the wiki states, and the wiki example is incorrect: 2 floodplain tiles and 3 jungle tiles give 1 unhealth not 0.

Does anyone have data to contradict this hypothesis? If so, what is going on in my game?
Thank you for your consideration.

Spoiler Screenshots (top screenshot is before jungle removal, bottom is after the jungle has been removed from the gems tile) :

Flood Plains 1.png

Flood Plains 2.png
 
Last edited:

comrizen

Chieftain
Joined
Sep 20, 2022
Messages
6
Perfect, thanks. I was thinking of looking through the code, but i didn't really know where to start looking. You saved me a ton of effort. I'll update the fandom wiki to reflect the correct calculation.
 
Top Bottom