Jump to content

Build errors in custom ability


Kregano

Recommended Posts

I'm currently trying to build a custom ability for the Grenadier class to take Suppression's normal slot (Suppression is going to be in the unused Squaddie slot in XComGameData.ini), but it's giving me build errors and I'm not sure what the problem is or where to look in the ability file.

 

Here's the build result:

 

------ Build started: Project: Cone of Fire, Configuration: Default XCOM 2 ------
Creating target folder structure...
Copying files...
**************************************************************
|| GENERATING SCRIPT PACKAGES |
**************************************************************

Prepping the script source:

Mirroring SrcOrig to working directory (Src) ...

-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------

Started : Friday, March 18, 2016 7:19:37 PM
Source : E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\
Dest : E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\Src\

Files : *.uc
*.uci

Options : /S /E /DCOPY:DA /COPY:DAT /PURGE /MIR /NP /R:1000000 /W:30

------------------------------------------------------------------------------

0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\
*EXTRA Dir -1 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\Src\ConeofFire\
*EXTRA Dir -1 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\Src\ConeofFire\Classes\
*EXTRA File 13052 X2Ability_ConeOfFire.uc
*EXTRA File 9413 X2Action_Fire_ConeOfFire.uc
*EXTRA File 1291 X2DownloadableContentInfo_ConeofFire.uc
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\AkAudio\
16 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\AkAudio\Classes\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\AkAudio\Inc\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\AkAudio\Src\
1 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\Core\
10 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\Core\Classes\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\Core\Inc\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\Core\Inc\Licensee\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\Core\Src\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\Engine\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\Engine\Bink\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\Engine\Bink\Src\
1227 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\Engine\Classes\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\Engine\Debugger\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\Engine\FaceFX\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\Engine\Inc\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\Engine\Inc\DwTrioviz\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\Engine\SQL\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\Engine\Src\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\Engine\Textures\
1 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\GameFramework\
17 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\GameFramework\Classes\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\GameFramework\Inc\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\GameFramework\Src\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\GFxUI\
17 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\GFxUI\Classes\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\GFxUI\Inc\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\GFxUI\Src\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\GFxUI\VTune\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\GFxUIEditor\
4 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\GFxUIEditor\Classes\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\GFxUIEditor\Inc\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\GFxUIEditor\Src\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\IpDrv\
26 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\IpDrv\Classes\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\IpDrv\Inc\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\IpDrv\Src\
1 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\OnlineSubsystemSteamworks\
6 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\OnlineSubsystemSteamworks\Classes\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\OnlineSubsystemSteamworks\Inc\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\OnlineSubsystemSteamworks\Src\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\UnrealEd\
189 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\UnrealEd\Classes\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\UnrealEd\FaceFX\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\UnrealEd\Inc\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\UnrealEd\Models\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\UnrealEd\SQL\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\UnrealEd\Src\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\XComEditor\
17 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\XComEditor\Classes\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\XComEditor\Inc\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\XComEditor\Src\
2 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\XComGame\
1930 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\XComGame\Classes\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\XComGame\Inc\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\XComGame\Live\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\XComGame\Live\Images\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\XComGame\Live\Images\AchievementIcons\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\XComGame\Live\Online\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\XComGame\Live\TU0\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\XComGame\PSN\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\XComGame\PSN\TU0\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\XComGame\PSN\TU0\TargetDir\
0 E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\SrcOrig\XComGame\Src\

------------------------------------------------------------------------------

Total Copied Skipped Mismatch FAILED Extras
Dirs : 65 0 65 0 0 2
Files : 3464 0 3464 0 0 3
Bytes : 21.09 m 0 21.09 m 0 0 23.1 k
Times : 0:00:00 0:00:00 0:00:00 0:00:00
Ended : Friday, March 18, 2016 7:19:37 PM


Copying script files from workspace ...
Package(ConeofFire) c:\users\xavier\Documents\Firaxis ModBuddy\XCOM\Cone of Fire\Cone of Fire\Src\ConeofFire\Classes\X2Ability_ConeOfFire.uc => E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\Src\ConeofFire\Classes\X2Ability_ConeOfFire.uc
Package(ConeofFire) c:\users\xavier\Documents\Firaxis ModBuddy\XCOM\Cone of Fire\Cone of Fire\Src\ConeofFire\Classes\X2Action_Fire_ConeOfFire.uc => E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\Src\ConeofFire\Classes\X2Action_Fire_ConeOfFire.uc
Package(ConeofFire) c:\users\xavier\Documents\Firaxis ModBuddy\XCOM\Cone of Fire\Cone of Fire\Src\ConeofFire\Classes\X2DownloadableContentInfo_ConeofFire.uc => E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\Src\ConeofFire\Classes\X2DownloadableContentInfo_ConeofFire.uc

