I'm trying to override some default AI behaviors (we need suicide pillagers) and am seeking documentation for the PushMission method of CyUnit.
In Python, it is defined as
So far as I can tell:
eMission = one of the enumerated missions, e.g. MISSION_PILLAGE
iData1 = (no idea)
iData2 = (no idea)
iFlags = (no idea)
bAppend = Add this to the end of the existing mission queue (?)
bManual = Switch this unit to manual control
eMissionAI = Some second set of mission types, often requiring participation of another unit, e.g. MISSIONAI_LOAD_SETTLER
pMissionAIPlot = Plot targeted in eMission or eMissionAI (?)
pMissionAIUnit = Unit targeted in eMission or eMissionAI (?)
Now I've spooled through the SDK (the implementation seems to be in CvSelectionGroup.cpp), and at least as far as I can comprehend, not every parameter is used for every mission. It seems that iData1 and iData2 are used as follows:
MISSION_MOVE_TO, MISSION_ROUTE_TO:
iData1 = X
iData2 = Y
MISSION_MOVE_TO_UNIT:
iData1 = Civ ID
iData2 = Unit ID
It looks like MISSION_PILLAGE uses none of these parameters. What data do I pass, then, or do I just skip all of them and do pushMission(MISSION_PILLAGE) ?
In Python, it is defined as
Code:
VOID pushMission (MissionType eMission, INT iData1, INT iData2, INT iFlags, BOOL bAppend, BOOL bManual, MissionAIType eMissionAI, CyPlot pMissionAIPlot, CyUnit pMissionAIUnit)
So far as I can tell:
eMission = one of the enumerated missions, e.g. MISSION_PILLAGE
iData1 = (no idea)
iData2 = (no idea)
iFlags = (no idea)
bAppend = Add this to the end of the existing mission queue (?)
bManual = Switch this unit to manual control
eMissionAI = Some second set of mission types, often requiring participation of another unit, e.g. MISSIONAI_LOAD_SETTLER
pMissionAIPlot = Plot targeted in eMission or eMissionAI (?)
pMissionAIUnit = Unit targeted in eMission or eMissionAI (?)
Now I've spooled through the SDK (the implementation seems to be in CvSelectionGroup.cpp), and at least as far as I can comprehend, not every parameter is used for every mission. It seems that iData1 and iData2 are used as follows:
MISSION_MOVE_TO, MISSION_ROUTE_TO:
iData1 = X
iData2 = Y
MISSION_MOVE_TO_UNIT:
iData1 = Civ ID
iData2 = Unit ID
It looks like MISSION_PILLAGE uses none of these parameters. What data do I pass, then, or do I just skip all of them and do pushMission(MISSION_PILLAGE) ?