Help

DarkAnt

Chieftain
Joined
Jun 27, 2006
Messages
8
Descriptive title eh?;)

I want to know where the missions listed in the CIV4MissionInfos.xml files are actually applied to units. More specifically this one --> MISSION_FOUND. What I'm looking for is where in the code does it tell civ4 that so and so unit can perform the sentery mission or the pillage mission. Also where in the code are the effects of these missions handled?

I've looked around in the sdk, xml and python files and I still can't find it. Maybe I'm just dense.

Thanks for the help,
DarkAnt
 
DarkAnt said:
Descriptive title eh?;)

I want to know where the missions listed in the CIV4MissionInfos.xml files are actually applied to units. More specifically this one --> MISSION_FOUND. What I'm looking for is where in the code does it tell civ4 that so and so unit can perform the sentery mission or the pillage mission. Also where in the code are the effects of these missions handled?

I've looked around in the sdk, xml and python files and I still can't find it. Maybe I'm just dense.

Thanks for the help,
DarkAnt

Check out in the SDK CvSelectionGroup::canStartMission. What the missions actually do are located in CvSelectionGroup::startMission and CvSelectionGroup::continueMission. Each of these three functions will probably call functions in CvUnit which you can edit, such as CvUnit::canFound or CvUnit::found (the first testing whether the unit can found a city in the plot, the second being the actual things that happen when the user founds a city)..

Hope that helps.
 
More specifically:

canStartMission: checks if a mission is valid, if true then the missions "thing" is shown in the GUI (button, cursor highlight for airbomb, etc).
startMission: what is called to actually start the mission and animation.
continueMission: anything extra required for the mission. EG: after battle is done in startMission, continueMission will move the unit into that plot.

Dale
 
Back
Top Bottom