GameplayAbilities¶
44 tools for the Gameplay Ability System: abilities, gameplay effects with their modifiers and components, attribute sets, gameplay cues, ability system components and gameplay events.
Back to the index.
activate_ability¶
Destructive
Try to activate one granted ability on an editor-world actor ability system component with TryActivateAbility; activated is the engine verdict, false when the activation checks of the ability refuse it. Use grant_ability first, and cancel_ability to stop it.
| Parameter | Type | Required | Description |
|---|---|---|---|
actor_name |
string | yes | Object name (not the label) of the editor-world actor, e.g. "BP_Hero_C_1", matched case-insensitively; find_actors_by_name maps labels to names |
ability_name |
string | yes | Ability to match among the granted specs: the ability_name from get_active_abilities, the class name with or without _C ("GA_Jump"), the asset path ("/Game/Abilities/GA_Jump") or the class path; case-insensitive, first match wins |
Returns: { actor_name, ability_name, activated }
add_attribute_to_set¶
Additive Refused during PIE
Add one FGameplayAttributeData member variable to an AttributeSet Blueprint, with default_value as its BaseValue and CurrentValue, then compile and save it. A name that is already an attribute of the class is left as it is (added false, already_existed true, nothing saved); a name taken by a variable of another type fails. attribute_present and base_value are read from the compiled class. An add is refused before any edit when a running PIE session, a read-only root or a .uasset read-only on disk would keep it from being saved, and a failed save undoes it, taking the variable out again and recompiling the Blueprint.
| Parameter | Type | Required | Description |
|---|---|---|---|
attribute_set_path |
string | yes | Full asset path of the AttributeSet Blueprint |
attribute_name |
string | yes | Name of the new attribute member variable |
default_value |
number | no | Initial BaseValue and CurrentValue of the attribute, default 0; not applied to an attribute that already exists. |
Returns: { attribute_set_path: string, attribute_name: string, default_value: number, added: bool, already_existed: bool, attribute_present: bool, base_value?: number, default_applied?: bool, saved: bool }
add_gameplay_effect_component¶
Additive Idempotent
Add one empty UGameplayEffectComponent of a standard type to the GEComponents array of a GameplayEffect Blueprint's CDO and save without recompiling. GE components are instanced subobjects of the effect, not actor components, so add_component_to_blueprint and add_component_to_actor cannot add them. Idempotent: an existing component of that type returns already_existed=true. Configure it with the set_gameplay_effect_component_* tools; get_gameplay_effect_components lists them. A running PIE session, a read-only root or a .uasset read-only on disk fails before any edit, and a failed save undoes the edit.
| Parameter | Type | Required | Description |
|---|---|---|---|
gameplay_effect_path |
string | yes | Asset path of the GameplayEffect Blueprint, e.g. "/Game/GAS/Effects/GE_Damage". |
component_type |
string | yes | Bare type name, case-insensitive: AssetTags, TargetTags, AdditionalEffects, ChanceToApply, Immunity, TargetTagRequirements, RemoveOther, CustomCanApply, BlockAbilityTags, Abilities or CancelAbilityTags (not the full class name). |
Returns: { gameplay_effect_path: string, component_type: string, component_class: string, component_count: int, component_added: bool, already_existed: bool }
add_gameplay_effect_modifier¶
Additive
Append one modifier with a constant magnitude to the Modifiers array on the class default object of a GameplayEffect Blueprint, then save it without recompiling and without an undo entry. attribute_name is looked up across every loaded AttributeSet class; an unknown attribute or modifier_op, a running PIE session, a read-only root or a .uasset read-only on disk fails before any edit, and a failed save undoes the edit. Each call appends a new entry, even an identical one; modifier_index says where it went. Change its magnitude type with set_gameplay_effect_modifier; remove_gameplay_effect_modifier drops it; get_gameplay_effect_modifiers lists them.
| Parameter | Type | Required | Description |
|---|---|---|---|
ge_blueprint_path |
string | yes | Full asset path of the GE Blueprint |
attribute_name |
string | yes | Attribute to modify, Health or MySet.Health: the bare name or AttributeSetClass.Attribute, case-insensitive, first match among the loaded AttributeSet classes |
modifier_op |
string | yes | Add, Multiply, Divide, or Override (case-insensitive) |
magnitude |
number | yes | Constant magnitude of the modifier, stored as a ScalableFloat without a curve |
Returns: { ge_blueprint_path: string, attribute_name: string, modifier_op: string, magnitude: number, modifier_index: int, modifier_count: int, magnitude_readback_ok: bool, magnitude_readback: number, added: bool }
apply_gameplay_effect¶
Destructive
Apply a GameplayEffect class to an editor-world actor's ability system component: an outgoing spec at the given level, with a fresh context from that component, applied to self. Duration and infinite effects then show in get_active_effects and come off with remove_gameplay_effect; an instant effect changes base values at once and leaves nothing active. Check the outcome with get_attributes or get_attribute_value; to set one value directly use set_attribute_base_value. applied is the engine's verdict (WasSuccessfullyApplied), true for an instant effect that executed; active says whether an active effect now stands for it, false for an instant one. When the engine refuses the effect (application requirements, an immunity, its chance to apply) applied is false and the call fails, with nothing changed. Not idempotent: each call adds another application or stack. Runtime state only: no undo step, nothing saved. execute_batch of apply_gameplay_effect calls applies a list.
| Parameter | Type | Required | Description |
|---|---|---|---|
actor_name |
string | yes | Object name (not the label) of the editor-world actor, e.g. "BP_Hero_C_1": the whole name, case-insensitive, no wildcards. get_actors_in_level lists names; find_actors_by_name maps a label to its name |
effect_class |
string | yes | Class path of a UGameplayEffect subclass, loaded with LoadClass: a Blueprint GE needs its _C class path, e.g. "/Game/Effects/GE_Burn.GE_Burn_C"; a C++ one "/Script/MyGame.GE_Burn". create_gameplay_effect_blueprint makes one; an unloadable path is an error |
level |
number | no | Effect level that scalable magnitudes are read at, a number, fractions allowed (e.g. 2.5); default 1.0 |
Returns: { actor_name, effect_class, level, applied, active } -- applied: the engine applied or executed the effect; active: an active effect now tracks it (duration or infinite effects)
cancel_ability¶
Destructive Idempotent
Stop a running ability on an editor-world actor's ability system component (CancelAbilityHandle) while keeping it granted, reading its spec before and after: was_active, still_active and cancelled. Start it again with activate_ability; to ungrant it use remove_ability instead; get_active_abilities shows which granted abilities are running (is_active). Idempotent: cancelling one that is not running changes nothing and still succeeds with cancelled=false. success is false, with an error, when it is still active afterwards (the ability may not allow cancelling). Runtime state only: no undo step, nothing saved. An unknown actor, a missing component or no matching granted ability is an error.
| Parameter | Type | Required | Description |
|---|---|---|---|
actor_name |
string | yes | Object name (not the label) of the editor-world actor, e.g. "BP_Hero_C_1": the whole name, case-insensitive, no wildcards. get_actors_in_level lists names; find_actors_by_name maps a label to its name |
ability_name |
string | yes | Granted ability to cancel: the ability_name get_active_abilities returns, the class name with or without _C ("GA_Jump"), the asset path ("/Game/Abilities/GA_Jump") or the class path; case-insensitive, first matching spec wins |
Returns: { actor_name, ability_name, was_active, still_active, cancelled } -- read back from the spec: cancelled means was_active and not still_active
create_attribute_set_blueprint¶
Additive Refused during PIE
Create a Blueprint parented to UAttributeSet at package_path/name, compile and save it, or reuse the AttributeSet Blueprint already there (created false, already_existed true; a Blueprint of another class there is an error, and is left untouched); with attributes, add one FGameplayAttributeData variable per entry, then compile and save it. A name the class already has is skipped and listed in skipped_attribute_names; success is false when an added attribute is missing from the compiled class or did not get its default_value. A running PIE session, a read-only root or a .uasset read-only on disk fails before anything is created or added; a call that adds nothing to an existing set is not refused and saves nothing (saved false). A failed save makes success false, with saved false and save_error, and the added attributes stay in memory only.
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string | yes | Asset name without a path, e.g. "AS_Character". |
package_path |
string | no | Content folder for the new asset, e.g. "/Game/GAS/Attributes"; defaults to /Game/Blueprints. |
attributes |
array | no | Optional array of {"name": "Health", "default_value": 100} objects; default_value (default 0) becomes the BaseValue and CurrentValue of the compiled default. Entries without a name are ignored; omitted, the set is created empty (add attributes later with add_attribute_to_set). |
Returns: { name: string, asset_path: string, parent_class: string, generated_class: string, is_attribute_set: bool, already_existed: bool, attributes_added: int, added_attribute_names: [string], skipped_attribute_names: [string], failed_attribute_names: [string], attributes_applied: bool, created: bool, saved: bool, save_error?: string }
create_gameplay_ability_blueprint¶
Additive
Create a Blueprint parented to UGameplayAbility at package_path/name, compile and save it; returns asset_path, generated_class and is_gameplay_ability. A GameplayAbility Blueprint already at that path is returned untouched (created false, already_existed true); a Blueprint of another class there is an error. Refused during PIE.
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string | yes | Asset name without a path, e.g. "GA_Fireball". |
package_path |
string | no | Content folder for the new asset, e.g. "/Game/GAS/Abilities"; defaults to /Game/Blueprints. |
Returns: { name: string, asset_path: string, parent_class: string, generated_class: string, is_gameplay_ability: bool, already_existed: bool, created: bool }
create_gameplay_cue_notify¶
Additive
Create a GameplayCueNotify Blueprint of the kind notify_type names -- Static (UGameplayCueNotify_Static, non-instanced one-shot, the default), Burst (UGameplayCueNotify_Burst, modern non-instanced one-shot), Actor (AGameplayCueNotify_Actor, a spawned, instanced cue actor) or Looping (AGameplayCueNotify_Looping, modern instanced looping notify) -- at package_path/name, compile and save it, or reuse the one of that class already there (created false, already_existed true); a Blueprint of another class there, or an unknown notify_type, is an error. A registered gameplay_cue_tag is written to the CDO and saved: a read-only root or a .uasset read-only on disk refuses that write and a failed save undoes it; an unregistered tag only yields cue_tag_set=false. Refused during PIE. Edit it with set_properties (Static, Burst) or set_properties (Actor, Looping).
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string | yes | Asset name without a path, e.g. "GCN_Hit". |
package_path |
string | no | Content folder for the new asset, e.g. "/Game/GAS/Cues"; defaults to /Game/Blueprints. |
notify_type |
string | no | Optional kind of notify, any case: Static (default), Burst, Actor or Looping. |
gameplay_cue_tag |
string | no | Registered gameplay tag written as GameplayCueTag and GameplayCueName, e.g. "GameplayCue.Hit"; an unregistered tag is skipped (cue_tag_set=false), not an error. |
Returns: { name: string, asset_path: string, parent_class: string, generated_class: string, notify_type: string, is_gameplay_cue_notify: bool, cue_tag_set: bool, cue_tag_requested: string, cue_tag: string, already_existed: bool, created: bool }
create_gameplay_effect_asset¶
Additive Idempotent
Create a native UGameplayEffect data asset (not a Blueprint, and not a container) at package_path/name with the given duration policy, and save it; no undo transaction. apply_gameplay_effect needs a class, so for an effect you will apply use create_gameplay_effect_blueprint instead; read the result back with get_gameplay_effect_info. Idempotent: a GameplayEffect already at that path, native or Blueprint, is returned untouched with already_existed=true and nothing saved; its duration_policy and duration_magnitude are read from the asset, and requested_duration_policy echoes the request that was not applied. An asset of another class there is refused. An unknown duration_policy is an error and nothing is created. A failed save (always while PIE runs) is an error, and the new asset stays in memory unsaved.
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string | yes | Asset name without a folder, e.g. "GE_Damage". |
package_path |
string | no | Content folder as a long package path, e.g. "/Game/GAS/Effects" (default /Game/GameplayEffects; one trailing slash is dropped). |
duration_policy |
string | no | "Instant", "HasDuration" or "Infinite", case ignored (default Instant). |
duration_magnitude |
number | no | Duration in seconds as a constant magnitude, e.g. 5.0; used only with HasDuration and ignored otherwise (default 0.0). |
Returns: { name, asset_path, already_existed, duration_policy, duration_magnitude?, requested_duration_policy?, created? }
create_gameplay_effect_blueprint¶
Additive
Create a Blueprint parented to UGameplayEffect at package_path/name, compile and save it; returns asset_path, generated_class and is_gameplay_effect. A GameplayEffect Blueprint already at that path is returned untouched (created false, already_existed true); a Blueprint of another class there is an error. Refused during PIE.
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string | yes | Asset name without a path, e.g. "GE_Damage". |
package_path |
string | no | Content folder for the new asset, e.g. "/Game/GAS/Effects"; defaults to /Game/Blueprints. |
Returns: { name: string, asset_path: string, parent_class: string, generated_class: string, is_gameplay_effect: bool, already_existed: bool, created: bool }
create_gameplay_mod_magnitude_calculation_blueprint¶
Additive
Create a Blueprint parented to UGameplayModMagnitudeCalculation (a custom magnitude calc class for GE modifiers), compile and save it. A Blueprint of that class already at the path is returned untouched (created false, already_existed true); one of another class there is an error.
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string | yes | Asset name, e.g. MMC_Damage |
package_path |
string | no | Target content path, defaults to /Game/Blueprints |
Returns: { name: string, asset_path: string, parent_class: string, generated_class: string, is_mod_magnitude_calculation: bool, already_existed: bool, created: bool }
get_ability_asset_tags¶
Read-only
Read the AssetTags of a GameplayAbility Blueprint from its class default object: ability_tags, asset_tag_count, and ability_name (the default object name). Despite the tool name, no activation data is read: no activation policy, required or blocked tags, cost or cooldown. Read-only and editor-time: it loads the asset and needs no actor or PIE; a path that is not a GameplayAbility Blueprint is an error. set_ability_asset_tags writes these tags; get_ability_info reads an ability granted to an actor.
| Parameter | Type | Required | Description |
|---|---|---|---|
ability_path |
string | yes | Full /Game path to the ability Blueprint asset |
Returns: { ability_path: string, ability_name: string, ability_tags: [string], asset_tag_count: int }
get_ability_info¶
Read-only
Read one ability granted to an editor-world actor ability system component: ability_class, level, is_active and input_id of the first matching spec. Read-only; an error when no granted spec matches ability_name. Use get_active_abilities to list them all.
| Parameter | Type | Required | Description |
|---|---|---|---|
actor_name |
string | yes | Object name (not the label) of the editor-world actor, e.g. "BP_Hero_C_1", matched case-insensitively; find_actors_by_name maps labels to names |
ability_name |
string | yes | Ability to match among the granted specs: the ability_name from get_active_abilities, the class name with or without _C ("GA_Jump"), the asset path ("/Game/Abilities/GA_Jump") or the class path; case-insensitive, first match wins |
Returns: { actor_name, ability_name, ability_class, level, is_active, input_id }
get_ability_system_component¶
Read-only
Read a short census of an editor-world actor's ability system component: component_name, active_abilities_count (every granted spec, running or not) and active_effects_count. Call it first to confirm an actor has a component before grant_ability, apply_gameplay_effect or send_gameplay_event_to_actor; for the entries behind the counts use get_active_abilities, get_active_effects or get_attributes. The component is the actor's IAbilitySystemInterface answer, else its first UAbilitySystemComponent. Read-only and idempotent; it reads the editor world, not a PIE session. A missing actor or component is an error, so has_ability_system is never false.
| Parameter | Type | Required | Description |
|---|---|---|---|
actor_name |
string | yes | Object name (not the label) of the editor-world actor, e.g. "BP_Hero_C_1": the whole name, case-insensitive, no wildcards. get_actors_in_level lists names; find_actors_by_name maps a label to its name |
Returns: { actor_name, has_ability_system, component_name, active_abilities_count, active_effects_count }
get_ability_tasks¶
Read-only
List the gameplay tasks the GameplayTasksComponents of an editor-world actor (its ability system component counts) know about, without changing anything: the tasks activated and not yet ended (the component's KnownTasks), plus any queued waiting for task resources. Each has task_name, task_class, task_state (Uninitialized, AwaitingActivation, Active, Paused or Finished), is_ability_task and owner_name (the object that started it, e.g. an ability instance); counts split ability tasks from other gameplay tasks. A task that was created but never activated is not known to the component and is not listed. An actor that is not found, or has no ability system component, is an error.
| Parameter | Type | Required | Description |
|---|---|---|---|
actor_name |
string | yes | Object name (not the label) of the editor-world actor, e.g. "BP_Hero_C_1", matched case-insensitively; find_actors_by_name maps labels to names |
Returns: { actor_name, task_count, ability_task_count, generic_task_count, tasks: [{ task_name, task_class, task_state, is_ability_task, owner_name }] }
get_active_abilities¶
Read-only
List every ability granted to an editor-world actor ability system component, running or not (all activatable specs, despite the tool name): ability_name (the class default object name), ability_class, level and is_active, plus count. Read-only; get_ability_info reads one.
| Parameter | Type | Required | Description |
|---|---|---|---|
actor_name |
string | yes | Object name (not the label) of the editor-world actor, e.g. "BP_Hero_C_1", matched case-insensitively; find_actors_by_name maps labels to names |
Returns: { ability_name, ability_class, level, is_active, actor_name, abilities, count }
get_active_effects¶
Read-only
List the gameplay effects currently active on an editor-world actor ability system component: effect_name (the definition object name), effect_class and level for each, plus count. Read-only; effects whose definition is gone are skipped. get_gameplay_effect_info reads one.
| Parameter | Type | Required | Description |
|---|---|---|---|
actor_name |
string | yes | Object name (not the label) of the editor-world actor, e.g. "BP_Hero_C_1", matched case-insensitively; find_actors_by_name maps labels to names |
Returns: { effect_name, effect_class, level, actor_name, effects, count }
get_attribute_meta_on_set_class¶
Read-only
Read back the FAttributeMetaData DataTable an AttributeSet class is initialized from (read-side of set_attribute_meta_on_set_class): row struct name, row count, and the serialized rows. This reports the AUTHORED defaults on disk, not the live values of any actor -- for those use get_attribute_value / get_attributes.
| Parameter | Type | Required | Description |
|---|---|---|---|
attribute_set_class_path |
string | yes | Full UAttributeSet class path |
data_table_path |
string | no | Optional override; default is /Game/UEAgent/AttributeMeta/<ClassName>_Meta |
Returns: { attribute_set_class, data_table_path, row_struct, row_count, rows }
get_attribute_value¶
Read-only
Read one attribute from the attribute sets registered on an editor-world actor ability system component: value (current, modifiers included), base_value and attribute_set. Read-only; an unknown attribute is not an error but found=false. get_attributes lists every attribute.
| Parameter | Type | Required | Description |
|---|---|---|---|
actor_name |
string | yes | Object name (not the label) of the editor-world actor, e.g. "BP_Hero_C_1", matched case-insensitively; find_actors_by_name maps labels to names |
attribute_name |
string | yes | Attribute name ("Health") or "SetClass.Attribute" ("MyAttributeSet.Health"), case-insensitive; the first registered attribute that matches wins |
Returns: { actor_name, attribute_name, found, value, base_value, attribute_set }
get_attributes¶
Read-only
List every attribute of the attribute sets registered on the ability system component of an editor-world actor (its IAbilitySystemInterface answer, else its first UAbilitySystemComponent), each with attribute_name, attribute_set, value (current, modifiers included), base_value and found, plus count. Read-only. A missing actor or component is an error; a component with no registered set gives count 0. Use get_attribute_value for one attribute, set_attribute_base_value to change one.
| Parameter | Type | Required | Description |
|---|---|---|---|
actor_name |
string | yes | Object name (not the label) of the editor-world actor, e.g. "BP_Hero_C_1", matched case-insensitively; find_actors_by_name maps labels to names |
Returns: { actor_name: string, attributes: [{ attribute_name: string, attribute_set?: string, value: number, base_value: number, found: bool }], count: int }
get_gameplay_cue_notify_info¶
Read-only
Read the class default object of a GameplayCueNotify Blueprint, loaded by asset path: notify_type (Static, Burst, Actor or Looping), its direct parent_class, GameplayCueTag, GameplayCueName and IsOverride. The lifetime and instancing fields come back only for Actor and Looping notifies; a Static or Burst reply leaves them out. Read-only and editor-time: it writes nothing and needs no PIE or actor. A missing asset or a Blueprint that is not a GameplayCueNotify is an error. Use it to check a notify before or after editing it with set_properties (Static, Burst) or set_properties (Actor, Looping); a new one: create_gameplay_cue_notify.
| Parameter | Type | Required | Description |
|---|---|---|---|
cue_notify_path |
string | yes | Full asset path of the GameplayCueNotify Blueprint (Static/Burst/Actor/Looping), e.g. "/Game/GAS/Cues/GCN_Hit". |
Returns: { cue_notify_path: string, parent_class: string, notify_type: string, gameplay_cue_tag: string, gameplay_cue_name: string, is_override: bool, auto_destroy_on_remove?: bool, auto_destroy_delay?: number, auto_attach_to_owner?: bool, unique_instance_per_instigator?: bool, unique_instance_per_source_object?: bool, allow_multiple_on_active_events?: bool, allow_multiple_while_active_events?: bool, num_preallocated_instances?: int }
get_gameplay_effect_components¶
Read-only
List the GameplayEffectComponents (the GEComponents array) on the class default object of a GameplayEffect Blueprint without changing it, in array order, each with its class and, for the standard ones, its configured values: target, asset and blocked-ability tags (with their combined tags), chance to apply (read at level 0), application, ongoing and removal require and ignore tags, and granted abilities (class, path, input_id); any other component class comes back with its class only. Use it to check what add_gameplay_effect_component, set_gameplay_effect_component or the set_gameplay_effect_component_* tools wrote, and to find the index remove_gameplay_effect_component takes; for duration, period, stacking and modifiers use get_gameplay_effect_info and get_gameplay_effect_modifiers. A GE with no components gives component_count 0. A path that does not load as a Blueprint, has no generated class, or is not a GameplayEffect Blueprint is an error; a native GameplayEffect asset (create_gameplay_effect_asset) is not read here.
| Parameter | Type | Required | Description |
|---|---|---|---|
gameplay_effect_path |
string | yes | Asset path of the GameplayEffect Blueprint, e.g. "/Game/GAS/GE_Burning", as create_gameplay_effect_blueprint returns it (asset_path). |
Returns: { gameplay_effect_path: string, components: [object], component_count: int }
get_gameplay_effect_info¶
Read-only
Read the first active gameplay effect on an editor-world actor ability system component whose definition matches effect_name: effect_class and level. Read-only; an error when none matches. For an effect asset that is not applied, use get_gameplay_effect_modifiers instead.
| Parameter | Type | Required | Description |
|---|---|---|---|
actor_name |
string | yes | Object name (not the label) of the editor-world actor, e.g. "BP_Hero_C_1", matched case-insensitively; find_actors_by_name maps labels to names |
effect_name |
string | yes | Active effect to match by its definition: the effect_name from get_active_effects, the class name with or without _C ("GE_Burn"), the asset path ("/Game/Effects/GE_Burn") or the class path; case-insensitive, first match wins |
Returns: { actor_name, effect_name, effect_class, level }
get_gameplay_effect_modifiers¶
Read-only
Read the attribute modifiers authored on a GameplayEffect asset (a native UGameplayEffect asset, or a Blueprint GE's class default object): for each, attribute, attribute_set, modifier_op (Additive, Multiplicitive, Division or Override) and magnitude_value_at_level_1; plus duration_policy (Instant, HasDuration or Infinite) and modifier_count. Use it to inspect an effect before apply_gameplay_effect; for an effect already active on an actor use get_gameplay_effect_info, for the asset's components get_gameplay_effect_components, and change modifiers with add_gameplay_effect_modifier, set_gameplay_effect_modifier or remove_gameplay_effect_modifier. Read-only and idempotent. magnitude_type always says ScalableFloat whatever the real type; magnitude_value_at_level_1 is present only for a ScalableFloat magnitude, so its absence means attribute-based, SetByCaller or custom. An unknown path is an error.
| Parameter | Type | Required | Description |
|---|---|---|---|
effect_path |
string | yes | Asset path of the effect, not its _C class path: a Blueprint GE "/Game/Effects/GE_Burn" or a native UGameplayEffect asset "/Game/Effects/GE_Native" (".Name" suffix optional). find_assets_by_name finds it; create_gameplay_effect_blueprint or create_gameplay_effect_asset makes one |
Returns: { attribute, attribute_set, modifier_op, magnitude_type, magnitude_value_at_level_1, effect_path, duration_policy, modifier_count, modifiers }
grant_ability¶
Additive
Grant a gameplay ability class to the ability system component of an actor in the editor world (not a PIE session) with GiveAbility at a whole-number level; granted says whether a valid spec handle came back, and false is still a success. Runtime state only: no undo step, nothing saved with the level. Not idempotent: granting the same class again adds another spec. Then run it with activate_ability, list the grants with get_active_abilities, and take one away with remove_ability. To grant it only while an effect is active, use set_gameplay_effect_component (component granted_abilities) on a GameplayEffect Blueprint instead. An unknown actor, an actor without an ability system component, or a class that does not load as a UGameplayAbility is an error and nothing is granted.
| Parameter | Type | Required | Description |
|---|---|---|---|
actor_name |
string | yes | Object name (not the label) of the editor-world actor, e.g. "BP_Hero_C_1", matched case-insensitively; find_actors_by_name maps labels to names |
ability_class |
string | yes | Class path of a UGameplayAbility subclass: "/Game/Abilities/GA_Jump.GA_Jump_C" for a Blueprint (note the _C), "/Script/MyGame.MyAbility" for C++; create_gameplay_ability_blueprint makes one. |
level |
integer | no | Spec level, a whole number, e.g. 3 (default 1). |
Returns: { actor_name, ability_class, level, granted }
poll_gameplay_tag_events¶
Read-only
Reads fires recorded for a register_gameplay_tag_event subscription since a cursor (non-destructive cursor read, same idiom as poll_delegate_events). Never destructive: call again with next_cursor to keep draining without missing or repeating a fire.
| Parameter | Type | Required | Description |
|---|---|---|---|
subscription_id |
number | yes | subscription_id returned by register_gameplay_tag_event (required) |
cursor |
number | no | Optional; only fires with sequence_id > cursor are returned. Defaults to 0 (everything retained). |
Returns: { subscription_id: number, subscription_exists: bool, events: [{sequence_id: number, timestamp: number, new_count: number}], next_cursor: number }
register_gameplay_tag_event¶
Additive Idempotent
Registers a REAL listener on a target actor's UAbilitySystemComponent for a gameplay tag's count changes (UAbilitySystemComponent::RegisterGameplayTagEvent, AbilitySystemComponent.h), binding an actual callback (.AddLambda) and keeping its FDelegateHandle so unregister_gameplay_tag_event can honestly undo it later. Idempotent: re-registering the same (actor, tag, event_type) returns the existing subscription_id instead of stacking a duplicate listener. Poll fires with poll_gameplay_tag_events.
| Parameter | Type | Required | Description |
|---|---|---|---|
actor_name |
string | yes | Object name of the target editor-world actor, or an editor label only one actor has (required) |
event_tag |
string | yes | FGameplayTag name (e.g. "Gameplay.Event.Hit") (required) |
event_type |
string | no | "NewOrRemoved" | "AnyCountChange" (default "NewOrRemoved") |
Returns: { actor_name: string, event_tag: string, event_type: string, subscription_id: number, registered: bool, already_existed: bool }
remove_ability¶
Destructive
Ungrant one ability from an editor-world actor's ability system component with ClearAbility, the inverse of grant_ability. To only stop a running ability and keep it granted, use cancel_ability instead; get_active_abilities lists what is granted and confirms the result. A running ability is only marked and leaves when it ends (pending_removal=true, still a success); removed=true means the spec is gone now. Only the first matching spec goes, so a class granted twice needs two calls; once none is left a call answers Ability not found. success is false with an error if the spec is still granted afterwards. Runtime state only: no undo step, nothing saved. An unknown actor or missing component is an error and changes nothing.
| Parameter | Type | Required | Description |
|---|---|---|---|
actor_name |
string | yes | Object name (not the label) of the editor-world actor, e.g. "BP_Hero_C_1": the whole name, case-insensitive, no wildcards. get_actors_in_level lists names; find_actors_by_name maps a label to its name |
ability_name |
string | yes | Granted ability to remove: the ability_name get_active_abilities returns, the class name with or without _C ("GA_Jump"), the asset path ("/Game/Abilities/GA_Jump") or the class path; case-insensitive, first matching spec wins |
Returns: { actor_name, ability_name, removed, pending_removal } -- read back: removed means the spec is gone; an active ability is only marked, and leaves when it ends (pending_removal)
remove_gameplay_effect¶
Destructive
Remove one active gameplay effect, with all its stacks, from an editor-world actor's ability system component (RemoveActiveGameplayEffect): the first whose definition matches effect_name. The inverse of apply_gameplay_effect; get_active_effects lists what is active and confirms the result. To change the effect asset itself use remove_gameplay_effect_modifier or remove_gameplay_effect_component instead. Instant effects never stay active, so they cannot be removed here (restore a value with set_attribute_base_value). When several active effects share a definition only the first goes, so call again for each; with none left a call answers Effect not found. removed is the engine answer confirmed by the effect no longer being active; success is false with an error otherwise. Runtime state only: no undo step, nothing saved.
| Parameter | Type | Required | Description |
|---|---|---|---|
actor_name |
string | yes | Object name (not the label) of the editor-world actor, e.g. "BP_Hero_C_1": the whole name, case-insensitive, no wildcards. get_actors_in_level lists names; find_actors_by_name maps a label to its name |
effect_name |
string | yes | Active effect to remove, matched by its definition: the effect_name get_active_effects returns, the class name with or without _C ("GE_Burn"), the asset path ("/Game/Effects/GE_Burn") or the class path; case-insensitive, first active match wins |
Returns: { actor_name, effect_name, removed } -- removed is what the engine reports, confirmed by the effect not being active afterwards
remove_gameplay_effect_component¶
Destructive
Remove a component from a GameplayEffect CDO's GEComponents array by index or by component_type/component_class (inverse of add_gameplay_effect_component), and save; the removed component is left out of the saved asset. A running PIE session, a read-only root or a .uasset read-only on disk fails before any edit, and a failed save undoes the edit.
| Parameter | Type | Required | Description |
|---|---|---|---|
gameplay_effect_path |
string | yes | Full asset path of the GE Blueprint |
component_index |
number | no | Optional index into the GEComponents array (call get_gameplay_effect_components to enumerate; 0 = first). Supply this OR component_type |
component_type |
string | no | Optional friendly type (AssetTags, TargetTags, AdditionalEffects, ChanceToApply, Immunity, TargetTagRequirements, RemoveOther, CustomCanApply, BlockAbilityTags, Abilities, CancelAbilityTags). Accepts the bare type or the full class name. Supply this OR component_index |
component_class |
string | no | Alias of component_type (accepts the full "<Type>GameplayEffectComponent" class name) |
Returns: { gameplay_effect_path: string, removed_index: int, removed_class: string, component_count: int, removed: bool, saved: bool }
remove_gameplay_effect_modifier¶
Destructive
Remove a modifier from a GameplayEffect CDO's Modifiers array by index (the D in add/set CRUD). A running PIE session, a read-only root or a .uasset read-only on disk fails before any edit, and a failed save undoes the edit.
| Parameter | Type | Required | Description |
|---|---|---|---|
ge_blueprint_path |
string | yes | Full asset path of the GE Blueprint |
modifier_index |
number | yes | Index into the GE CDO Modifiers array to remove (0 = first; add_gameplay_effect_modifier appends) |
Returns: { ge_blueprint_path: string, removed_index: int, modifier_count: int, removed: bool }
send_gameplay_event_to_actor¶
Destructive
Send a gameplay event to an editor-world actor's ability system component (UAbilitySystemBlueprintLibrary::SendGameplayEventToActor): it tries to activate every granted ability whose trigger is a GameplayEvent on event_tag or a parent tag, and wakes listeners such as Wait Gameplay Event tasks. Use it for event-driven abilities; to start an ability directly use activate_ability, to change attributes apply_gameplay_effect, and to watch tag count changes register_gameplay_tag_event. Not idempotent: each call fires the event again. Nothing is saved and there is no undo step. sent is measured: a probe listening on the component for exactly event_tag saw the event arrive (the call fails when it did not); asc_resolved says the engine's send path found that same component. Neither says which abilities reacted: check with get_active_abilities (is_active) or get_ability_tasks. An unknown actor, a label several actors share, a missing component or an unregistered tag is an error and sends nothing.
| Parameter | Type | Required | Description |
|---|---|---|---|
actor_name |
string | yes | Object name of the editor-world actor, e.g. "BP_Hero_C_1" (whole name, case-insensitive, no wildcards), or else an editor label only one actor has; resolved_by in the reply says which matched. get_actors_in_level lists names (required) |
event_tag |
string | yes | Full name of a registered gameplay tag, e.g. "Gameplay.Event.Hit"; find_gameplay_tags lists them, create_gameplay_tag adds one, and an unregistered tag is an error (required) |
payload_magnitude |
number | no | Optional number placed in the payload's EventMagnitude, e.g. 25.0; omitted leaves 0. The payload carries only EventTag and EventMagnitude (no instigator, target or object) |
Returns: { actor_name: string, event_tag: string, resolved_by: string ("object_name" | "label"), actor_object_name: string, sent: bool, asc_resolved: bool }
set_ability_asset_tags¶
Destructive Idempotent
Replace the asset tags on the class default object of a GameplayAbility Blueprint, loaded by asset path, with the registered tags in asset_tags, then save the asset without recompiling. The list is the whole new set: tags already there and not listed are dropped, an empty list clears them all, and a string that is not a registered tag is skipped and listed in unknown_tags instead of failing the call. Every call writes and saves, even when the tags are unchanged. A path that is not a GameplayAbility Blueprint, a running PIE session, a read-only root or a .uasset read-only on disk fails before any edit, and a failed save undoes the edit. Read back: get_ability_asset_tags; register a tag first: create_gameplay_tag; tags a GameplayEffect owns: set_gameplay_effect_component.
| Parameter | Type | Required | Description |
|---|---|---|---|
ability_blueprint_path |
string | yes | Asset path of the GameplayAbility Blueprint, e.g. "/Game/GAS/Abilities/GA_Fireball". |
asset_tags |
array | yes | Array of gameplay tag strings that becomes the whole asset-tag set, e.g. ["Ability.Fire", "Ability.Type.Magic"]; an empty array clears every asset tag. |
Returns: { ability_blueprint_path: string, resolved_tags: [string], unknown_tags: [string], ability_tags: [string], tag_count: int, configured: bool }
set_ability_cooldown¶
Destructive Idempotent
Point CooldownGameplayEffectClass on the class default object of a GameplayAbility Blueprint at the generated class of a GameplayEffect Blueprint, both loaded by asset path, then save the ability without recompiling. That effect is applied when the ability commits and the tags it grants block re-activation while it lasts, so give it a duration with set_gameplay_effect_duration and a cooldown tag with set_gameplay_effect_component. Any cooldown class already set is overwritten, and every call writes and saves, even with the same class; there is no way to clear it here. A path that is not a GameplayAbility or GameplayEffect Blueprint, a running PIE session, a read-only root or a .uasset read-only on disk fails before any edit, and a failed save undoes the edit. cooldown_effect_class, cooldown_effect_class_matches and set are read back from the class defaults after the save, and success is false when they do not hold the requested class. The cost effect: set_ability_cost; a new effect: create_gameplay_effect_blueprint.
| Parameter | Type | Required | Description |
|---|---|---|---|
ability_blueprint_path |
string | yes | Asset path of the GameplayAbility Blueprint, e.g. "/Game/GAS/Abilities/GA_Fireball". |
cooldown_effect_path |
string | no | Asset path of the GameplayEffect Blueprint used as the cooldown, e.g. "/Game/GAS/Effects/GE_Cooldown_Fireball"; typically a HasDuration effect. |
Returns: { ability_blueprint_path: string, cooldown_effect_path: string, cooldown_effect_class: string, cooldown_effect_class_matches: bool, set: bool }
set_ability_cost¶
Destructive Idempotent
Point CostGameplayEffectClass on the class defaults of a GameplayAbility Blueprint at the generated class of a GameplayEffect Blueprint, both loaded by asset path, then save the ability without recompiling. That effect is applied when the ability commits, and its modifiers (usually a negative add to an attribute such as Mana) are the price: the commit fails when the owner cannot pay. Give the effect its modifier with add_gameplay_effect_modifier; for the effect that blocks re-use use set_ability_cooldown instead; make a new effect with create_gameplay_effect_blueprint; read the value back with get_properties on the ability's class defaults. Any cost class already set is overwritten and every call writes and saves, so a repeat call leaves the same state; there is no way to clear it here. A path that is not a GameplayAbility or GameplayEffect Blueprint, a running PIE session, a read-only root or a .uasset read-only on disk fails before any edit, and a failed save undoes the edit. cost_effect_class, cost_effect_class_matches and set are read back from the class defaults after the save, and success is false when they do not hold the requested class.
| Parameter | Type | Required | Description |
|---|---|---|---|
ability_blueprint_path |
string | yes | Asset path of the GameplayAbility Blueprint, e.g. "/Game/GAS/Abilities/GA_Fireball". |
cost_effect_path |
string | no | Asset path of the GameplayEffect Blueprint used as the cost, e.g. "/Game/GAS/Effects/GE_Cost_Fireball"; typically an Instant effect that subtracts from an attribute. |
Returns: { ability_blueprint_path: string, cost_effect_path: string, cost_effect_class: string, cost_effect_class_matches: bool, set: bool }
set_attribute_base_value¶
Destructive Idempotent
Set the base value of one attribute on the ability system component of an actor in the editor world (not a PIE session) with SetNumericAttributeBase; active modifiers keep applying on top, so value (the current value) can differ from base_value, both read back after the write. Use it to set a starting value directly; to change it through gameplay rules (modifiers, duration) apply a GameplayEffect with apply_gameplay_effect, and to change an attribute set class's metadata use set_attribute_meta_on_set_class. Read it with get_attribute_value, all attributes with get_attributes. Runtime state only: no undo step, the level is not marked dirty. When no registered attribute set has that attribute it is still a success with set=false, value echoing the request and no base_value; an unknown actor or one without an ability system component is an error. Repeating the call writes the same base again.
| Parameter | Type | Required | Description |
|---|---|---|---|
actor_name |
string | yes | Object name (not the label) of the editor-world actor, e.g. "BP_Hero_C_1", matched case-insensitively; find_actors_by_name maps labels to names |
attribute_name |
string | yes | Attribute name ("Health") or "SetClass.Attribute" ("MyAttributeSet.Health"), case-insensitive, as get_attributes lists them; the first registered attribute that matches wins |
value |
number | yes | The new base value, a number such as 100 or 0.5; the tool does not clamp it, but the attribute set's own PreAttributeBaseChange may, so check base_value. |
Returns: { actor_name, attribute_name, value, set, base_value }
set_attribute_meta_on_set_class¶
Destructive Idempotent
Author the DataTable<FAttributeMetaData> that gives a UAttributeSet class its starting/min/max values, then validate it by calling InitFromMetaDataTable on that class's CDO. WHAT IT DOES NOT DO: it never writes the CDO -- only the DataTable is authored, and the running game is still expected to call CDO->InitFromMetaDataTable(DataTable) itself at character init (typically from an ASC's InitStats path). Use set_attribute_base_value to change a LIVE actor's attribute instead.
| Parameter | Type | Required | Description |
|---|---|---|---|
attribute_set_class_path |
string | yes | Full UAttributeSet class path (e.g. "/Script/GameplayAbilities.AbilitySystemTestAttributeSet" or "/Game/MyAS") |
metadata_rows |
array | yes | Array of |
data_table_path |
string | no | Target asset path (default "/Game/UEAgent/AttributeMeta/<ClassName>_Meta") |
Returns: { attribute_set_class, data_table_path, row_count, rows_imported, init_from_meta_succeeded, saved, problems }
set_gameplay_effect_component¶
Destructive Idempotent
Configure one GameplayEffectComponent of a GameplayEffect Blueprint, adding it to the class default object when missing: component says which -- asset_tags (tags the GE owns), target_tags (tags granted to the target while active), block_ability_tags (abilities blocked while active), target_tag_requirements (application/ongoing/removal require and ignore tags), chance_to_apply (a probability) or granted_abilities (an ability granted while active) -- and the matching parameters set it. Validated, written and saved by the tool that owns that component; a running PIE session, a read-only root or file fails before any edit. Read it back with get_gameplay_effect_info.
| Parameter | Type | Required | Description |
|---|---|---|---|
ge_blueprint_path |
string | yes | Asset path of the GameplayEffect Blueprint |
component |
string | yes | asset_tags, target_tags, block_ability_tags, target_tag_requirements, chance_to_apply or granted_abilities |
tags |
array | no | asset_tags, target_tags, block_ability_tags: the gameplay tags, which replace the component's Added tags |
application_require_tags |
array | no | Optional, target_tag_requirements |
application_ignore_tags |
array | no | Optional, target_tag_requirements |
ongoing_require_tags |
array | no | Optional, target_tag_requirements |
ongoing_ignore_tags |
array | no | Optional, target_tag_requirements |
removal_require_tags |
array | no | Optional, target_tag_requirements |
removal_ignore_tags |
array | no | Optional, target_tag_requirements |
chance |
string | no | chance_to_apply: probability from 0.0 to 1.0 |
ability_path |
string | no | granted_abilities: the GameplayAbility Blueprint path or class name |
input_id |
integer | no | Optional, granted_abilities: the input ID bound to the ability |
Returns: { the reply of the tool that owns the component: the values read back, already_existed, saved }
set_gameplay_effect_duration¶
Destructive Idempotent
Set DurationPolicy on a GameplayEffect -- the class default object of a GameplayEffect Blueprint, or a native UGameplayEffect asset when no Blueprint is at that path -- and, for HasDuration, a constant DurationMagnitude of duration_seconds (Instant and Infinite leave the stored magnitude as it was), then save the asset without recompiling and without an undo entry. A bad policy, HasDuration without duration_seconds, a Blueprint that is not a GE, a path with neither, a running PIE session, a read-only root or a .uasset read-only on disk fails before any edit, and a failed save undoes the edit. old_duration_policy is read before the write; duration_seconds and duration_readback_ok come back only for HasDuration. For periodic ticks, set_gameplay_effect_period.
| Parameter | Type | Required | Description |
|---|---|---|---|
ge_blueprint_path |
string | yes | Full asset path of the GE Blueprint, or of a native UGameplayEffect asset (create_gameplay_effect_asset) |
duration_policy |
string | yes | Instant, Infinite, or HasDuration (any case) |
duration_seconds |
number | no | Duration in seconds; required when duration_policy is HasDuration, ignored for Instant and Infinite |
Returns: { ge_blueprint_path: string, native_asset: bool, old_duration_policy: string, duration_policy: string, policy_matches: bool, duration_readback_ok: bool, duration_seconds: number, set: bool }
set_gameplay_effect_modifier¶
Destructive Idempotent
Set how the modifier at modifier_index of a GameplayEffect Blueprint computes its magnitude, in one call: magnitude_type attribute_based (a captured backing_attribute, scaled as (value + pre_multiply_add) * coefficient + post_multiply_add, optionally remapped through a curve-table row and filtered by source/target tags), custom (a calculation_class, optionally remapped through a curve-table row) or set_by_caller (a data_tag or data_name resolved at runtime). Without magnitude_type, the curve or the tag filters apply to the modifier's current attribute-based or custom magnitude, as magnitude_curve_for says. Each part is validated and applied by its own step on the class default object and saved; a running PIE session, a read-only root or file fails before any edit, and the call stops at the first part refused, with applied listing those already changed. Add a modifier first with add_gameplay_effect_modifier; read it with get_gameplay_effect_info.
| Parameter | Type | Required | Description |
|---|---|---|---|
ge_blueprint_path |
string | yes | Asset path of the GameplayEffect Blueprint |
modifier_index |
integer | yes | Index of the modifier in the effect's Modifiers |
magnitude_type |
string | no | Optional: attribute_based, custom or set_by_caller (replaces the magnitude); omitted keeps it |
backing_attribute |
string | no | attribute_based: the captured attribute, e.g. "MyAttributeSet.Health" |
attribute_source |
string | no | Optional, attribute_based: Source or Target (default Source) |
calculation_type |
string | no | Optional, attribute_based: AttributeMagnitude, AttributeBaseValue, AttributeBonusMagnitude or AttributeMagnitudeEvaluatedUpToChannel |
final_channel |
integer | no | Optional, attribute_based: the evaluation channel for AttributeMagnitudeEvaluatedUpToChannel |
snapshot |
boolean | no | Optional, attribute_based: capture the attribute when the spec is created (true) or when applied |
calculation_class |
string | no | custom: the UGameplayModMagnitudeCalculation class (Blueprint path or class name) |
coefficient |
string | no | Optional, attribute_based or custom: multiplier (default 1) |
pre_multiply_add |
string | no | Optional, attribute_based or custom: added before the coefficient (default 0) |
post_multiply_add |
string | no | Optional, attribute_based or custom: added after the coefficient (default 0) |
data_tag |
string | no | set_by_caller: the gameplay tag the caller sets the magnitude under |
data_name |
string | no | set_by_caller: the name the caller sets the magnitude under, instead of data_tag |
curve_table_path |
string | no | Optional: a CurveTable whose row_name remaps the magnitude (needs row_name) |
row_name |
string | no | Optional: the row of curve_table_path |
magnitude_curve_for |
string | no | With curve_table_path and no magnitude_type: attribute_based (the AttributeCurve) or custom (the FinalLookupCurve) |
source_tags |
string | no | Optional, attribute-based: only modifiers carrying all these tags on the source count |
target_tags |
string | no | Optional, attribute-based: only modifiers carrying all these tags on the target count |
Returns: { ge_blueprint_path: string, modifier_index: int, applied: { part: that part's reply }, failed?: { label, command, error } (when a part is refused) }
set_gameplay_effect_period¶
Destructive Idempotent
Set Period (seconds between periodic executions, 0 = not periodic) and bExecutePeriodicEffectOnApplication on the class default object of a GameplayEffect Blueprint, then save it without recompiling and without an undo entry. execute_on_application is always written, so leaving it out sets false. A non-GE Blueprint, a running PIE session, a read-only root or a .uasset read-only on disk fails before any edit, and a failed save undoes the edit. For damage or heal over time also give the effect a duration with set_gameplay_effect_duration; stacking is set_gameplay_effect_stacking.
| Parameter | Type | Required | Description |
|---|---|---|---|
ge_blueprint_path |
string | yes | Full asset path of the GE Blueprint. |
period_seconds |
number | yes | Period in seconds between executions (0 = non-periodic). |
execute_on_application |
boolean | no | Optional: if true the effect also executes immediately on application (default false). |
Returns: { ge_blueprint_path, period_seconds, period_readback_ok, execute_on_application, set }
set_gameplay_effect_stacking¶
Destructive Idempotent
Write the stacking policy on the class default object of a GameplayEffect Blueprint, loaded by asset path: StackingType always, and StackLimitCount, StackDurationRefreshPolicy and StackPeriodResetPolicy only when given (omitted ones keep their values), then save it without recompiling. Policy strings match case-insensitively. Every call writes and saves, even with the same values; stacking_type, stack_limit and stacking_matches are read back. An unknown stacking_type or policy, a non-GE Blueprint, a running PIE session, a read-only root or a .uasset read-only on disk fails before any edit, and a failed save undoes the edit. Stacking only matters for effects that last: give it a duration with set_gameplay_effect_duration and a tick with set_gameplay_effect_period; the modifiers are add_gameplay_effect_modifier.
| Parameter | Type | Required | Description |
|---|---|---|---|
ge_blueprint_path |
string | yes | Full asset path of the GE Blueprint. |
stacking_type |
string | yes | None | AggregateBySource | AggregateByTarget. |
stack_limit |
integer | no | Optional max stack count (int; 0 = no limit). |
duration_refresh_policy |
string | no | Optional: RefreshOnSuccessfulApplication | NeverRefresh. |
period_reset_policy |
string | no | Optional: ResetOnSuccessfulApplication | NeverReset. |
Returns: { ge_blueprint_path, stacking_type, stack_limit, stacking_matches, set }
unregister_gameplay_tag_event¶
Destructive Idempotent
Honestly unbinds a register_gameplay_tag_event subscription (UAbilitySystemComponent::UnregisterGameplayTagEvent, AbilitySystemComponent.h) using the real FDelegateHandle captured at register time, and removes it from the registry. Idempotent: an unknown/already-removed subscription_id is a success with removed:false, not an error.
| Parameter | Type | Required | Description |
|---|---|---|---|
subscription_id |
number | yes | subscription_id returned by register_gameplay_tag_event (required) |
Returns: { subscription_id: number, removed: bool, was_registered: bool, engine_unregister_ok: bool }