Gateway Library

Gateway Library is a Blueprint Function Library that serves as the primary API for the plugin. Most cases should use its functions to perform any mutations or queries.
info
Many mutation functions in the library accept a FGatewayTarget instead of a specific player reference. A target encapsulates who to operate on — a single component, a filtered subset, or every player in the game — so one function handles all targeting scenarios without requiring separate overloads.

Core

Function Description
GetGatewayComponent Returns the UGatewayComponent attached to a given APlayerState. Returns nullptr if the PlayerState is null or has no GatewayComponent attached.
GetGatewayComponentForPlayerController Convenience accessor. Resolves the APlayerState from the given APlayerController and returns its UGatewayComponent. Returns nullptr if the controller or its PlayerState is null.
GetGatewayComponentForCharacter Convenience accessor. Resolves the APlayerController and then the APlayerState from the given ACharacter and returns its UGatewayComponent. Returns nullptr if any step in the chain is null.
GetAllGatewayComponents Iterates all PlayerStates registered in the current GameState and returns every UGatewayComponent found. Returns an empty array if the world or GameState is unavailable.
SwitchSlot Sends a slot-switch request to all players resolved by the given FGatewayTarget, triggering a save-slot switch by SlotName on each target. Should only be called with server authority.
GetGatewaySettings Returns the singleton UGatewaySettings CDO. Use this to access global configuration such as StatDefinitions, ChallengeDefinitions, and RewardDefinitions asset references.

Stats

Function Description
Access
GetAllStatIDs Loads every UGatewayStatData asset referenced in Settings and returns a deduplicated array of FGameplayTag IDs. Useful for enumerating all known stats without needing a component instance.
GetAllStatDefinitions Returns a TMap<FGameplayTag, FGatewayStatDefinition> built from all loaded StatData assets. Duplicate IDs are skipped with the first occurrence winning. A checkf fires in development if any definition has an invalid tag.
GetStat Returns the FGatewayStat matching the given StatID tag from the provided UGatewayComponent. Returns a default-constructed FGatewayStat if the component is null or the stat is not found.
GetStats Returns the complete TArray<FGatewayStat> from the given component's stats provider. Logs a warning and returns an empty array if the component or provider is null.
GetStatsWithTag Returns all stats from the given component whose definition carries the specified Tag. Useful for filtering by category — for example, retrieving all stats tagged Gateway.Category.Combat at once.
GetStatValue Returns the raw float value of the stat matching StatID on the given component. Convenience shorthand for GetStat when you only need the numeric value and don't require the full FGatewayStat struct.
GetStatExtension Returns the first extension on the given FGatewayStat matching ExtensionClass, cast to the requested type. Uses DeterminesOutputType so Blueprint receives the correctly typed object pin.
GetStatExtensions Returns all extensions on the given FGatewayStat that match ExtensionClass. Useful when a stat carries multiple instances of the same extension type.
Mutate
UpdateStat Applies a stat update to all players resolved by the FGatewayTarget, using the stat's configured Update Policy. The Value is processed according to that policy (e.g. accumulated, compared, counted) rather than set directly. See the Update Policies section for details.
UpdateStats Applies a batch of FGatewayStatUpdate entries to all players resolved by the target in one call. Prefer this over calling UpdateStat in a loop when updating multiple stats at the same time.
UpdateStatsWithTag Applies Value to every stat carrying the given Tag across all players resolved by the target. Each matching stat processes the value through its own Update Policy independently. Useful for updating a whole group of related stats — for example, all damage stats — in one call.
SetStat Directly sets the stat value for all players resolved by the target, bypassing the Update Policy. Use this when you need an exact override rather than a policy-driven mutation — e.g. restoring a stat from an external save source.
ResetStats Resets a specific set of stats identified by StatIDs back to their default values for all players resolved by the target. Useful for selectively clearing a known set without touching others.
ResetAllStats Resets every stat back to its default for all players resolved by the target. Typically used when starting a completely fresh session.
ResetStatsWithTag Resets all stats carrying the given Tag back to their defaults for all players resolved by the target. A common use case is resetting all stats tagged Gateway.Stats.Persistence.Match at the start of a new match without touching lifetime stats.

Challenges

