Jump to content

PurePassive and Salvo


ClaytonCross

Recommended Posts

So....

 

Templates.AddItem(PurePassive('Salvo', "img:///UILibrary_PerkIcons.UIPerk_salvo", true));

 

Where do you find pure passive abilities so that you can edit them? I am trying to make salvo work with normal grenades instead of the grenade launcher.

Link to comment
Share on other sites

  • Replies 44
  • Created
  • Last Reply

Top Posters In This Topic

Err...So if I go to the Granade.UC file I see salvo does not consume actions. I am using:

 

[XcomClassData]

+SoldierRanks=( aAbilityTree=( (AbilityName="EverVigilant", ApplyToWeaponSlot=eInvSlot_Unknown), (AbilityName="Salvo", ApplyToWeaponSlot=eInvSlot_Unknown) ), aStatProgression=((StatType=eStat_Offense,StatAmount=2), (StatType=eStat_HP,StatAmount=1), (StatType=eStat_Strength,StatAmount=1), (StatType=eStat_Hacking,StatAmount=5), (StatType=eStat_CombatSims,StatAmount=0)), )

 

-And-

 

[X2Ability_<ClassName>]

Templates.AddItem(PurePassive('Salvo', "img:///UILibrary_PerkIcons.UIPerk_salvo", true));

 

Is there any reason it should not show up and work?

Link to comment
Share on other sites

Salvo takes effect because other abilities have a check for "if the unit has this perk, this won't end their turn." You can see which ones by searching the whole SDK for Salvo. (Similarly, most of the code relevant to ThreatAssesment is found in AidProtocol.)

 

Not sure why you're trying to make it apply to thrown grenades, as it already does so. Unless you mean instead of, in which case what you'd need to do something like:

 

AbilityTemplate = X2AbilityTemplate(AbilityManager.FindAbilityTemplate('LaunchGrenade'));

AbilityTemplate.DoNotConsumeAllSoldierAbilities.RemoveItem('Salvo');

Link to comment
Share on other sites

What I am trying to do is give a soldier the ability to a soldier to throw a grenade with the first action and it not end their turn. My first (and possibly only) problem is that for some reason it skips that ability and proceeds to the next ability instead of filling the ability table (which is why I listed configs in my second post entry for that). The second, worry was that since it was made for heavies who use a grenade launcher that maybe it would not work thrown. As you pointed out though it is listed under thrown so it should work if I can get it to show up.

Link to comment
Share on other sites

Soldiers can get Salvo through the AWC. It will work for thrown grenades.

 

If you want to just make ThrowGrenade unconditionally not end your turn, you could just grab the ActionPoints cost and set bConsumeAllPoints to false.

 

I still don't understand what you're trying to do with XComClassData

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...