How Difficulty Bonuses work for AI

Semantics aside, these are outside of any "sorts of" rules.
Code:
BUILDING_SOLAR_PLANT   YIELD_PRODUCTION   50
BUILDING_NUCLEAR_PLANT   YIELD_PRODUCTION   50

BUILDING_TRAINSTATION   YIELD_PRODUCTION   25
BUILDING_SEAPORT   YIELD_PRODUCTION   25
BUILDING_SPACESHIP_FACTORY   YIELD_SCIENCE   25

CORPORATION_TRADER_SIDS   YIELD_GOLD   50
CORPORATION_FIRAXITE_MATERIALS   YIELD_SCIENCE   100

Like I said somewhere else - no single building, policy, etc. is problematic. They just stack up.
These above are not even gold-related in most part.
 
Semantics aside, these are outside of any "sorts of" rules.
Code:
BUILDING_SOLAR_PLANT   YIELD_PRODUCTION   50
BUILDING_NUCLEAR_PLANT   YIELD_PRODUCTION   50

BUILDING_TRAINSTATION   YIELD_PRODUCTION   25
BUILDING_SEAPORT   YIELD_PRODUCTION   25
BUILDING_SPACESHIP_FACTORY   YIELD_SCIENCE   25

CORPORATION_TRADER_SIDS   YIELD_GOLD   50
CORPORATION_FIRAXITE_MATERIALS   YIELD_SCIENCE   100

Like I said somewhere else - no single building, policy, etc. is problematic. They just stack up.
These above are not even gold-related in most part.

Those are all so late that they have to be high to be worth the investment, otherwise they never pay off.
 
No please... corporations, train station and seaport unlock mid-game. There are still eras like Atomic and Information, right?

I'm not at my PC so I can't run the numbers immediately but someone like @CrazyG may be able to - this has all been discussed before.

G
 
well the later eras pass more quickly than the early ones (shorter length of turn times), but on medium or lower difficulties i'm pretty sure Industrial era would appear much more mid game than late game
 
What do you think about indexing Barbarians spawn rate to the difficulty level ?
In Chieftain-Prince, the AI is quite bad at clearing barbarians, making them very dangerous to the player. While in Deity, unless you are isolated, they are mostly irrelevant due to being hunted by the AI.

(Of course, if it is not possible in the code, ...)
 
Speaking of: @Gazebo can you please give us the most up to date formula for Handicap bonuses? That one is a bit old. Thanks!
Code:
int CvPlayer::DoDifficultyBonus(HistoricEventTypes eHistoricEvent)
{
    if (eHistoricEvent == HISTORIC_EVENT_DIG || eHistoricEvent == HISTORIC_EVENT_TRADE_CS)
        return 0;

    int iEra = GetCurrentEra();
    if(iEra <= 0)
    {
        iEra = 1;
    }
    int iHandicapBase = 0;
    int iHandicapA = 0;
    int iHandicapB = 0;
    int iHandicapC = 0;
    int iYieldHandicap = 0;
    CvHandicapInfo* pHandicapInfo = GC.getHandicapInfo(GC.getGame().getHandicapType());
    if(pHandicapInfo)
    {
        iHandicapBase = pHandicapInfo->getAIDifficultyBonusBase();
        iHandicapA = pHandicapInfo->getAIDifficultyBonusEarly();
        iHandicapB = pHandicapInfo->getAIDifficultyBonusMid();
        iHandicapC = pHandicapInfo->getAIDifficultyBonusLate();
        iYieldHandicap = iHandicapBase * (iHandicapA * iEra * iEra + iHandicapB * iEra + iHandicapC) / 100;
    }
    if (iYieldHandicap > 0)
    { 
        if (eHistoricEvent == HISTORIC_EVENT_ERA)
            iYieldHandicap *= 2;
        else if (eHistoricEvent == HISTORIC_EVENT_GP)
            iYieldHandicap /= 3;
        else if (eHistoricEvent != NO_HISTORIC_EVENT_TYPE)
            iYieldHandicap /= 2;

        bool IncludeCities = true;
        if (eHistoricEvent == HISTORIC_EVENT_GP ||
            eHistoricEvent == HISTORIC_EVENT_WONDER ||
            eHistoricEvent == HISTORIC_EVENT_TRADE_LAND ||
            eHistoricEvent == HISTORIC_EVENT_TRADE_SEA)
        {
            IncludeCities = false;
        }

        if (IncludeCities)
        {
            int iLoop;
            CvCity* pLoopCity;
            for (pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))
            {
                if (pLoopCity != NULL)
                {
                    pLoopCity->changeFood(iYieldHandicap);
                    pLoopCity->changeProduction(iYieldHandicap);
                }
            }
        }

        GetTreasury()->ChangeGold(iYieldHandicap);
        ChangeGoldenAgeProgressMeter(iYieldHandicap);
        changeJONSCulture(iYieldHandicap / 2);
      
        TechTypes eCurrentTech = GetPlayerTechs()->GetCurrentResearch();
        if(eCurrentTech == NO_TECH)
        {
            changeOverflowResearch(iYieldHandicap);
        }
        else
        {
            GET_TEAM(getTeam()).GetTeamTechs()->ChangeResearchProgress(eCurrentTech, iYieldHandicap, GetID());
        } 
    }
    return iYieldHandicap;
}
 
I thought A was the early handicap and C the late one, but its A that gets the most bonus with era scaling...so I'm confused.
 

Yes that helps, thank you!

But you could interpret what the phrase means, "The difficulty in the Community Patch is unchanged, but the rest of Vox Populi changes difficulty greatly, as described below." This isn't a very clear statement to me. G often says that such-and-such a difficulty in Vanilla is like such-and-such a different difficulty in Vox Populi, so a more clear statement of what is going on would be nice.
 
Yes that helps, thank you!

But you could interpret what the phrase means, "The difficulty in the Community Patch is unchanged, but the rest of Vox Populi changes difficulty greatly, as described below." This isn't a very clear statement to me. G often says that such-and-such a difficulty in Vanilla is like such-and-such a different difficulty in Vox Populi, so a more clear statement of what is going on would be nice.
You are free to edit it to make things clearer.
 
Top Bottom