Check City Happiness

tesb

Emperor
Joined
Jan 16, 2010
Messages
1,593
Hi i have a quick question again:

is there a function that checks the city happiness of population level x, e.g. something like: pCity.isHappy(x) would be false or true.

or some function akin to this. i just want to check if pCity is (or would be) happy or unhappy with x population.
 
No such function.

1) Record the original population
2) Set the population to X
3) Check the happiness status
4) Set the population back to original
 
hm is there not even a function that checks current unhappiness and current happiness, i.g.
Code:
x = happiness - unhappiness
	if x < 1:
		return false
(if there are such functions how are they called/named?)
 
Already off com so can't remember.
You can check the api for list of functions in cycity.
There are couple of happiness related ones.

Or simply go to cvmaininterface and copy down the happiness codes in city interface.
That will be 100% correct
 
Back
Top Bottom