Loading…
a327ex.com

SNKRX UI Cards and Keywords

Opus 4.8

Summary

Built the per-unit ability-ladder card system, the glossary-keyword hover system, and re-worded all 5 ported units' card text in the style of Artifact Classic. The planned 3-tier ability ladder was cut to 2 tiers when it wouldn't fit the 480×270 window; the back half of the session was an extended Artifact-wording study and a unit-by-unit text pass.

Orientation & the ability-ladder plan:

  • Resumed SNKRX-update (secret/NDA SNKRX rebuild on Anchor 2). Read project_snkrx_update.md, SNKRX-update/porting.md, and the snkrx-template .claude/CLAUDE.md.
  • The set plan (from N=4): stop porting new units; deepen the 5 ported (archer/swordsman/magician/outlaw/cannoneer) into a Lv.1/Lv.2/Lv.3 ability ladder, forcing a unit_card redesign.

Archer ability research (SNKRX-ref):

  • Ranger roster: archer (pure ranger), cannoneer (ranger+nuker), dual_gunner, sentry, corruptor, barrager (hunter is commented out/cut). All lean on arrows / ricochet / barrages.
  • Ranger has TWO bonuses: the passive class stat multiplier {hp=1,dmg=1.2,aspd=1.5,...} (the aspd=1.5 is what derives archer's 1.33s from the 2.0 literal), and the SET bonus (main.lua:991): "3/6 — 8%/16% chance to release a barrage on attack to allied rangers" (Player:barrage, player.lua:1953, fires N projectiles 0.075s apart).
  • Archer's current kit: Lv.1 = the pierce attack (12 dmg, 1.33s, infinite pierce); Lv.3 = "Bounce Shot" (ricochet = level==3 and 3). SNKRX has NO Lv.2 — that tier is invented.

Cross-game ability catalog (reference/projectile_ability_research.md):

  • Mined ricochet / barrage / multi-projectile and adjacent mechanics from Path of Exile (LMP/GMP, Volley, Barrage, Tornado Shot, Chain, Fork, Deadeye Ricochet, Pierce/Drillneck, Far Shot/Point Blank, Ballista Totem, Mirage Archer), Risk of Rain 1/2 (Ukulele, Laser Glaive, AtG Missile, Sentient Meat Hook, Sticky Bomb, Will-o'-the-wisp, Gasoline, Railgunner), and Binding of Isaac (Inner Eye/Mutant Spider/20-20, Monstro's Lung, Tammy's Head, Cupid's Arrow, Spoon Bender, Rubber Cement, Polyphemus, Cricket's Body, Ipecac, Lump of Coal, Chocolate Milk/Brimstone/Tech X).
  • Distilled into ~18 recurring archetypes (fan, volley, sequential barrage, travel-then-burst, enemy-chain, terrain-ricochet, fork/split, return, homing, pierce(+scale), charge-and-release, big-slow-heavy, deploy-turret, distance-scaling, on-kill-burst, nth-shot, on-hit proc, payload-DoT).

Lv.2 naming → "Bodkin Point" (later cut): Designed a Lv.2 passive "+1 damage per pierced enemy." Named it (options: Skewer / Momentum / Bodkin / Drill Shot / Impale); user chose "Bodkin Point." Removed later when the ladder dropped to 2 tiers.

The 3-tier → 2-tier pivot (the fit wall):

  • Card redesign brief: each ability gets its own block (name + tags + description + chips for active). Active vs passive differ (passives omit the chip row).
  • At 480×270, three full ability blocks (~250–270px) overflowed the window; horizontal layout also failed (3 columns need ~480px wide minus the panel offset). User decided: "keep the game to 2 abilities instead of 3." Removed Bodkin Point; kept Lv.1 + Lv.3 (the original SNKRX shape). Abilities got an explicit level field (1 and 3, not array index).

unit_card_v2 (inventory.lua) — the ability-ladder card:

  • Defs converted to abilities = {{level,name,kind,tags,description},…}. The card branches: def.abilitiesunit_card_v2, else legacy unit_card (now unused among the 5).
  • Header = classes only (attack_type removed from all unit headers — carrier type lives on the Lv.1 tag line, per the archer precedent "remove projectile tag from the Archer itself").
  • Per block: [Lv.N] small tag + ability NAME in the title font (Awesome 9 @16) wearing the unit gradient (spec = def.spec); a lowercase keyword tag line; a wrapped description (yellow numbers); DMG/CD/RANGE chips on active blocks only.
  • Card width = widest RIGID element (header / ability name / chip row — usually the chip row); descriptions + tag lines word-wrap to it via new wrap_runs (rich-text wrap preserving per-run color/font/spec).
  • Tunable spacing constants abil_name_tag_gap / abil_tag_desc_gap / abil_block_gap.
  • Font: a medium-weight experiment (FatPixel/BoldPixels/More 15/pirkkala with a cycle key) was built then dropped — user chose "same font as the top" (title font) + the unit gradient.

Unlock feature: snake_unit.level (1–3, default 1). While hovering a unit's card in F6, keys 1/2/3 set its level (merge-level stand-in). The cell shows u.level; the card grays tiers above the level (locked), full-colors the rest.

Glossary-keyword hover system (inventory.lua):

  • glossary registry: keyword → {title, desc}. mark_terms (in the card draw) underlines any tag word (ability tags + the class/attack line) that has a glossary entry, records its screen rect, flags the hovered one; glossary_popup_draw pops a ui_tooltip definition below it (clamped/flipped on-screen).
  • Underline tuning: dashes "way smaller, almost dots" → 2px-long, 1px-thick dashes every 4px; idle term_dot_color (64,67,71), solid term_line_color (70,73,77) on hover (both in the panel_border→grey gap so the dotted→solid shape change carries the hover).

Popup own shadow layer (snkrx/ui/init.lua + main.lua):

  • User: the popup must "live in its own layer so that they also get the shadow treatment, otherwise they merge into the card." Added ui_popup_layer + ui_popup_render() (mirrors ui_render's alpha→shadow composite for the popup layer), called after ui_render() in draw(); glossary_popup_draw swaps the global ui_layerui_popup_layer around the ui_tooltip call. Generalizable — candidate to propagate to snkrx-template.

Bugs fixed:

  • inventory.lua:287 table index is nil — switching the pass-1 loop from for lv, ab to for _, ab (explicit ab.level) left blocks[lv] = … with lv nil → changed to blocks[#blocks + 1].
  • Extra space before the standalone . after a gradient "Piercing Arrow" — wrap_runs re-spaces every word; fixed so closing punctuation (. , ; : ! ? )) hugs the previous word.

Artifact Classic wording study (reference/artifact_wording_style.md):

  • Tried the executable route: parsed Artifact's VPK directory (pak01_dir.vpk, VPK v2 format, custom PowerShell parser) and extracted files — but found NO local English card/keyword text (only Steam item names in resource/localization/items_english.txt; card_effects.txt is particle config). Artifact's card text was delivered online via the card-set API. Pivoted to the wiki (WebSearch/WebFetch; several sites 403/ECONNREFUSED, but search returned verbatim definitions).
  • Gathered ~18 verbatim keyword definitions (Cleave, Retaliate, Siege, Pierce, Disarm, Condemn, Lock, Rapid Deployment, Death Shield, Damage Immunity, Initiative, Purge, Bounty, Deploy, Taunt, Soulbound, Battle) + card-effect texts (Assassinate, Chain Frost, Mana Drain, Payday, Slay).
  • Wrote a style profile: 11 principles (verb-first effects; trigger→effect for keywords; static keywords as declaratives; pin down where/when; exact quantities; PRE-ANSWER interactions; self-referential keyword values; controlled vocabulary; consistent POV; flavor quarantined from rules; length scales with precision) + reusable sentence templates + corpus + sources.

Wording pass (all 5 units + the keyword glossary):

  • Locked conventions (now in memory feedback_card_wording_style.md): lowercase keyword tags; ADDITIVE +N keyword grants that stack (e.g. Lv.3 "+3 ricochet to Piercing Arrow" — never an absolute that reads as overwrite); "destroyed" as the single projectile end-word; value keywords say "this many"; cross-reference another ability by name in the unit gradient; "unit" (generic) vs "enemy" (damage-only); class glossary lines = the direct SNKRX 3/6 — set-bonus descriptions as placeholders.
  • Active/passive verb: "perform" → "use" ("an ability the unit uses on its own" / "the unit never actively uses it").
  • Archer: Lv.1 "Shoots an infinitely piercing arrow that deals 12 damage."; Lv.3 Bouncing Shot "+3 ricochet to Piercing Arrow." ("Piercing Arrow" in the gradient).
  • Converted the other 4 from the legacy schema to the abilities ladder + worded them: swordsman (Cleave / Sharpen), magician (Arcane Burst / Quick Cast), outlaw (Fan of Knives / Flying Daggers), cannoneer (Cannon Shot / Cannon Barrage). Lv.1 names are first-draft; swordsman Lv.3 merge "Cleave" renamed "Sharpen" to avoid the Lv.1 clash.
  • Glossary (14 keywords): active, passive, projectile, pierce, ricochet, area, multiple, homing + the 5 class lines (ranger/warrior/mage/rogue/nuker as SNKRX 3/6 descriptions). Dropped random as a tag; renamed spreadmultiple ("Fires several projectiles at once."). Area finalized (effect-agnostic, per user): "Affects every unit in a zone at once, whether an attack, buff, or debuff."

Memory: Updated project_snkrx_update.md (ability-ladder cards + glossary system built, 2-tier ladder, the systems and unbuilt placeholders), created feedback_card_wording_style.md (the Artifact register + locked conventions), updated MEMORY.md.

STILL UNBUILT: merge + set-bonus systems (Lv.3 effects + class 3/6 lines are display-only); ability NAMES are first-draft.

🔒 Only the summary of this log is public. Private because this is SNKRX update.