High-level domain map: README — Architecture.
Detailed folder map and ownership: architecture rule.
Load order is defined in CombatMode/Embeds.xml (included
from CombatMode/CombatMode.toc).
When you move or rename modules, update this file, Embeds.xml, the architecture rule, and touched Lua headers in the same change (see docs-sync rule).
- CombatMode/Core/Runtime/Runtime.lua — receives the AddOn namespace (
local addonName, CM = ...), optional_G.CMalias, registersADDON_LOADED/PLAYER_LOGINlifecycle, nativeCombatModeDBmerge, and slash commands (/cm,/combatmode). - CombatMode/Constants/ — constants/data modules initialize
CM.Constantsand must load before feature consumers (Namespace.luafirst). - CombatMode/Core/Dev/ — developer tools with no production impact when idle:
- FunctionProfiler.lua (zero-overhead
C_AddOnProfiler.MeasureCallwrapper; gated by Debug Mode toggle)
- FunctionProfiler.lua (zero-overhead
- CombatMode/Core/Runtime/ — remaining runtime support scripts:
- EventRouter.lua (event routing +
_G.CombatMode_OnEvent) - CVarManager.lua (all CVar-writing helpers; reticle preset +
reticleTargetingCVarOverrides→CM.GetEffectiveReticleTargetingCVarValues) - BindingQueue.lua (combat-safe deferred binding updates)
- UserLuaCondition.lua (cached
loadstringevaluator for user-authored Lua conditions) - Bootstrap.lua (startup sequence)
- EventRouter.lua (event routing +
- CombatMode/Core/ClickCasting/, FreeLook/, Crosshair/, AllyCycle/ — feature modules (see
Embeds.xmlfor exact order). Vignette.lua loads after FreeLook (fades with Mouse Look). - CombatMode/UI/Options/ — options window toolkit: Draw.lua then Widgets.lua then SpellMultiSelect.lua (all define
CM.UIpieces), then OptionsPanel.lua (definesCM.UI.Options.AddTab/CM.UI.CreateWindow/CM.OpenOptions), then ColorPickerDialog.lua (themedColorSelectpicker for swatches), then BlizzardSettingsBridge.lua (AddOns panel shortcut), then Tabs/Tab.lua* (each registers a tab viaAddTab). - CombatMode/UI/Changelog/ — ChangelogNamespace.lua first (defines
CM.Config), then ChangelogData.lua + ChangelogPanel.lua; and CombatMode/UI/Editors/ — the standalone editors (ReticleCVarEditorData/Panel.lua, TargetingMacroPrelinesEditor.lua, CrosshairColorsEditor.lua). Both load after theUI/Optionstoolkit they consume. - Frame —
CombatModeFrameXML inCombatMode/Embeds.xml;OnEvent/OnUpdatecall globals defined in Core. Events are registered on this frame duringCM:OnEnable().
- Slash:
/cm,/combatmode(Core/Runtime). Uninstall is the options sidebar button (CM.UninstallCombatMode), not a slash command. - Options: standalone movable window
CombatModeOptionsFrameopened byCM.OpenOptions()(bound to/cm, the first-login popup, and Escape → Options → AddOns → Combat Mode viaUI/Options/BlizzardSettingsBridge.lua); tabs registered viaCM.UI.Options.AddTabinUI/Options/Tabs/. - Changelog (in-game):
CM.Config.ShowChangelog()(sidebar footer → Changelog, or auto after version bump viaCore/Runtime/Runtime.lua+CM.Config.MaybeShowChangelogOnNewVersion); body stringCM.Config.ChangelogTextinUI/Changelog/ChangelogData.lua, maintained fromCombatMode/CHANGELOG.mdwithscripts/sync-changelog-to-lua.ps1.