Deleting existing compiled script packages:
E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\XComGame\Script\ConeofFire.u

Launching script compiler for new package scripts...

Command: E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\binaries\Win64\XComGame.com Arguments: make -nopause -mods ConeofFire "E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\XComGame\\Mods\ConeofFire\"
Log: Executing Class UnrealEd.MakeCommandlet
Shader map M_Digital_Distortion_Ghosting_A had an invalid uniform expression set and was discarded! This most likely indicates a bug in cooking, and the default material will be used instead.
--------------------Core - Release--------------------
--------------------Engine - Release--------------------
--------------------GFxUI - Release--------------------
--------------------AkAudio - Release--------------------
--------------------GameFramework - Release--------------------
--------------------UnrealEd - Release--------------------
--------------------GFxUIEditor - Release--------------------
--------------------IpDrv - Release--------------------
--------------------OnlineSubsystemSteamworks - Release--------------------
--------------------XComGame - Release--------------------
--------------------XComEditor - Release--------------------
--------------------ConeofFire - Release--------------------
Analyzing...
E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\Src\ConeofFire\Classes\X2Ability_ConeOfFire.uc(13) : Error, Missing ';' in 'Class'
Compile aborted due to errors.

Warning/Error Summary
---------------------
E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\Src\ConeofFire\Classes\X2Ability_ConeOfFire.uc(13) : Error, Missing ';' in 'Class'

Failure - 1 error(s), 0 warning(s) (1 Unique Errors, 0 Unique Warnings)

Execution of commandlet took: 7.14 seconds
Done building project "Cone of Fire.x2proj" -- FAILED.

========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

 

 

So, I'm missing a semi-colon, but I don't know if it's just one semi-colon or 13, because whenever I look at line 13 (one of the var localized strings, there's a semi-colon at the end:

 

//---------------------------------------------------------------------------------------
// FILE: X2Ability_ConeOfFire.uc
// AUTHOR: Kregano
// DATE:
// PURPOSE: Defines Cone of Fire ability.
//
//---------------------------------------------------------------------------------------
//
//---------------------------------------------------------------------------------------

class X2Ability_ConeOfFire extends X2Ability dependson (XComGameStateContext_Ability)

var localized string ConeOfFireTargetEffectDesc;
var localized string ConeOfFireSourceEffectDesc;

