1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

How do I edit out the distress mechanic?

Discussion in 'Community Patch Project' started by scribens, Nov 12, 2020.

  1. scribens

    scribens Chieftain

    Joined:
    Nov 12, 2020
    Messages:
    4
    Pretty much what it says on the tin.

    I've read all there is to the overhaul to the happiness mechanic. At first I thought it was wonderful, but then I learned about the distress mechanic and how you are punished for doing things like playing the game correctly (increasing production in your cities). Yes, I've done Public Works to death in my cities. I've watched Future Tech get researched and my happiness go nowhere because 98% of unhappiness in my cities is due to distress.

    All I want to know is how to edit it out. I don't want to hear any "have you tried x?" or "but the devs like it when you play with your kneecaps broken!" Just point me to the file to edit the line out.
     
  2. Deljade

    Deljade Warlord

    Joined:
    Jun 24, 2019
    Messages:
    292
    I don't think there's a single line you can delete to get rid of distress, one would have to build the dll without distress in it, correct me if I'm wrong.
    On the other hand, I don't really understand the frustration. This is your first post and you make a weird request and demand to not hear anything else. You must be having some real problems with distress in your games, which is not my experience (I value production very highly).
     
    4CV, Hinin and LifeOfBrian like this.
  3. vyyt

    vyyt Deity

    Joined:
    Jan 28, 2005
    Messages:
    2,302
    Location:
    Czech Republic
    Well, you are probably not playing the game correctly, increasing production should decrease distress. Or maybe there is something wrong with your install. Distress comes first but causing 98% of your unhappiness sounds weird.

    You cannot remove it completely, but you can lower it by tinkering with this code in Modular Elements/Happiness Mod/CityHappiness.sql - line 93:

    Code:
    -- Value by which yield/threshold difference is modified based on the remaining population
        INSERT INTO Defines (
        Name, Value)
        SELECT 'BALANCE_UNHAPPY_CITY_BASE_VALUE_DISORDER', '70'
        WHERE EXISTS (SELECT * FROM COMMUNITY WHERE Type='COMMUNITY_CORE_BALANCE_CITY_HAPPINESS' AND Value= 1 );
     
    4CV likes this.
  4. andersw

    andersw Emperor

    Joined:
    Feb 11, 2008
    Messages:
    1,110
    Location:
    sweden
    Its part of the (un)happiness system.
    When you grow a LOT and dont work enough on happiness (lux, public works, national wonders etc) first you get boredom, poverty etc but when things get really bad it will ONLY show as distress.
    Below that distress unhappiness, ie when you gain more of the above, unhappiness from poverty, boredom etc will start show up again.
    I guess you could mod to have a LOT more free happiness (not sure where) or reduce difficulty.

    The mod is different from vanilla in that sense where unhappiness was basically from the number of cities, here it is also tied to growth which means you need to take happiness into consideration when sitting on a few HUGE cities.
    The good thing is it achieves a balance of a few HUGE or lots of small cities (compared to vanilla where tall was vastly better).
    Now Im not saying that you should love it but this is more or less how it works.

    edit: I have to say it is a bit misleading since 50% could be said to be FULL happiness, anything above is excess, if you go wide just above 35 is enough.
     
  5. scribens

    scribens Chieftain

    Joined:
    Nov 12, 2020
    Messages:
    4
    Yeah, I don't know why anyone is saying "it's ok as long as it's about 35%." When your happiness is below 50%, you deal -10% combat damage across the board. That's a very clear penalty for not being able to stay above 50% but from what I've heard before on other message boards and now here as well is that you should expect your empire to be unhappy and nothing about that sounds like good game design.

    I get it, I'm a new user so you guys think I'm doing something wrong. I did a trial run to test the theory that distress automatically influences happiness despite if you increase your luxuries/build wonders that provide happiness/complete the Public Works project/complete Future Tech and it was pretty clear and cut through: distress automatically displaces any +happiness you may get from the aforementioned because of whatever calculation it is running off of. And when your food gains and production gains are not within some close arbitrary range, your city becomes distressed. So when I run Order and have plus-production buildings in my cities, they will become distressed unless the city was built in an area maximized for food (unlikely, since the mod adds more resources and thus less space for farms).

    The number one complaint I've seen about this mod on other boards is that the distress mechanic is beyond wonky and I absolutely see it. It doesn't matter if you play tall or wide, all that matters is if you start making huge excess of production in your city over food, the city will always be distressed, no matter how many times you build a Public Works within it or if you get extra happiness boosters. This mod punishes you for optimizing production in your cities and I'm not really here for the Paradox Interactive experience of being punished for playing the game well.

    Thanks for the tip vyyt on where I can edit that happiness value. I assume lowering the number increases the threshold by which the game determines whether yields are too far apart to determine distress?
     
    RedHotTomato likes this.
  6. Milae

    Milae Warlord

    Joined:
    Dec 17, 2019
    Messages:
    216
    Gender:
    Male
    @scribens That's not how distress works. In order to reduce distress you need more (food + production) / population. So increasing either production or food will decrease unhappiness.

    I understand why you thought you needed more food (divided by) production though because that's what it shows when you mouse over it but I think that's supposed to mean increase food or production.

    One other thing worth mentioning is that the way unhappiness works is it goes through from top to bottom on the list (distress, then poverty etc) and will stop adding unhappiness once you reach the cap which is that city's population. So you saying it's only distress that you are having issues with could just mean that the distress already capped out the city so you won't get the other sources (but if you reduced distress another source would just replace it and unhappiness would remain the same). Point I'm trying to make is that unhappiness from all sources can be very punishing and usually the best way to get on top of it is to control your population. Not only does this reduce the needs you have for all yields since they are all per citizen. But in those situations where a city is capped on unhappiness, one less pop is basically one less unhappiness.
     
    glider1, Asterix Rage and vyyt like this.
  7. chicorbeef

    chicorbeef Emperor

    Joined:
    Dec 26, 2017
    Messages:
    1,455
    Gender:
    Male
    I've seen alot of people confused by the slash in :c5food:/:c5production:, is it possible to make it explicitly say :c5food: or :c5production: when you mouse over it?

    I do think Poverty and Distress in particular can be a pain, but Distress doesn't punish you for lack of production, it's the opposite, production reduces Distress. It's not the ratio that is important, it's how much of both food and production you have.
     
    vyyt likes this.
  8. Asterix Rage

    Asterix Rage Warlord

    Joined:
    Jun 6, 2010
    Messages:
    1,486
  9. zeofig

    zeofig Warlord

    Joined:
    Jul 6, 2016
    Messages:
    106
    I think :c5food:+:c5production: would be good
     
    Zuizgond, Zanteogo and vyyt like this.
  10. Deljade

    Deljade Warlord

    Joined:
    Jun 24, 2019
    Messages:
    292
    I also think you are misunderstanding how happiness works. I don't think it's meaningful to talk about a "distress mechanic". Distress is part of happiness mechanic and increasing production or food will reduce it. Also, the mod is not balanced to start at the information era, obviously you got a lot of distress since it's the one that comes first in your information era cities. I suggest trying a game on King and see how it plays out before delivering ultimatums.
     
    vyyt likes this.
  11. scribens

    scribens Chieftain

    Joined:
    Nov 12, 2020
    Messages:
    4
    If that is not the case, then why is distress reduced in my cities when I focus my citizens for food and then set to convert 50% of production to food? My production will usually be 3x or 4x what I am bringing in with food and once that happens, the city becomes distressed at its max population.

    "Control the population," what is this, Banished? The greater your population, the greater your outputs. The greater your outputs, the better you can support your empire (bigger military, can afford military upkeep, can afford upgrading units, can unlock policies quicker, tech up quicker, build things in your city quicker, etc.). That's how Civ has always worked, which is why end-game is usually of race to finish until your cities start starving. What exactly is this mod's expectation when it comes to population--don't build any of the food production/food carry buildings? Intentionally starve your citizens?
     
  12. chicorbeef

    chicorbeef Emperor

    Joined:
    Dec 26, 2017
    Messages:
    1,455
    Gender:
    Male
    I'm not intending to change your mind regarding the happiness, I don't know how to edit distress out, if I knew I would tell you.

    I just want to clarify some mechanics, as far as I understand them. Food and production output are added together, averaged per citizen, and compared to the global median food and production per citizen. You receive a point of unhappiness for a certain amount of food and production per citizen lacking, subject to modifiers from things like empire size, buildings, wonders and policies.

    Setting your cities to farming (which converts 25%, not 50% of production to food I believe) increases the total amount of food + production per citizen, so it reduces distress. It also has a distress modifier reduction built into it.

    There is an avoid growth button if you want to avoid growth, you don't need to starve citizens. Personally I don't like using it, and I have had gripes with how much the unhappiness system punished growth before (it used to be the case where Specialist unhappiness reduction didn't exist and there was an overall glut of food in policy trees, leading avoiding growth to pretty much be a dominant strategy at least for me), but yeah, that option does exist if you need it.
     
  13. Deljade

    Deljade Warlord

    Joined:
    Jun 24, 2019
    Messages:
    292
    "converting" :c5production: to any yield does not nullify :c5production:'s effect on distress. Of course if you convert to :c5food: your cities will have both a lot of :c5food: and a lot of :c5production: so distress will go down. Also if you read the farming process it directly reduces distress unhappiness.
    I agree with avoiding growth, I hate doing it myself and never resort to it, unless I want to micro a citizen birth yield. You don't have to avoid growth to play the game, though some players like it as part of their playstyle.
     
  14. ShadedSkies

    ShadedSkies Chieftain

    Joined:
    Aug 3, 2014
    Messages:
    80
    There are several past versions of Vox Populi where happiness was much more lenient. You can try to dig up some of them. I only saved one installer from 7-17-3 which is quite outdated by now (still a great version though)
     
  15. Asterix Rage

    Asterix Rage Warlord

    Joined:
    Jun 6, 2010
    Messages:
    1,486
    Few More Buildings for VP

    Casino: +1 Happiness
    Ski Resort: +1 luxury
    Park: +2 Happiness
    Recruitment Office: -1 Unhappiness from distress
     
  16. LifeOfBrian

    LifeOfBrian King

    Joined:
    Aug 21, 2019
    Messages:
    671
    Playing as Progress on Deity, I can usually hover around at least 50% for most of the game and distress usually isn't the biggest problem, but rather boredom, illiteracy or poverty because of AI's religious beliefs and because I often play against Korea, Maya and other civs that have extra yields that raise the medians for unhappiness. So happiness is tough on Deity, but far from unplayable - if you play well, you'll manage unhappiness except in extreme circumstances, for example when you're at war with every civ.
     
  17. General_Drax

    General_Drax Warlord

    Joined:
    Sep 23, 2019
    Messages:
    227
    Gender:
    Male
    Location:
    Bologna, Italy
    In this 10-7 due to interlaced DP when you DoW one you get at least 3 or 4 more. Need to brute force your way to domination. Literally.
     
  18. Amask

    Amask Oogala Boogala

    Joined:
    Feb 7, 2002
    Messages:
    777
    Location:
    Toronto
    Only half of production counts, or so it did the last time I played, in September. I don't know if it says this anywhere, but I discovered it by looking at the source code.
     
  19. Zanteogo

    Zanteogo King

    Joined:
    Nov 13, 2015
    Messages:
    800
    The only issue I see in the current beta is because tech speed tends to be faster now, your happiness needs depends on tech level and the needs level of all other civs. You end up researching way faster than you can build so you will slowly slip into a unhappiness hole.

    Also, at some point the AI bonuses got shifted. They are very weak early on, but the AI get's a noticeable power spike somewhere in the second or third era. Due to your happiness needs being based on all civs, it can be a sudden happiness issue as soon as the AI's click into "turbo" mode.
     
    Last edited: Nov 16, 2020
  20. RedHotTomato

    RedHotTomato Chieftain

    Joined:
    Jul 7, 2017
    Messages:
    49
    Gender:
    Male
    My capital had 1000 production and 300-400 food surplus, and i am still having 20+ distress in a city with 30+ population. :D
    Trust me, the system is flawed. No matter what happiness u fix, the unhappiness of the other bracket will increase once you reached a certain turn.
     

Share This Page