Charles555nc
Prince
- Joined
- May 3, 2010
- Messages
- 522
Im running into some problems where the Ai has to build up too much of an army before attacking lol. I even gave the ai like 6 or 7 free starting units and a large 30% unit production discount. Can I get another recompile with these changes to cvcityai.cpp:
Changes in bold.
int CvCityAI::AI_minDefenders()
{
int iDefenders = 3;
int iEra = GET_PLAYER(getOwnerINLINE()).getCurrentEra();
if (iEra > 1)
{
iDefenders++;
}
if (iEra > 3)
{
iDefenders++;
}
if (((iEra - GC.getGame().getStartEra() / 2) >= GC.getNumEraInfos() / 2) && isCoastal(GC.getMIN_WATER_SIZE_FOR_OCEAN()))
{
iDefenders++;
}
return iDefenders;
}
This will make base defenders 3 and then increase that by 1 during medieval period and by 1 at the industrial period. Thanks Horatius (for era defining) and Keldath!!
Changes in bold.
int CvCityAI::AI_minDefenders()
{
int iDefenders = 3;
int iEra = GET_PLAYER(getOwnerINLINE()).getCurrentEra();
if (iEra > 1)
{
iDefenders++;
}
if (iEra > 3)
{
iDefenders++;
}
if (((iEra - GC.getGame().getStartEra() / 2) >= GC.getNumEraInfos() / 2) && isCoastal(GC.getMIN_WATER_SIZE_FOR_OCEAN()))
{
iDefenders++;
}
return iDefenders;
}
This will make base defenders 3 and then increase that by 1 during medieval period and by 1 at the industrial period. Thanks Horatius (for era defining) and Keldath!!
