Skip to content
Games by Hyper
Sign Up / Login
Games by Hyper

Generic

  • QuickStart
  • Support
  • Purchase Options
  • Roadmap
  • FAQ
  • Learning
  • For Professional Studios

Templates

  • Template Logic and flexibility

Shared Infrastructure

  • Gameplay Tags
  • Datamanagement
  • Folder Structure

Item Management

  • Inventory
  • Jigsaw Inventory
  • List Inventory
  • Respawn Actor Manager
  • Hotbar
  • Crafting
  • Item Allocator
  • Vendor
  • Icon Creator
  • Interactive Foliage
  • Inspection System

Interaction and Feedback

  • Interaction System
  • Outliner System

UI

  • Main Menu
  • HUD
  • Information Prompt

Locomotion

  • Animation Framework
  • Extended Movement Component
  • Leader Posing
  • Custom-Skeletal-Meshes

Combat

  • Attribute Manager
  • Team Affiliation
  • Equipment Manager
  • Ragdoll System
  • Ability System
  • Target Locking
  • Weapon Attachment System
  • Limb System
  • Combat-framework

Construction and Survival Mechanics

  • Building System
  • Mineable Rocks
  • Tree Cutting
  • Farming System
  • Fishing System
  • Swimming System

Game Management

  • Global Save System
  • Respawn System
  • Session Manager
  • Game Mode System
  • Spectate System
  • Player Manager
  • Team Manager
  • Score Manager
  • Guild Manager
  • Party Manager

Multiplayer

  • Online Multiplayer Framework
  • Replication Subsystem
  • Chat System
  • Console Command Manager

AI

  • Basic AI
  • NPC Behavior System
  • Perception System
  • Companion System

Exploration and Narrative

  • Dialogue System
  • Memory System
  • Quest Manager
  • Map System
  • Teleport System
  • Guide System
  • Event Manager
  • Visual Novel System
  • Dungeon Adventure Kit
  • Region Manager

Progression and Leveling

  • Level Manager
  • Unlock System
  • Reputation System

Security and Control Systems

  • Drone System
  • Lock System
  • Security System
  • Defense System
  • Defense System – Modern
  • Defense System – Primitive

Character and Player Systems

  • Character Creator
  • Class System
  • Mount System
  • First Person

Environmental Control and Immersion

  • Time and Day Night Cycle management
  • Weather System
  • Background Music System
  • Footstep System

Environment Building

  • Mesh to Actor Swap System
  • Auto Landscape
  • Cave
  • Deform
  • Ditch
  • Exclusion
  • Forest
  • Forest-Basic
  • Lake
  • Level Instances
  • Mesh
  • Path
  • Props
  • Spline
  • Village
View Categories
  • Home
  • Docs
  • Team Affiliation

Team Affiliation

9 min read

Team Affiliation #

  • Overview
  • Core Concepts
    • What is Team Affiliation?
    • Use Cases
    • Gameplay Tag Based System
  • Components
    • Gameplay Tag Component
    • Affiliation Tags
  • Setting Up Team Affiliation
    • On Characters (AI/NPCs)
    • On Player Controller
    • On Player Character
  • Checking Affiliation
    • Is Affiliated Function
    • Common Use Cases
  • Integration with Other Systems
    • Attribute Manager (Damage Prevention)
    • Vendor System (Discounts)
    • AI Behavior
  • Example Implementations
    • Call of Duty Style Teams
    • RPG Faction System
    • Dynamic Alliances
  • How To Guides
    • Setting Up Team-Based Shooter
    • Setting Up Faction-Based RPG
    • Creating Custom Affiliation Logic
  • OVERVIEW

The Team Affiliation System is a lightweight, tag-based system that determines relationships between characters. It enables complex gameplay mechanics based on whether characters share affiliations.

