G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
FGameplayTagQuery Struct Reference

An FGameplayTagQuery is a logical query that can be run against an FGameplayTagContainer. A query that succeeds is said to "match". Queries are logical expressions that can test the intersection properties of another tag container (all, any, or none), or the matching state of a set of sub-expressions (all, any, or none). This allows queries to be arbitrarily recursive and very expressive. For instance, if you wanted to test if a given tag container contained tags ((A && B) || (C)) && (!D), you would construct your query in the form ALL( ANY( ALL(A,B), ALL(C) ), NONE(D) ). More...

Public Member Functions

Functions
bool IsEmpty () const
bool Matches (FGameplayTagContainer Tags) const
FGameplayTagQuery & opAssign (FGameplayTagQuery Other)
const FString & GetDescription () const

Static Public Member Functions

Static Functions
static FGameplayTagQuery MakeQuery_MatchAllTags (FGameplayTagContainer InTags)
static FGameplayTagQuery MakeQuery_MatchNoTags (FGameplayTagContainer InTags)
static FGameplayTagQuery MakeQuery_MatchTag (FGameplayTag InTag)
static FGameplayTagQuery MakeQuery_MatchAnyTags (FGameplayTagContainer InTags)

Public Attributes

Hidden
TArray< FGameplayTag > TagDictionary
 List of tags referenced by this entire query. Token stream stored indices into this list.
TArray< uint8 > QueryTokenStream
 Stream representation of the actual hierarchical query.
FString UserDescription
 User-provided string describing the query.
FString AutoDescription
 Auto-generated string describing the query.
int TokenStreamVersion
 Versioning for future token stream protocol changes. See EGameplayTagQueryStreamVersion.
Variables
const FString Description

Static Public Attributes

Static Variables
static FGameplayTagQuery EmptyQuery

Detailed Description

An FGameplayTagQuery is a logical query that can be run against an FGameplayTagContainer. A query that succeeds is said to "match". Queries are logical expressions that can test the intersection properties of another tag container (all, any, or none), or the matching state of a set of sub-expressions (all, any, or none). This allows queries to be arbitrarily recursive and very expressive. For instance, if you wanted to test if a given tag container contained tags ((A && B) || (C)) && (!D), you would construct your query in the form ALL( ANY( ALL(A,B), ALL(C) ), NONE(D) ).

You can expose the query structs to Blueprints and edit them with a custom editor, or you can construct them natively in code.

Example of how to build a query via code: FGameplayTagQuery Q; Q.BuildQuery( FGameplayTagQueryExpression() .AllTagsMatch() .AddTag(FGameplayTag::RequestGameplayTag(FName(TEXT("Animal.Mammal.Dog.Corgi")))) .AddTag(FGameplayTag::RequestGameplayTag(FName(TEXT("Plant.Tree.Spruce")))) );

Queries are internally represented as a byte stream that is memory-efficient and can be evaluated quickly at runtime. Note: these have an extensive details and graph pin customization for editing, so there is no need to expose the internals to Blueprints.

Member Function Documentation

◆ GetDescription()

const FString & GetDescription ( ) const

◆ IsEmpty()

bool IsEmpty ( ) const

◆ MakeQuery_MatchAllTags()

FGameplayTagQuery MakeQuery_MatchAllTags ( FGameplayTagContainer InTags)
static

◆ MakeQuery_MatchAnyTags()

FGameplayTagQuery MakeQuery_MatchAnyTags ( FGameplayTagContainer InTags)
static

◆ MakeQuery_MatchNoTags()

FGameplayTagQuery MakeQuery_MatchNoTags ( FGameplayTagContainer InTags)
static

◆ MakeQuery_MatchTag()

FGameplayTagQuery MakeQuery_MatchTag ( FGameplayTag InTag)
static

◆ Matches()

bool Matches ( FGameplayTagContainer Tags) const

◆ opAssign()

FGameplayTagQuery & opAssign ( FGameplayTagQuery Other)

Member Data Documentation

◆ AutoDescription

FString AutoDescription

Auto-generated string describing the query.

◆ Description

const FString Description

◆ EmptyQuery

FGameplayTagQuery EmptyQuery
static

◆ QueryTokenStream

TArray<uint8> QueryTokenStream

Stream representation of the actual hierarchical query.

◆ TagDictionary

TArray<FGameplayTag> TagDictionary

List of tags referenced by this entire query. Token stream stored indices into this list.

◆ TokenStreamVersion

int TokenStreamVersion

Versioning for future token stream protocol changes. See EGameplayTagQueryStreamVersion.

◆ UserDescription

FString UserDescription

User-provided string describing the query.