# Spy Stats for ElvUI
Surfaces [Spy](https://www.curseforge.com/wow/addons/spy)'s win/loss record and Kill On Sight info right where you're looking - the unit tooltip, enemy nameplates, and ElvUI unit frames.
**Despite the name, the tooltip and nameplate features work without ElvUI** - ElvUI is only needed for the unit-frame tags.
## What it does
- **Tooltip** (works immediately, no setup): enemy players you have a record against get a `Wins: 3 Losses: 1` line, and anyone on your KOS list gets their reasons listed underneath.
- **Nameplates** (works immediately): players you have a record against get a colored outline and their record in text; KOS targets additionally get bobbing arrows on both sides so they're impossible to miss in a fight.
- **ElvUI unit-frame tags** (needs ElvUI): drop your record - or your whole guild's combined record - straight onto your frames.
## Requirements
- **[Spy](https://www.curseforge.com/wow/addons/spy)** - required.
- **ElvUI** - optional; only for the unit-frame tags.
- **ThreatPlates** - optional; nameplates anchor to its health bar when present, and fall back to the plain Blizzard nameplate otherwise.
- **Spy Guild KOS Sync** - optional; provides the guild win/loss record and attribution shown here.
## ElvUI unit-frame tags
In `/ec` → Unit Frames → Individual Units → Target → Custom Texts, create a text and set its Text Format to one of:
| Tag | Output |
| --- | --- |
| `[spy:wl]` | `W: 1 - L: 0`, colored like Spy's tooltip |
| `[spy:wl:plain]` | `W: 1 - L: 0`, no coloring |
| `[spy:winloss]` | `Wins: 1 Losses: 0`, the full tooltip form |
| `[spy:gwl]` | `Guild W: 12 - L: 3`, the whole guild's combined record (needs Spy Guild KOS Sync) |
Set **Attach Text To** to Health so it tracks the health bar.
## Tuning
By default nothing shows for players you've never traded kills with, which keeps things quiet. Constants at the top of the files adjust the rest - `SHOW_EMPTY_RECORD` (in `SpyStatsElvUI.lua`) to show a zero record for everyone Spy knows, and `TEXT_POSITION` / `KOS_COLOR` / `RECORD_COLOR` / `ARROWS` / `ARROW_FLIP` (in `Nameplates.lua`) for the nameplate text position, colors, and arrows.
`/spystats` reports whether the tags registered and what the current target resolves to.

