Files
OEVG 403ba232e6 Release Puppeteer 1.2.1 with resurrection icon
Improve aura refresh, frame rendering, roster updates, heal prediction, and spell cost display. Add outline dragging, a resurrection indicator, and Lua 5.0 regression coverage.
2026-11-18 12:01:41 -04:00

21 KiB
Raw Permalink Blame History

Changelog

OEVG's fork of OldManAlpha/Puppeteer. Newest version first.

1.2.1 (2026-11-11)

Incoming resurrection icon (2026-11-18)

  • Show pfUI's resurrection icon just left of the health status on dead or released friendly units with an incoming resurrection. Uses existing ClassicAPI cast notifications and SuperWoW/HealComm tracking, and keeps the health status text visible.

Outline drop-coordinate fix (2026-11-13, version retained)

  • After OEVG reported frames landing above the outline, replace parent-height reconstruction with the actual outline displacement applied to the original frame anchor offsets. Position the movement handle on the selected group instead of at a synthetic screen origin.
  • Replace simplistic drag mocks with parent-relative geometry: test exact preview/drop equality for all nine anchors, nonzero parent origin, repeated/no-op drags, mixed scales, Move All and hiding mid-drag. All six suites and Lua 5.0 parsing pass; native in-game confirmation remains pending.

Outline dragging and cleanup (2026-11-13, version retained)

  • Drag lightweight outlines instead of populated unit-frame groups, repositioning real frames once on release. Single-group and Move All behavior, modifier inversion, locked/hidden exclusions, hidden-title drag gestures and saved anchors are retained. Coordinates account for group/UIParent scale; hiding a participating group or UIParent finishes the drag and clears previews.
  • Reuse per-group outline records and remove the old bulk-moving parent and obsolete movement strata helper. Existing position-saving behavior remains unchanged.
  • Reclaim each aura entry's owned ClassicAPI timing table during disposal without recursively freeing borrowed tracked timers.
  • Fix experimental enemy tracking's trailing-slot cleanup (including when the last relevant slot is beyond the midpoint), and avoid catch-up polling bursts after a long pause.
  • Experimental cast icons share one static callback rather than allocate a closure per start. Debug-off paths skip string building. Disposal preserves newer caster registrations; fade end time and zero-duration/empty-group/zero-heal calculations are corrected.
  • Simplify identical incoming-heal color branches. Broader rendering-setter caching is deferred until profiling identifies worthwhile setters and their invalidation requirements.
  • All six Lua 5.0 behavior suites and all-file parsing pass, including outline coordinate/lifecycle mocks, aura ownership, enemy cleanup and cast-icon lifecycle. Native dragging, actual freeze reduction and other in-game behavior remain unverified.

Stage 5: optional effective spell costs (2026-11-12, version retained)

  • With Use ClassicAPI enabled, version 1.20.2+ and the required functions, resolve learned player spells to their real IDs and use C_Spell.GetSpellPowerCost for effective resource costs. Explicit ranks are validated; unspecified ranks select the highest known rank. Older/unversioned builds retain existing providers.
  • Cache scalar costs/resource types between invalidations rather than allocating API tables on every mana tick. Player aura, talent, spellbook, level, equipment, form, maximum-mana and world-entry events invalidate costs. Ordinary power changes reuse cached costs.
  • Preserve Nampower/tooltip fallbacks for unavailable data and per-second funnel spells. Distinguish known free spells from unknown spells, and do not divide ClassicAPI rage costs a second time. Unknown Nampower spell IDs no longer reach record reads.
  • Tooltip text refreshes when cost, resource, maximum power or active resource changes even if the integer casts-left value stays equal. Player cost-changing events refresh an open tooltip.
  • All five Lua 5.0 regression suites and all-file parsing pass. Stage 5 in-game verification remains pending; no measured performance gain is claimed.

