Commit graph

2 commits

Author SHA1 Message Date
Kelsi
54353e03e6 feat(editor): add WACT JSON round-trip (--export/--import-wact-json)
Closes the editing loop on the action-bar-layout catalog: dump
a .wact to JSON, hand-edit barMode / classMask / spellId /
itemId / buttonSlot (e.g. swap a Warrior's button 1 from Heroic
Strike to Mortal Strike, move Polymorph from slot 3 to slot 8,
add a Hearthstone item-macro to slot 12, share Mark of the Wild
across Druid+Priest classMask), re-import to a byte-identical
binary.

barMode dual-encoded: int 0..6 OR human-readable name ("main" /
"pet" / "vehicle" / "stance1" / "stance2" / "stance3" /
"custom"). All other fields are scalar so no special handling
needed.

Verified byte-identical round-trip on all three presets
(warrior / mage / pet). CLI flag count 1088 -> 1090.
2026-05-10 00:14:21 -07:00
Kelsi
48dbf72f11 feat(editor): add WACT (Action Bar Layout) open catalog format
Open replacement for the hardcoded per-class default action bar
bindings. Defines which abilities auto-populate which action
button slots when a new character is created or a class is
reset. A Warrior's button 1 binds Heroic Strike, button 2
Charge, button 3 Rend, etc. — new characters of that class get
those buttons pre-populated so the action bar isn't empty on
first login.

Distinct from WKBD (Keybindings) which maps physical keys to
action button slots — WACT maps action button slots to
abilities. The two together complete the default-control
configuration: Key 1 -> Action Slot 1 (WKBD) -> Heroic Strike
(WACT).

Seven barMode values cover the major action bar contexts:
  - Main (slots 0-11, standard 12-button bar)
  - Pet (hunter/warlock pet action bar)
  - Vehicle (mounted/vehicle action bar)
  - Stance1/2/3 (warrior battle/defensive/berserker; druid
    bear/cat/tree)
  - Custom (server-custom bar overlay)

Cross-references back to WCHC (classMask layout), WSPL (spellId
for the bound ability), and WIT (itemId for item-macro bindings
like Hearthstone in slot 12). findByClass(classBit, barMode)
returns the bindings sorted by buttonSlot — used directly by
character creation to populate action bars.

Three preset emitters: --gen-act (10 Warrior starter bindings on
Main bar with canonical 3.3.5a abilities), --gen-act-mage (10
Mage starter bindings including Counterspell + Polymorph),
--gen-act-pet (10 Hunter pet-bar bindings using barMode=Pet for
Attack/Stance/Bite/Claw/Dismiss).

Validation enforces id+name+classMask presence, barMode 0..6,
no duplicate ids; warns on:
  - buttonSlot > 143 (max is 12 bars × 12 slots = 144)
  - both spellId and itemId set (engine prefers spellId, item
    is silently ignored)
  - both spellId=0 AND itemId=0 (button will render empty)
  - (classMask + barMode + buttonSlot) collisions for
    overlapping classes — multiple bindings fighting for the
    same physical slot

Wired through the cross-format table; WACT appears in all 18
cross-format utilities. Format count 94 -> 95; CLI flag count
1083 -> 1088.
2026-05-10 00:11:53 -07:00