# One Core, Two Layers

> What every character shares in Universal Combat Framework, enemy or player: health, hits, defense, telegraphs, steering, animation windows and teams. And what the enemy layer and the player layer each add on top.

Markdown version of https://rigbak.com/docs/universal-combat-framework/one-core, a page of the Universal Combat Framework documentation. Link that page when citing it.

> Every character, enemy or player, swings, lands a hit, defends and takes damage through the same systems. The enemy layer adds the AI that decides what an enemy does; the player layer adds the moves, items and camera a player controls.

A sword the player swings and a baton an enemy swings sweep the same way, are worth what their damage config says, and land through the struck character's defense and health. Set a system up once and it reads the same on both sides of a fight.

## What every character shares

| System | What it gives a character | What you add | Page |
| --- | --- | --- | --- |
| Vitals | Health, stamina, stance and any pool you name: spent, healed, refilled over time, drained, and read by a HUD. | **UCF Vitals** component | [Vitals](https://rigbak.com/docs/universal-combat-framework/vitals) |
| Melee trace | Hit volumes swept across a window of the attack montage, so a fast swing misses nothing between frames. | **UCF Melee Trace Window** on the montage | [Melee Trace and Damage](https://rigbak.com/docs/universal-combat-framework/melee-trace-and-damage) |
| Damage | What a hit is worth, what it is (its damage tags), and the effects it sets off, by surface. | A **Damage Config** asset, an **Impact Surface Set** asset | [Melee Trace and Damage](https://rigbak.com/docs/universal-combat-framework/melee-trace-and-damage) |
| Defense | Parries, blocks, invulnerability and armor, each a rule that answers an incoming hit. | **UCF Defense** component, a **Defense Rule Set** asset | [Defense](https://rigbak.com/docs/universal-combat-framework/defense) |
| Telegraphs | A warning over an attack's wind-up, before the blow lands. | **UCF Telegraph Window** on the montage | [Telegraphs](https://rigbak.com/docs/universal-combat-framework/telegraphs) |
| Animation windows | Gameplay tags held for a stretch of a montage, and footsteps, foley and other effects played from animation. | **UCF State Tag Window**, **UCF Anim Effect Window** | [Animation Integration](https://rigbak.com/docs/universal-combat-framework/animation-integration) |
| Approach and warp | An attack that turns to its target, closes the gap and stops short of it. | **UCF Approach Window**, **UCF Skew Warp** on the montage | [Animation Integration](https://rigbak.com/docs/universal-combat-framework/animation-integration) |
| Physical reactions | Bones that move under physics when a blow lands, and a ragdoll on death. | **UCF Physical Reaction** component | [Physical Reactions](https://rigbak.com/docs/universal-combat-framework/physical-reactions) |
| Teams | Who fights whom. | **UCF Team** component | [Targeting](https://rigbak.com/docs/universal-combat-framework/player/targeting) |
| Speed by tag | A character slowed while a gameplay tag is on it. | **UCF Speed Modifier** component | [Sprint and Speed](https://rigbak.com/docs/universal-combat-framework/player/sprint-and-speed) |

---

## One fight, both sides

What the two layers share is what lets an enemy and a player fight each other with nothing to translate between them.

| Shared | What it means in a fight |
| --- | --- |
| **One hit path both ways** | A parry rule on the player stops an enemy's swing, and an enemy's block stops the player's. Either way the damage comes off the struck character's `UCF.Vital.Health`. |
| **One team check** | Each character's **UCF Team** decides who is a foe. The player's targeting reads it through **Target Teams**, an enemy's target filter through the enemy's own team, so both sides agree. |
| **One warning, two audiences** | A **UCF Telegraph Window** on an attack's wind-up warns the enemies in front of it, whose reaction sets can parry or dodge, and puts a marker over the attacker for every player whose character carries a **UCF Telegraph Viewer** with a style set. |
| **One set of tags** | Tags both layers use for one thing are one tag (`UCF.State.Blocking`, `UCF.AnimEffect.Footstep`), so a rule that checks for a blocking character, or an effect bank row for a footstep, works on every character. |
| **Enemies the player can lock on to** | Every enemy built on **UCF Enemy Character Base** is a target the player's lock-on can pick, and it drops out of targeting when it dies. |

The seam goes one step further: an enemy's action set plays combos from the player's action graphs. See [Action Graphs in Action Sets](https://rigbak.com/docs/universal-combat-framework/action-graphs-in-action-sets).

---

## What the enemy layer adds

The AI that decides what an enemy does next.

| System | What it does |
| --- | --- |
| [Action System](https://rigbak.com/docs/universal-combat-framework/enemy/action-system) | Scores every action an enemy could take and runs the best, with cooldowns, combos and a way to run each one (an ability, a Behavior Tree, or a combo from an action graph). |
| [Reaction System](https://rigbak.com/docs/universal-combat-framework/enemy/reaction-system) | Answers a hit or a warning with a parry, a dodge or a counter. |
| [Movement System](https://rigbak.com/docs/universal-combat-framework/enemy/movement-system) | Circles, holds its distance, strafes and keeps out of other enemies' way. |
| [Combat Roles](https://rigbak.com/docs/universal-combat-framework/enemy/combat-roles) and [Combat Tokens](https://rigbak.com/docs/universal-combat-framework/enemy/combat-tokens) | Splits a group into attackers, flankers and waiters, and lets a crowd take turns. |
| [Awareness System](https://rigbak.com/docs/universal-combat-framework/enemy/awareness-system) and [Threat Detection](https://rigbak.com/docs/universal-combat-framework/enemy/threat-detection) | What an enemy has seen and heard, and whether the player's camera is on it. |
| [Territory and Patrols](https://rigbak.com/docs/universal-combat-framework/enemy/territory) | Patrol posts, wander areas and the leash that walks an enemy home. |
| [StateTree](https://rigbak.com/docs/universal-combat-framework/enemy/statetree) | The brain the decisions run in. |

## What the player layer adds

The moves, items and camera a player controls.

| System | What it does |
| --- | --- |
| [Action Graph](https://rigbak.com/docs/universal-combat-framework/player/action-graph) | Every move as a node, and every input that leads on from it as a transition. |
| [Input](https://rigbak.com/docs/universal-combat-framework/player/input) | Keys to input tags, chords, and abilities that answer a key. |
| [Items](https://rigbak.com/docs/universal-combat-framework/player/items), [Equipment](https://rigbak.com/docs/universal-combat-framework/player/equipment), [Inventory](https://rigbak.com/docs/universal-combat-framework/player/inventory) and [Quick Bar](https://rigbak.com/docs/universal-combat-framework/player/quick-bar) | Items that bring their own moves, drawn to a body place and put away, owned and slotted on a belt. Enemies hold the same items: see [Enemy Weapons](https://rigbak.com/docs/universal-combat-framework/enemy-weapons). |
| [Combat Styles](https://rigbak.com/docs/universal-combat-framework/player/combat-styles) | One asset for a character's combat feel: rotation, targeting, reach, movement and camera. |
| [Targeting](https://rigbak.com/docs/universal-combat-framework/player/targeting) and [Attack Steering](https://rigbak.com/docs/universal-combat-framework/player/attack-steering) | The enemy in front, lock-on, and attacks that steer at the target. |
| [Camera](https://rigbak.com/docs/universal-combat-framework/player/camera) | A third-person camera framed by the style or the weapon in hand. |
| [Interaction](https://rigbak.com/docs/universal-combat-framework/player/interaction) and [Paired Actions](https://rigbak.com/docs/universal-combat-framework/player/paired-actions) | Doors, chests and racks, and two characters in one synced move, such as a finisher. |
| [Hit Reactions](https://rigbak.com/docs/universal-combat-framework/player/hit-reactions) | A flinch that cuts a character's attack, and hyper armor that carries a heavy swing on. |
| [HUD and Input Prompts](https://rigbak.com/docs/universal-combat-framework/player/hud-and-input-prompts) | A HUD that follows the ability system, and prompts that show the bound key. |

> **Note**
>
> **A character is not tied to its layer.** An enemy carries the player layer's components: every demo enemy holds the player's items, flinches, falls limp and wears down poise the way the player does, the combo enemies play combos from their item's action graph, and the dual-sword boss carries the player layer's finisher stun. [Getting Started](https://rigbak.com/docs/universal-combat-framework/getting-started#what-the-enemies-are-made-of) shows each enemy's parts.

---

Previous page: [Upgrade and Access](https://rigbak.com/docs/universal-combat-framework/upgrade-and-access). Next page: [AI Agent Guide](https://rigbak.com/docs/universal-combat-framework/agents)