Core Features:

  • Gameplay tag based affiliation
  • Works on Characters, Player Controllers, and AI
  • Integrates with damage, vendor, and AI systems
  • Simple to implement, powerful in application
  • No complex team management required

Common Applications:

  • Team-based shooters (Call of Duty style)
  • Faction systems (RPG guilds, clans)
  • Friend/enemy AI relationships
  • Vendor discounts for allies
  • Quest access based on reputation
  • Multiplayer team coordination

The system uses Gameplay Tag Components to store affiliation tags. Characters with matching tags are considered affiliated.

See Also: Gameplay Tag Component documentation for details on tag container management.

Core concepts #

What is Team Affiliation? #

Team affiliation determines whether two actors (characters, players, AI) belong to the same group or faction.

Affiliation Check:

Actor A has tag: Team.Chaos

Actor B has tag: Team.Chaos

Result: Affiliated (same team)

Actor A has tag: Team.Chaos

Actor C has tag: Team.Order

Result: Not Affiliated (different teams)

Key Principle:

If two actors share at least one affiliation tag, they are affiliated. The system compares gameplay tag containers to determine this.

Flexibility:

Actors can have multiple affiliation tags:

Player has tags:

  • Team.BlueTeam
  • Faction.Merchant
  • Guild.Blacksmiths

NPC has tags:

  • Faction.Merchant

Result: Affiliated (both have Faction.Merchant)

This allows for complex relationships like alliances, guilds, and sub-factions.

Use Cases #

Team-Based Shooters (Call of Duty, Battlefield):

  • Prevent friendly fire between teammates
  • Shared objectives and spawn points
  • Team-based scoring
  • Enemy identification

RPG Faction Systems (Skyrim, Fallout):

  • Guild memberships
  • City allegiances
  • Dynamic reputation
  • Faction-specific vendors and quests

Multiplayer Coordination:

  • Clan/party systems
  • Raid groups
  • PvP teams
  • Alliance mechanics

AI Behavior:

  • Friendly AI won't attack affiliated players
  • Guards attack hostile factions
  • Civilians flee from enemies
  • Allies provide assistance

Vendor Integration:

  • Discounts for faction members
  • Exclusive items for allies
  • Reputation-based pricing
  • Guild shops

Gameplay Tag Based System #

The team affiliation system uses Gameplay Tags stored in Gameplay Tag Components.

Why Gameplay Tags?

  • Flexible and extensible
  • No hardcoded team IDs or enums
  • Easy to add new factions at runtime
  • Designer-friendly
  • Network-replicated automatically

Tag Hierarchy:

You can organize affiliation tags hierarchically:

Team

├─ Team.BlueTeam
├─ Team.RedTeam
└─ Team.GreenTeam

Faction

├─ Faction.Empire
├─ Faction.Rebels
└─ Faction.Neutral

Guild

├─ Guild.Warriors
├─ Guild.Mages
└─ Guild.Thieves

Tag Matching:

The system checks for ANY matching tag between actors. Partial hierarchy matches work too (if configured in gameplay tag settings).

See Also: Gameplay Tag Component documentation for full tag container details.

Components #

Gameplay Tag Component #

The Gameplay Tag Component stores affiliation tags for an actor.

Component Location:

Add the Gameplay Tag Component to:

  • Player Controller: For persistent player affiliation (survives respawn, saved/loaded)
  • Character: For AI/NPC affiliation or temporary player affiliation
  • Any Actor: System works on any actor with the component

Tag Container:

The component contains a Gameplay Tag Container that stores all affiliation tags for that actor.

Adding Tags at Design Time:

  • Select actor with Gameplay Tag Component
  • Find Gameplay Tags section
  • Add tags to container

Adding Tags at Runtime:

Replication:

The Gameplay Tag Component automatically replicates tags to clients in multiplayer, ensuring all players see correct affiliations.

Affiliation Tags #

Affiliation tags identify which team, faction, or group an actor belongs to.

