Ranged units that can paradrop - how will the AI use them?

PawelS

Ancient Druid
Joined
Dec 11, 2003
Messages
2,811
Location
Poland
I'm giving a promotion to one kind of units in my mod (mages) that allows them to teleport using the paradrop mechanic. They have only UNITAI_RANGED (I haven't given them UNITAI_PARADROP, should I?), and can't melee attack. I wonder what the AI will do with them if it happens to get that promotion - I tried to figure it out in the DLL code, but it seems too obscure for me in this regard. If no one answers this, I'm going to make some tests.

Btw is it possible to remove the paradrop animation, or replace it with another animation? I remember someone asked this question some time ago, but IIRC there was no definite answer.
 
I'm not quite sure what you mean, but it doesn't seem to be attached to a specific unit, as it looks the same for all units - it shows a plane flying and then parachutes falling, which doesn't work very well for a fantasy mod :)
 
I'm guessing then that it is a hard-coded animation. If your lucky, it is a gDLL-> call that can be found and changed in the dll paradrop code.
 
You're right, I found this in the dll (somehow I didn't get the idea to search for it earlier, I only searched for the answer to the first question, about the AI):

Code:
	//play paradrop animation
	if(pPlot->isActiveVisible(false))
	{
		auto_ptr<ICvUnit1> pDllUnit(new CvDllUnit(this));
		gDLL->GameplayUnitParadrop(pDllUnit.get());
	}

So when I reach the stage of DLL modification, I can remove it (early versions of the mod probably won't have a custom DLL, so the mages will paradrop instead of teleporting :)).
 
Hmm... I'd really be interested in knowing where the actual animation is. Could this be a backdoor way to fire off any arbitrary animation?

I wish I knew how to make a code spider that would find/list all cases of "gDLL->" in the dll.
 
I don't know if this helps but there are a couple of paradrop animations listed in the Unit Effects. I have tried to edit/add unit effects with no luck but somebody else may know how to do it.

Code:
    <trigger type="FTimedTriggerEffect" id="1" time="0" duration="2" repeat="0" ec="1000" track="2" tier="0" event="ART_DEF_VEFFECT_PARADROP_WINGTIP_TRAIL_01" bone="fx_WingTrail_L"/>
    <trigger type="FTimedTriggerEffect" id="2" time="0" duration="2" repeat="0" ec="1000" track="2" tier="0" event="ART_DEF_VEFFECT_PARADROP_WINGTIP_TRAIL_01" bone="fx_WingTrail_R"/>
    <trigger type="FTimedTriggerEffect" id="3" time="0" duration="2" repeat="0" ec="1000" track="2" tier="0" event="ART_DEF_VEFFECT_PARADROP_BLADES_01" bone="fx_PROPELLER_bone01"/>
    <trigger type="FTimedTriggerEffect" id="4" time="0" duration="2" repeat="0" ec="1000" track="2" tier="0" event="ART_DEF_VEFFECT_PARADROP_BLADES_01" bone="fx_PROPELLER_bone02"/>
    <trigger type="FTimedTriggerEffect" id="5" time="0" duration="2" repeat="0" ec="1000" track="2" tier="0" event="ART_DEF_VEFFECT_PARADROP_BLADES_01" bone="fx_PROPELLER_bone03"/>
    <trigger type="FTimedTriggerEffect" id="6" time="0" duration="2" repeat="0" ec="1000" track="2" tier="0" event="ART_DEF_VEFFECT_PARADROP_BLADES_01" bone="fx_PROPELLER_bone04"/>
    <trigger type="FTimedTriggerEffect" id="7" time="1.114058" duration="0" repeat="0" ec="1000" track="5" tier="0" event="ART_DEF_VEFFECT_PARATROOPER_01" bone="Bone_Jump01_Frame133"/>
    <trigger type="FTimedTriggerEffect" id="8" time="1.07963" duration="0" repeat="0" ec="1000" track="5" tier="0" event="ART_DEF_VEFFECT_PARATROOPER_02" bone="Bone_Jump02_Frame132"/>
    <trigger type="FTimedTriggerEffect" id="9" time="1.00428569" duration="0" repeat="0" ec="1000" track="5" tier="0" event="ART_DEF_VEFFECT_PARATROOPER_03" bone="Bone_Jump03_Frame130"/>
    <trigger type="FTimedTriggerEffect" id="10" time="0.9756966" duration="0" repeat="0" ec="1000" track="5" tier="0" event="ART_DEF_VEFFECT_PARATROOPER_04" bone="Bone_Jump04_Frame129"/>
    <trigger type="FTimedTriggerEffect" id="11" time="0.9408641" duration="0" repeat="0" ec="1000" track="5" tier="0" event="ART_DEF_VEFFECT_PARATROOPER_05" bone="Bone_Jump05_Frame128"/>
    <trigger type="FTimedTriggerEffect" id="12" time="0.8349559" duration="0" repeat="0" ec="1000" track="5" tier="0" event="ART_DEF_VEFFECT_PARATROOPER_06" bone="Bone_Jump06_Frame125"/>
    <trigger type="FTimedTriggerSound" id="13" time="0" duration="0" repeat="0" ec="1000" track="1" tier="-1" event="AS3D_UNIT_PARATROOPER_PARADROP_PLANE" bone=""/>
    <trigger type="FTimedTriggerSound" id="14" time="0.8333333" duration="0" repeat="0" ec="1000" track="1" tier="-1" event="AS3D_UNIT_PARATROOPER_PARADROP_CHUTES" bone=""/>
 
Top Bottom