Skip to content

Rich hover: list incoming abilities as icons with damage-taken number + % (THE differentiator) #2

Description

@vergelli

Summary

The differentiator. Extend the hover card so that, in addition to what it
shows today, it lists the incoming abilities as icons (what's actually hitting
you), ranked by contribution, each with its damage-taken number and %.
Post-STOP only (frozen session), so per-frame cost is irrelevant and decimation is
already in place.

Feasibility

NOT possible with the data we retain today — but a modest, hot-path-safe change
unlocks it.
Ability IDs are captured on every event (lib/mem/event.lua:16,
ability_id) but the temporal buffer only stores collapsed group totals
(by damage type / by source), not per-ability detail. So the frozen session has no
per-ability breakdown to draw.

Minimum data-path change (does NOT touch the zero-alloc hot path)

  1. Hot path untouched — ability_id already on every event in the ring buffers.
  2. Add a per-ability accumulation at sample-tick time only (cost irrelevant):
    a sibling of the existing *_groups_into helpers keyed by ability_id, summing
    incoming damage per ability and recording its source/type group key. Reused
    scratch tables.
  3. Store the per-ability list in the sample: extend the slot schema in
    core/temporal_buffer.lua + the copy/push path to carry, per ability,
    { ability_id, amount, share, group_key }. Icon derived lazily via
    GetAbilityIcon(ability_id) — no need to store icon paths.
  4. Carry through the decimator (ui/graph.lua decimate, copy the reference like
    type_groups/source_groups) and attach to the hover band; render icon + % +
    number rows in an expanded card (needs to grow + an icon-row pool).

Caveat to honor

The decimator folds raw samples into one pixel column by taking the peak
sample. The hovered column's per-ability list reflects that peak sample's
abilities — consistent with the existing fold, so the % column matches the bar.

UX defaults proposed (adjust freely)

  • Show top 5 incoming abilities by damage, descending.
  • If more, append a "+N more" / "Other" row.
  • Columns: [icon] ability name 12.3k 34%.

Notes

  • For incoming damage, "ability" = the enemy ability/source that dealt the hit —
    i.e. "what's killing me, ranked."
  • Reference shape will be proven first in Verdant, then ported here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions