Recalculating Modifiers

BlueGenie

Emperor
Joined
Apr 23, 2009
Messages
1,575
Yosemite. Thought I'd start a thread for the CTRL+SHIFT+T recalculation of modifiers and assets, for posting bugs found and asking questions about.

Cheers
 
Right, I'll start.

Bug: Slave Market resurfaces on rebuilding despite being out of the Slavery Civic. So far that's the only Civic specific building I've seen it happen with.

Question: What happens if it's even possible on rebuild in MP games? Does it work at all, or does it only do it for the one player and thus cause OOS all the time?

Cheers
 
Right, I'll start.

Bug: Slave Market resurfaces on rebuilding despite being out of the Slavery Civic. So far that's the only Civic specific building I've seen it happen with.

Question: What happens if it's even possible on rebuild in MP games? Does it work at all, or does it only do it for the one player and thus cause OOS all the time?

Cheers

Can you provide a save game with the slave market issue please.

On the multiple player question, it is deterministic so it should be fine provided all players recalculate then save again before continuing I think.
 
Saved games attached.
If it doesn't do it for you on recalc then you can see the result in my saved game after recalculating.
This is actually a little bit of a pain as I can't recalculate again without having it pop up every time I do it, and there are several reasons and times when recalculating is necessary to remove bugs. Bugs which I should post elsewhere in fact... *ponders* Unless I already did. *laugh* Can't remember.
Actually think I did but it was never really looked at as I was then playing with the folder C2C. I am not now and the problems persist so I'll post them again.

Cheers
 
Question: What happens if it's even possible on rebuild in MP games? Does it work at all, or does it only do it for the one player and thus cause OOS all the time?
I changed it to using a message some time ago so if one player uses Ctrl-Alt-T it will rebuild on all computers at the same time. As Koshling said it is deterministic so all computers should end up in the same state which means no OOS.
 
Very good Andy, good to hear.
Koshling, in that save, both, you might want to check Phoenicians evaluation of civics. Seems to me they change a lot. 15 times in the past 500 turns on Eternity is way too often at least.
In fact both of the civs I've met keep going back and forth between Despotism and Monarchy.

Cheers
 
I am not sure if recalculation takes into consideration bonuses from previous event like +2 health in all cities.

I think it just removes them.
 
I am not sure if recalculation takes into consideration bonuses from previous event like +2 health in all cities.

I think it just removes them.
It replays all events so it should keep the +2 health in all cities. If not, then that is a bug.
 
It replays all events so it should keep the +2 health in all cities. If not, then that is a bug.

Unless the event relies on Python to set the health instead of using the relevant tags (in which case its an issue with that specific event). If you have a save game that illustrates it (and know what the evnt was) please post it.
 
Unless the event relies on Python to set the health instead of using the relevant tags (in which case its an issue with that specific event). If you have a save game that illustrates it (and know what the evnt was) please post it.

Well, I can say for sure that the event that gives the option of doing herbal experiments does not survive recalcs. The first save I have attached is a save before the recalc, and the second is a save after recalc, as well as about a hundred turns later, but you can still probably see the problem.
 
Well, I can say for sure that the event that gives the option of doing herbal experiments does not survive recalcs. The first save I have attached is a save before the recalc, and the second is a save after recalc, as well as about a hundred turns later, but you can still probably see the problem.

The problem here is that the first save game does no record the fact that the event ever happened! I don't know why this is. I'm timed out or now, but I'll set up a test later to force the event to happen and see if it gets recorded (and if not why not)

Edit - ok figured it out. Its a generic flaw with the event recording system and its interaction with recalculation (so good find). Basically any events that are not quests are 'forgotten' two turns after they happen! I'll look into why it has this behaviour and do somthing about it for the purposes of recalculation later today. It will NOT be possible to fix existing games however, because they have just lost the necessary information.
 
After recalculating modifiers in SVN 2134 I don't get any food from buildings. Newly built buildings work fine.
 
After recalculating modifiers in SVN 2134 I don't get any food from buildings. Newly built buildings work fine.

Save game from before recalc please. Also exact decription of exactly which building (any one example will do in a specific city, to go with it)...

If you don't have a before-recalc save an after-recalc will do, again with a speicfic example.
 
Well, I can say for sure that the event that gives the option of doing herbal experiments does not survive recalcs. The first save I have attached is a save before the recalc, and the second is a save after recalc, as well as about a hundred turns later, but you can still probably see the problem.

Fixed the recalculation of event effects (though it will only work for events that happen after the upgrade to the fixed version - anything prior is lost I'm afraid). In testing I also that event health/unhealth was showing up as civic health/unhealth in the hover text, so I fixed that too.
 
Fixed the recalculation of event effects (though it will only work for events that happen after the upgrade to the fixed version - anything prior is lost I'm afraid). In testing I also that event health/unhealth was showing up as civic health/unhealth in the hover text, so I fixed that too.

Thanks alot for this! I have suspected that something was amiss for a while, as it seemed that none of the events that fired were having any effect on me! Turns out it wasn't my imagination.

Does this also address the problem of Wonders using Python not being able to have their one-time effects survive recalcs? Or is that a seperate issue?
 
It's every food building in every city that no longer gives food after recalculating. It's obvious because my capital goes from growing in 5 turns to shrinking in 40+. The mouseover for food calcs is still correct, it shows +23 food per turn when you mouseover it, but the actual amount I get doesn't include any food from buildings.

Not sure which version I started the game on, was SVN from a couple weeks ago, I think, and this was the first time I had tried updating.
 

Attachments

  • Mike AD-0410 before recalcs.CivBeyondSwordSave
    1.9 MB · Views: 45
Thanks alot for this! I have suspected that something was amiss for a while, as it seemed that none of the events that fired were having any effect on me! Turns out it wasn't my imagination.

Does this also address the problem of Wonders using Python not being able to have their one-time effects survive recalcs? Or is that a seperate issue?

Separate issue. One time effects from Python (that change modifiers) are just not regeneratable. If we have such wonders (laregly we don't but there may be a few exceptions) we need to move their functionality into tags somehow.
 
Separate issue. One time effects from Python (that change modifiers) are just not regeneratable. If we have such wonders (laregly we don't but there may be a few exceptions) we need to move their functionality into tags somehow.
Alternatively we can add a Recalc event.
 
Saved games attached.
If it doesn't do it for you on recalc then you can see the result in my saved game after recalculating.
This is actually a little bit of a pain as I can't recalculate again without having it pop up every time I do it, and there are several reasons and times when recalculating is necessary to remove bugs. Bugs which I should post elsewhere in fact... *ponders* Unless I already did. *laugh* Can't remember.
Actually think I did but it was never really looked at as I was then playing with the folder C2C. I am not now and the problems persist so I'll post them again.

Cheers

Found the problem and testing fix now. Should be in the SVN in an hour or so.
 
Top Bottom