1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Recalculating Modifiers

Discussion in 'Civ4 - Caveman 2 Cosmos' started by BlueGenie, Mar 23, 2012.

  1. BlueGenie

    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
     
  2. BlueGenie

    BlueGenie Emperor

    Joined:
    Apr 23, 2009
    Messages:
    1,575
    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
     
  3. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    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.
     
  4. BlueGenie

    BlueGenie Emperor

    Joined:
    Apr 23, 2009
    Messages:
    1,575
    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
     
  5. AIAndy

    AIAndy Deity

    Joined:
    Jun 8, 2011
    Messages:
    3,420
    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.
     
  6. BlueGenie

    BlueGenie Emperor

    Joined:
    Apr 23, 2009
    Messages:
    1,575
    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
     
  7. Shogu

    Shogu Warlord

    Joined:
    Jan 19, 2008
    Messages:
    148
    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.
     
  8. AIAndy

    AIAndy Deity

    Joined:
    Jun 8, 2011
    Messages:
    3,420
    It replays all events so it should keep the +2 health in all cities. If not, then that is a bug.
     
  9. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    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.
     
  10. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,072
    Location:
    America
    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.
     
  11. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    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.
     
  12. gcaliber

    gcaliber Chieftain

    Joined:
    Nov 26, 2009
    Messages:
    53
    After recalculating modifiers in SVN 2134 I don't get any food from buildings. Newly built buildings work fine.
     
  13. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    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.
     
  14. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    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.
     
  15. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,072
    Location:
    America
    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?
     
  16. gcaliber

    gcaliber Chieftain

    Joined:
    Nov 26, 2009
    Messages:
    53
    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.
     

    Attached Files:

  17. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    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.
     
  18. AIAndy

    AIAndy Deity

    Joined:
    Jun 8, 2011
    Messages:
    3,420
    Alternatively we can add a Recalc event.
     
  19. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    Found the problem and testing fix now. Should be in the SVN in an hour or so.
     

Share This Page