Tag Naming Convention:

  • Team Tags: Team.BlueTeam, Team.RedTeam, Team.Chaos, Team.Order
  • Faction Tags: Faction.Empire, Faction.Rebels, Faction.Merchants
  • Guild Tags: Guild.Warriors, Guild.Mages, Guild.Assassins
  • Custom Tags: Any hierarchy you define

Creating Affiliation Tags:

  • Open Project Settings → Gameplay Tags
  • Create parent tag (e.g., “Team”)
  • Add child tags (e.g., “Team.BlueTeam”, “Team.RedTeam”)
  • Use these tags in Gameplay Tag Components

Multiple Affiliations:

Actors can have multiple tags for complex relationships:

Character Tags:

  • Team.BlueTeam (main team)
  • Faction.Military (faction)
  • Guild.Snipers (specialization)

This character is affiliated with:

  • All BlueTeam members
  • All Military faction members
  • All Sniper guild members

Setting up team affiliation #

On Characters (AI/NPCs) #

For AI characters and NPCs with static affiliations, add tags directly to the character blueprint.

Setup Steps:

  • Open character blueprint (e.g., BP_Enemy_Chaos)
  • Add Gameplay Tag Component (if not already present)
  • In component details, add affiliation tags
  • Example: Add “Team.Chaos” tag

When to Use:

  • AI that belong to fixed factions
  • NPCs with permanent allegiances
  • Enemies in specific areas
  • Static world characters
Important – Respawn Behavior:

If the character dies and respawns, tags added to the character will persist. However, if you want tags to reset on death, handle this in your respawn logic.

Example – Enemy AI:

BP_Enemy_Chaos:

  • Gameplay Tag Component
 - Tags: Team.Chaos

BP_Enemy_Order:

  • Gameplay Tag Component
 - Tags: Team.Order

Chaos enemies won't attack each other, but will attack Order enemies.

On Player Controller #

For player affiliations that should persist through death and be saved/loaded, add tags to the Player Controller.

Setup Steps:

  • Open player controller blueprint (e.g., BP_PlayerController)
  • Add Gameplay Tag Component (if not already present)
  • Add affiliation tags in BeginPlay or when joining team
  • Save/load tags with player data

When to Use:

  • Multiplayer team assignments
  • Persistent faction memberships
  • Saved player allegiances
  • Cross-session affiliations

Advantages:

  • Survives character death/respawn
  • Can be saved and loaded
  • Persists across level transitions
  • Easy to modify at runtime
Example – Multiplayer Team Assignment:

On Player Join Server:

  1. Assign player to team (Blue or Red)
  2. Add corresponding tag to Player Controller
 - Team.BlueTeam OR Team.RedTeam
  1. Tag persists until player leaves or changes team

Runtime Tag Modification:

Player joins Team Blue:

  • Add Gameplay Tag: Team.BlueTeam

Player switches to Team Red:

  • Remove Gameplay Tag: Team.BlueTeam
  • Add Gameplay Tag: Team.RedTeam

On Player Character #

For temporary or respawn-reset affiliations, add tags to the player character.

Setup Steps:

  • Open player character blueprint (e.g., BP_PlayerCharacter)
  • Add Gameplay Tag Component (if not already present)
  • Add affiliation tags

When to Use:

  • Temporary disguises or infiltration mechanics
  • Testing/debugging
  • Single-player with no save system
  • Affiliations that should reset on death
Important – Death Behavior:

Tags on the character will reset when the character dies and a new character is spawned (unless you manually transfer tags).

Example – Disguise Mechanic:

Player wears enemy uniform:

  1. Add Tag: Faction.Enemy (to character)
  2. Enemies treat player as ally
  3. On death or disguise removal, tag is removed
  4. Player reverts to original faction

Choosing Player Controller vs Character:

  • Player Controller: Persistent affiliation (recommended for most games)
  • Character: Temporary affiliation or single-player without save system

Checking affiliation #

