SpecialUnit Type CarrierAI, Uhh, Help?

phungus420

Deity
Joined
Mar 1, 2003
Messages
6,296
I've added a new specialunit type to my game. Right now, I'm just experimenting with a single type, I'm calling it SpecialUnit_Infantry. So far I'm experimenting with a single unit with this type (warrior) and a single unit to transport it (transport helicopter).

Here is the problem. In the CIV4SpecialUnitInfos.xml file we have these lines here which would seem to show the AI how to use transports of specialunits. Specifically:

<CarrierUnitAIs>
<CarrierUnitAI>
<UnitAIType>UNITAI_CARRIER_SEA</UnitAIType>
<bUnitAI>1</bUnitAI>
</CarrierUnitAI>
</CarrierUnitAIs>

Now originally I tried to create a logical syntax Unit AI and placed it here. I used UNITAI_ASSAULT_LAND I did not expect this to work. It did not, just gave me the start up error "UNITAI_ASSAULT_LAND is incorrect, for the unit I put this in (the transport heli). But otherwise the unit worked fine.

Problem is the AI does not seem to be know it can load the transport heli. At least I have yet to see it do it. It is possible my test sample is too small, and the AI can and will do it, but doesn't seem so.

Does anyone know how to get the AI to understand land transports of new specialunit types? I've searched around on the boards and can't find anything. Originally posted this in another thread, but it had a terrible title, with another question in it, so I figured I'd make a new thread with more apropriate title. Hopefully someone who knows more about the AI can let me know some more details about this.

My goal is to have the AI understand how to transport a new special unit type over land. If this is not possible with XML modding, I'd like to know, and also I'd be interested in knowing how much C++ or Python I'd need to understand to tackle this.
 
Back
Top Bottom