posted 07-04-21 10:10 AM EDT (US)   
Hello friends, I apologize in advance for my level of Google translator in English.

The question mentioned in the title of this topic has arisen, since I am making a mod and after creating a complete civilization with all its characteristics I have decided to start fighting with the AI ​to be able to play against the civilization. I have created new units, new buildings, technologies, politicians, combining and mixing codes, in short I have struggled with many .xml. I mean I understand many basic and not so basic aspects of modding to put you in the situation, I don't need to start at the beginning. I have also read 3 AI guides for beginners but did not find anything relevant on this point.

Objective: AI go to next age

What exactly have I done?
I removed the .personality from the Iroquois AI to give it to my civilization, it all starts with inactive villagers, after adding some lines in iamain.xs, like calling mod units and buildings, defining kbUnitPickSetPreferenceFactor, adding my civilization to the list of void initPersonality (void), among others. Then, as my villagers use the free settler system I modified everything that refers to the Ottoman settlers, like this
if ((kbGetCiv () == cCivOttomans) || (kbGetCiv () == cCivPirates))
aiPlanSetVariableInt (gSettlerMaintainPlan, cTrainPlanNumberToMaintain, 0, 0);
I suppose this could have something to do with the problem, I also saw that the villagers try to build an outpost, although I don't know where they get it from since it takes away the ability to do it in the protoy.xml, I thought that when that plan failed construction everything would get stuck, so I told the game that the outpost of my civilization is the church using gTowerUnit = cUnitTypeChurch ;, but this also does not help them to move to the next age. I thought it could be a politician problem and I added the politician 1 and 2 of my civilization in these lists:
for (age = cAge2; <= cAge5)
{
for (p = 0; <6)
xsArraySetFloat (poliScores, p, 0.0); // Reset scores
numChoices = aiGetPoliticianListCount (age);
for (p = 0; <numChoices)
{// Score each of these choices based on the strength of our behavior settings.
politician = aiGetPoliticianListByIndex (age, p);
// Rusher bonuses
if (btRushBoom> 0.0)
bonus = btRushBoom;
else
bonus = 0.0;
if ((politician == cTechPoliticianQuartermaster) ||
(politician == cTechPoliticianScout) ||
(politician == cTechPolitico1) ||
(politician == cTechPolitico2) ||
(politician == cTechPoliticianScoutRussian) ||
(politician == cTechPoliticianSergeantDutch) ||
(politician == cTechPoliticianSergeantGerman) ||
(politician == cTechPoliticianSergeantSpanish) ||
(politician == cTechPoliticianMohawk) ||
(politician == cTechPoliticianMarksman) ||
(politician == cTechPoliticianMarksmanOttoman) ||
(politician == cTechPoliticianMarksmanPortuguese) ||
(politician == cTechPoliticianAdventurerBritish) ||
(politician == cTechPoliticianAdventurerRussian) ||
(politician == cTechPoliticianAdventurerSpanish))
{
xsArraySetFloat (poliScores, p, xsArrayGetFloat (poliScores, p) + bonus); // Add in a bonus based on our rusher trait.
}
Nor did I help the cause.

Basically I have tried to replicate at my convenience what the other civilizations do in the iamain.xs, they work and build, even mod units, so I do not understand why they do not go to the next age. Could someone help me with this? I can pass the entire code if the above is not enough.