Announcement

Collapse
No announcement yet.

[SDK] Whipping and Research Overflow bug fixes.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [SDK] Whipping and Research Overflow bug fixes.

    For more information on the whipping bugfix see
    this thread.

    The research overflow bug is that overflow beakers are not adjusted by the discounts.

    Both the whipping and research overflow bugfixes are included in this compiled CvGameCoreDLL, you may safely put it in your CustomAssets folder and use it for games in progress.


  • #2
    Description of Overflow bug and the fix

    Description:
    ie: You generate 50 beakers per turn.
    - You finish research on a tech at 99/100 beakers, so 50 beakers overflow [there is always +1 beaker from the ether].
    - You start researching a tech with a 40% discount-bonus (so 50 beakers become 70).
    - The next turn the new tech will at 121 beakers (50+71) - while it should be at 141 (70+71).

    Fix:
    The overflow bugfix simply involves changing line 10968 in CvPlayers.cpp

    From:
    Code:
    iOverflowResearch = getOverflowResearch();
    To:
    Code:
    iOverflowResearch = (getOverflowResearch() * calculateResearchModifier(getCurrentResearch())) / 100;
    Interestingly the bug is not present in the code to display the number of turns remaining - in other words, in v1.61 there can be a mismatch between turns displayed and actual turns. This is naturally fixed.

    Comment


    • #3
      Wow, excellent work Blake. Does this work with Warlords? Do I put the dll into?
      C:\Documents and Settings\Andy\My Documents\My Games\Sid Meier's Civilization 4\CustomAssets\

      Also, what other work have you done?

      Possibility

      Comment

      Working...
      X