Quick Questions / Quick Answers

I noticed that the Great Prophet spawn in the city with the highest faith output. This can definitely be the case where your secondary city works a natural wonder with faith so it gets picked. I really hate this and am unsure if it can ever be fixed.

Thank you for the quick response. That makes a lot of sense since my Great Prophet spawned on my second which works a Natural Wonder and is surrounded by mountains while I have Goddess of Nature as my Pantheon (faith from mountains and Natural Wonders). This city will no doubt produce the most faith right now.
 
Thank you for the quick response. That makes a lot of sense since my Great Prophet spawned on my second which works a Natural Wonder and is surrounded by mountains while I have Goddess of Nature as my Pantheon (faith from mountains and Natural Wonders). This city will no doubt produce the most faith right now.
In some cases (e.g. you have a terrain based generated pantheon), you can affect it by reallocating your worked tiles the turn before the Great Prophet is supposed to be born).
 
What does determine the city which will see the birth of a Great Prophet ? Most of the time my Great Prophet will appear in the Capital, and that is arguably the best scenario. But once in a while he will appear in a random secondary city which doesn't necessarily has the same potential as the capital. It's far from being a catastrophic scenario, but in a few cases I was basically forced to make that secondary city my Holy City or else I would not be able to found a religion.

I'm wondering if this is something predictable and under our control.
The great prophet spawns in the city that gives the final faith point for the purchase.

Suppose you have just 3 cities.
#1 has 10 faith per turn.
#2 has 4.
#3 has 2.
Now, suppose your first gp costs 800 faith, and you have accumulated 788 faith until last turn.
Your cities give faith to the empire in order. So, after your cities share their yields, you get:
#1 - - > 798 faith
#2 - - > 802 faith, a great prophet is purchased in this city, and it remains 2 faith.
#3 - - > 4 faith.

A city with higher faith production has bigger chances of producing a prophet. Or you could count were it is expected to appear, and build temples in selected cities (or maybe sell shrines) to try to force the spawning in your desired destination. But goody huts, religious city states and uncertainty about your pantheon exact yields and timing makes this daunting.
 
The great prophet spawns in the city that gives the final faith point for the purchase.

Suppose you have just 3 cities.
#1 has 10 faith per turn.
#2 has 4.
#3 has 2.
Now, suppose your first gp costs 800 faith, and you have accumulated 788 faith until last turn.
Your cities give faith to the empire in order. So, after your cities share their yields, you get:
#1 - - > 798 faith
#2 - - > 802 faith, a great prophet is purchased in this city, and it remains 2 faith.
#3 - - > 4 faith.

A city with higher faith production has bigger chances of producing a prophet. Or you could count were it is expected to appear, and build temples in selected cities (or maybe sell shrines) to try to force the spawning in your desired destination. But goody huts, religious city states and uncertainty about your pantheon exact yields and timing makes this daunting.

Interesting. So it is possible to control where the Great Prophet will spawn, to a certain extend.
 
Interesting. So it is possible to control where the Great Prophet will spawn, to a certain extend.
Yes, but it's just easier to build roads and move your great prophet if you dislike the location. Also, there's nothing wrong with a secondary city being the holy city. Unless you are playing a very centric tradition, secondary cities have their roles too.
 
Is there a way to adjust wonder cost increase? I'd like to make wonder spamming in the same era more difficult. Thanks
 
Is there a way to adjust wonder cost increase? I'd like to make wonder spamming in the same era more difficult. Thanks

In

Sid Meier's Civilization 5\MODS\(1) Community Patch\Core Files\Core Values\CoreDefines.sql

Look for these strings:

BALANCE_CORE_WORLD_WONDER_SAME_ERA_COST_MODIFIER
BALANCE_CORE_WORLD_WONDER_PREVIOUS_ERA_COST_MODIFIER
BALANCE_CORE_WORLD_WONDER_EARLIER_ERA_COST_MODIFIER
 
City Survivors: I conquer Madrid with 6 citizens, and it decreases to 3. I then conquer Barcelona with 5 citizens, and it reduces to 4. Is this random? On 3/1 Beta.

Thanks,
M
 
City Survivors: I conquer Madrid with 6 citizens, and it decreases to 3. I then conquer Barcelona with 5 citizens, and it reduces to 4. Is this random? On 3/1 Beta.

Thanks,
M

More tourism over the other civ = less pop reduction on city capture.
 
Playing on Chieftain: Top bar says I have 38% :c5citizen: (17:c5happy:/22:c5angry:). But 17/(17+22) = 44%. How is the %:c5citizen: Calculated? I do have 39 citizens total; I counted on "General Information".
 
Playing on Chieftain: Top bar says I have 38% :c5citizen: (17:c5happy:/22:c5angry:). But 17/(17+22) = 44%. How is the %:c5citizen: Calculated? I do have 39 citizens total; I counted on "General Information".

If you have as many happy citizens as unhappy citizens, you have 50% approval.

If you have twice as many happy citizens as unhappy citizens, you have 100% approval.

If you have twice as many unhappy citizens as happy citizens, you have 0% approval.

All other situations are based on the same scale.
 
