Conception of a new happiness system

Joined
Aug 23, 2016
Messages
2,028
Location
Germany
Based on my poll about happiness components and a lot of people talking about happiness issues, I want to jump on the train @Stalker0 have started to make possibly a modmod for a new happiness system.
(you can still vote for it here: https://forums.civfanatics.com/threads/what-should-the-happiness-system-achieve-poll.664984/)

Shortening the results here: Happiness should mainly care about Expansion and Growth, War and Infrastructure, later on a tool to force Ideologies.

Ilteroi, Tu_79 and I had the same Idea. A currency which links each of those components with each other and make it harder to follow the main paths of Growth (Tall/Tradition), Expansion (Thick/Progress) and War (wide/Authority) at the same time. The core of the new system will be based on a good Infrastructure, but will not depend on it solely.

So let's get started:
Happiness/Unhappiness gets replaced with stability points (SP). SP are earned like a local yield per turn and add to a empire wide bank (like gold). You can earn SP mostly through luxuries and buildings.
Some of the options to earn SP also increase the maximum of the bank (each additional founded/annexed city beyond your capital do this too). The relative amount of SP you have collected in comparison to your maximum defines the stability of your empire, which can range from 0-100%.
The stability of your empire is at the same time a negative modifier for your SP income.
This means, it's relatively easy to climb out of a bad situation and stabilize, but if you want to reach a high value of stability, you need to play good. Reaching a high value is lucrative, cause it offer benefits, while having a low stability harms you.

The percentual Stability Point decrease is not the only negative effect you have to face. For each victory condition (except DipV, cause there's no real playstiles for it), there are 2 main drains of stability to balance the system.
Culture Victory: growth and specialist usage
Domination Victory: expansion and war weariness
Science Victory: researching and specialist usage
Points Victory (peaceful wide): expansion and growth

Options to gain SP:
- First source is the palace, which give a strong bonus (1)
- Atleast one normal building in each era, which generate SP per turn and increase the maximum of SP (+0,1 per turn and +2 to maximum, 2nd era building +0,2 per turn and +4 maximum etc. )
- luxuries generate SP on two ways
*each luxury generate a small amount of SP on a local city level (yields on tile)
*each unique luxury generate a big amount of SP directly
- natural wonders offer direct local SP
- Policies can add SP to the buildings, improvements, specialists, etc., can decrease the SP reduction effect or shrink effects of different SP drains.
- a Process which is able to double the SP-generation of a city to stabilize after a hard stability hit or make it possible to be longer at war

Locality
(not a big friend of it, but cause more people like local "happiness" treatment than global, this is an option)
Cause SP can be treated as a normal yield, each city earn those on a local level. The amount of local SP earned can be compared to a national/international average/median, which will in return offer benefits, if the city is above or penalties if the city is below of it.
(early game, cities with more luxuries will be more stable than those without, cause luxuries also give some SP on a local level. But over time, buildings will have more impact than luxuries, so cities without luxuries can be as good as those with.)

(Optional: Locality II - Beautyness)
Cause happiness/stability is now bound on a countable yield, we could give terrain aspects a value. Having forests around may be good for the Iroquese, a lot of water may be nice for Polinesia or Carthage, the Inka like mountains. Pantheons, such as God of Nature for mountains or God of Desert could benefit too. And on the other side, having too many swamp, desert or snow tiles could be harmful for the city stability. (I think most people would be happier to walk at sunshine over a beach than through a permanent half darkness in a cold tundra outpost.)

Empire stability effect
Different treshholds are set. Going above a higher treshhold gives the empire benefits, dependant how much you are above of it. (You gain +2% border growth and +1% growth for each additional percent above 60%, +1% gold for each additional percent above 70%, +1% culture and science for each additional percent above 80%, for example)
On the other side, you receive penalties for being below specific treshholds and/or specific actions are forbidden. (Beeing below 30% could increase your unit maintenance by +1% for each percent below, beeing below 25% forbids the construction of diplomatic units and settlers and below 20% you can´t declare war or annex cities, for example [thanks to Tu_79]).

How you lose SP:
SP Reduction Effect (SPRE)
Based on the amount of SP you have in comparison to your maximum, your generation of SP gets decreased, this is the SP Reduction Effect (SPRE). If your stability has reached 50%, your SP income is decreased by 50%, if you have reached 60%, your income is reduced by 60%.

Expansion:
Gaining a tile by what ever reason, decreases your SP directly by a flat value. (this effect increase with each era)
Founding/conquering a city will trigger this too, dependant on the amount of tiles you gain by this action (this idea is based on Pineappledans rework of Spain, the code for this is already written)
Long term advantage of founding/annexing cities is a flat increase of maximum SP, slightly weakening the SP-reduction and offer bigger buffer vs. small impacts.
Puppets never generate any SP, nor do they ever increase the maximum SP, but they are able to drain your SP by tile gain and citizen birth (see below)

Growth
The birth of a citizen reduce your SP by a flat value, this value is multiplied with the already existing population in the city

War weariness
Units getting harmed or killed reduce your SP by a flat value. The lost SP is based on unit strength and percentual health loss. A power 20 unit losing 50% of its health does the same damage as a power 40 unit losing 25% of its health.
(at the moment, the war weariness also uses damage done to units for its calculation, but is hidden in the background and only comes into action slowly. The basic code for this concept is already written)
Harming or killing other units cause SP damage as well, but only to a degree of 33%-50%. (I don't like the mechanic, but I think it's necessary for balancing warmongers)
Improvements getting pillaged causes a one time flat SP hit
Over the time, the decreasing effect of the SP-Bank gets greater, the longer you are at war. (this effect increases, the more units you have in enemy territory, simulating the attrition of an invasion)

Specialist usage (urbanization)
The relative amount of specialists in comparison with your total population defines how much urbanization you have.
For each 3% of population working as specialist, you lose 1% of your total SP generation. (numbers open to discuss)

Researching
Researching a technology decreases your SP. Personally, I would chose this option:
Based on a formula and your population, you lose a flat amount of SP (for example: 5+0,1*population )
But other options are possible too. Maybe you always lose 5-10% of your maximum SP per researched tech, or researching a tech costs you a defined number of SPs and it gets increased by Era.

Ideologies
No much change here. The greater the tourism of civs with other ideologies, the greater is the pressure on your stability. Represented with a reduction of your SP generation through the SP reduction effect.

Policy trees
Tradition
- National wonders generate flat SP
- Treshholds starts working 5% lower (good and bad ones)
Progress
- city center generates a mediocre amount of SP
- 25% less SP impact of gaining tiles by gold/culture/founding
Authority
- 15% less SP impact from unit damage and war length
- cities with a garrison generate a mediocre amount of SP
Fealty
- protective buildings (wall,...) generate a low amount of SP
- 20% less impact from citizen birth
Statecraft
- Gain a low amount of SP for each CS friend, a mediocre amount of SP for each CS ally
- +20% effect from global luxuries
Artistry
- up to 5% SP reduction effect from urbanization is negated
- SP from World wonders and themes
Industry
- double the impact from local luxuries
- each 3 active trade routes decrease the SP reduction effect by 1%
Imperialism
- puppets offer 25% of their SP generation and maximum to the empire
- military buildings offer a small amount of SP
Rationalism
- small amount of SP from specialists
- 20% less impact from researching a technology

(optional rebel spawn)
At very low stability, rebels can spawn after a 4 turn alarming time. They randomly spawn at the 3 cities with the lowest SP generation. Cause puppets didn't generate SP, those are chosen first. It always spawn 6 barbarians, as close to the city as possible, in worst case, as a ring, which blocks the city (and its regeneration). Those barbarians get a promotion, which denies pillaging for them, but also gives them +33% protection against city attack.

(Optional: Golden age)
I think it's not that difficult to adjust the current Golden age mechanic with this system, but I want to show also here a different idea:
Golden ages always happens with the entry of a new era. The maximum of the GA length is set to 20 turns. With the start of the GA, your average empire stability modifies the length of it. An average stability of 50% since the last entry in a new era would give you guaranteed GA of 10 turns.
Policies/Monopolies/Wonders of course could modify this too.

Coding and balancing
The target of the new system is mainly to make it easy to understand and predictable. The amount of text I have written may show something different, but in the end, its all based on a simple currency system like gold in the game. There are only 3 components; earning SP per turn nearly exclusivly on a local city level like gold, a modifier, which decreases your SP income, and actions, which reduces your earned SP.
Changing one of the aspects didnt influence the other aspects, the only connection is the SP bank. If one thing changes (tech progress goes faster like in last version), changing the linked aspect (SP reduction for researching a tech) can be individually adjusted.
The code for all suggested mechanics is already there.
I also made some thoughts about balancing. If its possible, the "new" system could be intregraded ADDITIONALLY to the current system, but for some time only for aesthetics. People could track their "empire stability" nearby and report, if some actions are too weak or too strong. If most people agree that chosen values looks good, only then, we could swap to the new system fully. (thoughts from someone with only rudimentary coding abilities :) )
 
Last edited:
I like the current system, so I probably won't participate much in this discussion, but I find it interesting how you can basically just replace the words "SP" with happiness and in a lot of cases there aren't many changes. So I feel like these aren't that radical of changes that aren't incompatible with the current system. The main changes (from what i can see) is an increasing "cap" to happiness and a reduction to happiness if you have too much (both of which make high happiness harder, but more lucrative). I think currently it can be quite hard to get to high happiness, but there also aren't too many rewards which could be improved.

And, I think it's good that people are coming up with alternatives and changes to the current system, good luck :)
 
About the effects of low stability, I think that it should not punish the players, not even by not enjoying the bonus from high stability.

The major effect of stability should be the allowance of some actions. Each of the following actions would require a higher stability:

Military unit > diplo unit >settler unit > declare war > annex city.

So, if you don't have enough stability for a settler unit, you can't declare wars or annex cities either.
 
but I find it interesting how you can basically just replace the words "SP" with happiness and in a lot of cases there aren't many changes.
There are HUGE differences.
The stability system is much much faster in its response to your actions and gives you much more control over it.(if you stop growth, avoid researching a tech and pull your military units away from getting damage, you are able to avoid 75% of your instability sources immidiatly)
Stopping growth in the happiness system didnt remove the unhappiness, even the median is saved and will be lower than the "real" median, you still need a very long time till you have raised the yields of the city to make it less unhappy.
And only ONE TURN later with growth, you are getting back to ALL the unhappiness you have avoided for some time. Stopping Growth didnt really "fight" unhappiness, you only let it harm later.
And war weariness is tearing down your happiness, no matter if you fight like hell or sit there and wait. If the AI didnt want peace, theres nothing you can do to face the increasing amount of unhappiness.
In the stability system, beeing at war for longer isnt good either, but a decrease in SP generation alone can never make you "unhappy". The system didnt force you to stop beeing a warmonger, but it says, if you want to be a big warmonger, you have to sacrifice something for it. You can avoid growth, expansion and maybe even researching techs to save SP for your later coming war effort. I find that very realistic and game play wise interesting.
The major effect of stability should be the allowance of some actions. Each of the following actions would require a higher stability:

Military unit > diplo unit >settler unit > declare war > annex city.
This is really a great idea! Unless you have atleast some stability, you can´t declare war, so you first have to stabilize your empire, before its ready to do its next expansion. I like it. :)
 
