Jump to content

How can I add another ability to DefaultAbilitySet


raistca

Recommended Posts

Edit: Oh I think I put this in the wrong place

 

Or perhaps there is another way that I'm not seeing. I would like to add another default ability that is available to everyone, but I can't seem to find where X2Ability_DefaultAbilitySet's DefaultAbilitySet array is initialized or modified. It has some entries in the defaultproperties:

 

defaultproperties
{
DefaultAbilitySet(0)="StandardMove"
DefaultAbilitySet(1)="Interact" 
DefaultAbilitySet(2)="Interact_OpenDoor"
DefaultAbilitySet(3)="Interact_OpenChest"


EvacThisTurnName="EvacThisTurn"
ImmobilizedValueName="Immobilized"
ConcealedOverwatchTurn="ConcealedOverwatch"
}

But adding in my ability:

defaultproperties
{
DefaultAbilitySet(0)="StandardMove"
DefaultAbilitySet(1)="Interact" 
DefaultAbilitySet(2)="Interact_OpenDoor"
DefaultAbilitySet(3)="Interact_OpenChest"
DefaultAbilitySet(4)="FieldStabilize"


EvacThisTurnName="EvacThisTurn"
ImmobilizedValueName="Immobilized"
ConcealedOverwatchTurn="ConcealedOverwatch"
}

Doesn't seem to have any effect.

 

Here's the ability that I'm trying to add in (basically to let anyone stabilize a bleeding out ally without a medikit).

 

static function X2AbilityTemplate AddFieldStabilize()
{
local X2AbilityTemplate                 Template;
local X2AbilityCost_ActionPoints        ActionPointCost;
local X2AbilityTarget_Single            SingleTarget;
local X2Condition_UnitProperty          UnitPropertyCondition;
local X2AbilityTrigger_PlayerInput      InputTrigger;
local X2Effect_RemoveEffects            RemoveEffects;


`CREATE_X2ABILITY_TEMPLATE(Template, 'FieldStabilize');


ActionPointCost = new class'X2AbilityCost_ActionPoints';
ActionPointCost.iNumPoints = 1;
Template.AbilityCosts.AddItem(ActionPointCost);


Template.AbilityToHitCalc = default.Deadeye;


SingleTarget = new class'X2AbilityTarget_Single';
Template.AbilityTargetStyle = SingleTarget;


UnitPropertyCondition = new class'X2Condition_UnitProperty';
UnitPropertyCondition.ExcludeDead = true;
Template.AbilityShooterConditions.AddItem(UnitPropertyCondition);


UnitPropertyCondition = new class'X2Condition_UnitProperty';
UnitPropertyCondition.ExcludeDead = false;
UnitPropertyCondition.ExcludeAlive = false;
UnitPropertyCondition.ExcludeHostileToSource = true;
UnitPropertyCondition.ExcludeFriendlyToSource = false;
UnitPropertyCondition.IsBleedingOut = true;
Template.AbilityTargetConditions.AddItem(UnitPropertyCondition);


RemoveEffects = new class'X2Effect_RemoveEffects';
RemoveEffects.EffectNamesToRemove.AddItem(class'X2StatusEffects'.default.BleedingOutName);
Template.AddTargetEffect(RemoveEffects);
Template.AddTargetEffect(class'X2StatusEffects'.static.CreateUnconsciousStatusEffect());


InputTrigger = new class'X2AbilityTrigger_PlayerInput';
Template.AbilityTriggers.AddItem(InputTrigger);


Template.AbilitySourceName = 'eAbilitySource_Standard';
Template.IconImage = "img:///UILibrary_PerkIcons.UIPerk_stabilize";
Template.ShotHUDPriority = class'UIUtilities_Tactical'.const.STABILIZE_PRIORITY;
Template.Hostility = eHostility_Defensive;
Template.eAbilityIconBehaviorHUD = eAbilityIconBehavior_AlwaysShow;
Template.bAllowedByDefault = true;
Template.bLimitTargetIcons = true;


Template.ActivationSpeech = 'StabilizingAlly';


Template.BuildNewGameStateFn = TypicalAbility_BuildGameState;
Template.BuildVisualizationFn = TypicalAbility_BuildVisualization;


return Template;
}

Does anyone know how to do this?

 

Thanks

Edited by raistca
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...