Function Description
Access
GetAllChallengeIDs Loads every UGatewayChallengeData asset referenced in Settings and returns a deduplicated array of FGameplayTag IDs.
GetAllChallengeDefinitions Returns a TMap<FGameplayTag, FGatewayChallengeDefinition> from all loaded ChallengeData assets. Duplicate IDs are skipped. A checkf fires in development if any definition has an invalid tag.
GetChallenge Returns the FGatewayChallenge matching the given ChallengeID tag from the provided component. Returns a default-constructed value if the component is null or the challenge is not found.
GetChallenges Returns the complete TArray<FGatewayChallenge> from the given component's challenges provider.
GetChallengesWithTag Returns all challenges from the given component whose definition carries the specified Tag. Useful for querying a category of challenges — for example, retrieving all challenges tagged Gateway.Category.Daily at once.
GetCompletedChallenges Returns only the challenges marked complete on the given component. Saves callers from filtering the full challenge array manually.
GetProceduralChallenges Returns all currently registered procedural challenges on the given component — i.e. those injected at runtime rather than loaded from a UGatewayChallengeData asset.
GetTotalChallengeCount Returns the total number of challenges registered on the given component as an int32. Useful for progress UI without pulling the full array.
GetCompletedChallengeCount Returns the number of completed challenges on the given component as an int32. Pair with GetTotalChallengeCount to derive a completion percentage.
IsChallengeComplete Returns true if the challenge identified by ChallengeID is currently marked complete on the given component. Delegates to the challenges provider's completion check.
Conditions
IsConditionSatisfied Evaluates a single FGatewayChallengeCondition against the given component's current stat values. Returns true if the condition's ComparisonPolicy is satisfied. Useful for checking individual conditions outside of the normal challenge evaluation flow.
GetConditionCompletionPercent Returns a float in the 0.0–1.0 range representing how far toward completion the given condition is, based on the component's current stat value. Useful for driving progress bars on individual condition steps.
IsConditionBinary Returns true if the given condition has no meaningful intermediate progress — i.e. it is either fully satisfied or not. Use this to decide whether to show a progress bar or a simple check mark for a condition in UI.
Extensions
GetChallengeExtension Returns the first extension on the given FGatewayChallenge matching ExtensionClass, cast to the requested type. Uses DeterminesOutputType so Blueprint receives the correctly typed object pin.
GetChallengeExtensions Returns all extensions on the given FGatewayChallenge that match ExtensionClass.
Mutate
CompleteChallenges Marks the challenges identified by ChallengeIDs as complete for all players resolved by the target. Typically triggers any downstream reward or event logic defined in the challenges provider.
CompleteAllChallenges Marks every challenge as complete for all players resolved by the target. Primarily a development and cheat utility for testing reward pipelines without manually fulfilling each challenge.
CompleteChallengesWithTag Marks all challenges carrying the given Tag as complete for all players resolved by the target.
ResetChallenges Resets the challenges identified by ChallengeIDs back to their initial state for all players resolved by the target — clearing completion status and any tracked progress.
ResetAllChallenges Resets every challenge for all players resolved by the target. Useful for wiping challenge progress at the start of a new game or season.
ResetChallengesWithTag Resets all challenges carrying the given Tag for all players resolved by the target.
Procedural
RegisterProceduralChallenge Registers a runtime-constructed FGatewayChallenge on all players resolved by the target. Use this to inject challenges that are not defined in a UGatewayChallengeData asset — for example, encounter-specific or roguelike run challenges generated at runtime.
UnregisterProceduralChallenge Removes the procedural challenge identified by ChallengeID from all players resolved by the target.
UnregisterAllProceduralChallenges Removes all procedural challenges from all players resolved by the target. Does not affect challenges loaded from data assets.
UnregisterAllProceduralChallengesWithTag Removes all procedural challenges carrying the given Tag from all players resolved by the target. Useful for clearing a specific group of procedural challenges — for example, all challenges belonging to a completed encounter or dungeon floor.

Rewards

Function Description
Access
GetAllRewardIDs Loads every UGatewayRewardData asset referenced in Settings and returns a deduplicated array of FGameplayTag IDs.
GetAllRewardDefinitions Returns a TMap<FGameplayTag, FGatewayRewardDefinition> from all loaded RewardData assets. Duplicate IDs are skipped. A checkf fires in development if any definition has an invalid tag.
GetReward Returns the FGatewayReward matching the given RewardID tag from the provided component. Returns a default-constructed value if the component is null or the reward is not found.
GetAllRewards Returns the complete TArray<FGatewayReward> from the given component's rewards provider.
GetRewardsWithTag Returns all rewards from the given component whose definition carries the specified Tag. Useful for querying a category of rewards without filtering the full array manually.
GetGrantedRewards Returns only the rewards that have been granted to the given component's player. Saves callers from filtering the full reward array manually.
GetTotalRewardCount Returns the total number of rewards registered on the given component as an int32. Useful for progress UI without pulling the full array.
GetGrantedRewardCount Returns the number of granted rewards on the given component as an int32. Pair with GetTotalRewardCount to derive a completion percentage.
IsRewardGranted Returns true if the reward identified by RewardID has been granted on the given component.
Extensions
GetRewardExtension Returns the first extension on the given FGatewayReward matching ExtensionClass, cast to the requested type. Uses DeterminesOutputType so Blueprint receives the correctly typed object pin.
GetRewardExtensions Returns all extensions on the given FGatewayReward that match ExtensionClass.
Mutate
GrantRewards Grants the rewards identified by RewardIDs to all players resolved by the target. The rewards provider handles marking them as granted and firing any associated events.
GrantAllRewards Grants every defined reward to all players resolved by the target. Like CompleteAllChallenges, this is primarily a development utility for quickly validating reward display and unlock logic.
GrantRewardsWithTag Grants all rewards carrying the given Tag to all players resolved by the target.
ResetRewards Revokes and resets the rewards identified by RewardIDs for all players resolved by the target — clearing their granted state. Useful for time-limited rewards or re-earnable content.
ResetAllRewards Revokes and resets every reward for all players resolved by the target.
ResetRewardsWithTag Revokes and resets all rewards carrying the given Tag for all players resolved by the target.