Is Affiliated Function #

The core function of the team affiliation system is Is Affiliated.

How It Works:

  • Get Gameplay Tag Component from Actor A
  • Get Gameplay Tag Component from Actor B
  • Compare tag containers
  • If ANY tag matches between containers, return true
  • If no matching tags, return false
Example Usage:

Attacker shoots Target:

  1. Check Is Affiliated(Attacker, Target)
  2. If true (same team):
 - Prevent damage (friendly fire disabled)
 OR
 - Apply reduced damage (friendly fire enabled)
  1. If false (different teams):
 - Apply full damage

Blueprint Implementation:

The function is available as a blueprint node and can be called from anywhere:

  • Weapon logic
  • AI behavior trees
  • Damage calculations
  • Vendor interactions
  • Quest systems

Common Use Cases #

The team affiliation system provides the foundation for many gameplay mechanics. Here are some possibilities:

Friendly Fire Prevention:

On Apply Damage:

  1. Is Affiliated(Attacker, Victim)?
  2. If true → Block damage
  3. If false → Apply damage

This is implemented and used by the damage system to prevent friendly fire when enabled.

AI Target Selection:

AI looking for target:

  1. Get all nearby actors
  2. For each actor:
 - Is Affiliated(Self, Actor)?
 - If false → Valid target
 - If true → Ignore (ally)
  1. Select closest valid target

This is implemented in AI behavior to ensure AI only targets non-affiliated actors.

Vendor Discounts (Example):

Player opens vendor:

  1. Is Affiliated(Player, Vendor)?
  2. If true → Apply faction discount
  3. If false → Standard prices

Quest Access (Example):

Player interacts with quest giver:

  1. Is Affiliated(Player, QuestGiver)?
  2. If true → Show faction quests
  3. If false → Show generic quests or deny access

Door/Area Access (Example):

Player approaches restricted door:

  1. Is Affiliated(Player, DoorFaction)?
  2. If true → Allow entry
  3. If false → Door locked

These are just examples of how you can use the affiliation system in your own implementations.


Integration with other systems #

The team affiliation system is designed to integrate with other gameplay systems. The Is Affiliated function can be called from any system to check relationships between actors.

Damage Systems:

Check affiliation before applying damage to implement friendly fire prevention or reduced friendly damage.

AI Systems:

Use affiliation checks in AI behavior trees to determine valid targets and allies.

Vendor Systems:

Implement faction-based pricing by checking if player is affiliated with vendor.

Quest Systems:

Gate quest availability based on player affiliation with quest givers.

Access Control:

Use affiliation to control access to doors, areas, or features.

The affiliation system provides the relationship data – you implement the specific behavior in your own systems.


Example implementations #

Call of Duty Style Teams #

Team-based multiplayer shooter with two teams.

Setup:

  • Create gameplay tags:
    • Team.BlueTeam
    • Team.RedTeam
  • On player join:
    • Assign to team based on balance
    • Add tag to Player Controller
  • Implement friendly fire prevention in your damage system using Is Affiliated check
  • Configure spawn points by team

Result:

  • Blue team members are affiliated with each other
  • Red team members are affiliated with each other
  • Blue team is not affiliated with Red team
  • Team identification in UI

Team Switching:

On Switch Team:

  1. Remove old team tag
  2. Add new team tag
  3. Respawn player at new team spawn

RPG Faction System #

Dynamic faction system with multiple guilds and reputations.

Setup:

  • Create faction tags:
    • Faction.Empire
    • Faction.Rebels
    • Faction.Merchants
    • Guild.Warriors
    • Guild.Mages
    • etc.
  • NPCs have static faction tags on their characters
  • Player gains/loses faction tags through quests and actions
  • Player Controller stores current faction tags

Dynamic Affiliation:

Player completes Empire quest:

  • Add Tag: Faction.Empire
  • Remove Tag: Faction.Rebels (if present)

