$ show awgil/ffxiv_bossmod
This repository is a Dalamud plugin for Final Fantasy XIV that provides real-time boss encounter assistance. It includes a modular system for defining boss mechanics (AOEs, stacks, spreads, knockbacks, etc.) using a component-based architecture with state machines. The plugin covers all expansions from A Realm Reborn through Dawntrail, including dungeons, trials, savage raids, ultimates, alliance raids, hunts, deep dungeons, and quests. It also features an autorotation system for cooldown planning and AI movement hints, as well as replay recording and analysis tools for post-fight review and reverse-engineering of game mechanics. The architecture is centered around `BossModule` subclasses that define encounter logic via `StateMachineBuilder` and reusable `BossComponent` classes. Components observe game events (casts, statuses, icons, tethers) and produce arena overlays, text hints, and AI suggestions. The codebase is large and community-driven, with contributions from many developers. While the core framework is well-structured, there is significant per-encounter code that is tightly coupled to specific game data (action IDs, status IDs, positions), leading to maintenance overhead and occasional incomplete or placeholder implementations. The plugin is actively developed, with support for the latest expansion (Dawntrail) and ongoing updates. However, the reliance on reverse-engineered game data and hardcoded values means that patches can break functionality. The codebase includes many TODO comments and some modules marked as incomplete, indicating areas of ongoing research or unfinished work.
The LLM identified 5 files worth highlighting for reuse:
A generic component for handling standard area-of-effect attacks. It tracks cast events and displays AOE indicators. Reusable across any encounter that uses standard AOEs, parameterized by action ID and shape. Demonstrates clean separation of mechanic logic from encounter-specific code.
Handles stack and spread mechanics where players must either stack together or spread out. Uses status effects to determine assignments and provides visual hints. Reusable for any encounter with uniform stack/spread mechanics, showing a well-abstracted pattern for common raid mechanics.
Fluent API for defining encounter phase transitions and component activation. Allows declarative specification of phases, casts, and conditions. Core to the module system but could be extracted as a general state machine library. Demonstrates a clean DSL pattern for complex state management.
Provides a system for AI modules to receive hints about forbidden zones, goal zones, and target priorities. Uses shape distance functions for spatial reasoning. Reusable for any game AI that needs spatial hints, showing a flexible and extensible design for AI integration.
Tool for analyzing replay data to identify unknown action effects and generate enum definitions. Helps reverse-engineer game mechanics by comparing predicted effects with actual results. Reusable pattern for any game replay analysis, demonstrating a data-driven approach to understanding game behavior.