# RPDice

RPDice is a World of Warcraft roleplay-focused character sheet and dice toolkit.
Current version: `1.3.3`.

It provides a custom stat system, ability cards, live resource tracking, inspect sharing, and encounter utilities for party/raid RP play.

## What It Does

- Custom Character Sheet
  - Attributes, Skills, and Actions with modifiers
  - Editable max/current values
  - Health and custom resource bars

- Ability System
  - Ability slots with icons, descriptions, triggers, and uses/charges
  - Inline dice support (for example `(1d20+3)`)
  - Optional resource spend/gain directives in ability text
  - Tooltip-rich compact/inspect/encounter display
  - Script actions can also spend/gain custom resource directly

- Compact and Inspect Cards
  - Compact player card with bars and ability icons
  - Inspect card with live synced bars and abilities from other players

- Scripts and Effects
  - Dedicated `Scripts` tools window for roll-triggered script rules
  - Trigger filters: source, scope, roll mode, nat rule, threshold, trigger limits
  - Script actions: add modifier, apply/remove/clear effects, custom chat text, custom resource spend/gain
  - Script icon picker for effect-producing scripts
  - `Effects` popout for active buffs/debuffs, including per-character persistence
  - Active effects can be re-edited inline:
    - right-click an active effect row to load it into `Name` / `Mod`
    - use `Save` to update, `Add` to create new entries
  - Active effect totals are applied into relevant roll types and shown in roll output

- Encounter Tools
  - Encounter window with party/raid cards
  - GM Tool for creating and managing enemies
  - GM Tool manual initiative entry controls (`Name`, `Init`, `+`) for non-roller fallback entries
  - Enemy initiative rolling and shared initiative sync
  - Initiative Tracker for players and enemies
  - Initiative turn controls: `Start Round`, `Reset Turn`, `Prev Turn`, `Next Turn`
  - Synced round/turn state across group members with optional turn-announcement chat output
  - Enemy raid marker tagging that appears in tracker rows
  - Enemy model picker with searchable list, paging, and preview quality settings

- UI/Settings
  - Root settings plus subpages: `Gameplay`, `Typing Tracker`, `Model Picker`, `Windows`, `Modifiers`
  - Per-window scale and opacity controls
  - Background style options
  - Position persistence for major windows
  - Window clamp and window lock options
  - Auto-open compact card on login
  - Auto-open initiative tracker on initiative roll
  - Auto-refresh encounter on group roster changes
  - Initiative gameplay toggles:
    - `Leader-only turn controls`
    - `Announce turn changes in chat`
  - Typing tracker scale/opacity, idle mode (`Hide`/`Fade`), and group-only visibility
  - Stat tooltip toggle + advanced stat tooltip mode
  - Optional fallback broadcast to `PARTY`/`RAID` for mixed groups with non-RPDice users
  - Roll transport centralized through `Core/RollPipeline.lua` for consistent addon + fallback behavior

## Typical Workflow

1. Open Character Sheet and configure stats/bars.
2. Set up Ability cards (icons, description, uses/charges, dice).
3. Use Compact Card for quick in-play access.
4. Use Inspect/Encounter in group play to view synced character data.
5. As GM, manage enemies and initiative from the Encounter tools.

## Roll Feedback

- Nat d20 results are highlighted in chat:
  - Natural `20` in green
  - Natural `1` in red
- Nat d20 results now also play SFX feedback:
  - Nat `20`: high-impact success sound
  - Nat `1`: failure/ouch sound
- Script-triggered effects/modifiers are included in final roll output where applicable.
- Effect contributions are shown as bracketed buff/debuff detail and applied into final totals.

## Installation

1. Place the `RPDice` folder into:
   - `_retail_/Interface/AddOns/`
2. For GM model picker data, also place the `RPDice_ModelData` folder into:
   - `_retail_/Interface/AddOns/`
3. Restart WoW or run `/reload`.
4. Enable **RPDice** (and **RPDice Model Data**, if installed) in AddOns on character select.

## Notes

- Best experience is in Party/Raid when addon messages can sync.
- Some features depend on other players also running RPDice.
- GM model picker requires the companion `RPDice_ModelData` addon folder to be installed.
- TRP3 display names are supported where unit resolution is available.

## License

This project is released under **CC0 1.0 Universal**. See `LICENSE`.