Stage 4: heal history and idle updaters (2026-11-12, version retained)

  • At session initialization, prune player-specific healing history older than 180 days and retain the newest 2,000 healers per realm. Undated legacy entries receive a timestamp/grace period; generic spell estimates remain untouched. The limit applies at startup, not on every combat event.
  • Direct and HoT learning timestamp valid observations, including unchanged HoT amounts. Targets with healing modifiers do not train player estimates.
  • Unconsumed last-cast learning records expire after a 15-second grace period; the existing 10-second cleanup pass reclaims them and stops when idle. Late observations cannot train from expired records.
  • The range-arrow updater runs only while enabled with a hovered unit. The custom-unit updater stops when its map is empty and resumes on additions, preserving older SuperWoW polling.
  • OEVG reported stage 3 working. All four Lua 5.0 behavior suites and all-file parsing pass, including actual cast-event and custom-unit mutation hooks. Stage 4 in-game validation/profiling remain pending.

Stage 3: render and roster improvements (version retained)

  • Coalesce repeated health, power, aura, range, sight and PvP redraws on the next frame. Cache changes and click targets remain immediate; reusable batches stop their updater when idle.
  • Merge changed-aura sets, prioritize full rebuilds, and cancel stale queued work when a frame is rebound or fully refreshed.
  • Skip unchanged incoming-heal redraws while keeping hidden-frame totals current and rereading predictions when shown.
  • With SuperWoW or optional ClassicAPI GUIDs, roster events refresh changed units and reposition changed groups. Same-name replacement pets use identity; clients without GUIDs retain conservative refreshes. Explicit checks/settings still force refreshes.
  • OEVG reported stages 1 and 2 working. All three Lua 5.0 suites and all-file parsing pass. A mocked 2,000-request burst produces 40 health and 40 power redraws across 40 units. Stage 3 in-game testing and performance measurement remain pending.

Stage 2: aura refresh improvements (version retained)

  • Refresh-only ClassicAPI deltas read the changed instance IDs into one reused buffer, then update only matching displayed icons. Stack-only changes do not restart unchanged cooldown sweeps; icon geometry and textures are left alone. Stack font size changes only when needed.
  • Instance IDs are linked lazily to uniquely identified cached spells because positional slot reads do not return instance IDs. Duplicate spells, missing/replaced IDs, unexpected aura metadata, unsupported instance APIs and full/add/remove updates retain the full-scan path. No allocating per-aura metadata scan is added to initialization.
  • When ClassicAPI timing disappears, a full scan restores available SuperWoW/Nampower tracked timers or clears the timer. Auras that never had a timer can still update stacks directly.
  • Enemy debuff displays rebuild when refreshed expiration or player ownership changes their ordering. Friendly frames keep their existing priority order and lightweight refresh path.
  • Aura identity maps are reused and cleared on full scans; they are not allocated when ClassicAPI aura scanning is off. Borrowed event payloads are consumed synchronously, never stored.
  • Stage 1 was reported working in game by OEVG. Stage 2 passes both Lua 5.0 behavior suites and all-file parsing, including fallback routing, native/legacy timers and actual enemy ordering. A mocked 40-unit refresh burst uses 40 instance reads with zero full slot enumerations. This is a call-count test, not an in-game speed measurement. OEVG subsequently reported stage 2 working.

Fixed

  • Without SuperWoW, target and raid-slot caches now recheck whether they represent the player before applying self distance/line-of-sight shortcuts. Changing targets or reassigning a raid slot no longer keeps stale self state.
  • Native aura timers expire even while their group or UIParent is hidden. The shared text updater stops once its last timer expires; showing or refreshing an aura still restores its current timer. Hidden unexpired timers remain registered; broader idle scheduling is deferred.
  • PvP state is compared and stored as the same boolean, preventing repeated unchanged-state updates when UnitIsPVP returns nil.
  • Heal prediction removes timed-out cast ownership records and their receiver entries together, prunes empty heal/HoT receiver tables, and tolerates missing buckets. Receiver notifications follow cleanup so a callback starting another cast cannot have that new cast erased by the old removal. Other active casts on the receiver are preserved.
  • Fallback spell lookup uses a scalar for the last matching slot instead of a temporary table, retaining exact-rank and highest-rank lookup behavior.

