[FIXED in 1.0.0.328] Cities with the same IDs share housing from improvements for each other

bolbas

Warlord
Joined
Jan 10, 2017
Messages
108
[1.0.0.317] All cities on the map get housing from improvements from other cities that have the same IDs. For example all first founded cities get the same ID. So if we found a capital close to other capitals (Players or City States) then we will get housing from improvements from these cities' tiles as if they were owned by us. The same thing with 2nd cities, 3rd, etc. The bug is actual for vanilla game and both expansions.
To fix this bug it's enough to add a check if tiles are owned by local player to a 'pCityGrowth:GetHousingFromImprovements()' function.

There are no improvements in Paris but Housing from improvements is 1. It's because of 2 farms in Hattusa.
Spoiler :
wPLZokP.jpg

There is 1 farm in Krakow but Housing from improvements is 1 again. It's because of 1 more plantation in London.
Spoiler :
TEKtw7L.jpg
 
Last edited:
Update (I've edited the thread also): This bug affects capitals only.
 
Last edited:
Update (I've edited the thread also): This bug still exists for vanilla game and both expansions.
 
Well, finally I found the reason of this bug! Almost a year has passed! I've edited the title and the thread. The problem was not only in capitals but in cities' IDs.
 
Last edited:
Let's hope that now when the bug is definitely recognized they will fix it ))
 
Capitals have always id=65536 and that is why the problem was visible so easy. I didn’t however realized that other cities also have duplicated IDs, they look kind of random.
Anyway, clearly the problem is caused by the fact that somebody forgot that IDa are not unique on the game level, but only for a player. And the 1000000 dolar question: where elese did they forget about that? There could other problems like that.
 
Yes, every next city gets ID = previousID + 65537. By the way, ID problem can also be a reason of this bug with complete healing units. But I'm not sure as I don't have a savefile to check it. And I don't know if it still exists.
 
Back
Top Bottom