Can a charge ability trigger a power?

So continuing my journey to mod aztec, currently I am trying to change the swashbuckler attack that the warchief gets from the age up in a charge attack (which works) and also make it so that the Ascension power attack speed boost ( or more specifically an upgraded version of it) also triggers after the swashbuckler attack.

I have added this to the powermod

<power name="dePowerAscension2" type="UnitAction">
		<displaynameid>79908</displaynameid>
		<rolloverid>79909</rolloverid>
		<icon>resources\images\icons\abilities\ability_cuachic_ascension.png</icon>
		<minimapeventtime sendalertto="player">1</minimapeventtime>
		<activetime>15</activetime>
		<radius>5.0</radius>
		<placement forceonmap="1" enemy="" allowgaia="">unit</placement>
		<auxiliarypower>dePowerAscensionAux2</auxiliarypower>
		<auxiliarypowertargettype>self</auxiliarypowertargettype>
		<explicitlyrestrictedattacktargettype>WaterGuardian</explicitlyrestrictedattacktargettype>
		<explicitlyrestrictedattacktargettype>LogicalTypeImmuneToSharpshoot</explicitlyrestrictedattacktargettype>
		<unitaction>SwashbucklerAttack</unitaction>
		<allowduringnorush>0</allowduringnorush>
	</power>
	<power name="dePowerAscensionAux2" type="GeneralEffect">
		<displaynameid>79908</displaynameid>
		<rolloverid>79909</rolloverid>
		<timerrolloverid>91839</timerrolloverid>
		<icon>resources\images\icons\abilities\ability_cuachic_ascension.png</icon>
		<minimapeventtime sendalertto="none">1</minimapeventtime>
		<activetime>15</activetime>
		<effect type="ActionEnable" action="RoarROF">
			<target type="ProtoUnit">xpAztecWarchief</target>
		</effect>
		<effect type="ActionEnable" action="RoarSpeed">
			<target type="ProtoUnit">xpAztecWarchief</target>
		</effect>
		<effect type="RateOfFire" action="HandAttack" relativity="Absolute" amount="-0.30">
			<target type="ProtoUnit">xpAztecWarchief</target>
		</effect>
		<messagealertplayerrelation>none</messagealertplayerrelation>
		<placement forceonmap="1">LOSDontCare</placement>
		<allowduringnorush>1</allowduringnorush>
		<isauxiliarypower>1</isauxiliarypower>
		<startsoundset>GeneralKichiro7Spears</startsoundset>
	</power>

added the following to abilities

<xpaztecwarchief mergeMode= 'modify'>
		 <ability mergeMode= 'modify'>dePowerAscension
            <tech mergeMode='add'>dePowerAscensionshadow</tech>
			<rof>60</rof>
			<sharedcooldown>true</sharedcooldown>
			<activetimecooldown>true</activetimecooldown>
		</ability>
		<ability mergeMode='add'>dePowerAscension2
			<tech>DEREVAztecSwashbucklerShadow</tech>
			<rof>90</rof>
			<sharedcooldown>true</sharedcooldown>
			<activetimecooldown>true</activetimecooldown>
			<bindtochargeaction>true</bindtochargeaction>
		</ability>
		<ability mergeMode='add'>dePowerAscensionAux2
			<rof>9</rof>
			<nevershowingrid>true</nevershowingrid>
			<alwaysdisabledingrid>false</alwaysdisabledingrid>
		</ability>
		<ability mergeMode='remove'>PowerSwashbuckler
			<tech>DEREVAztecSwashbucklerShadow</tech>
			<rof>90</rof>
			<sharedcooldown>true</sharedcooldown>
		</ability>
 </xpaztecwarchief>

The other changes to the warchief unit, tactics files etc has also been done

So what is happening now is that when the warchief does the swashbuckle attack, no power gets activiated. So the question is that am i missing something or is this setup not possible

Funny thing is that during my attempts to make this work I accidentlly got it to work but only if the new attack isnt a charge attack, but a normal click and aim power does trigger the other effect, therefore my suspicion is that charge attacks cant trigger a power.

any advice?

How I would approach this is make sure the attack works when it’s not charged, then try all variants of charged attacks until I figure out what makes it not work.

That’s my 2 cents.

Yeah if i change it so that it isnt a charge attack and has to be triggered manually then it does trigger the power and also does the attack

What I am beginning to realise is that the attack action isnt actually considered a power i think so it isnt triggering the aux power

normally when it has to be triggered manually, you are activating the power first and then it does the attack. With a charge attack i think just the attack action is occurring and therefore not the power.

there are variants? I am going off the charged saberstrike as the model, could see the others

Did you check the Bersaglieri btw? I think their ability to increase speed is through a power.

1 Like

Maybe you forgot add its in the “protoy”? Example where to look “xpAztecWarchief”

<protoaction>
<name>SwashbucklerAttack</name>

no its definitely that it needs to be done in a different way.

Im just using the already existing swashbuckler attack for it.

but @HoopThrower’s suggestion to check the Bersaglieri was correct, since its the the attack itself that is the trigger you have to add the power you want to cast to the action entry in the tactics file itself.

didnt even know you can do that since Bersaglieri is i think the only example of this in the game

1 Like