Verification

  • Added Lua 5.0 behavior tests for mutable unit tokens, immutable GUID caches, PvP return variants, hidden/reshown/refreshed timers, spell lookup, overlapping and multi-target heals, HoT removal, timeout cleanup, callback re-entry and receiver churn.
  • Regression tests and parsing of all Lua files passed with the real Lua 5.0 interpreter. OEVG subsequently reported stage 1 working in game; stage 2 was also reported working; stage 3 testing is pending. No performance measurement yet. See tests/README.md.
  • Added .gitattributes to keep text files LF-normalized. Provider selection remains unchanged; stage 4 adds persistent healer-cache pruning.

1.2 (2026-11-02)

Added

  • Optional ClassicAPI support. Puppeteer uses ClassicAPI when it is installed. Each feature is detected separately, so an older ClassicAPI only loses the parts it lacks. Turn it off with Use ClassicAPI in /pt → Options → Mods, then reload. The Mods tab also shows whether ClassicAPI was detected, and its version.
    • Buffs and debuffs are read in one pass with their spell IDs, dispel types, timers and casters, with no tooltip scanning. Debuffs that the server moved into buff slots show as debuffs.
    • A refreshed aura updates its timer and stack count in place, without rebuilding the aura icons or the health bar.
    • Aura timers work without SuperWoW.
    • The game draws aura timer sweeps itself.
    • Range, online status, visibility and incoming resurrections update right away. Resurrections are seen from any nearby caster, including players without HealComm.
    • With SuperWoW, heal amounts are learned from the combat log event instead of combat log chat text, so learning works in every client language.
    • Distance and line-of-sight are provided when UnitXP SP3 is not installed. Distance is only provided when SuperWoW is also missing.
  • Tooltip Behavior option in Options → Other:
    • Default keeps the game's mouseover tooltip, which only shows for nearby units.
    • Always shows the unit tooltip for every unit, including far away party and raid members.
    • Never hides the tooltip while you hover unit frames, so it doesn't cover other frames. The spells tooltip still shows.
  • Test UI shows raid frames while you're solo or in a party (from fey, fix/testui-raid-frames). While /pt testui is on, every frame group shows (Party, Pets, Raid, Raid Pets) whatever your real group is, and Hide While Solo doesn't hide the test frames. Turning test mode off restores the normal rules.

Changed

These patterns come from brues-code/pfUI's unit frames.

  • Hidden frames skip event updates. A frame skips health, power, aura, range, sight, connection and resurrection updates while it, or its group, is hidden, for example the party frames while you're in a raid. The unit cache still updates, and showing the frame or its group redraws it. A UI hidden with Alt+Z still counts as shown. Incoming heals are still always updated.
  • Heal prediction's cleanup check stops when idle. It used to run every frame. Now it stops when no cast, HoT, resurrection or cast icon is left, and starts again when one is added.
  • ClassicAPI's range event (UNIT_IN_RANGE_UPDATE) is only used without UnitXP SP3 and SuperWoW. ClassicAPI checks every registered unit on every frame. With either of those mods, Puppeteer already polls precise distance.

Fixed

  • A timed-out resurrection removed every resurrection on its target. When one caster's resurrection passed its 20-second limit, other casters' resurrections on the same target disappeared too. Now only the expired one is removed. The bug was found in razzeee/Puppeteer's summoning commit.
  • Settings text outside the window. Long labels in the Other tab ("Pets Use Owner's Class Color", "(1.18.1) LFT Auto Role") and the contributor line on the About tab no longer run outside the window.

ClassicAPI implementation notes

