Automate explore for air units?

Joined
Jun 27, 2007
Messages
2,248
Location
Hamilton, Ontario
I'm sure like a lot of people I could and should use extra air units to do recon missions but don't want to to the micromanagement every turn. Especially during peace time even though I have air units to spare and should be looking out for sneak attacks outside my culture's visual range. Now I've seen the AI do recon missions over my territory so I know they know how to do it and most units have the auto explore button. So why don't air units have that button?
In CvUnit.cpp I see this:
Code:
	case AUTOMATE_EXPLORE:
		if ((!canFight() && (getDomainType() != DOMAIN_SEA)) || (getDomainType() == DOMAIN_AIR) || (getDomainType() == DOMAIN_IMMOBILE))
		{
			return false;
		}
		break;
I don't know how to get the button to appear on the unit but what happens if you could activate it?
If you removed the block on DOMAIN_AIR would it operate the same way the AI would use an air unit to do recon missions? Or would it operate like other units do auto explore and only remove fog or war from terrain and then do nothing.
So is it possible for AI control of air units to be enabled, and would it do what one would expect?
 
Hmmm ... I don't know a whole lot about how the human interface parts work, perhaps Pep would have some insight? Is there anything like this in the BUG mod?

I took a quick peak at the useage of AUTOMATE_EXPLORE ... seems like it might work if you remove the block on air domain you pointed out and also added AI_exploreAir() to the end of the appropriate section in CvUnitAI::AI_update. I imagine Firaxis had a reason for blocking this, though I can't think what it would be.

One very interesting thing: it would appear that if you put a loaded carrier on explore that the aircraft will auto recon every turn after the ship stops. You learn something new every day.
 
...One very interesting thing: it would appear that if you put a loaded carrier on explore that the aircraft will auto recon every turn after the ship stops. You learn something new every day.

I read that in the code but when I tried it out I couldn't get it to work.
 
jdodg, if I remember correctly the auto explore for air units was implemented by Blake in one of the later versions for Better AI for warlords. I assume he disabled when it was used in BtS. It suffered a fate similar to the Glance screen I guess.

I can remember specifically thinking how neat it was that you could put aircraft carriers on explore and it would explore and use its planes to explore.
 
Okay cool, thanks for the info. I tried doing a compare of BTS to the later version of the Warlords Better AI to see what there was that could be brought up, but it was useless ... so much has changed it's hard to find these kinds of little things.

You're right though, there seem to be two small changes which disable exploration for aircraft and reversing them should bring it back. I wish we knew why it was dropped ...
 
Back
Top Bottom