yield library bug

mystikx21

Deity
Joined
Feb 18, 2006
Messages
3,229
Location
ohio
I've been running into an issue with an (old) policy yield modifier bug in the lua while running a couple of test games. It showed up with factories (so late in the game), and the net effect was
a) removed factories and other late game production buildings from the game (nuclear/solar power) despite nothing being done to them that differed from other buildings. Other buildings with similar changes remained active (workshop, stable, Iron Works). Disabling those changes (xml/sql data edits mid-game can usually be enabled or disabled without corrupting anything) and clearing the cache doesn't appear to have resolved the issue.
b) the tech tree getting very weird around the industrial age. Particularly industrialization itself was touchy. It would no longer obviously display which techs were already researched for example and industrialization had to be selected from the tech tree directly to get it.
c) the build queue crashing such that the game is unplayable (nothing can be bought or built that isn't already listed to do). It doesn't crash the build queue until factories are researched that I can tell. But that's the entire late game (eg, when you're most likely to be about to try to win the game if it wasn't wrapped up before then).

I'll have to disentangle this bug some more (disable some changes to see what's causing it exactly), but it puts right at line 399 in the yield library lua (which is a policy yield modifier bug similar to the old Wat Phra Kaew bug in GEM). Since this was, I thought, resolved a long time ago, I thought I would check to see if there was an easy fix.
 
It might also be a bug furtt upstream from where the log indicates.
You may have to look a little more.

Sent from my GT-I9305T using Tapatalk
 
I figured that. Which is annoying. :)

I'll try some toying around more but the impact was limited to factories and power plants from examining what wasn't displaying or loading properly and so far I can't see any difference in what I did to them from anything else that does work and display. It has given me some time to re-arrange some of the tech tree effects I put in the works, but that's a small potatoes issue if I can't find this one bug.

You mean upstream, like code before that line (that's where it just cuts out finally as a combination of other bugs?). I haven't fiddled with the lua at all. I'll verify if there's an issue with anything else or maybe if it is just the save games were corrupted tomorrow and move on. Kind of why I felt it better to play test this first.
 
Yeah, the function that is shown in the log may actually be referencing a function from some where else. You may have to trace it back through the code.
I actually find it a good way to learn the code.
Expanding the logging code is another of my wishes. I've seen some good code that we might be able to add. That's down the track though.

Sent from my GT-I9305T using Tapatalk
 
I backed it out to an earlier save and the bug hasn't yet reappeared at the same point of the game.

I'll have to see if I can recreate it. Unless the save was somehow corrupted the only major difference was the ideology that a rival civ adopted (they went autocracy instead of order).

It's possible that the issue is related to the ideologies and whether they are handled differently than policies in the dll/yield library. Investigating that.
 
Top Bottom