LoneGazebo / Community-Patch-DLL

Community Patch for Civilization V - Brave New World
Other
291 stars 160 forks source link

6-7-1 : Urbanisation causes no unhappiness/isn't counted #8015

Closed DemaciaMaggotPie closed 3 years ago

DemaciaMaggotPie commented 3 years ago

6-7-2 Hotfix

3rd/4th UC

In spite of having no effects (aside from the Palace) that would allow me Urbanisation-free Specialists, I am able to freely add specialists without any changes to my Unhappiness. The tooltip of the city breakdown on the right correctly reflects the fact I "would" incur 1 Urbanisation per extra Specialist beyond the first.

Additionally, it appears Empire Size and City Size and not increasing Needs% (as shown on the left)


image

IanE9 commented 3 years ago

This looks to be a side effect of fixing the database so that it only loads once. Mod values aren't getting loaded because of bad ordering in CvDllDatabaseUtility::CacheGameDatabaseData(). The default unhappiness value for specialists is 1, but the real value is expected to be a percentage so each specialist is counting for 0.01 unhappiness.

In short this line needs to be moved so that it happens before we start processing the database. https://github.com/LoneGazebo/Community-Patch-DLL/blob/c56deaf38b2e3c4158162b3f4ec2410ecd1db90d/CvGameCoreDLL_Expansion2/CvDllDatabaseUtility.cpp#L185