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

Happiness [IMPLEMENTED]

Discussion in 'Civ4Col - We The People' started by raystuttgart, Feb 2, 2020.

?

Is "Happiness" a concept you want to see in WTP?

  1. Yes, sounds fun and is not too complex.

    75.0%
  2. No, it is is a pointless and tedious feature.

    25.0%
  1. Red velvet

    Red velvet Chieftain

    Joined:
    Jul 12, 2020
    Messages:
    5
    I would like to see more specialists affecting Happiness. But I think that there should be an overall limit of the three factors on overall total production bonus from bells, health, and happiness add up to less than the total sum i.e. if the factors individual offer production bonuses of 30% the maximum of all production is capped at 75%. A second point on the "beer and rum" domestic consumption is that beer consumption was vital for health reasons due to poor water. The process of producing "near" beer made water safe for consumption. It was noted as an important milestone in the early days of plymouth plantation.
     
  2. Ramstormp

    Ramstormp Warlord

    Joined:
    Jan 13, 2020
    Messages:
    114
    Gender:
    Male
    Threw together some more code to make one unit of a yield automatically stay in the city if that yield is in domestic demand:

    Spoiler :

    int CvUnit::loadYieldAmount(YieldTypes eYield, int iAmount, bool bTrade)
    ////R&R mod, vetiarvind, max yield import limit - end
    {
    if (!canLoadYield(plot(), eYield, bTrade))
    {
    return 0;
    }
    if (iAmount <= 0 || iAmount > getMaxLoadYieldAmount(eYield))
    {
    return 0;
    }
    //Ramstormp, leave one yield for domestic demand - Start
    CvCity* pCity = plot()->getPlotCity();
    if (pCity->getYieldDemand(eYield) > 0)
    {
    iAmount--;
    }
    // Ramstormp - END
    CvUnit* pUnit = plot()->getPlotCity()->createYieldUnit(eYield, getOwnerINLINE(), iAmount);
    FAssert(pUnit != NULL);
    if(pUnit != NULL)
    {
    pUnit->setTransportUnit(this);
    }
    return iAmount; //R&R mod, vetiarvind, max yield import limit
    }


    Although I am probably the microman of all micromanagers, the shift key and touchpad on my laptop very hard to manage. I am sure many others would prefer it that way. What do you think @raystuttgart ?
     
  3. Tugboatspotter

    Tugboatspotter Warlord

    Joined:
    Dec 19, 2019
    Messages:
    278
    That is an interesting solution.

    I would suggest instead of retaining one unit, it should retain units equal to the domestic demand. Also, if this behavior could be toggled on and off it would be even better.
     
  4. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    7,296
    Gender:
    Male
    Location:
    Stuttgart, Germany
    Sorry, but that is a really bad idea. :sad:
    (At least the way it is currently implemented.)

    It is never a good solution to hardcode something like that.
    The decision to leave one yield in storage should always stay to the player.

    We as modders can not simply take control over player decisions in logic.
    Players will hate that and also not understand.

    What if you explicitly want to move all goods out of storage.
    With your logic it will not allow that anymore ...

    All this will do is getting bug reports and complaints.

    -----

    That is not just better - it is the only reasonable way to implement something like this at all:
    A UI-configurable setting the player decides on himself

    The only reasonable alternative would be to implement it as a UI-configurable setting in CityScreen.
    (e.g. similar to "Automated Trade Route Settings" in City Management)

    Of course these settings also need to be stored for every city.
    (Just like the "Automated Trade Route Settings".)

    A list of Yields with a Checkbox next to it "Leave Domestic Demand for Manual Loading".
    (For Automated Trade Routes it basically already exists.)

    -----

    But it is a feature I would hardly ever use - probably never.
    (I like to do a lot of micromanagement and I am personally used to using "Shift Key".)

    So personally I consider efforts vs. benefits to be too high.
    But if anybody else wants to implement such a UI-Config-Dialog, I do not mind. :dunno:

    Also:

    It is not directly related to Happiness.
    Please let us not always abuse existing threads for new features / ideas.

    But we could start a new thread "Ideas for UI Improvements / Comfort Functions".

    -----

    By the way:
    1. It is already possible to use "Shift"-Key to determine the load amount and thus not completely empty storage when loading onto a Transport.
    2. It Trade Route Automation you can already set a min storage to be left inside of the city.
     
    Last edited: Jul 22, 2020
  5. Ramstormp

    Ramstormp Warlord

    Joined:
    Jan 13, 2020
    Messages:
    114
    Gender:
    Male
    Sorry Ray, it was something simple that I tried based on the discussion and for my own immediate consumption, and it worked so I got a bit overexcited.

    I didn't expect it to stand in its current state. I think it already messes with the amounts you choose in trade route automation, since if you say load 7 you only get 6 loaded I think (I hardly ever use automated trade, I like to load every yield every time).

    I guesss I'll seek the python and his UI, somewhat uncharted swamp waters.

    I already had expanded the feature slightly so that if you wanted to grab the last dangling yield you could on the second attempt, and was thinking of expanding it further to first drag all yields but the demanded amount; Second, drag all demanded goods but one; Third, drag the last one.
     
  6. XSamatan

    XSamatan Warlord

    Joined:
    Sep 4, 2013
    Messages:
    102
    I agree with ray that such an implementation is counter-intuitive. If a player manually loads cargo from a colony it always should load a full stack (for detailed management we already can use SHIFT).

    An additional option to have automated trade routes always leave the domestic demand of self-produced goods in a colony could be a nice new feature.

    @Ramstormp
    your basic idea fills a small gap in the link between two unrelated systems: happiness and cargo transfer. As ray stated both systems work just fine of their own, the link works in most circumstances.

    Regards
    XSamatan
     
  7. Ramstormp

    Ramstormp Warlord

    Joined:
    Jan 13, 2020
    Messages:
    114
    Gender:
    Male
    Yes, I realize it is not necessary to have any yields to get my domestic happiness points as long as they are going to be produced at the end of the turn; but it will help visually to not have to do the math every time and would have a more direct view of which yields are in demand without having to mouse over; plus helps emotionally not ever having to see -1 unhappy symbol.
     
  8. Tugboatspotter

    Tugboatspotter Warlord

    Joined:
    Dec 19, 2019
    Messages:
    278
    Is there any reason why happiness logic can't consider goods as: goods plus city production (as calculated at the start of last turn)? No need to impact performance, and ambiguity is shifted to stopping production instead of loading goods.
     
    Last edited: Jul 23, 2020
  9. pauldst

    pauldst Chieftain

    Joined:
    Jul 4, 2006
    Messages:
    12
    Gender:
    Male
    Location:
    Grandview, MO
    I hope this is the right place for this:
    I'm playing my first game with Happiness. -3 for war with Europeans is a bit stiff, but acceptable. However, making it -3 for every European country? If you are at war, you are at war. Adding a bit for more enemies I can see, not adding the same amount for every enemy.

    How about making it so that every additional European enemy is another -1?
     
  10. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    7,296
    Gender:
    Male
    Location:
    Stuttgart, Germany
    It is the right place. :thumbsup:

    You evil warmonger ! :D

    I am not sure. :dunno:
    Basically there would then be no more real decision "Will I start another War?" after you already have a first War going.

    It would actually do the contrary:
    Once a player has started a first War, he might be more inclined to start even more Wars,
    because he know that the difference considering Happiness is just tiny (-1).

    "Happiness" should always make the player consider if he starts Wars or not.
    (It should not give hidden Players incentives to start a second War after they already started a first War.)

    About gameplay:

    I wanted "Happiness" to make decisions to start a War tougher.
    The decision to start a second War (in parallel) should thus stay as tough as the decision to start the first War.

    Your suggestion would simply make large scale "Warmongering" less challenging to manage.
    You build up an army and since you already have it you of course steamroll everything that comes in your way - not really caring who you currently attack and conquer.

    If you manage "Domestic Demand" and all other positive factors well, you can most likely still handle it. But the more wars you start, the harder it will get though.

    The feature was really exactly supposed to prevent these "steamrolling Wars" - where Human Player simply attacks and conquers everything in his way.
    (That is actually what you are asking to be removed.)

    About immersion:

    1. The colonists in e.g. the British Colonists came from all over the world. They were not "purely British".
    Some of them were Dutch, some of them were French, some of them were Russian, ...
    None of them (would have) liked if the British declared war on their "brothers".

    2. The traders in e.g. British Colonist did trade with many other colonies and countries.
    When Britain declared War on e.g. France, the trade relations heavily suffered.
    This impacted wealth and thus "Happiness" more or less proportional to every new enemy.

    3. Having a "two front war" with worsening the chances of winning is not neglectable either.
    E.g. in WW2 many Germans did support the War on the East Front but heavily doubted the West Front to be a good thing.
    In fact, starting even more fronts would have caused a really severe drop in "Happiness" (Civil Support).

    Summary:

    In general however it is simply a matter of taste.

    That is why there are configuration settings in "GlobalDefinesAlt.xml" for almost all features.
    Thus players and modders can adjust the settings to their personal taste.

    The Define you are looking for (which however does not differentiate between first and second War) should be called something like "UNHAPPINESS_FROM_WARS".

    Simply set it from 3 to 1 if you want to have less Unhappiness from Wars.
    You will however have to start a new game to become effective.
     
    Last edited: Jul 27, 2020
    pauldst likes this.
  11. pauldst

    pauldst Chieftain

    Joined:
    Jul 4, 2006
    Messages:
    12
    Gender:
    Male
    Location:
    Grandview, MO
    I guess I should have mentioned that both wars were at the "request" of the king? :king:
     
  12. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    7,296
    Gender:
    Male
    Location:
    Stuttgart, Germany
    That does not really change anything. It actually even proves my point. :)

    I always hated that the decision to accept the "King's Request to start a War" was too easy (even tempting) to be accepted.
    Now you really have to think about it, because it comes at higher consequences. It is a decision with consequences now - not only rewards in the form of troops.

    You used to think: Great! Free Units! Accept!
    Now you think: Cool ! Free Units! - But wait my Happiness will drop! .... Should I or should I not? ...
     
  13. pauldst

    pauldst Chieftain

    Joined:
    Jul 4, 2006
    Messages:
    12
    Gender:
    Male
    Location:
    Grandview, MO
    It shouldn't be a choice, really. Your nation is at war or it isn't, and the colonies are part of the nation, whether you want it or not. For example, there were many island colonies. They switched hands quite a bit because of wars. Even if those people didn't have the means to take the war to the enemy, and didn't want to, war often came to them. If simulating history, then war isn't a choice, but there are some choices as to what you do in it. Also, those wars often involved alliances, and those sometimes changed in mid-war.

    Roleplaying is a significant part of the way I play a game like this. I look at the units as if they were people. I try to keep my word. I have loyalty. I play this, to some extent, like I was actually a person in the situation. Maybe that's dumb, but it's part of what makes this fun for me, and better than playing chess. :crazyeye:

    Maybe I'll change the Happiness setting (thanks!), maybe I won't. However, I don't have a problem with the initial happiness hit--other than maybe it should build up over time--it is the accumulation based on numbers of enemies.
     
  14. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    7,296
    Gender:
    Male
    Location:
    Stuttgart, Germany
    No, rolepalying is totally normal. :)
    I do it myself to some extent as well.

    But still, roleplaying also requires consequences for decisions to actually "cause an emotion".
    Roleplaying needs both sides: Reward and Consequences, Joy and Pain, Love and Hate, ...

    You may accept the King's request to start a War - because it is part of your roleplaying - but it still hurts a little because you feel that it is not going to make your people happy.
    Just the fact that people write posts like you tells me that it is "a good design decision" to have this "War Unhappiness" sting a bit. ;)

    2 of the most important lessons in game design:

    Trying to always have things "feel fair" is going to bore people.

    There need to be situations where you simply get lucky and get a cool reward withouth having earned it by hard work. ("Child gets Present"-Feeling)
    There needs to be situations where you can simply have really bad luck and loose something of value. ("Lurking Danger"-Feeling)

    If nobody really cares
    (by either loving or hating it) you have done something wrong.
    A basically unimportant (-1) on Happiness for following Wars would be a good example of that -> nobody would care about it because it almost does not matter.

    Balancing "emotional game design aspects" like that is pretty hard and I might not always be right, I admit. :)
    (The "moral compass", "interpretation of good and bad" and thus "role playing preferences" of each of us are too different.)

    Sometimes however the first "shock feeling" a player has is also overexagerated - simply because they are not used to it yet.
    That is why modders need to stay in touch with their community and also play the game themselves.

    I know, it may sound "theoretical" but once you really think about the games you really liked and remembered, you will notice it is those that caused "some emotions".
    (And those emotions can not always be just good, because otherwise it will get boring as well.)

    ---------

    See, I have my own "theory of game design" and know not everybody does agree with it.
    For your current request I do not feel that it would be a good idea. (Simply because it removes consequences of decisions.)

    We all have our personal taste and own character and we modders cannot make everybody 100% happy within 1 mod.
    The only thing that really solves this is to start modding yourself and adjusting the game to your personal taste.
    (Basically that is why I became a modder myself.)
     
    Last edited: Jul 29, 2020
    pauldst likes this.
  15. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    7,296
    Gender:
    Male
    Location:
    Stuttgart, Germany
    Since I got reports for "Happiness" getting way too high in late game (and also could prove that by simple math), the following small change was implemented:

    To community:
    Thanks for the data to help me figure this out. :thumbsup:

    "Rebel Sentiment Bonus" and "Health Bonus" on "Happiness from Building" were removed for balancing reasons
    (It was actually doubled because of "Happiness from Bells" and "Happiness from Health" also separately exist.)

    This became especially obvious in late game, when "Happiness from Building" gets large itself and then also gets a +50% on top from "Rebel Sentiment Bonus" + 10% on top from "Health Bonus".
    And "Happiness from Bells" additionaly being large as well ...

    see e.g. in this data from a screenshot reported by a community member:
    Spoiler :




    To make it clear:
    This change only affects balancing of "Happiness".
    (No other Yields are affected).

    However, this aspect is solved, tested and commited now. :)
    (Published with next release - further optimizations of balancing for Happiness might follow though once I get more test data and feedback from next internal beta test phase.)

    See in this example in a test scenario:
    (The Rebel Sentiment Bonus e.g. is > 20% but it is not applied anymore to "Happiness from Building".)
    Spoiler :


     

    Attached Files:

    Last edited: Aug 1, 2020
    XSamatan likes this.
  16. Fürstbischof

    Fürstbischof Chieftain

    Joined:
    Jul 20, 2018
    Messages:
    82
    Gender:
    Male
    A minor tweak would be nice:

    Happiness should not be applied to slaves, especially not for modifying their chance to run away. But OTOH the city health rate should indeed by used to modify their chance to run away.
     
  17. Fürstbischof

    Fürstbischof Chieftain

    Joined:
    Jul 20, 2018
    Messages:
    82
    Gender:
    Male
    In the tooltip is "Happiness by buildings" displayed by TXT_KEY_MISC_HELP_BUILDING_YIELD instead of TXT_KEY_YIELD_HAPPINESS_PRODUCED. It's also not grouped with the other sources of happiness. (The same might be true for "Unhappiness by buildings")
     
  18. Fürstbischof

    Fürstbischof Chieftain

    Joined:
    Jul 20, 2018
    Messages:
    82
    Gender:
    Male
    I've revised the Happiness tooltips. Style and appearance is now more similar to the other tooltips of the city screen. The readability has been slightly improved by coloring. That's (almost) all I can do with changes to the .xml file.
    upload_2021-3-28_12-16-35.png
    @raystuttgart
    Happiness is in need of some (minor) polishing. Please take a look at my earlier suggestion to improve the feature. There is also a display bug which needs to be fixed.
     
    XSamatan and Mr. ZorG like this.
  19. Mr. ZorG

    Mr. ZorG Prince

    Joined:
    Feb 13, 2020
    Messages:
    333
    Gender:
    Male
    Location:
    Russia, Vladimir
    Last edited: Mar 28, 2021
  20. Fürstbischof

    Fürstbischof Chieftain

    Joined:
    Jul 20, 2018
    Messages:
    82
    Gender:
    Male
    Fortunately, you only need one file, in which almost all happiness-related texts are grouped together.

    Installation: Locate where you have installed the WTP mod. Drop the file in the
    "WeThePeople-2.8.2.2\Assets\XML\Text" sub-directory.
     

    Attached Files:

Share This Page