Tracking and understanding Science spikes in BNW using CEG3.5 and CAT.

That's a different bug then.
I am getting a consistent spike in every game mod since 3.4.1.
It happens between turn 18 and 30 and is usually about 170 beakers at standard gamespeed.

I have messaged some moderators to change the thread name but no answer yet.

How did you get 3.5.3?
 
I have messaged some moderators to change the thread name but no answer yet.

I read the thread four minutes after it was sent and responded immediately; I'm happy to rename the thread or merge it, but I've not been told what to rename it to or where to merge it. I thought maybe if I now put the question to the thread, someone might let me know.
 
Thank you for renaming this Rob.
How can I test my theory:
These science spikes occur because the program does not delivery bonuses each turn.
I noticed that with with Interfaith dialog, the Science might have been delivered with one massive lump once a threshold was reached.
See here.

Maybe the NoTechTradeModifier = "50" TechTradeKnownModifier = "0" is also delivered in one lump.
I notice that it seems to arrive the turn after I finish a tech and have simultaneously met several AI which were 1-2 techs ahead of me.
If the game awards this all at once, that could be the reason.

Could this be tested by removing the NOTECHTRADEDMODIFIER?
 
I am at turn 120 of a CEG3.5.3/CAT game as Morroco
Panagea Plus, Standard, Prince.
This is the first game since CEG3.4.1 where I haven't had a science spike early on.
Like I said above, I changed NoTechTradeModifier = "50"
to TechTradeKnownModifier = "0".

I have irregular jumps in science of over 15 beakers at most, but most turns the science delivers exactly or one more than promised.

I chased and won the Great Library with no spike.
There was no production freeze as happened with Celts on another thread.

Could the solution be that the game delivers the bonus for science in one lump some at unknown intervals?
What else would I test to see if this is the culprit?
 
NoTechTradeModifier is an unused variable in both vanilla BNW and this mod. It's an old xml carryover from civ 4 where tech trading was a factor.
 
NoTechTradeModifier = "50" TechTradeKnownModifier = "0"
What about TechTradeKnown.

This is 0 for Prince on up but a negative number for easier levels.

Since I have only tried with Prince or King, this should not be a factor.
What is the variable that gives me the bonuses for lagging behind the AI?
 
The function getTechTradeKnownModifier is not used in the C++ either. Probably another legacy function.
 
I have not encountered the early spike in 3 test games as Morrocco and Celts.
I am encountering irregular science spikes later in the game that are about the same size but not proportionately larger.
IOW, I was getting a 160 point spike around turn 22.
Now I get 160-300 point spikes in classical and medieval ages that are not related to research agreements which I make a point of refusing.
There are too many variables in the later game due to religion, alliances, etc.
I believe that these spikes have to do with me being the last civ to study the science.
What variable causes this catch-up science feature?

Is it TechTradeKnownModifier? I have it at -10 in the last game and am getting quite a few one turn sciences.
 
I believe that these spikes have to do with me being the last civ to study the science.

This is not the case. In a game with goody huts disabled (so no other civs could have received techs for free) I received a +5 science spike in both turn 5 and 6 while researching pottery, and another spike in turn 9 when researching Writing. There's no way any of the AIs could have already had Writing on turn 9. I then used IGE to give myself all the Ancient Era techs and despite the fact this clearly put my miles ahead of the AIs on research, I received spikes on the next two rounds, then nothing for a few rounds, then more spikes, then I quit the game.

3.5.3, cat/ceg/ige only mods loaded.
 
Ran some test, disabled all mods except CAT and started disabling folders until the bug went away. It appears the issue is with the files in the CAT -> Tools -> Yield Library folder.
 
Ran some test, disabled all mods except CAT and started disabling folders until the bug went away. It appears the issue is with the files in the CAT -> Tools -> Yield Library folder.

We know that whatever is causing the problem must be using the yield library folder since that's where the instant yields functions were added. The problem itself may not lie in the yields folder though.
 
Oh my g... this seems like a real game breaker!

Can't wait to get a (relatively) stable release of CAT/CEP. Haven't played anything other than a few test turns since G&K and it's starting to itch...

\Skodkim
 
The only place I can find which specifically changes stored science is AIPerTurnBonuses. This skips the human player, however, so it's probably not that. It's worth testing though. Does the problem happen if you disable line 974 of CEAI_Events.lua by adding a -- to the front like this:

Code:
[COLOR="Blue"]--[/COLOR]LuaEvents.ActivePlayerTurnEnd_Player.Add(AIPerTurnBonuses)

Something else we can try is enabling line 1656 of YieldLibrary.lua by removing the -- at the front of the line:

Code:
if player:IsHuman() then
  log:Warn(sciString)
end

This should show a warning in lua.log whenever we change the stored science of a human player. This will at least help us identify if it actually is a call to that function causing the problem. :think:
 
just an update to this bug, when it happens and you get tech increases at 1 per turn

it will then hit a point where tech is 5000+ per turn.
 
I have not seen the big spike in the last few mods versions.
Just little unexpected ones at tech completion here and there.

When I did see the spike, I was playing as Celts or Korea.
It gave a science surplus of around 150 points.
I believe I posted the lualog near the top of this thread.
The log did reveal any errors occurring at the time.

It was repeatable. If I reloaded a save from Main menu, the spike would occur again.

It seemed unrelated to lagging behind other civs in techs; see post aboev.

Again, it's not the biggest problem unless we can confirm more sightings with recent logs.

I will try Thal's suggestion if I see it occur again, move back a few turns, load the suggestion, and try it again.
 
I haven't seen any spikes since 3.4.
3.6.2 has been flawless up to turn 120.
May major concern is that it is unplayably slow.
If that's the only script to give the AI a science bonus, I wouldn't want to remove it.
 
Top Bottom