Batch manage gameplay tags including adding, renaming, deprecating, and finding references across the codebase. Use when reorganizing tag hierarchy, renaming tags safely, or auditing tag usage. Triggers on "gameplay tag", "rename tag", "tag management", "tag refactor", "tag hierarchy", "find tag references".
Batch operations for gameplay tag management with safe refactoring support.
Process:
Tag File Locations:
Config/Tags/
├── SipherAbilitiesTags.ini # Ability-related tags
├── SipherCharacterStateTags.ini # Character state tags
├── SipherCombatTags.ini # Combat system tags
├── SipherGameplayCueTags.ini # Gameplay cue tags
└── DefaultGameplayTags.ini # General tags
Format:
[/Script/GameplayTags.GameplayTagsList]
+GameplayTagList=(Tag="Ability.Combat.HeavyAttack",DevComment="Heavy melee attack ability")
+GameplayTagList=(Tag="State.Character.Attacking",DevComment="Character is in attack animation")
Safe Rename Process:
## Tag Rename: {OldTag} → {NewTag}
### Step 1: Find All References
Search patterns:
- C++: `FGameplayTag::RequestGameplayTag(FName("{OldTag}")`
- C++: `FName("{OldTag}")`
- Blueprints: Tag property values
- DataTables: Tag columns
- Config: .ini files
### Step 2: Create Redirect
Add to DefaultGameplayTags.ini:
```ini
+GameplayTagRedirects=(OldTagName="{OldTag}",NewTagName="{NewTag}")
{List of files to update}
**Search Commands:**
```bash
# Find C++ references
grep -r "OldTagName" --include="*.cpp" --include="*.h"
# Find config references
grep -r "OldTagName" --include="*.ini"
Deprecation Process:
## Deprecate Tag: {TagName}
### Step 1: Add Redirect to Replacement
```ini
+GameplayTagRedirects=(OldTagName="{TagName}",NewTagName="{ReplacementTag}")
; DEPRECATED - Use {ReplacementTag} instead
+GameplayTagList=(Tag="{TagName}",DevComment="DEPRECATED: Use {ReplacementTag}")
{Files requiring update}
### 4. Audit Tag Usage
**Audit Report:**
```markdown
## Gameplay Tag Audit Report
### Tag Hierarchy Summary
| Root | Children | Depth | Usage Count |
|------|----------|-------|-------------|
| Ability | {N} | {N} | {N} |
| State | {N} | {N} | {N} |
| Effect | {N} | {N} | {N} |
### Unused Tags
Tags defined but never referenced:
| Tag | Defined In | Last Modified |
|-----|------------|---------------|
| {Tag} | {File} | {Date} |
### Orphan References
Tags referenced but not defined:
| Tag | Referenced In | Line |
|-----|---------------|------|
| {Tag} | {File} | {N} |
### Duplicate Definitions
Tags defined in multiple files:
| Tag | Files |
|-----|-------|
| {Tag} | {Files} |
### Naming Convention Violations
| Tag | Issue | Suggested |
|-----|-------|-----------|
| {Tag} | {Issue} | {Fix} |
Ability.
├── Combat.
│ ├── Light.{AbilityName}
│ ├── Heavy.{AbilityName}
│ └── Special.{AbilityName}
├── Movement.
│ ├── Dash
│ ├── Jump
│ └── Dodge
├── Cooldown.{AbilityName}
└── Blocked.By.{Reason}
State.
├── Character.
│ ├── Alive
│ ├── Dead
│ └── Stunned
├── Combat.
│ ├── Attacking
│ ├── Blocking
│ └── Parrying
├── Ability.{AbilityName}.Active
└── Effect.{EffectName}
Effect.
├── Damage.
│ ├── Physical
│ └── Elemental.{Type}
├── Buff.{BuffName}
├── Debuff.{DebuffName}
└── Status.{StatusName}
GameplayCue.
├── Character.
│ ├── Hit.{Type}
│ └── Death
├── Ability.{AbilityName}
└── Effect.{EffectName}
// Script to add multiple tags
TArray<FString> NewTags = {
"Ability.Combat.NewAttack1",
"Ability.Combat.NewAttack2",
"State.Effect.NewStatus"
};
for (const FString& Tag : NewTags)
{
// Add to appropriate ini file
AddTagToConfig(Tag, GetTagCategory(Tag));
}
## Batch Rename Operation
| Old Tag | New Tag | References |
|---------|---------|------------|
| {Old1} | {New1} | {N} files |
| {Old2} | {New2} | {N} files |
### Generated Redirects
```ini
+GameplayTagRedirects=(OldTagName="{Old1}",NewTagName="{New1}")
+GameplayTagRedirects=(OldTagName="{Old2}",NewTagName="{New2}")
{Consolidated file list}
### Find References
```markdown
## Tag Reference Report: {TagName}
### C++ References
| File | Line | Context |
|------|------|---------|
| {File} | {N} | {Code snippet} |
### Blueprint References
| Asset | Property |
|-------|----------|
| {Asset} | {Property path} |
### Config References
| File | Line |
|------|------|
| {File} | {N} |
### DataTable References
| Table | Row | Column |
|-------|-----|--------|
| {Table} | {Row} | {Column} |
### Total: {N} references in {N} files
| Rule | Check | Severity |
|---|---|---|
| Unique | No duplicate definitions | Error |
| Hierarchy | Parent tag exists | Warning |
| Naming | Follows convention | Warning |
| Reference | All references valid | Error |
| Redirect | No circular redirects | Error |