Cannot upgrade using city-state resources

antdog

Chieftain
Joined
Jan 13, 2011
Messages
38
I have a surplus of iron which all comes from a city-state. I am unable to purchase an upgrade on my warriors, but I'm at least able to build swordsmen now. I don't believe I have this upgrade problem when using resources I obtain on my own though. Is this a bug or a new game design I'm unaware of?
 
Try saving your game, reloading, and then upgrading.

I have got this bug with the last 10 versions or so of TBM: sometimes, nothing happens when you click the upgrade button, even with the correct amount of gold and resources. It does not just affect warriors either, but it does only seem to happen in the early game. Usually a reload fixes it.
 
This is a rather strange bug I've noticed too. It happens in very rare circumstances (once in my last game) and does not appear to be tied to citystates in particular. As jacktannery said, reloading temporarily works around the problem.

I've been trying to think of what might cause this to fix it. When I click the button in this situation the tuner reports an error that the "UI" variable is nil. This doesn't make sense because the UI variable is the root of everything we see in the user interface. I'm really puzzled how this could turn nil, yet the game still keeps going okay overall, and works after reloading. :think:

I haven't changed anything with this part of the game in a while. Due to these weird circumstances I can't help but wonder if this is a vanilla bug introduced in patch 1.0.1.332... :think:
 
I think I've tracked down the source of this problem, and this should be solved in v8.7. :)

I believe it has something to do with a mysterious concept called "contexts" Firaxis uses. No one outside Firaxis knows for sure how contexts work or what they're for. Somehow when I try to update the flag promotion icons (when a unit is upgraded), occasionally something goes wrong and the whole Lua implementation disappears from existence (basic functions say they are nil).

I now check if Lua exists, and if that fails, it just stops trying to update the icons. They instead get updated when we next end our turn.

I think the reason re-loading works around the problem is it might also restart the Lua interpreter. It might be some problem with how firaxis stores things in the cache.
 
Back
Top Bottom