Pazyryk
Deity
- Joined
- Jun 13, 2008
- Messages
- 3,584
Is there any other source for this "misc" yield in the base game other than population for YIELD_SCIENCE? I'm using the Change counterpart function and I need to know what I previously set, which means I need to know what the base game is adding. There is no Set function here so you can't "reset" exacly, you have to unchange your previous changes.
Also, does anyone know if changes I make with ChangeBaseYieldRateFromMisc would stick around in the city after the city changes hands by conquest?
The city UI on this is rather strange. Basically, call this yield "from population" if it is science, or "from misc" if anything else.
Also, does anyone know if changes I make with ChangeBaseYieldRateFromMisc would stick around in the city after the city changes hands by conquest?
The city UI on this is rather strange. Basically, call this yield "from population" if it is science, or "from misc" if anything else.
Code:
local iYieldFromMisc = pCity:GetBaseYieldRateFromMisc(iYieldType);
if (iYieldFromMisc ~= 0) then
if (iYieldType == YieldTypes.YIELD_SCIENCE) then
strYieldBreakdown = strYieldBreakdown .. "[ICON_BULLET]" .. Locale.ConvertTextKey("TXT_KEY_YIELD_FROM_POP", iYieldFromMisc, strIconString);
else
strYieldBreakdown = strYieldBreakdown .. "[ICON_BULLET]" .. Locale.ConvertTextKey("TXT_KEY_YIELD_FROM_MISC", iYieldFromMisc, strIconString);
end
strYieldBreakdown = strYieldBreakdown .. "[NEWLINE]";
end