Last edited:
Specialist usage (urbanization)
The relative amount of specialists in comparison with your total population defines how much urbanization you have.
For each 3% of population working as specialist, you lose 1% of your total SP generation. (numbers open to discuss)

If there is one thing I would remove from VP entirely it's urbanization unhappiness. There are so many specialists slots in a late game city yet we can only work a few of them at a time outside of the capital. It is especially the case when unhappiness from all sources becomes so high that you are stuck at 50% global happiness. Any excess happiness allows you to gain more population while staying at 50%, but urbanization won't be countered by anything other than a few buildings or policies/tenets.
 
Last edited:
Recent Multiplayer game we did. With good religion values and strategic wonders. I don't think it matters. Plus you could sacrifice a bit of turn and gold per turn to up the happiness by one.
Spoiler :
upload_2020-12-13_16-31-49.png
 
very detailed concept, although it already looks quite complicated again. but i'd like to steer discussion towards implementation questions.

1. what is essential, and what is not? need to start with the simplest possible solution.
2. which additional tables and columns are needed in the database?
3. what needs to be added/changed on lua side?
4. what needs to be added/changes on dll side?

not saying i'm going to do any of this by the way, just trying to push you to think about those topics.
 
Last edited:
1. what is essential, and what is not? need to start with the simplest possible solution.
As said, I would start with an only visual realisation for the human without any links to the AI, to test, if it's working like intended.

