AbilitySystem.IgnoreCooldowns
AbilitySystem.IgnoreCooldowns
#Overview
name: AbilitySystem.IgnoreCooldowns
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Ignore cooldowns for all Gameplay Abilities.
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of AbilitySystem.IgnoreCooldowns is to provide a cheat or debugging mechanism that allows developers to bypass cooldown restrictions for all Gameplay Abilities in Unreal Engine’s Ability System.
This setting variable is primarily used in the Gameplay Abilities plugin, which is part of Unreal Engine’s runtime modules. It specifically affects the Ability System, which is responsible for managing and executing gameplay abilities in games.
The value of this variable is set through a console variable (CVar) named “AbilitySystem.IgnoreCooldowns”. It’s initialized as false by default, meaning cooldowns are respected unless explicitly ignored.
The variable interacts closely with its associated variable bIgnoreAbilitySystemCooldowns
. They share the same value, with the console variable controlling the state of bIgnoreAbilitySystemCooldowns
.
Developers must be aware that this is a cheat variable (ECVF_Cheat), meaning it’s intended for testing and debugging purposes, not for regular gameplay. Using this in a shipped game could potentially break game balance and player experience.
Best practices when using this variable include:
- Only use it during development and testing phases.
- Ensure it’s disabled before shipping the game.
- Use it in conjunction with proper logging to track when and where cooldowns are being ignored.
- Be cautious when using it in multiplayer scenarios, as it could lead to desynchronization issues if not handled properly.
Regarding the associated variable bIgnoreAbilitySystemCooldowns
:
The purpose of bIgnoreAbilitySystemCooldowns
is to store the state of whether cooldowns should be ignored for all Gameplay Abilities.
This variable is used within the UAbilitySystemGlobals class, which is part of the Gameplay Abilities plugin. It’s accessed through the ShouldIgnoreCooldowns() function, which other parts of the Ability System can use to check if cooldowns should be bypassed.
The value of this variable is set by the console variable “AbilitySystem.IgnoreCooldowns” as mentioned earlier.
It interacts directly with the AbilitySystem.IgnoreCooldowns console variable, essentially serving as the internal representation of that setting.
Developers should be aware that this variable has been deprecated as of Unreal Engine 5.3. The new approach is to use the bIgnoreAbilitySystemCooldowns
in the AbilitySystemGlobals namespace, controlled by the new CVarAbilitySystemIgnoreCooldowns.
Best practices for this variable include:
- Updating any code that directly accesses this variable to use the new namespace version or the ShouldIgnoreCooldowns() function.
- Being aware of its deprecation and planning to remove any direct usage in future updates.
- Using it only for development and testing purposes, never in shipped game code.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Private/AbilitySystemGlobals.cpp:34
Scope (from outer to inner):
file
namespace UE::AbilitySystemGlobals
Source code excerpt:
bool bIgnoreAbilitySystemCosts = false;
FAutoConsoleVariableRef CVarAbilitySystemIgnoreCooldowns(TEXT("AbilitySystem.IgnoreCooldowns"), bIgnoreAbilitySystemCooldowns, TEXT("Ignore cooldowns for all Gameplay Abilities."), ECVF_Cheat);
FAutoConsoleVariableRef CVarAbilitySystemIgnoreCosts(TEXT("AbilitySystem.IgnoreCosts"), bIgnoreAbilitySystemCosts, TEXT("Ignore costs for all Gameplay Abilities."), ECVF_Cheat);
}
UAbilitySystemGlobals::UAbilitySystemGlobals(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
#Associated Variable and Callsites
This variable is associated with another variable named bIgnoreAbilitySystemCooldowns
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Private/AbilitySystemGlobals.cpp:31
Scope (from outer to inner):
file
namespace UE::AbilitySystemGlobals
Source code excerpt:
namespace UE::AbilitySystemGlobals
{
bool bIgnoreAbilitySystemCooldowns = false;
bool bIgnoreAbilitySystemCosts = false;
FAutoConsoleVariableRef CVarAbilitySystemIgnoreCooldowns(TEXT("AbilitySystem.IgnoreCooldowns"), bIgnoreAbilitySystemCooldowns, TEXT("Ignore cooldowns for all Gameplay Abilities."), ECVF_Cheat);
FAutoConsoleVariableRef CVarAbilitySystemIgnoreCosts(TEXT("AbilitySystem.IgnoreCosts"), bIgnoreAbilitySystemCosts, TEXT("Ignore costs for all Gameplay Abilities."), ECVF_Cheat);
}
UAbilitySystemGlobals::UAbilitySystemGlobals(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
#Loc: <Workspace>/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Private/AbilitySystemGlobals.cpp:553
Scope (from outer to inner):
file
function bool UAbilitySystemGlobals::ShouldIgnoreCooldowns
Source code excerpt:
bool UAbilitySystemGlobals::ShouldIgnoreCooldowns() const
{
return UE::AbilitySystemGlobals::bIgnoreAbilitySystemCooldowns;
}
bool UAbilitySystemGlobals::ShouldIgnoreCosts() const
{
return UE::AbilitySystemGlobals::bIgnoreAbilitySystemCosts;
}
#Loc: <Workspace>/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/AbilitySystemGlobals.h:323
Scope (from outer to inner):
file
class class UAbilitySystemGlobals : public UObject
Source code excerpt:
/** If we should ignore the cooldowns when activating abilities in the ability system. Set with ToggleIgnoreAbilitySystemCooldowns() */
UE_DEPRECATED(5.3, "Use bIgnoreAbilitySystemCooldowns in the AbilitySystemGlobals namespace, controlled by new CVarAbilitySystemIgnoreCooldowns")
bool bIgnoreAbilitySystemCooldowns;
/** If we should ignore the costs when activating abilities in the ability system. Set with ToggleIgnoreAbilitySystemCosts() */
UE_DEPRECATED(5.3, "Use bIgnoreAbilitySystemCosts in the AbilitySystemGlobals namespace, controlled by new CVarAbilitySystemIgnoreCosts")
bool bIgnoreAbilitySystemCosts;
#endif // WITH_ABILITY_CHEATS