When ClassicAPI is not installed, or Use ClassicAPI is off, the code takes the same paths as in 1.1.3.

  • Aura scan (libs/PTUnit.lua). C_UnitAuras.GetAuraSlots fills one reused slot buffer (its fill-a-table form, checked at load), and C_UnitAuras.UnitAuraBySlot returns each aura positionally. The per-slot entry reuse from 1.1.3 is kept, so a scan creates no tables after an entry's first use. Each entry keeps its own reused time table for ClassicAPI's duration, expiration and caster. A start time is never set in the future. SuperWoW/Nampower tracked times are the fallback when ClassicAPI has none. Tooltips use GameTooltip:SetUnitAura with the C_UnitAuras index.
  • Aura deltas (core/EventHandler.lua). For visible real unit tokens, UNIT_AURA_DELTA replaces UNIT_AURA. An event with only updated auras re-reads stacks and timers in place (PTUnit:RefreshClassicAuras) and updates the shown icons (PTUnitFrame:RefreshAuras). Added or removed auras, or a changed list, take the full path. UNIT_AURA still handles SuperWoW GUID arguments and members out of view.
  • Aura timers (PTUnitFrame.lua). Icons use a native Cooldown frame (no end flash, no built-in numbers) instead of a Model with an OnUpdateModel script. One shared driver updates the countdown text of visible timers, and only rewrites the text when the second changes. Second strings 0–60 are cached. The game's own countdown numbers are not used, because they need the game-wide countdownForCooldowns setting.
  • Events.
    • UNIT_DISTANCE_CHECK_UPDATE and UNIT_IN_RANGE_UPDATE re-read distance and sight for the unit.
    • UNIT_CONNECTION updates health, power and range.
    • INCOMING_RESURRECT_CHANGED updates the health text, and UnitHasIncomingResurrection is added to resurrection checks.
  • Heal learning (libs/HealPredict.lua, SuperWoW only). COMBAT_LOG_EVENT_UNFILTERED replaces the four combat-log chat frames for SPELL_HEAL, SPELL_PERIODIC_HEAL and SPELL_AURA_REMOVED. Critical heals are ignored as before. Direct heals are only learned when they match the caster's last cast, by spell ID or name. The switch happens at the first PLAYER_ENTERING_WORLD, and only if ClassicAPI's player GUID string equals SuperWoW's.
  • Distance and sight (libs/Util.lua). UnitDistanceSquared (center to center) is the distance provider only without UnitXP SP3 and SuperWoW. UnitInLineOfSight is the sight provider only without UnitXP SP3.
  • Not used. ClassicAPI's collectgarbage options are no-ops on the Lua 5.0 collector, and ClassicAPI does not shorten GC pauses itself. Its duration text bindings can't reproduce Puppeteer's flashing timer colors.

1.1.3-lowgc

Low-garbage build based on OldManAlpha's latest dev branch. That branch includes the Nampower cast-fail fix for heal predictions and the Vanilla Shaman Color option.

Added

  • Blizzard Modern bars. Blizzard Modern health and power textures, with a nine-class health palette and optional white health and power numbers. See the README and MODERN-BLIZZARD.txt.
  • Puppeteer Flat and Puppeteer Flat Borderless bar textures. The original Puppeteer textures are brighter in the top half than the bottom (about 188 vs 137–120 brightness), which makes bar colors look darker halfway down. The flat textures use the top-half brightness all the way down. The bordered one keeps Puppeteer's dark top and bottom edge.
  • Pets Use Owner's Class Color (on by default). When health bars or names use the Class color, a hunter's pet is hunter green and a warlock's pet is warlock purple. Each pet slot's owner is looked up in a table built at load, so this adds no garbage.
  • Move frames with hidden titles. While a group's title is hidden, hold Shift+Ctrl+Alt and left-drag any of its unit frames to move the group.
    • It uses the normal drag code, so frame locking, "move all frames" and saved positions behave as with the title.
    • That click never casts, even if the keys are released before the mouse button.
    • Groups with a visible title or a locked position keep the old behavior, including any Shift+Ctrl+Alt left-click binding.
  • Raid and healer mana in the Raid header, with reporting for raid leaders and officers (from skrymsli). As shipped, it rescanned all 40 raid frames and redrew the header on every mana, rage or energy event in the raid:
    • Each event became about 20x more expensive in CPU (111 µs vs 5.6 µs), and a raid-wide mana tick about twice as slow.
    • Here it updates at most twice per second, which is back to OldManAlpha's cost (5.3 µs per event) and adds about 2 bytes of garbage per raid-wide tick.
  • Variable test UI size, /pt testui [count] (from skrymsli). Its per-call pattern match was replaced with a value cached when each frame is created.

