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

Editing unhappines defines.

Discussion in 'Community Patch Project' started by Wumper, Apr 23, 2018.

  1. Wumper

    Wumper Chieftain

    Joined:
    Mar 10, 2016
    Messages:
    36
    Hi. I played some games with this mode pack and I love it so far but I have some issues with it, mainly with happiness. I don't know if this is how it's intended to be but unhappiness starts to really mount up after a while for me, to the point where I make nothing else but buildings to satisfy happiness needs. I understand the logic behind it (upgrade your ****** infrastructure) but I think that the mod is a little too hard with defense and poverty and I'd love it if I didn't have to always focus on those buildings.

    I looked into the defines in the mod folder and I think I found the relevant bits.

    Spoiler :
    -- Value by which yield/threshold difference is divded.
    INSERT INTO Defines (
    Name, Value)
    SELECT 'BALANCE_UNHAPPY_CITY_BASE_VALUE_DISORDER', '-25'
    WHERE EXISTS (SELECT * FROM COMMUNITY WHERE Type='COMMUNITY_CORE_BALANCE_CITY_HAPPINESS' AND Value= 1 );

    And
    Spoiler :
    -- Value by which yield/threshold difference is divded.
    INSERT INTO Defines (
    Name, Value)
    SELECT 'BALANCE_UNHAPPY_CITY_BASE_VALUE_POVERTY', '20'
    WHERE EXISTS (SELECT * FROM COMMUNITY WHERE Type='COMMUNITY_CORE_BALANCE_CITY_HAPPINESS' AND Value= 1 );


    My question is, how do I change these exactly to make unhappiness from poverty and lack of defense a little easier to manage? I would also appreciate some general tips for managing unhappiness in this mod.
     
  2. raphaell666

    raphaell666 Chieftain

    Joined:
    Mar 27, 2018
    Messages:
    62
    Gender:
    Male
    As far as I can tell, those are the modifiers that are added to the multiplier on the base need threshold when calculating the global averages, which will then be compared to the values of the city (I am heavily simplifying what the mod does here, I may be oversimplifying it).

    As an example, for the defense need modifier "BALANCE_UNHAPPY_CITY_BASE_VALUE_DISORDER" with a value of -25, it is calculated approximately based on 75% of the global defense per city average (100-25%). Does that make sense? If you wanted to reduce unhappiness due to crime, you could decrease that value to -30 for example.

    For "BALANCE_UNHAPPY_CITY_BASE_VALUE_POVERTY", on the other hand, it is increasing the need, with 120% due to the modifier value of 20 (which results from 100+20%). If you want to reduce unhappiness due to poverty, you could reduce that modifier to 15, for example.

    All those modifiers are "BALANCE_UNHAPPY_CITY_BASE_VALUE_BOREDOM", "BALANCE_UNHAPPY_CITY_BASE_VALUE_ILLITERACY", "BALANCE_UNHAPPY_CITY_BASE_VALUE_POVERTY" and "BALANCE_UNHAPPY_CITY_BASE_VALUE_DISORDER".

    There are a lot other modifiers that go into these calculations, but I think you can play around with these to start.

    It would be ideal if someone more experienced with the mod could corroborate what I am saying.
     
    Last edited: Apr 24, 2018
  3. Wumper

    Wumper Chieftain

    Joined:
    Mar 10, 2016
    Messages:
    36
    I edited those and some other things (namely starting happiness) but ingame nothing has changed. What did I miss?
     
  4. raphaell666

    raphaell666 Chieftain

    Joined:
    Mar 27, 2018
    Messages:
    62
    Gender:
    Male
    You are changing the file CityHappiness.sql inside the mod folders, right?

    Did you clear the cache folder inside "%homepath%\Documents\My Games\Sid Meier's Civilization 5"?

    These changes should be savegame compatible as far as I can tell.

    I suggest you change only the values I mentioned above firstly, try changing them by greater increments if you are not noticing their effect.

    For reference, I am using a sql file from a personal mod similar to this one with the following code to test:
    Code:
    UPDATE Defines 
    SET "Value" = 10
    WHERE "Name" = 'BALANCE_UNHAPPY_CITY_BASE_VALUE_POVERTY';
    
    And it seems to be working fine.
     
  5. Wumper

    Wumper Chieftain

    Joined:
    Mar 10, 2016
    Messages:
    36
    I'm working inside the mods folder in documents/My Games/Sid Meier's Civilzation 5/MODS.

    I tried editing the starting happiness since that's easier to check but even after clearing the cache, the changes I made don't have any effect ingame.
     
  6. raphaell666

    raphaell666 Chieftain

    Joined:
    Mar 27, 2018
    Messages:
    62
    Gender:
    Male
    Just made a quick test:

    Code:
    UPDATE Defines
    SET "Value" = 0
    WHERE "Name" = 'BALANCE_UNHAPPY_CITY_BASE_VALUE_POVERTY';
    
    upload_2018-4-24_15-19-9.png

    Code:
    UPDATE Defines
    SET "Value" = 20
    WHERE "Name" = 'BALANCE_UNHAPPY_CITY_BASE_VALUE_POVERTY';
    
    upload_2018-4-24_15-19-48.png

    I think I interpreted the numbers wrong. Increasing the BALANCE_UNHAPPY_CITY_BASE_VALUE_POVERTY actually increases Gold Need in your cities.

    EDIT: I actually interpreted them correctly, just got confused for a moment.

    EDIT:
    Which files are you editing, exactly?
     
  7. Wumper

    Wumper Chieftain

    Joined:
    Mar 10, 2016
    Messages:
    36
    Documents\My Games\Sid Meier's Civilization 5\MODS\(2) Community Balance Overhaul\Modular Elements\Happiness Mod

    I'm working with the files here (CityHappiness.sql and StartingHappiness.sql to be precise), as far as I know these are the files the mod uses. I'm using notepad++ if that matters.
     
  8. raphaell666

    raphaell666 Chieftain

    Joined:
    Mar 27, 2018
    Messages:
    62
    Gender:
    Male
    Should work as well. Try changing the BALANCE_UNHAPPY_CITY_BASE_VALUE_POVERTY as I mentioned above, and see if you can notice the difference in the happiness tooltip inside the City view window as in the example I gave.

    Are you using EUI?
     
  9. Wumper

    Wumper Chieftain

    Joined:
    Mar 10, 2016
    Messages:
    36
    That is the one I was changing to no effect. Can I just disable the modded happiness system entirely somehow?
     
  10. Wumper

    Wumper Chieftain

    Joined:
    Mar 10, 2016
    Messages:
    36
    I did a clean install and now it works for some reason. Thanks a lot for helping out.

    I would still be interested in completely disabling the happiness system, I'm not a big fan of it to be honest.
     
  11. raphaell666

    raphaell666 Chieftain

    Joined:
    Mar 27, 2018
    Messages:
    62
    Gender:
    Male
    I'm glad to know it worked. I can't really help you with completely disabling the system and, honestly, disabling it does not really interest me. I am not sure if you can do it either because as far as I know it is a core part of VP.

    I am under the impression that a lot of people are unhappy with the current happiness system in the mod (the irony), I assume it will be taken a look at soon. The mod is still constantly being updated (multiple releases per week even). Do not give it up just yet.

    EDIT: I did not see it before, a hotfix just came out which seems to reduce unhappiness by a considerable amount. :D https://forums.civfanatics.com/threads/new-hotfix-version-april-24th-4-24.631719/
     
  12. Stalker0

    Stalker0 Baller Magnus

    Joined:
    Dec 31, 2005
    Messages:
    5,617
    No it’s a core part of the mod. and while you can recommend some adjustments, G has strongly stated that the core fundamentals of the happiness system are not changing
     
  13. Wumper

    Wumper Chieftain

    Joined:
    Mar 10, 2016
    Messages:
    36
    I like how the happiness system works in theory but in practice it's a bit too tedious at the moment in my oppinion. From what I remember it was better in the CBP days, it was a limiting factor on growth and expansion but these days I find myself almost exclusively building things that reduce unhappiness to stay afloat.
     
  14. Gazebo

    Gazebo Lord of the Community Patch Supporter

    Joined:
    Sep 26, 2010
    Messages:
    17,571
    Gender:
    Male
    Location:
    Little Rock
    How can it be better in CBP days when it still...is?

    G
     
  15. Wumper

    Wumper Chieftain

    Joined:
    Mar 10, 2016
    Messages:
    36
    I meant older versions before it was renamed to Vox Populi. The mod improved a lot, don't get me wrong, just the happiness system is a bit harsh right now. Although, I see that you already fixed that in the newest patch so ignore my rambling.
     

Share This Page