104 Nation Wonder Bug

EsoEs

Warlord
Joined
Jul 25, 2011
Messages
242
So I've been playing the standard 104 release and I just encountered a wierd bug. I had the Oxford University down to 1 turn in a city, then switched production because I wanted to save the techs until the right moment. In this time, I captured an American city and made a puppet. When I went back to complete the Oxford University, it went back to 3 turns to complete on the same exact city focus. I didnt pay attention to the cost to build before/after but theres no reason I should have it down to 1 turn, then go back some turns later and its now 3 turns even on the same city focus. I thought puppets weren't supposed to increase the cost of National Wonders, social policies, etc.
 
Puppets do not increase the prerequisite building requirement, but the ":c5production: cost per city" value does count every city, including puppets. This effect is done in the game core only Firaxis has access to.
 
@timbuktu
That's strange... In the 2 out of 3 situation the numbers are:

prereq.BuildingsNeeded = math.max(0, ((buildingCount + #prereq.MissingCities) * prereq.Info.PercentBuildingNeeded / 100) - buildingCount)
prereq.BuildingsNeeded = math.max(0, ((2 + 1) * 75 / 100) - 2) = math.max(0, (3 * .75) - 2) = math.max(0, 2.25 - 2) = 0.25

0.25 is not 0, so I'm uncertain how it can be buildable if all 3 cities are normal cities (not puppets or razing). It gets buildingCount by totalling (city:GetNumRealBuilding(buildingID) + city:GetNumFreeBuilding(buildingID)) for each normal city in the empire. Could you attach these things in a zip file?

  • Savegame where the problem occurs
  • /Mods folder
  • /ModUserData folder
  • /Cache folder
 
Ooh that explains it...

There's two functions available to us, GetNumRealBuilding and GetNumFreeBuilding. The second function is used for those free buildings awarded by world wonders. If you actually look at the list of buildings in the city with the tuner, the building does not exist. I therefore figured it's "fake." Why else would they put the word "real" in the function name? I guess this is wrong, and they consider these buildings "real" too. :lol:

I've removed references to the 'free' function for v108.3 beta. See if it works then. :)
 
Back
Top Bottom