If you have as many happy citizens as unhappy citizens, you have 50% approval.

If you have twice as many happy citizens as unhappy citizens, you have 100% approval.

If you have twice as many unhappy citizens as happy citizens, you have 0% approval.

All other situations are based on the same scale.

Is there an exact formula somewhere? I looked but couldn't find it. With 22 unhappy citizens, for the 35% approval threshold I used (22/2) * 2^(35/50). But this gave 18 happy citizens, whereas I should be lower than 17. My formula works for 100% (44), 50% (22), and 0% (11) approval.

Thanks for all your hard work on the mod; it's great.
 
Is there an exact formula somewhere? I looked but couldn't find it. With 22 unhappy citizens, for the 35% approval threshold I used (22/2) * 2^(35/50). But this gave 18 happy citizens, whereas I should be lower than 17. My formula works for 100% (44), 50% (22), and 0% (11) approval.

Thanks for all your hard work on the mod; it's great.
I think it was
100 - 50*(unhappiness / happiness)% , limited to the interval 0-100%.
 
I think it was
100 - 50*(unhappiness / happiness)% , limited to the interval 0-100%.

100 - 50*(22/17) = 35.3%, not the 38% the tooltip gave. I assume the happiness/unhappiness are whole numbers, so there should not be an issue of rounding.

Also, if my Happiness was double my unhappiness, I would get 100 - 50 * 1/2 = 75% approval, not 100%.
 
City Unhappiness does not increase until the population goes up, and can go up a lot at a time. E.g. My Capital is 6 happy/1 unhappy, and the tooltip is telling me if I go to 7 citizens, all 7 will be unhappy. Is it considered an exploit to restrict growth in this case, or just good play?
 
unhappiness / happiness goes from 2 to 0.5, then the formula must be something like:

F(0.5) = 0; F(1) = 0.5; F(2) = 1;

Three points. Let's try a square function. F(x) = ax^2 + bx + c
F(0.5) = a * 0.5^2 + b * 0.5 + c = 0
F(1) = a * 1^2 + b * 1 + c = 0.5
F(2) = a * 2^2 + b * 2 + c = 1

It's a three equations system:
0.25 * a + 0.5 * b + c = 0
a + b + c = 0.5
4 * a + 2 * b + c = 1

Let's solve it.
3 * a + b = 0.5
3.75 * a + 1.5 * b = 1
<==>
4.5 * a + 1.5 * b = 0.75
3.75 * a + 1.5 * b = 1
<==>
0.75 * a = -0.25 <==> a = - 0.25/0.75 = -1/3
<==>
b + c = 1/2 + 1/3 = 5/6
2* b + c = 1 + 4/3 = 14/6
<==>
b = 9/6 = 3/2
<==>
c = 5/6 - 3/2 = -4/6 = -2/3

Then
F(x) = -1/3 * x^2 + 3/2 * x - 2/3
where x is happiness/unhappiness.

Let's test it.
x = 17/22 = 0.772727
F(x) = -0.199035 + 1.15909 - 0.666666 = 0.29 = 29%
Nope!

