Gateway Library

Gateway Library is a Blueprint Function Library that serves as the primary API for the plugin. Most cases should use it's functions to perform any mutations.
Function Description
Core
GetGatewayComponent Returns the UGatewayComponent attached to a given APlayerState. Returns nullptr if the PlayerState is null or has no GatewayComponent attached.
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.
SwitchSlotForPlayer Server-side only. Sends a Client_SwitchSlot RPC to the owning client for the given PlayerState, triggering a save-slot switch by SlotName. Logs a warning and returns early if called without authority.
GetGatewaySettings Returns the singleton UGatewaySettings CDO. Use this to access global configuration such as StatDefinitions, ChallengeDefinitions, and RewardDefinitions asset references.
Function Description
Stats — 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.
GetStatForPlayer Returns the FGatewayStat matching the given StatID tag for a specific PlayerState. Returns a default-constructed FGatewayStat if the component is not found.
GetAllStatsForPlayer Returns the complete TArray<FGatewayStat> from the player's GatewayStatsProvider. Logs a warning and returns an empty array if either the component or the StatsProvider is null.
GetStatsWithTagForPlayer Returns all stats whose definition carries the given Tag. Useful for filtering stats by category — for example, retrieving all stats tagged Gateway.Category.Combat at once.
Function Description
Stats — Mutate Single Stat
UpdateStatForPlayer Applies a stat update to a single player using the stat's configured Update Policy. The Value is processed according to that policy (e.g. accumulated, compared, counted) rather than set directly.
UpdateStatsWithTagForPlayer Applies Value to every stat on a single player that carries the given Tag. Each matching stat processes the value through its own Update Policy independently.
UpdateStatForPlayers Convenience overload. Calls UpdateStatForPlayer for each entry in a provided PlayerStates array. Useful for applying a uniform stat update to a specific subset of players simultaneously.
UpdateStatForAllPlayers Applies a stat update to every player currently in the game by iterating GetAllGatewayComponents. The same StatID and Value are applied to all components.
SetStatForPlayer Directly sets the stat value on a single player, 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.
ResetStatForPlayer Resets a single stat identified by StatID back to its default value for one player. The default is defined in the stat's FGatewayStatDefinition.
ResetStatForPlayers Convenience overload. Calls ResetStatForPlayer for each entry in a provided PlayerStates array.
ResetStatForAllPlayers Resets a single stat to its default for every player currently in the game. Commonly used at end-of-round to clear per-round stats like Match Damage before a new session begins.
Function Description
Stats — Mutate Multiple Stats
UpdateStatsForPlayer Applies a batch of FGatewayStatUpdate entries to a single player in one call. Prefer this over calling UpdateStatForPlayer in a loop when updating multiple stats at the same time.
UpdateStatsForPlayers Applies a batch of FGatewayStatUpdate entries to each player in a provided PlayerStates array.
UpdateStatsWithTagForPlayers Applies Value to all stats matching Tag across a specific subset of players.
UpdateStatsForAllPlayers Applies a batch of FGatewayStatUpdate entries to every player in the game. Each player processes the batch through their own GatewayStatsProvider.
UpdateStatsWithTagForAllPlayers Applies Value to all stats matching Tag for every player in the game.
ResetStatsForAllPlayers Resets a specific list of StatIDs for every player. Useful for selectively clearing a known set of stats without touching others — e.g. resetting only the stats relevant to the completed round.
ResetAllStatsForPlayer Resets every stat on a single player back to its default value. A full wipe of one player's stat state.
ResetAllStatsForAllPlayers Resets every stat for every player in the game. A full wipe of all stat state — typically used when starting a fresh game session from a completely clean state.
ResetStatsWithTagForPlayer Resets all stats matching Tag back to default for a single player. Mirrors the tag-based access pattern for targeted resets.
ResetStatsWithTagForAllPlayers Resets all stats matching Tag back to default for every player in the game.
Function Description
Challenges
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.
GetChallengeForPlayer Returns the FGatewayChallenge matching the given ChallengeID tag for a specific player. Returns a default-constructed value if the component is not found.
GetAllChallengesForPlayer Returns the complete TArray<FGatewayChallenge> from the player's GatewayChallengesProvider.
CompleteChallengeForPlayer Marks the challenge identified by ChallengeID as complete for the given player. Typically triggers any downstream reward or event logic defined in the ChallengesProvider.
ResetChallengeForPlayer Resets a single challenge back to its initial state for one player — clearing completion status and resetting any tracked progress.
ResetAllChallengesForPlayer Resets every challenge for a single player. Useful for resetting a player's challenge progress at the start of a new game or season.
CompleteAllChallengesForPlayer Marks every challenge as complete for a single player. Primarily a development/cheat utility for testing reward pipelines without manually fulfilling each challenge.
Function Description
Rewards
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.
GetRewardForPlayer Returns the FGatewayReward matching the given RewardID tag for a specific player. Returns a default-constructed value if the component is not found.
GetAllRewardsForPlayer Returns the complete TArray<FGatewayReward> from the player's GatewayRewardsProvider.
GrantRewardForPlayer Grants the reward identified by RewardID to a single player. The RewardsProvider handles marking it as granted and firing any associated events.
GrantRewardsForPlayer Grants multiple rewards in one call by passing an array of RewardIDs to a single player's GatewayRewardsProvider.
ResetRewardForPlayer Revokes and resets a single reward for one player — clearing its granted state. Useful for time-limited rewards or re-earnable content.
ResetAllRewardsForPlayer Revokes and resets every reward for a single player.
GrantAllRewardsForPlayer Grants every defined reward to a single player. Like CompleteAllChallengesForPlayer, this is primarily a development/cheat utility for quickly validating reward display and unlock logic.