[CivUP 2.0.51/GEM 1.9.1] Monument to the Gods messes up city screen

skodkim

Deity
Joined
Jan 16, 2004
Messages
2,497
Location
Denmark
Hi

I'v experienced a really bad bug that's made me give up two games now and has caused me a lot of hours. Finally I found that it's related to picking the Monument to the Gods Pantheon belief.

Basically the city screen is messed up when building wonders and it looks a lot like its related to these two posts: Link or Link 2. I can't open the production queue, city screen shows starts from other cities when scrolling through the cities using the arrow buttons,...

I run other mods as well but haven't seen anything like this before (nothing I haven't used before)

Lua.log contains the following
Spoiler :
[16365.565] InfoAddictHistoricalData: INFO: Total time for DrawGraph(score): 0.009s
[16365.659] InfoAddictCivRelations: INFO: Total time to build political view: 0.007s
[16365.737] TurnProcessing: Hiding TurnProcessing
[16394.347] Runtime Error: [string "C:\Users\hollenbo\Documents\My Games\Sid Me..."]:851: bad argument #2 to '?' (Key must be of type 'number' or 'string'.)
[16396.828] Runtime Error: [string "C:\Users\hollenbo\Documents\My Games\Sid Me..."]:851: bad argument #2 to '?' (Key must be of type 'number' or 'string'.)
[16397.062] Runtime Error: [string "C:\Users\hollenbo\Documents\My Games\Sid Me..."]:851: bad argument #2 to '?' (Key must be of type 'number' or 'string'.)
[16397.109] Runtime Error: [string "C:\Users\hollenbo\Documents\My Games\Sid Me..."]:851: bad argument #2 to '?' (Key must be of type 'number' or 'string'.)
[16398.934] Runtime Error: [string "C:\Users\hollenbo\Documents\My Games\Sid Me..."]:851: bad argument #2 to '?' (Key must be of type 'number' or 'string'.)
[16400.197] Runtime Error: [string "C:\Users\hollenbo\Documents\My Games\Sid Me..."]:851: bad argument #2 to '?' (Key must be of type 'number' or 'string'.)
[16400.853] Runtime Error: [string "C:\Users\hollenbo\Documents\My Games\Sid Me..."]:851: bad argument #2 to '?' (Key must be of type 'number' or 'string'.)
[16401.960] Runtime Error: [string "C:\Users\hollenbo\Documents\My Games\Sid Me..."]:851: bad argument #2 to '?' (Key must be of type 'number' or 'string'.)
[16403.863] Runtime Error: [string "C:\Users\hollenbo\Documents\My Games\Sid Me..."]:851: bad argument #2 to '?' (Key must be of type 'number' or 'string'.)
[16404.737] Runtime Error: [string "C:\Users\hollenbo\Documents\My Games\Sid Me..."]:851: bad argument #2 to '?' (Key must be of type 'number' or 'string'.)


I'm going to load my game from one turn before picking the belief (where it worked!) and see if I can continue from there if picking another belief.

Edit: Loaded up the game again and chose Fertility Rites instead and now the game works. I don't thnik this is related to the other mods as most of them are "just" xml-edits.

\Skodkim
 
Thanks for bringing this up. That log file was very helpful, and led me straight to the problem. Does this fix it for you? I'm testing it now.

1) Open Civup\2_ModTools_Trunk\Libraries\YieldLibrary.lua

2) Change line 851 from this:
Code:
itemEra = GameInfo.Technologies[itemTable[itemID]].Era
to this:
Code:
itemEra = GameInfo.Technologies[itemTable[itemID][B].PrereqTech[/B]].Era
 
Changing the line from

local itemEra = GameInfo.Technologies[itemTable[itemID]].Era

to

local itemEra = GameInfo.Technologies[itemTable[itemID].PrereqTech].Era

did the trick (based on a small test)

\skodkim
 
This bug still exists. Reloading before picking the belief fixed it for me aswell. (Sadly I'm allready ~40 turns later, ignoring the problem at first)

I only found 2_ModTools_Trunk\YieldLibrary\YieldLibrary.lua and the only line close to what you 2 posted looks like:

local itemEra = GameInfo.Technologies[itemTech].Era

but nothing with ItemID.

edit:using 2.3.1 and 1.12.1
 
That's how it looks for me:
 

Attachments

  • civ5.jpg
    civ5.jpg
    285.6 KB · Views: 73
I'm having a similar problem to Skodkim, but not exactly. I'm getting the same "mostly blank city screen" for 2/3 of my cities, which have built wonders. In the third city, which as only a monument, everything shows up fine. I have adopted the "God of the Open Sky" religious belief, which seems to be adjusting yields correctly.

I have posted the relevant part of the Lua.log file. Hopefully it will help you figure out what's happening. I have changed the names of my directory structure to protect the innocent. :)

Spoiler :

[1397858.970] Runtime Error: [string "d:\Users\B----\S----\Documents\My Games\..."]:948: attempt to index global 'pPlayer' (a nil value)
[1397859.532] Runtime Error: [string "d:\Users\B----\S----\Documents\My Games\..."]:948: attempt to index global 'pPlayer' (a nil value)
[1397859.906] Runtime Error: [string "d:\Users\B----\S----\Documents\My Games\..."]:948: attempt to index global 'pPlayer' (a nil value)
stack traceback:
[string "d:\Users\B----\S----\Documents\My Games\..."]:948: in function 'OnCityViewUpdate'
[string "d:\Users\B----\S----\Documents\My Games\..."]:2499: in function <[string "d:\Users\B----\S----\Documents\My Games\..."]:2497>
[1397862.761] Runtime Error: [string "d:\Users\B----\S----\Documents\My Games\..."]:948: attempt to index global 'pPlayer' (a nil value)
[1397864.883] Runtime Error: [string "d:\Users\B----\S----\Documents\My Games\..."]:948: attempt to index global 'pPlayer' (a nil value)
[1397865.632] Runtime Error: [string "d:\Users\B----\S----\Documents\My Games\..."]:948: attempt to index global 'pPlayer' (a nil value)


Let me know if you have any idea on how to fix this!
 
There's a bug right now which messes up city screens in cities with wonders, but thats not (I think) related to any beliefs.

\Skodkim
 
Ah, I didn't notice the date of the earlier posts on this thread, so I assumed they were all current :)

Either way, Civup 2.3.2 and Gem 1.12.2 fix the problem. Thanks!
 
Hi all,

I had the same problems in the city screen (e.g. no buildings shown on the right list, etc.), so I updated to Civup 2.3.2 and Gem 1.12.2. Now the city screen looks better, the buildings on the right hand side of the screen are being shown again.

However, there is still one nasty bug: no tile resources are shown any more (please see attachment).

Any ideas?

Thanks!
 

Attachments

  • civ5.jpg
    civ5.jpg
    276.2 KB · Views: 75
Back
Top Bottom