Changed

  • Shorter title bars. The title bar above each frame group is 16 px tall instead of 20 px (HEADER_HEIGHT at the top of PTUnitFrameGroup.lua).
  • Much less garbage in combat. WoW 1.12 runs Lua 5.0, whose collector stops the game and walks the whole heap whenever enough garbage piles up. That is the combat hitch, and the only fix an addon can make is to allocate less. None of these changes alter how the frames look or behave.
Event (40-man raid) OldManAlpha 1.1.3-lowgc
Full group check (RAID_ROSTER_UPDATE) 17,657 bytes 237 bytes
Target change 4,789 bytes 1.5 bytes
HealComm message from another healer 436 bytes 4.3 bytes
Heal cast (SuperWoW START + CAST) 409 bytes 1.8 bytes
HoT cast + Nampower aura event 419 bytes 0.4 bytes
Heal cast + its combat log line 134 bytes 5.6 bytes
UNIT_HEALTH 50 bytes 21 bytes

A simulated Naxxramas-style fight went from 21.1 KB/s to 8.6 KB/s of garbage. The SuperWoW + Nampower + UnitXP client and the plain 1.12 client gave the same results.

  • Private table pool (libs/Pool.lua).
    • Puppeteer used Compost-2.0, which strongly keeps only 10 tables and puts the rest in a weak table that every GC empties. Its erase also shrinks tables, so every reuse has to grow them again.
    • Puppeteer's own code now uses a pool that survives GC and keeps table capacity. The shared Ace libraries still use their own Compost.
  • Aura scanning (PTUnit). Each unit reuses one entry table per aura slot, and its name and type arrays, instead of rebuilding everything on every UNIT_AURA.
  • Target changes and group checks.
    • The heal prediction GUID set is refilled in place, instead of building a new array and set every time.
    • Frame sorting and layout use reusable scratch tables and static comparators.
    • Role ranks are computed once per frame instead of inside the comparator, which also removes an O(n²) lookup during the sort.
  • Heal prediction.
    • Tables orphaned on every cast are now reclaimed: the last cast, overwritten HoTs and overwritten resurrections.
    • Debug messages are only built when debug output is on.
  • Aura tracking.
    • Nampower aura events reuse one table instead of creating {target} each time.
    • AoE buff target lists are released after use.
  • Unit frame text.
    • Health, missing health, power, incoming heal and range text are each built with one string.format.
    • Color code prefixes and aura minute strings ("5m") are cached.
    • Range text is only rebuilt when the shown distance or its color changes.
  • Bundled HealComm-1.0. The message split table and heal entries are reused. This only applies when Puppeteer's copy is the one loaded.

Verification

  • All files compile under a real Lua 5.0 VM.
  • OldManAlpha's build, skrymsli's build and this build were run through the same deterministic simulated fight. Every frame's texts, bar values, colors, alpha, positions, aura icons, heal predictions and aura caches were compared at checkpoints across 10 settings and client combinations.
  • Against OldManAlpha's build, every unit frame matched exactly. The only differences were in the raid header, where skrymsli's mana labels are.
  • Against skrymsli's build, the only difference was that a stale aura icon reference now holds that slot's current aura instead of an erased table. That only affects what a hover tooltip would show.