...send workers to overseas unclaimed territory? I want the AI to send a worker along with a settler, so it will start improving a new city right away.
It should already do this provided the transport ship has at least three cargo slots (settler, worker, defensive unit). The code is there for it, anyway.
The AI_workerMove method in CvUnitAI.cpp has code for loading workers onto ships.
Code:
if (!isHuman())
{
if (plot()->getOwnerINLINE() == getOwnerINLINE())
{
if (AI_load(UNITAI_SETTLER_SEA, MISSIONAI_LOAD_SETTLER, UNITAI_SETTLE, 2, -1, -1, 0, MOVE_SAFE_TERRITORY))
{
return;
}
}
}
For reference, the definition of AI_load looks like:
Code:
bool CvUnitAI::AI_load(UnitAITypes eUnitAI, MissionAITypes eMissionAI, UnitAITypes eTransportedUnitAI, int iMinCargo, int iMinCargoSpace, int iMaxCargoSpace, int iMaxCargoOurUnitAI, int iFlags, int iMaxPath)
So, from my understanding, it'll load workers provided:
- There are at least two units already on the ship
- At least one of those is a settler
- There are no workers currently on the ship
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.