MC/docs/design/ITEM-CARD.md
2026-11-28 17:00:13 +01:00

3.2 KiB

DuneRealms item card: design handoff

Two surfaces, one look: the website card (done, in website/control-panel/public/item-lore.css) and the in-game tooltip (this spec). Images: item-card/web-card.png (approved), item-card/ingame-card.png (target), item-card/banner-art-source.png (art source, 720x240). Style: smooth, futuristic Dune. Every compartment is its own sub-box on the website; in game they are separated by spacing and section headers.

Palette (from dunerealms.com)

Token Hex Use
base #081e17 card background (bottom)
panel #102a23 / #17372c sub-boxes, background (top)
gold #e5b95e accents, section headers, frame line
gold dark #c4a255 secondary accent, sub-header
gold light #f2d593 values, MK chip
cream #f5ead0 / text #eae3cc titles, field names
muted #b7c8b7 story text
rarity existing quality colours rarity chip, glow, icon socket border

Layout, top to bottom (both surfaces)

  1. Art header: dune scene (dusk sky, two moons, sandworm, ridges), rounded top. Item icon in a rounded socket in the top-right corner, glow in the rarity colour, gold 2 px outline.
  2. Name (gold on the tooltip, cream on the web), uppercase on the web.
  3. Identity: rarity chip + MK chip, then S1 · ARRAKIS.
  4. Story: italic, muted, gold rule on the left.
  5. DETAILS compartment: House, Grade, Durability (+ bar), Effect. No Slot row.
  6. Action line, e.g. ▸ Right-click to inspect.
  7. ENCHANTMENTS compartment (level in gold light, roman numerals).
  8. STATS compartment (web), values in #9fe0cf.
  9. Footer: Origin world: <world> in gold + cream.

In-game implementation notes

  • Frame: tooltip_style = dunerealms:dune. Sprites already exist: DuneResourcePack/assets/dunerealms/textures/gui/sprites/tooltip/dune_background.png and dune_frame.png (+ .mcmeta, nine-slice 48x48, border 8). Equipment keeps its per-quality style dunerealms:quality/<q>.
  • Art header + item icon (1.21.8 cannot draw an item inside a tooltip): bake the icon into the banner image. One bitmap font glyph per item = banner (480x72, shown at height 24, about 160 px wide) with that item's texture composited into the right-corner socket. Font dunerealms:card_art, private-use code points U+E100+n, mapping file item-id to code point. Generic banner without icon: U+E000. Needs a build script that reads textures/item/*.png.
  • Fallback when the pack is not loaded or the player is Bedrock: skip the glyph line and use the existing text title rule.
  • Text colours are in ItemLoreCard.java (SAND, SPICE) and ItemOrigin.java; both already use the palette above.
  • Do not change the QUALITY | MK header text or the Origin world: prefix: existing items are matched on them and would get duplicate lines. EquipmentLoreStyleTest asserts the exact enchantment line.
  • The art banner is also the website header image (.item-lore-art img); use the same source file.

Status

Website CSS and the in-game text/palette/frame are committed but not run through Gradle or tested in game. The banner glyph font and per-item icons are not built.