Happiness and Discontent
Happiness is a value tracked independently for each city. Cities gain or lose Happiness each year from various sources, and can also experience one-time increases or decreases. A lose of Happiness is called Discontent , so that changes are always positive numbers: it is either a gain of Happiness or a gain of Discontent .
A new city starts with a Discontent Level of 1. When the city accumulates enough Discontent (100 + 10*level) , it gains a new Discontent Level. Each Discontent Level increases city Maintenance and reduces Science by 5%. It also decreases the opinion of the city's family by 20.
When the city starts to gain Happiness instead, its Discontent Level goes down, eventually becoming a Happiness Level starting at level 1 and growing at the same rate as for Discontent Levels (100 + 10*level). Happiness Levels increase city Growth and reduces city Maintenance by 5% each.
Yearly changes to Happiness 
- +1 for having at least one military unit from the city's family within its borders per wall, moat and tower
- +2 / +1 per Pleased (opinion 100 to 199) / Friendly (opinion 200 or higher) religion present in the city
- Some event options add a Project that affects Happiness yearly
Yearly changes to Discontent 
- +2 or more if the city has lost any amount of HP (caused by enemy attacks, fixable with the Repairs project)
One-time changes to Happiness and Discontent 
- +20/+40/+60/+80 respectively for the repeatable projects Festival I/Festival II/Festival III/Festival IV (requires Weak/Developing/Strong/Legendary culture)
- +??? for hurrying production, depending on the amount hurried [NEED EXACT VALUES], if you don't have the Monetary Reform law
- Some event options directly increase Happiness or Discontent Level