Essential is the SP bank. Cause it's very similar to gold (locally collected and saved empire wide), a mainly copy and paste of the gold entry and renaming should be do the job.
Next step would be adding flat sources for the SP-system. Each luxury/building/policy would get the SP effect in addition.
Cause it's mainly a yield type like gold, this shouldn't be that hard to realize (sure a lot of work, but atleast not hard to do).
Then add the SP reduction effect. I think that can be done in 5 minutes. Requesting the ratio between SP and maximum and use that ratio as decrease for the generation.

If this system works, the next step would be adding the main drains for the system.
Progress uses already mechanics which add yields for citizen birth and researching a tech. I would take this and do the yields negative.
For gaining a tile, either by culture, founding or conquest, there's already a code in spains UA. Taking this and making it negative should do the job too.
Drains from warmongering seems to be a bit more tricky. There is a code which is able to notice damage done to units. But the values for it are hidden in background. If the code can be taken and used with a formula which drains SP based on taken damage and strength, then it would be a very clear function. War weariness over time has also a code, which can be taken.

That would be the base, if this works mechanically then the other options could be integrated.

In the next rounds, the stability effect, urbanization and percentual effects from policies/wonders could be integrated. That would be the phase we're the community would see the SP effect in their games too.

If it's working like intended and balanced to some degree, the major overhaul with the removal of the happiness system and teaching the AI would be the last step.
 
Why would gaining a tile consume SPs?
The first idea was, that only founding cities reduce SP, but this would harm wide play only at the start of the game. After settling peacefully the last city, there wouldnt be that much that would balance wide vs warmonger or tall.
But losing SP for gaining a tile is such a great universal mechanic, that it can be used to work for peaceful wide (lots of cities do lots of expansions) and warmongering at the same time (it harms your stability automatically more if you conquer big cities than small ones). Making the rule set also a bit smaller. If you like, you can see this aspect as the "empire modificator" in the current system.

That gaining a tile causing some instability is in my eyes a realistic effect, cause after 4000 B.C, nearly every corner of the world was already settled. Increasing the area of your nation means you are activly occupying the territory of some minor tribes, which very often have caused trouble to some degree in the real world.
 
Top Bottom