GetYieldRateModifier is bugged

Thalassicus

Bytes and Nibblers
Joined
Nov 9, 2005
Messages
11,057
Location
Texas
There's a whole range of bugged functions in the game, but a recent one I noticed is GetYieldRateModifier. It does not factor in the CapitalGrowthMod attribute from the Tradition policy, even though CapitalGrowthMod is displayed as a yield rate modifier on the tooltip in CityView.lua and indicates an increase in food supply on that tooltip. The function does correctly consider other modifiers, like unhappiness or the Floating Gardens.
 
There's a whole range of bugged functions in the game, but a recent one I noticed is GetYieldRateModifier. It does not factor in the CapitalGrowthMod attribute from the Tradition policy, even though CapitalGrowthMod is displayed as a yield rate modifier on the tooltip in CityView.lua and indicates an increase in food supply on that tooltip. The function does correctly consider other modifiers, like unhappiness or the Floating Gardens.

The Growth is +50% Growth (excess food) NOT +50% Food
 
You're right, I realized the bug is actually in two different places...

The GetYieldModifierTooltip function incorrectly returns growth modifiers in the string, which are not yield modifiers. The GetYieldModifierTooltip function is hardcoded so this bug cannot be fixed directly, though we can write a new function to replace the bugged version.

Second, the GetYieldTooltipHelper function in InfoTooltipInclude.lua is bugged. It should display:

  1. Base yield
  2. Base modifiers
  3. If food: Surplus yield (<Base * YieldMod> - Eaten)
  4. If food: Surplus modifiers
  5. Total surplus
It incorrectly displays #3 for #1 and does not show #3, which is significant if Floating Gardens are built in a city. I'll fix this bug in the unofficial patch. :)
 
Back
Top Bottom