It could be a truncated straight function, though.
F(x) = x - 0.5; F(x) < 1
F(0.5) = 0.5 - 0.5 = 0 (fits)
F(1) = 1 - 0.5 = 0.5 (fits)
F(2) = 2 - 0.5 = 1.5 (doesn't fit, but forced to value 1 since it is bigger than 1)

Let's test it.
x = 17/22 = 0.772727
F(x) = 0.272727 = 28%
Nope!

F(x) = 1 / x - 0.5; F(x) > 0; F(x) < 1
F(0.5) = -1.5 >> F(0.5) = 0 (forced)
F(1) = 1 - 0.5 = 0.5 (fits)
F(2) = 0.5 - 0.5 = 3.5 >> F(2) = 1 (forced)
x = 17/22 = 0.772727
F(x) = 4.5%
Even less!

I surrender! Let's look at the code.
 
unhappiness / happiness goes from 2 to 0.5, then the formula must be something like:

F(0.5) = 0; F(1) = 0.5; F(2) = 1;

Three points. Let's try a square function. F(x) = ax^2 + bx + c
F(0.5) = a * 0.5^2 + b * 0.5 + c = 0
F(1) = a * 1^2 + b * 1 + c = 0.5
F(2) = a * 2^2 + b * 2 + c = 1

It's a three equations system:
0.25 * a + 0.5 * b + c = 0
a + b + c = 0.5
4 * a + 2 * b + c = 1

Let's solve it.
3 * a + b = 0.5
3.75 * a + 1.5 * b = 1
<==>
4.5 * a + 1.5 * b = 0.75
3.75 * a + 1.5 * b = 1
<==>
0.75 * a = -0.25 <==> a = - 0.25/0.75 = -1/3
<==>
b + c = 1/2 + 1/3 = 5/6
2* b + c = 1 + 4/3 = 14/6
<==>
b = 9/6 = 3/2
<==>
c = 5/6 - 3/2 = -4/6 = -2/3

Then
F(x) = -1/3 * x^2 + 3/2 * x - 2/3
where x is happiness/unhappiness.

Let's test it.
x = 17/22 = 0.772727
F(x) = -0.199035 + 1.15909 - 0.666666 = 0.29 = 29%
Nope!

It could be a truncated straight function, though.
F(x) = x - 0.5; F(x) < 1
F(0.5) = 0.5 - 0.5 = 0 (fits)
F(1) = 1 - 0.5 = 0.5 (fits)
F(2) = 2 - 0.5 = 1.5 (doesn't fit, but forced to value 1 since it is bigger than 1)

Let's test it.
x = 17/22 = 0.772727
F(x) = 0.272727 = 28%
Nope!

F(x) = 1 / x - 0.5; F(x) > 0; F(x) < 1
F(0.5) = -1.5 >> F(0.5) = 0 (forced)
F(1) = 1 - 0.5 = 0.5 (fits)
F(2) = 0.5 - 0.5 = 3.5 >> F(2) = 1 (forced)
x = 17/22 = 0.772727
F(x) = 4.5%
Even less!

I surrender! Let's look at the code.

I also tried 2^x, but didn't work. I don't know how to look at the code.
 
unhappiness / happiness goes from 2 to 0.5, then the formula must be something like:

F(0.5) = 0; F(1) = 0.5; F(2) = 1;

Three points. Let's try a square function. F(x) = ax^2 + bx + c
F(0.5) = a * 0.5^2 + b * 0.5 + c = 0
F(1) = a * 1^2 + b * 1 + c = 0.5
F(2) = a * 2^2 + b * 2 + c = 1

It's a three equations system:
0.25 * a + 0.5 * b + c = 0
a + b + c = 0.5
4 * a + 2 * b + c = 1

Let's solve it.
3 * a + b = 0.5
3.75 * a + 1.5 * b = 1
<==>
4.5 * a + 1.5 * b = 0.75
3.75 * a + 1.5 * b = 1
<==>
0.75 * a = -0.25 <==> a = - 0.25/0.75 = -1/3
<==>
b + c = 1/2 + 1/3 = 5/6
2* b + c = 1 + 4/3 = 14/6
<==>
b = 9/6 = 3/2
<==>
c = 5/6 - 3/2 = -4/6 = -2/3

Then
F(x) = -1/3 * x^2 + 3/2 * x - 2/3
where x is happiness/unhappiness.

Let's test it.
x = 17/22 = 0.772727
F(x) = -0.199035 + 1.15909 - 0.666666 = 0.29 = 29%
Nope!

It could be a truncated straight function, though.
F(x) = x - 0.5; F(x) < 1
F(0.5) = 0.5 - 0.5 = 0 (fits)
F(1) = 1 - 0.5 = 0.5 (fits)
F(2) = 2 - 0.5 = 1.5 (doesn't fit, but forced to value 1 since it is bigger than 1)

Let's test it.
x = 17/22 = 0.772727
F(x) = 0.272727 = 28%
Nope!

F(x) = 1 / x - 0.5; F(x) > 0; F(x) < 1
F(0.5) = -1.5 >> F(0.5) = 0 (forced)
F(1) = 1 - 0.5 = 0.5 (fits)
F(2) = 0.5 - 0.5 = 3.5 >> F(2) = 1 (forced)
x = 17/22 = 0.772727
F(x) = 4.5%
Even less!

I surrender! Let's look at the code.

Code:
if (MOD_BALANCE_CORE_HAPPINESS)
    {
        int iUnhappyCitizens = getUnhappinessFromCitizenNeeds();
        if (iUnhappyCitizens == 0)
            m_iHappinessTotal = 100;
        else
        {
            int iHappyCitizens = getHappinessFromCitizenNeeds();
            int iPercent = min(200, (iHappyCitizens * 100) / max(1, iUnhappyCitizens));

            iPercent /= 2;

            if (iPercent != m_iHappinessTotal)
            {
                m_iHappinessTotal = iPercent;
                GC.GetEngineUserInterface()->setDirty(GameData_DIRTY_BIT, true);
            }
        }
    }
 
Code:
if (MOD_BALANCE_CORE_HAPPINESS)
    {
        int iUnhappyCitizens = getUnhappinessFromCitizenNeeds();
        if (iUnhappyCitizens == 0)
            m_iHappinessTotal = 100;
        else
        {
            int iHappyCitizens = getHappinessFromCitizenNeeds();
            int iPercent = min(200, (iHappyCitizens * 100) / max(1, iUnhappyCitizens));

            iPercent /= 2;

            if (iPercent != m_iHappinessTotal)
            {
                m_iHappinessTotal = iPercent;
                GC.GetEngineUserInterface()->setDirty(GameData_DIRTY_BIT, true);
            }
        }
    }

So it's basically (#Happy/#Unhappy)/2. With 17 happy, 22 unhappy like I had, I should get (17/22)/2 = 38.6%. The tooltip showed 38%. So it's rounding down. I think that's good, since if you at 49.6% you want it to show 49%, not 50%.

As @Recursive said, if #Happy is double, approval is 100%. If they are equal, it is 50%.
If #Happy is half, its 25% approval.

Thanks Gazebo.
 
Back
Top Bottom