Formula for emancipation anger

·Imhotep·

Legendary Builder
Joined
Nov 16, 2005
Messages
2,056
Location
Munich, Germany
Hi guys,

could anyone of you take a quick digg into the SDK and tell me the exact formula that is used in the SDK for calculating the emancipation anger? I always thought it was +1 :mad: for every civ running emancipation, but it clearly is not so. I need the formula for one of my python based wonders. Thanks in advance! :)
 
I've actually found it myself. In CvCity.cpp, it's:

Code:
iUnhappiness = ((iAngerPercent * (getPopulation() + iExtra)) / GC.getPERCENT_ANGER_DIVISOR());

as part of the overall unhappiness calculation. This can be achieved and changed in Python fairly simple, using

Code:
iCityPop = pCity.getPopulation()
iExtra = pCity.extraPopulation()
iAngerPercent = pPlayer.getCivicPercentAnger(14)
iHappiness = ((iAngerPercent * (iCityPop + iExtra)) / gc.getPERCENT_ANGER_DIVISOR())
 
Top Bottom