# EPF Custom Skins

[![License: CC BY-NC-SA 4.0](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-blue.svg)](https://creativecommons.org/licenses/by-nc-sa/4.0/)
[![Version](https://img.shields.io/badge/Version-1.0.0-informational)](ElitePlayerFrame_Enhacned_CustomSkins.toc)
[![WoW](https://img.shields.io/badge/WoW-12.0%20(TWW)-orange)](https://worldofwarcraft.blizzard.com/)
[![Lua](https://img.shields.io/badge/Lua-5.x-blue)](https://www.lua.org/)

Add-on that **extends [Elite Player Frame (Enhanced)](https://www.curseforge.com/wow/addons/elite-player-frame-enhanced)** with custom frame textures and extra selection options.

Version and WoW interface compatibility are defined in the [.toc](ElitePlayerFrame_Enhacned_CustomSkins.toc) file; update the badges above when you change them.

---

## ✨ What This Add-on Adds (vs. Original)

| Feature | Original EPF Enhanced   | This add-on                                                          |
|--------|-------------------------|----------------------------------------------------------------------|
| Custom frame textures | Built-in modes only     | Custom textures from `assets/`, configured in Lua                    |
| Selection by class | Yes                     | Yes (same)                                                           |
| Selection by **specialization** | No                      | Yes — different skin per spec (e.g. Affliction vs Demonology)        |
| Selection by **race** | No                      | Yes — optional race-specific or race+spec textures                   |
| Selection by **faction** | Yes, for built-in modes only | Yes — optional `"Alliance"` / `"Horde"` in your config; respects `/epf faction` |
| **Auto-update on spec change** | No (spec not supported) | Yes — frame updates when you change specialization without reloading |

---

## 📌 Requirements

- **ElitePlayerFrame_Enhanced** must be installed and enabled.

---

## 🎨 How to Add Textures

1. Put texture files (e.g. PNG) in the add-on’s **`assets/`** folder.
2. Add **`-2x`** versions (e.g. `warlock-2x.png`) for high-DPI.
3. Edit **`CustomFrameModes.lua`** and add or edit entries in the **`textureConfig`** table. Each entry has:
   - **class** (required): e.g. `"WARLOCK"`, `"DRUID"`.
   - **name** and **ext**: file name and extension (e.g. `"warlock"`, `"png"`).
   - **spec** (optional): specialization ID for spec-only skins.
   - **race** (optional): race API string (e.g. `"Human"`, `"Scourge"`, `"Dracthyr"`).
   - **faction** (optional): `"Alliance"` or `"Horde"`. Only applied when `/epf faction` is on.

### Load order and priority

Textures are checked **in the order they appear** in `textureConfig`. The **first** entry whose conditions match (class, then optional faction/race/spec) is used. So:

- Put **more specific** entries **first** (e.g. race+spec+faction → spec only → class only).
- Example order: Warlock Affliction Undead → Warlock Affliction Horde → Warlock Affliction → Warlock.

---

## ⌨️ Choosing Textures with /epf

The base addon provides several slash commands. Use **`/epf help`** to list them.

### Class and faction selection (automatic mode)

- **`/epf class`** — toggles **class-based** frame selection in automatic mode. **Enabled by default.** When on, the addon (and this add-on’s textures) picks the skin by your class (and, with this add-on, by spec/race). When off, automatic mode ignores class.
- **`/epf faction`** — toggles **faction-based** frame selection in automatic mode. **Enabled by default.** When on, entries in `textureConfig` that have **faction** set (e.g. `faction = "Horde"`) will only match that faction.

For automatic class/spec/race/faction behaviour, use **`/epf frame 1`** (see below) and leave **class** (and **faction**, if you use faction-specific textures) enabled (default).

### Frame mode (picking a texture)

The base addon lists **all frame modes** (built-in + the ones this add-on registers) and assigns each a **number**:

- **`/epf frame`** — shows the current mode and, with **`/epf frame help`**, the full list with numbers.
- **`/epf frame 0`** — no custom texture (disabled).
- **`/epf frame 1`** — **automatic** mode: the addon picks the texture (by class/spec/race when class selection is on; this add-on updates it when you change spec).
- **`/epf frame 2`**, **`/epf frame 3`**, … — use the texture at that position in the list (fixed until you change it or switch back to 1).

So for automatic behaviour: **`/epf frame 1`** and leave **`/epf class`** on. To force a single skin: **`/epf frame help`** to see numbers, then **`/epf frame <number>`**.

---

## 🤝 Contributing

You are welcome to:

- **Propose a pull request (PR)** to add new skins or improve this addon.
- **Fork this addon** and create your own addon with your own skins (or a different set of textures). You may use this project as a base and publish your fork under the same or a compatible license (see [LICENSE](LICENSE.md)).

---

## 👤 Author

**Drakeinhart**

---

## 📄 License

This addon is licensed under [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)](LICENSE.md). You may share and adapt with attribution; **commercial use is not permitted**, and derivatives must use the same license. See [LICENSE.md](LICENSE.md) for the full text.

---

## 🚀 Publishing to CurseForge

A GitHub Actions workflow can build a zip and upload it to CurseForge when you **publish a release** or run it **manually**. Configure the required secrets (API token, project ID, game version IDs) and steps in [.github/CURSEFORGE-SETUP.md](.github/CURSEFORGE-SETUP.md).
