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

City center yield not added

Discussion in 'Civ5 - Confirmed Bugs' started by SatanasOz, Sep 26, 2010.

  1. Imp. Knoedel

    Imp. Knoedel Stalin and Starlight, Stalling a Stallion

    Joined:
    Nov 11, 2011
    Messages:
    8,569
    Location:
    The cooler Germany
    Five years later and here we still are. Stupid buggy mess. :badcomp:
     
  2. Ansive

    Ansive Prince

    Joined:
    Aug 22, 2010
    Messages:
    342
    Aww man, my 5 food city center is useless.
    I'm surprised there's no fix for this.

    Oh well, I'll remember not to accept peace treaties from the AI.
    In one instance, asking for peace on my turn and taking the city that was offered gave me a useless city center. Loading and trying again with me setting the deal parameters gave me an ok city.

    Same with luxury deals on AI turn "oh hey, you used to trade that incense to me, you have two, let's trade!"
    I DON'T HAVE TWO.
     
  3. Delnar_Ersike

    Delnar_Ersike Prince

    Joined:
    Jan 1, 2007
    Messages:
    497
    Location:
    localhost
    I think I might have accidentally stumbled upon the source of the bug, though I haven't tested it myself. The bad code is in CvCity:: DoCreatePuppet(). TL;DR: the bug is caused by code that is not only not working as intended, but would (almost) never work as intended.

    When a city is puppeted, all tiles within a 2-tile radius are supposed to have Working City Overrides set to the newly puppet city. Working City Overrides happen when a tile can be worked by multiple cities: the city to which the tile is currently allocated is its Working City Override, whereas the city that acquired the tile first is the Working City.

    The problem is that the code doesn't do this at all. Instead, it follows the following strange set of instructions: for every tile within a 3-tile radius around the city, it checks whether that looped tile is within 2 range of the tile that is (City's X coordinate, City's Y coordinate) away from the looped tile. If it is, then that second tile's Working City Override is set to the newly puppeted city. This condition rarely ever fires off, and when it does, I think it will usually get cleaned up by one of the many updateWorkingCity() calls that exist in the game. When it doesn't get cleaned up though, you should experience an issue identical to the one people have been posting in screenshots here: the city to which the tile belongs cannot work it because its Working City Override is set to another city, the player cannot unset the Working City Override because the UI doesn't let them do it to city tiles, and the Working City Override city cannot work the tile either because it's outside of the city's work range (since cities have to be at least 3 tiles apart). If updateWorkingCity() is called in an incorrect order or not at all when a city flips from a peace deal, that might explain why people have only seen the bug as a result of getting a city through a peace deal.
     
  4. fyar

    fyar Prince

    Joined:
    Sep 13, 2013
    Messages:
    343
    Sorry if this should be posted in the Tech Support forum... mods, feel free to move this thread if it's inappropriate to post it here, but most of the threads there about in-game bugs don't seem to get addressed.

    I am playing a game where I cannot work the base tile of my annexed city. This is the tile that the city is actually sitting on. That's 4 food and 2 hammers that I'm being deprived every turn. I think this happened after I annexed the city, because I didn't notice it when the city was a puppet. The screenshot (and the game save) are attached below. If I try to click on the center tile to work it, it acts as the "Reset Tiles" button and moves all my other citizens around but still does not work the base tile. Has anyone ever seen this bug? Is there a fix?

    For what it's worth, I am using the EUI but no other mods.
     

    Attached Files:

  5. inthesomeday

    inthesomeday Immortan

    Joined:
    Dec 12, 2015
    Messages:
    2,798
    I used to have that bug sometimes, I think it got patched a while while back. Last time I had it was vanilla.
     
  6. Nigel_Tufnel2

    Nigel_Tufnel2 King

    Joined:
    Oct 27, 2014
    Messages:
    688
    Location:
    Great Plains of North America
    I had it happen about six weeks ago as well...
     
  7. Sclb

    Sclb Emperor

    Joined:
    Jul 14, 2015
    Messages:
    1,283
    This is a known bug. If you accept an AI city from peace deal during AI's turn, it will happen. However if you only accept peacedeal during YOUR turn, you won't see this bug.
     
  8. Browd

    Browd Dilettante Administrator

    Joined:
    Aug 5, 2012
    Messages:
    11,627
    Gender:
    Male
    Location:
    Washington, DC
    Moderator Action: Merged with existing Confirmed Bug thread.
     
  9. fyar

    fyar Prince

    Joined:
    Sep 13, 2013
    Messages:
    343
    Well that's annoying, especially given that it's been a known bug for years, given how long this thread has been here. But at least I know how to avoid it (assuming I can remember your advice).
     
  10. MrSaturn

    MrSaturn Chieftain

    Joined:
    Mar 9, 2007
    Messages:
    3
    Still got this bug in 1.0.3.279

    I made the deal for the city during my turn, not during the AI turn.

    Constantinople is 4 tiles away as the closet city.
     

    Attached Files:

  11. ljofthemm

    ljofthemm Chieftain

    Joined:
    Feb 13, 2007
    Messages:
    31
    Gender:
    Male
    Location:
    Fort Worth, TX
    Hahaha, just happened in my guantlet HOF game I'm playing as Germany. Will be submitting that one soon.
     
  12. jamesviago

    jamesviago Chieftain

    Joined:
    Jun 16, 2006
    Messages:
    12
    Gender:
    Male
    same bug i think. city tile not providing any output, from city annexed in AI players offer of peace. Oct 2016. this is a very old bug.
     
  13. ljofthemm

    ljofthemm Chieftain

    Joined:
    Feb 13, 2007
    Messages:
    31
    Gender:
    Male
    Location:
    Fort Worth, TX
    Oh well, devs should hopefully have it fixed in the patch that comes out Friday...
     
  14. Browd

    Browd Dilettante Administrator

    Joined:
    Aug 5, 2012
    Messages:
    11,627
    Gender:
    Male
    Location:
    Washington, DC
    There is no Civ V patch coming out Friday. Civ 6 is being released.
     

Share This Page