158 & 159 losing "free science"

glssr60

Chieftain
Joined
Dec 10, 2008
Messages
26
At some point (seemingly random) the "free" amount of research stops being added in to my accumulation. It is being added along with whatever is being generated by the existing cities but then, although the tooltip still shows it being added, the only amount the cumulative number is increased by is JUST what the cities are contributing, causing quite a bit of loss of science for the early game. The toolbar at top also continues to show the remaining turns of research for that tech as though the entire amount is being added, so it remains on the same amount of remaining turns till completion for several turns sometimes. I attempted to add the lua.log both as a log and rar file. Hopefully you receive it.
 

Attachments

I am also using Civwillard and infoaddict....I tried disabling them and still got the same problem
 
Could you open this file:
Civup/ThalUtilities/Core/TU_City.lua​

Find line 102 and change from this:
PHP:
if itemInfo.Class ~= "UNITCLASS_SCOUT" and city:CanTrain(itemInfo.ID, 0, 1) and (not budget or City_GetPurchaseCost(city, GameInfo.Units, itemInfo.ID) <= budget) then
to this (third line is unchanged after the elseif):
PHP:
if not itemInfo then
    log:Fatal("City_GetUnitsOfFlavor itemInfo=nil FlavorType=%s UnitType=%s", flavorType, flavorInfo.UnitType)
elseif itemInfo.Class ~= "UNITCLASS_SCOUT" and city:CanTrain(itemInfo.ID, 0, 1) and (not budget or City_GetPurchaseCost(city, GameInfo.Units, itemInfo.ID) <= budget) then
Then:

  1. save the file
  2. reload your game
  3. advance one turn
  4. upload lua.log
I've added that change to v159.2, but making the change in your current game should somewhat fix the problem for you, and give me some information about what's going on.
 
the new lua.log is attached but I did not update to 159.2 before I advanced the game after making those changes you requested. After uploading I installed 159.2 and my science is now working correctly. Thank you!
 

Attachments

Thanks! That revealed the problem:

FATAL City_GetUnitsOfFlavor itemInfo=nil FlavorType=FLAVOR_DEFENSE UnitType=UNIT_ATOMIC_BOMB
FATAL City_GetUnitsOfFlavor itemInfo=nil FlavorType=FLAVOR_DEFENSE UnitType=UNIT_NUCLEAR_MISSILE

For some weird reason, retrieving these unit types from the Unit table is returning a nil value. I don't know why that might be. It's not important for gameplay, since these units cannot be purchased anyway... but it's very puzzling. The good thing is at least we've worked around the problem. :think:
 
Back
Top Bottom