static function array<X2DataTemplate> CreateTemplates()
{
local array<X2DataTemplate> Templates;

static function X2AbilityTemplate ConeOfFire()
{
local X2AbilityTemplate Template;
local X2AbilityCooldown Cooldown;
local X2AbilityCost_Ammo AmmoCost;
local X2AbilityCost_ActionPoints ActionPointCost;
local X2AbilityTarget_Cursor CursorTarget;
local X2AbilityMultiTarget_Cone ConeMultiTarget;
local X2Effect_ReserveActionPoints ReservePointsEffect;
local X2Effect_MarkValidActivationTiles MarkTilesEffect;
local X2Condition_UnitEffects SuppressedCondition;

`CREATE_X2ABILITY_TEMPLATE(Template, 'ConeOfFire');

Template.IconImage = "img:///UILibrary_PerkIcons.UIPerk_supression";

AmmoCost = new class'X2AbilityCost_Ammo';
AmmoCost.iAmmo = 2;
AmmoCost.bFreeCost = true;
Template.AbilityCosts.AddItem(AmmoCost);

ActionPointCost = new class'X2AbilityCost_ActionPoints';
ActionPointCost.bConsumeAllPoints = true; // this will guarantee the unit has at least 1 action point
ActionPointCost.bFreeCost = true; // ReserveActionPoints effect will take all action points away
Template.AbilityCosts.AddItem(ActionPointCost);

Template.AbilityShooterConditions.AddItem(default.LivingShooterProperty);

Template.AddShooterEffectExclusions();

ReserveActionPointsEffect = new class'X2Effect_ReserveActionPoints';
ReserveActionPointsEffect.ReserveType = 'Suppression';
Template.AddShooterEffect(ReserveActionPointsEffect);

Template.AbilityToHitCalc = default.DeadEye;
Template.AbilityTargetConditions.AddItem(default.LivingHostileUnitDisallowMindControlProperty);
Template.AbilityTargetConditions.AddItem(default.GameplayVisibilityCondition);
Template.AbilityTriggers.AddItem(default.PlayerInputTrigger);

Cooldown = new class'X2AbilityCooldown';
Cooldown.iNumTurns = 1;
Template.AbilityCooldown = Cooldown;

CursorTarget = new class'X2AbilityTarget_Cursor';
CursorTarget.bRestrictToWeaponRange = true;
Template.AbilityTargetStyle = CursorTarget;

ConeMultiTarget = new class'X2AbilityMultiTarget_Cone';
ConeMultiTarget.bUseWeaponRadius = true;
ConeMultiTarget.ConeEndDiameter = 32 * class'XComWorldData'.const.WORLD_StepSize;
ConeMultiTarget.ConeLength = 60 * class'XComWorldData'.const.WORLD_StepSize;
Template.AbilityMultiTargetStyle = ConeMultiTarget;

Template.AbilityTriggers.AddItem(default.PlayerInputTrigger);

ReservePointsEffect = new class'X2Effect_ReserveActionPoints';
ReservePointsEffect.ReserveType = default.ConeOfFireReserveType;
Template.AddShooterEffect(ReservePointsEffect);

MarkTilesEffect = new class'X2Effect_MarkValidActivationTiles';
MarkTilesEffect.AbilityToMark = 'ConeOfFireShot';
Template.AddShooterEffect(MarkTilesEffect);

Template.AdditionalAbilities.AddItem('ConeOfFireShot');
Template.BuildNewGameStateFn = TypicalAbility_BuildGameState;
Template.BuildVisualizationFn = TypicalAbility_BuildVisualization;
Template.bSkipFireAction = true;
Template.bShowActivation = true;

SuppressionEffect = new class'X2Effect_Suppression';
SuppressionEffect.BuildPersistentEffect(1, false, true, false, eGameRule_PlayerTurnBegin);
SuppressionEffect.bRemoveWhenTargetDies = true;
SuppressionEffect.bRemoveWhenSourceDamaged = true;
SuppressionEffect.bBringRemoveVisualizationForward = true;
SuppressionEffect.SetDisplayInfo(ePerkBuff_Penalty, Template.LocFriendlyName, default.SuppressionTargetEffectDesc, Template.IconImage);
SuppressionEffect.SetSourceDisplayInfo(ePerkBuff_Bonus, Template.LocFriendlyName, default.SuppressionSourceEffectDesc, Template.IconImage);
Template.AddTargetEffect(SuppressionEffect);

Template.AbilitySourceName = 'eAbilitySource_Perk';
Template.eAbilityIconBehaviorHUD = eAbilityIconBehavior_AlwaysShow;
Template.ShotHUDPriority = class'UIUtilities_Tactical'.const.CLASS_CAPTAIN_PRIORITY;
Template.bDisplayInUITooltip = false;
Template.AdditionalAbilities.AddItem('SuppressionShot');
Template.bIsASuppressionEffect = true;
Template.AbilityConfirmSound = "TacticalUI_ActivateAbility";

Template.BuildNewGameStateFn = TypicalAbility_BuildGameState;
Template.BuildVisualizationFn = TypicalAbility_BuildVisualization;
Template.TargetingMethod = class'X2TargetingMethod_Cone';
Template.BuildAppliedVisualizationSyncFn = SuppressionBuildVisualizationSync;
Template.CinescriptCameraType = "StandardSuppression";

Template.Hostility = eHostility_Offensive;

Template.bCrossClassEligible = true;

return Template;
}

simulated function SuppressionBuildVisualization(XComGameState VisualizeGameState, out array<VisualizationTrack> OutVisualizationTracks)
{
local XComGameStateHistory History;
local XComGameStateContext_Ability Context;
local StateObjectReference InteractingUnitRef;

local VisualizationTrack EmptyTrack;
local VisualizationTrack BuildTrack;

local XComGameState_Ability Ability;
local X2Action_PlaySoundAndFlyOver SoundAndFlyOver;

History = `XCOMHISTORY;

Context = XComGameStateContext_Ability(VisualizeGameState.GetContext());
InteractingUnitRef = Context.InputContext.SourceObject;

//Configure the visualization track for the shooter
//****************************************************************************************
BuildTrack = EmptyTrack;
BuildTrack.StateObject_OldState = History.GetGameStateForObjectID(InteractingUnitRef.ObjectID, eReturnType_Reference, VisualizeGameState.HistoryIndex - 1);
BuildTrack.StateObject_NewState = VisualizeGameState.GetGameStateForObjectID(InteractingUnitRef.ObjectID);
BuildTrack.TrackActor = History.GetVisualizer(InteractingUnitRef.ObjectID);

class'X2Action_ExitCover'.static.AddToVisualizationTrack(BuildTrack, Context);
class'X2Action_StartSuppression'.static.AddToVisualizationTrack(BuildTrack, Context);
OutVisualizationTracks.AddItem(BuildTrack);
//****************************************************************************************
//Configure the visualization track for the target
InteractingUnitRef = Context.InputContext.PrimaryTarget;
Ability = XComGameState_Ability(History.GetGameStateForObjectID(Context.InputContext.AbilityRef.ObjectID, eReturnType_Reference, VisualizeGameState.HistoryIndex - 1));
BuildTrack = EmptyTrack;
BuildTrack.StateObject_OldState = History.GetGameStateForObjectID(InteractingUnitRef.ObjectID, eReturnType_Reference, VisualizeGameState.HistoryIndex - 1);
BuildTrack.StateObject_NewState = VisualizeGameState.GetGameStateForObjectID(InteractingUnitRef.ObjectID);
BuildTrack.TrackActor = History.GetVisualizer(InteractingUnitRef.ObjectID);
SoundAndFlyOver = X2Action_PlaySoundAndFlyOver(class'X2Action_PlaySoundAndFlyOver'.static.AddToVisualizationTrack(BuildTrack, Context));
SoundAndFlyOver.SetSoundAndFlyOverParameters(None, Ability.GetMyTemplate().LocFlyOverText, '', eColor_Bad);
if (XComGameState_Unit(BuildTrack.StateObject_OldState).ReserveActionPoints.Length != 0 && XComGameState_Unit(BuildTrack.StateObject_NewState).ReserveActionPoints.Length == 0)
{
SoundAndFlyOver = X2Action_PlaySoundAndFlyOver(class'X2Action_PlaySoundAndFlyOver'.static.AddToVisualizationTrack(BuildTrack, Context));
SoundAndFlyOver.SetSoundAndFlyOverParameters(none, class'XLocalizedData'.default.OverwatchRemovedMsg, '', eColor_Bad);
}
OutVisualizationTracks.AddItem(BuildTrack);
}

simulated function SuppressionBuildVisualizationSync(name EffectName, XComGameState VisualizeGameState, out VisualizationTrack BuildTrack)
{
local X2Action_ExitCover ExitCover;

if (EffectName == class'X2Effect_Suppression'.default.EffectName)
{
ExitCover = X2Action_ExitCover(class'X2Action_ExitCover'.static.AddToVisualizationTrack( BuildTrack, VisualizeGameState.GetContext() ));
ExitCover.bIsForSuppression = true;

class'X2Action_StartSuppression'.static.AddToVisualizationTrack( BuildTrack, VisualizeGameState.GetContext() );
}
}

static function X2AbilityTemplate ConeOfFireShot()
{
local X2AbilityTemplate Template;
local X2AbilityCost_ReserveActionPoints ReserveActionPointCost;
local X2AbilityToHitCalc_StandardAim StandardAim;
local X2Condition_Visibility TargetVisibilityCondition;
local X2AbilityTrigger_Event Trigger;
local array<name> SkipExclusions;
local X2Condition_UnitEffectsWithAbilitySource TargetEffectCondition;
local X2Effect_RemoveEffects RemoveSuppression;
local X2Effect ShotEffect;

`CREATE_X2ABILITY_TEMPLATE(Template, 'ConeOfFireShot');

Template.bDontDisplayInAbilitySummary = true;
ReserveActionPointCost = new class'X2AbilityCost_ReserveActionPoints';
ReserveActionPointCost.iNumPoints = 1;
ReserveActionPointCost.AllowedTypes.AddItem('Suppression');
Template.AbilityCosts.AddItem(ReserveActionPointCost);

StandardAim = new class'X2AbilityToHitCalc_StandardAim';
StandardAim.bReactionFire = true;
Template.AbilityToHitCalc = StandardAim;
Template.AbilityToHitOwnerOnMissCalc = StandardAim;

Template.AbilityTargetConditions.AddItem(default.LivingHostileTargetProperty);

TargetEffectCondition = new class'X2Condition_UnitEffectsWithAbilitySource';
TargetEffectCondition.AddRequireEffect(class'X2Effect_Suppression'.default.EffectName, 'AA_UnitIsNotSuppressed');
Template.AbilityTargetConditions.AddItem(TargetEffectCondition);

TargetVisibilityCondition = new class'X2Condition_Visibility';
TargetVisibilityCondition.bRequireGameplayVisible = true;
Template.AbilityTargetConditions.AddItem(TargetVisibilityCondition);
TargetVisibilityCondition.bDisablePeeksOnMovement = true;
TargetVisibilityCondition.bAllowSquadsight = true;
Template.AbilityTargetConditions.AddItem(TargetVisibilityCondition);
AbilityCondition = new class'X2Condition_AbilityProperty';
AbilityCondition.TargetMustBeInValidTiles = true;
Template.AbilityTargetConditions.AddItem(AbilityCondition);

Template.AbilityShooterConditions.AddItem(default.LivingShooterProperty);

SkipExclusions.AddItem(class'X2AbilityTemplateManager'.default.DisorientedName);
Template.AddShooterEffectExclusions(SkipExclusions);
Template.bAllowAmmoEffects = true;

RemoveSuppression = new class'X2Effect_RemoveEffects';
RemoveSuppression.EffectNamesToRemove.AddItem(class'X2Effect_Suppression'.default.EffectName);
RemoveSuppression.bCheckSource = true;
RemoveSuppression.SetupEffectOnShotContextResult(true, true);
Template.AddShooterEffect(RemoveSuppression);

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

//Trigger on movement - interrupt the move
Trigger = new class'X2AbilityTrigger_Event';
Trigger.EventObserverClass = class'X2TacticalGameRuleset_MovementObserver';
Trigger.MethodName = 'InterruptGameState';
Template.AbilityTriggers.AddItem(Trigger);

Template.AbilitySourceName = 'eAbilitySource_Standard';
Template.eAbilityIconBehaviorHUD = EAbilityIconBehavior_NeverShow;
Template.IconImage = "img:///UILibrary_PerkIcons.UIPerk_supression";
Template.ShotHUDPriority = class'UIUtilities_Tactical'.const.CLASS_LIEUTENANT_PRIORITY;
Template.bDisplayInUITooltip = false;
Template.bDisplayInUITacticalText = false;

//don't want to exit cover, we are already in suppression/alert mode.
Template.bSkipExitCoverWhenFiring = true;

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

// Put holo target effect first because if the target dies from this shot, it will be too late to notify the effect.
ShotEffect = class'X2Ability_GrenadierAbilitySet'.static.HoloTargetEffect();
ShotEffect.TargetConditions.AddItem(class'X2Ability_DefaultAbilitySet'.static.OverwatchTargetEffectsCondition());
Template.AddTargetEffect(ShotEffect);
// Various Soldier ability specific effects - effects check for the ability before applying
ShotEffect = class'X2Ability_GrenadierAbilitySet'.static.ShredderDamageEffect();
ShotEffect.TargetConditions.AddItem(class'X2Ability_DefaultAbilitySet'.static.OverwatchTargetEffectsCondition());
Template.AddTargetEffect(ShotEffect);

return Template;
}

 

 

 

Any ideas what's going on or what I'm missing?

Edited by Kregano
Link to comment
Share on other sites

There is an art to figuring out which line the compiler should complain about. There is no semicolon after your class statement, it just doesn't happen to be line 13. Line 13 is where it noticed the error.

Oh, I've seen a bunch of code editors do that before. I'll fix that and see if there are more errors.

Link to comment
Share on other sites

Fixed that error and deleted some apparently redundant function commands, then got this when I tried to build the mod:

 

 

Warning/Error Summary
---------------------
E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\Src\ConeofFire\Classes\X2Ability_ConeOfFire.uc(210) : Error, 'AbilityCondition': Bad command or expression
E:\SteamLibrary\SteamApps\common\XCOM 2 SDK\Development\Src\ConeofFire\Classes\X2Ability_ConeOfFire.uc(46) : Error, 'ReserveActionPointsEffect': Bad command or expression

Failure - 2 error(s), 0 warning(s) (2 Unique Errors, 0 Unique Warnings)

 

This is confusing to me, since that stuff is copypasted from some of the game's stock skills and barely tweaked:

 

ReservePointsEffect = new class'X2Effect_ReserveActionPoints';
ReservePointsEffect.ReserveType = default.ConeOfFireReserveType;
Template.AddShooterEffect(ReservePointsEffect);

 

AbilityCondition = new class'X2Condition_AbilityProperty';
AbilityCondition.TargetMustBeInValidTiles = true;

Link to comment
Share on other sites

  • Recently Browsing   0 members

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