Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
[SETUP IN PROGRESS] Pitboss 33: Industrial Era start

(March 11th, 2016, 21:19)Boldly Going Nowhere Wrote: It's a feature.

It's CivMath! Incomprehensible and buried!

EDIT: Just a confirmation, barbarians are on.

Thanks. This information features prominently in my plan to win. thumbsup

INDUSTRIAL BARBARIANS

(March 11th, 2016, 21:26)NobleHelium Wrote: INDUSTRIAL BARBARIANS

Robber barons?

Played: Pitboss 18 - Kublai Khan of Germany Somalia | Pitboss 11 - De Gaulle of Byzantium | Pitboss 8 - Churchill of Portugal | PB7 - Mao of Native America | PBEM29 Greens - Mao of Babylon

(March 11th, 2016, 21:08)BRickAstley Wrote: I just made a game with multiple Peters of India. Some had 310h settlers, some had 301h settlers. I have literally no idea.

For whatever it's worth, I'm fine with allowing the RNG/witchcraft determine settler cost and whatever it spits out for you is what you get.

It's not something like coastal cities take more hammers to build settlers (on the assumption that cities built there are more likely to have a Lighthouse/Harbor), is it? I mean, there's no reason for it to be so, but nothing about this makes sense tongue

I did some code diving to try to find the formula, and I came up empty. I did find this thread over at CFC: http://forums.civfanatics.com/showthread.php?t=406951

It's a few people trying to find the root of the same issue... They didn't find it, but maybe this will narrow it down for someone.

edit: it does seem to suggest that Cheater Hater may be right

(March 12th, 2016, 02:03)scooter Wrote: I did some code diving to try to find the formula, and I came up empty. I did find this thread over at CFC: http://forums.civfanatics.com/showthread.php?t=406951

It's a few people trying to find the root of the same issue... They didn't find it, but maybe this will narrow it down for someone.

edit: it does seem to imply coastal can impact costs.

From this thread it appears that the relevant function is getNewCityProductionValue.

Code:
int CvPlayer::getNewCityProductionValue() const
{
    int iValue = 0;
    for (int iJ = 0; iJ < GC.getNumBuildingClassInfos(); iJ++)
    {
        BuildingTypes eBuilding = ((BuildingTypes)(GC.getCivilizationInfo(getCivilizationType()).getCivilizationBuildings(iJ)));

        if (NO_BUILDING != eBuilding)
        {
            if (GC.getBuildingInfo(eBuilding).getFreeStartEra() != NO_ERA)
            {
                if (GC.getGameINLINE().getStartEra() >= GC.getBuildingInfo(eBuilding).getFreeStartEra())
                {
                    iValue += (100 * getProductionNeeded(eBuilding)) / std::max(1, 100 + getProductionModifier(eBuilding));
                }
            }
        }
    }

    iValue *= 100 + GC.getDefineINT("NEW_CITY_BUILDING_VALUE_MODIFIER");
    iValue /= 100;

    iValue += (GC.getDefineINT("ADVANCED_START_CITY_COST") * GC.getGameSpeedInfo(GC.getGameINLINE().getGameSpeedType()).getGrowthPercent()) / 100;

    int iPopulation = GC.getDefineINT("INITIAL_CITY_POPULATION") + GC.getEraInfo(GC.getGameINLINE().getStartEra()).getFreePopulation();
    for (int i = 1; i <= iPopulation; ++i)
    {
        iValue += (getGrowthThreshold(i) * GC.getDefineINT("ADVANCED_START_POPULATION_COST")) / 100;
    }

    return iValue;
}

Looking at this, it's easy to see how it relates the relevant factors for the late-era start, but hard to see how the discrepancy (where different Peters of India have different Settler costs) might occur. Just to check, have other people found the same issue? I'm away from my CIV computer until at least tomorrow, or I'd mess around bughunting myself.
Civ 6 SP: Adventure One 
Civ 4 MP: PBEM74B [3/4] PBEM74D [3/4]
-Dedlurker: PB34

The game cannot know beforehand though whether you are gonna settle coastal or not. However it could alter the next cost depending on whether your previous settle was coastal... So whether your last city got extra free hammers. It might even be that each coastal city raises the settler cost for all future cities. Or just ramping costs per city in general.

(March 12th, 2016, 03:37)ReallyEvilMuffin Wrote: The game cannot know beforehand though whether you are gonna settle coastal or not. However it could alter the next cost depending on whether your previous settle was coastal... So whether your last city got extra free hammers. It might even be that each coastal city raises the settler cost for all future cities. Or just ramping costs per city in general.
I know that--my thought was that settlers built in a coastal city would cost more.



Forum Jump: