Skip to content

How It Integrates

Jared Wright edited this page Jun 9, 2026 · 1 revision

How it integrates

This module extends the mod-playerbots AI engine without editing a single playerbots file. It subclasses playerbots' strategy/action/trigger/value classes and links against them, so it requires a stock, unmodified mod-playerbots checkout.

mod-playerbots exposes no extension API, so the module reaches in two ways:

  1. Context registration. It appends its four DungeonClear*Context factories into the engine's shared context registries on the first world tick (see src/AiObjectContextAccess.h and src/DungeonClearModule.cpp). The contexts are private statics in playerbots, reached via a private-access template.
  2. Command + strategy. It registers a .dc CommandScript and a login hook that applies the consolidated dungeon clear strategy to bots present at login. The only path that reaches a self-bot created mid-session is the playerbots config (NonCombatStrategies = "+dungeon clear").

The trade-off

Coupling to playerbots' internal class shape instead of a stable API means an upstream rename of those registries surfaces as a compile error here, never a silent runtime failure — you find out at build time, not mid-clear.

Note on already-built bots

Contexts register on the first world tick. Bots that already existed before the module loaded need a reload before the dungeon clear chat strategy sticks; a "DPS-only" symptom is usually a stale engine, not a class gate.

Clone this wiki locally