And the player should (in theory) be able to manipulate the AI in a similar way (Y go to war with X, then go to peace with X leaving Y fighting X). Forcing the person who asks Y to join the war be locked out of diplomatic contact with X just as long as Y is makes as much sense as Y being locked out of diplomatic contact in the first place.I don't think that is necessarily questionable behaviour. More fool you for accepting the AI's request to commit yourself to a battle you weren't already involved in. I'd probably try to manipulate a human player like that, too.
That is quite wierd... can you post a save from just before the chop?
I think the idea is that, if elsewhere you have a huge great people factory, you don't want to build great people HERE.I've always found this weird.
In CvCityAI::AI_specialistValue the value of a specialist is nowhere modified by the city's CvCity::getTotalGreatPeopleRateModifier().
Rather the opposite: the great people point value is divided by the player's average AI_averageGreatPeopleMultiplier(). So as far as I can tell, the higher your great people point modifier, the less valuable the AI will think specialists are. I am missing some part of the picture here, or this is a bug that has always been present?
if (!isHuman() && (iCurrentEra <= ((iTotalEras * 2) / 3)))
{
// try to spawn a prophet for any shrines we have yet to build
bool bNeedProphet = false;
int iBestSpreadValue = 0;
for (iJ = 0; iJ < GC.getNumReligionInfos(); iJ++)
{
ReligionTypes eReligion = (ReligionTypes) iJ;
if (isHolyCity(eReligion) && !hasShrine(eReligion)
&& ((iCurrentEra < iTotalEras / 2) || GC.getGameINLINE().countReligionLevels(eReligion) >= 10))
{
CvCivilizationInfo* pCivilizationInfo = &GC.getCivilizationInfo(getCivilizationType());
int iUnitClass = GC.getSpecialistInfo(eSpecialist).getGreatPeopleUnitClass();
FAssert(iUnitClass != NO_UNITCLASS);
UnitTypes eGreatPeopleUnit = (UnitTypes) pCivilizationInfo->getCivilizationUnits(iUnitClass);
if (eGreatPeopleUnit != NO_UNIT)
{
// note, for normal XML, this count will be one (there is only 1 shrine building for each religion)
int shrineBuildingCount = GC.getGameINLINE().getShrineBuildingCount(eReligion);
for (int iI = 0; iI < shrineBuildingCount; iI++)
{
int eBuilding = (int) GC.getGameINLINE().getShrineBuilding(iI, eReligion);
// if this unit builds or forceBuilds this building
if (GC.getUnitInfo(eGreatPeopleUnit).getBuildings(eBuilding) || GC.getUnitInfo(eGreatPeopleUnit).getForceBuildings(eBuilding))
{
bNeedProphet = true;
iBestSpreadValue = std::max(iBestSpreadValue, GC.getGameINLINE().countReligionLevels(eReligion));
}
}
}
}
}
if (bNeedProphet)
{
iTempValue += ((iGreatPeopleRate * iBestSpreadValue));
}
}
iTempValue *= 100;
iTempValue /= GET_PLAYER(getOwnerINLINE()).AI_averageGreatPeopleMultiplier();
iTempValue /= (1 + iEmphasisCount);
iValue += iTempValue
I know that it is hard to make such kind of centralization, but IMHO even saying to the AI governor that you only want one city trying to get prophets would help. There is no point both in terms of AI smartness or even on game performance to make ALL the cities of the empire consider going priest mode just because you want ONE Prophet. I wonder how badly this can gripe the AI when they have lots of cities....rolo: I agree with you, unfortunately there isn't an easy way to make a centralized selection happen for specialists with the code structure of BTS.
So the math should be something like:
(civ-wide GPP multiplier) / (average multiplier GPP per city)
to find the "bias factor" (how does this city compare to the average in my civilization).
Then multiply that by the GPP multiplier in this city.
int iOurPopPercent = 100 * GET_TEAM(getTeam()).getTotalPopulation() / std::max(1, GC.getGameINLINE().getTotalPopulation());
GET_TEAM(getTeam()).getTotalPopulation([B]true[/B])