Player joins Warrior Guild:

  • Add Tag: Guild.Warriors
  • Can stack with Faction.Empire

Implementation Examples:

  • Use affiliation checks to determine AI hostility
  • Implement faction-based vendor pricing
  • Gate quest availability
  • Control area access


How to guides #

Setting Up Faction-Based RPG #

Step 1: Create Faction Tags #

  • Open Project Settings → Gameplay Tags
  • Create faction hierarchy:
 Faction
 ├─ Faction.Empire
 ├─ Faction.Rebels
 ├─ Faction.Merchants
 └─ Faction.Neutral

 Guild
 ├─ Guild.Warriors
 ├─ Guild.Mages
 └─ Guild.Thieves

Step 2: Add Tags to NPCs #

  • Open NPC character blueprints
  • Add Gameplay Tag Component
  • Add appropriate faction tags:
 Empire Guard:
 - Faction.Empire

 Rebel Scout:
 - Faction.Rebels

 Merchant NPC:
 - Faction.Merchants

Step 3: Add Component to Player Controller #

  • Open BP_PlayerController
  • Add Gameplay Tag Component
  • Player starts with no faction (or default faction)

Step 4: Create Faction Join System #

  • Create faction join quest/interaction
  • On join faction:
 Join Empire:
 - Add Tag: Faction.Empire
 - Remove any conflicting tags (Faction.Rebels)
 - Save player data

Step 5: Implement Faction Benefits #

  • AI Behavior: Use Is Affiliated to determine targeting
  • Vendor Systems: Check affiliation for pricing
  • Quest Systems: Check affiliation for quest availability

Step 6: Test Faction Interactions #

  • Join a faction
  • Verify faction NPCs are friendly
  • Check enemy factions are hostile
  • Test vendor discounts
  • Verify faction quests appear

Creating Custom Affiliation Logic #

You can extend the affiliation system with custom logic beyond simple tag matching.

Example – Reputation-Based Benefits:

Check Affiliation with Reputation:

  1. Is Affiliated(Player, NPC)?
  2. If true:
 - Get reputation level from player data
 - Apply benefits based on reputation level
  1. If false:
 - No benefits
Example – Conditional Affiliation:

Complex Affiliation:

  1. Check Is Affiliated(A, B)
  2. Additional checks:
 - Both must be in same area
 - Event flag must be active
 - Time of day restriction
  1. Return combined result

This allows for context-sensitive affiliations beyond simple tag matching.

What are your Feelings
Still stuck? How can we help?

How can we help?

Table of Contents
  • Team Affiliation
    • Core concepts
      • What is Team Affiliation?
      • Use Cases
      • Gameplay Tag Based System
    • Components
      • Gameplay Tag Component
      • Affiliation Tags
    • Setting up team affiliation
      • On Characters (AI/NPCs)
      • On Player Controller
      • On Player Character
    • Checking affiliation
      • Is Affiliated Function
      • Common Use Cases
    • Integration with other systems
    • Example implementations
      • Call of Duty Style Teams
      • RPG Faction System
    • How to guides
      • Setting Up Faction-Based RPG
      • Step 1: Create Faction Tags
      • Step 2: Add Tags to NPCs
      • Step 3: Add Component to Player Controller
      • Step 4: Create Faction Join System
      • Step 5: Implement Faction Benefits
      • Step 6: Test Faction Interactions
      • Creating Custom Affiliation Logic

© 2026 Games by Hyper

X Reddit Patreon Discord Linkedin YouTube

Review Cart

No products in the cart.

  • Hyper Bundle Configurator
  • Shop
    • Game Templates
    • Courses
    • Loyalty Store
    • Survival Modules
    • RPG Modules
    • Environment Building
    • Browse All
  • My account
  • Become a Member
  • Cart
  • Get Help
    • FAQ
    • Upgrade your Game Template
    • Documentation
  • About Hyper
  • News & Updates