Instruction file imported from factoryblack/RestlessValheim (
.cursor/rules/kit.mdc). Copyright stays with the author.
Kit
RestlessUi is the only HUD language. Settings, buffs, minimap, notices, and the hotbar all go through it. Do not invent a second widget set. If a helper exists, call it.
- Strip — sliced
row-idle(StripBorder),RowTint. Short repeating atoms: rows, buffs, biome bar, toasts. Never a tall plate. - Chip — same slice,
ChipBorder,ChipTint. Keys, Q/E, switches. - Tray — solid Nested + Rim. One well that holds atoms (F8 sheet, item inspect). Do not 9-slice
row-idleover a tall plate. - TrayHead — F8 title atom. Ink-tinted Strip at
RowWidth×BarHeight. CallRestlessUi.TrayHead. Inset (TrayPad/TrayGutter). Not a roof. - TitleTear — solid Ink Strip behind a title. May escape the tray at the top-right only (
HeadOverhang/HeadLift). Never a full-width lid. CallRestlessUi.TitleTear. - Rim — Unity Outline (
Accent0.85, 1.2 / −1.2). CallRestlessUi.Rim. Torn atoms skip it except F8 row hover. Tall solids always. Future rarity only retints the inspect Rim. - Well — generated circle. Do not use on the hotbar; slots are torn-edge Strip squares.
- Type — Jötunn Averia
Text. Regular body, Bold only atTitleSize. Colours:Text/Muted/Accent. - Fade —
FadeSeconds. Slide uses the same clock. - HudRow — one Strip + duration fill (left-anchored
row-idleinFillTint, width follows the clock) + icon + title + meta. Notices (HudRow.Notice) and buffs (HudRow.Buff). Empty food slots use the vanilla food fork when it exists, else kiteat-fork(cream). Do not rebuild this layout in a feature. CallNotices.Postto push a line into the drawer. - HudMeter — thin Ink track (
row-idle) whose width follows max (grows out from the hotbar). Keep it 18px — a sliced plate here is the wrong shape; thinner is the look. Dark track is always the full max length. Fill is kitHealthTint/AdrenalineTint/StaminaTint/EitrTint(garnet / copper / amber / frost), clipped to current/max. Averia current is optional. Health docks left ofBarand grows left; adrenaline stacks above it on the same inner X. Stamina docks right and grows right; eitr stacks above it. Each pair is vertically centered on the hotbar midline. Do not rebuild this in a feature. - Wear — vertical torn slit on the right inside of the slot, 11px wide. Graphic is
row-idle's ragged left and right stacked, bleached to white, then tinted cream (Accent) / red (HealthTint). 9-sliced top/bottom. Grows up with remaining durability. Never Mask-fill the plate. Do not keep vanillaGuiBaron a Restless slot. - KeyChip — Chip + Averia. Verb left, bind right (cream mouse glyph or key). Resolve with
RestlessUi.Bind/PaintChip(never dumpMISSING BUTTONDEFor raw$buttontokens). - KeyStack — KeyChip column, or one torn Look plate. Features pass rows only.
BottomRightgrows up (combat, fishing, hammer).Lookis a single Strip with title + bind lines on it (cook, pick up, doors) — not a stack of separate chips. - Dock — named
HudDockpins (TopLeftfor every notice,Barfor the item hotbar, equipped-piece helper just aboveBar, health left ofBarwith adrenaline stacked above, stamina right ofBarwith eitr stacked above, each vitals pair centered on the hotbar midline,BottomRightfor action hints — pivot on the corner, stack upward,Lookfor world hover under the crosshair). Guardian power and food (including empty Eat rows) live on the buff list.Dock()still means hang one rect on another.
Never: TMP / LiberationSans, hotkey-btn, slider.png, toggle-on, map-compass, 9-sliced panel-back as a card. panel-back is a mask only. Never UI-Mask the vanilla map RawImage. M map uses the same off-screen RT + panel-back Mask as the HUD minimap. Chrome is Strip plates (biome, pin name, share toggles, icon trays) and a KeyStack for the map binds. The kit's full-width top Hotkeys bar is baked ESC/I text — reconstruct keys as Chip + Averia. Notices all stack top-left. Do not pin toasts to the right, center, or onto the hotbar.
Must
- Call the helper. Do not rebuild Tray, TrayHead, TitleTear, Rim, DressSlot, HudRow, HudMeter, Wear, KeyChip, KeyStack.
- Torn is an atom. Solid Nested + Rim is a tray. Do not 9-slice
row-idleover a tall plate. - Torn never flush to Rim. F8 title is inset TrayHead. A title may use TitleTear off the top-right corner. Never a roof over the well.
- Chips and Averia on a Strip sit
PlateInsetin from the torn lip. - Hover Rim on torn rows only. Do not Rim a scrollbar.
- Slots are
DressSlot. Inspect, Tab, and hotbar share that atom.
New HUD behaviour gets an F8 toggle in the same turn.
Material proof (tooltip first)
Jules has authorised evolving the shared kit to match the proposed Torch treatment.
RestlessUi.PaperSurface, PaperCorner, and PaperDivider are opt-in shared material helpers.
The tooltip uses these in place of its solid Tray skin and TitleTear; other surfaces retain their current presentation.
The new paper-panel and paper-chip assets use tiled centres with explicit sprite borders; this does not permit stretching the old row-idle or panel-back over a tall card.
Keep baked material colour white; use separate paper-*-rim alpha overlays for accents. Text and game icons remain separate. Reuse these helpers rather than duplicating their asset setup.
See docs/visual-materials.md. This is a proof awaiting Unity validation, not a finished migration of every UI surface.
Settings material adoption
Jules authorised the reference Settings screen's full-width overhanging header for this surface. Use PaperSettingsHeader for that header; the earlier inset-only TrayHead rule continues on other surfaces. Settings opts into PaperSurface, PaperControl, PaperSwitch, PaperSlider, PaperSelectable and PaperDivider. PaperControl restores interaction after PaperSurface (which deliberately disables raycasts for inspect). Keep configuration, synchronisation and key capture in SettingsUi; shared helpers own appearance only.
Crafting material adoption
Crafting and its existing navigation strip also opt into PaperSurface, PaperControl, PaperSelectable and PaperDivider. Fit the paper around the live control bounds; retain game icons, callbacks and controller navigation. Keep recipe quality information and live material count/shortage feedback. Restore any modified selectable state on undress. See docs/crafting-materials.md; this surface still needs Unity validation.
First playtest follow-up
Use PaperQuality for explicit tooltip quality diamonds; inventory DressQuality is a numeric marker, not a diamond renderer. Inspect portraits intentionally omit inventory wear/equipment overlays. Idle paper rims mask baked gold; selected/elemental accents are deliberate. Settings switch tracks are capsules. Crafting shares inspect's text parser and measured rows, with unknown lines retained in a clipped scroll area. See docs/ui-playtest-refinements.md for the remaining runtime checks.
Forged component expansion
User authorised new reusable artwork for badges, quality, tabs and actions. Use ForgedSurface/ForgedTab/QualityMarks/ForgedScrollbar and RestlessHint from the shared kit. Quality gems sit beside category without a Quality caption; PaperQuality delegates to those assets. Text/glyph/tint layers remain independent from backing art. The crafted detail viewport must be inset within its owned plate, never copied from the vanilla TMP rectangle. Craft detail uses a clone of the vanilla recipe-list scrollbar, not ForgedScrollbar. RestlessScrollRect moves about one viewport per wheel notch without inertia; same-recipe refreshes retain scroll position. See docs/forged-kit.md.
Material polish integration
User authorised wiring the asset study into the existing UI. PortraitFrame, CategoryStrip, QualityLozenge and ControlFeedback are shared RestlessUi helpers. PaperCorner uses the solid corner overlay and separate cast pine; PaperDivider keeps its cast knot proportional. Navigation sprite replacements must restore the original sprite, colour and aspect on undress. Keep native PVP state presentation. Focus and selection are separate visual states. Do not replace main's recipe scrolling implementation. See docs/ui-polish-integration.md.
Inventory material adoption
DressSlot's inventory opt-in uses inventory-slot with quiet focus outlines and an equipped underline. HUD slots retain their existing material and wear. Inventory wear is 4px wide with clearance for the lock diamond and bottom count/bind strip. Use InventoryEmpty/InventoryBinding/InventorySurface; no ornate slot frames or padlock replacement. Empty equipment silhouettes disappear when occupied. Fit the shared paper to existing grid cells and divide groups with plain rules; do not move cells away from native grid hit testing. See docs/inventory-integration.md.
Container presentation shares InventorySurface, PaperControl and the existing reversible control/artwork registries. Fit the frame to native bounds, never move the grid for decoration. Capacity means occupied cells / total cells, not weight. BoundedLabel gives compact controls modest best-fit limits; descriptions and tooltip/recipe stat rows retain their measured wrapping layout.
Skills uses PaperControl rows and InventorySurface around the native viewport, with original icons, bars and hover descriptions. Never resize the frame around scrolling content or replace native progress calculations. Restore bar colours on undress. Character records use the display-only Metric helper with bounded labels/values; data comes from Ledger, not new counters. See docs/character-skills.md.
Collection material adoption
Compendium, trophies and achievements use shared paper collection shells fitted to stationary viewports. Collection cards must preserve unknown native status text and progress bars; do not run inventory-only wear/chrome suppression on them. Compendium paragraph padding may own a dedicated reader content rect with measured text height, while retaining the native ScrollRect and restoring layout on undress. Mixed-content prefabs keep their original layout as a fallback. See docs/collection-screens.md.
ESC material adoption
MenuScreen uses PaperSurface around active button bounds and complete logout/quit confirmation bounds; PaperControl/PaperSelectable on owned child graphics. Keep native button rects, callbacks and navigation. Owned surfaces/mirrors ignore native layout groups. Restore exact TMP visibility, native graphics and selectable state on undress. Do not add decorative action icons or style settings/player/cloud warnings through the menu traversal. See docs/menu-materials.md and ui-asset-audit.md.
World map material adoption
Large-map chrome opts into PaperSurface, PaperSwitch and BoundedLabel; retain native map/pin sprites and MapStudio capture. Pin selection uses a constant-sized paper accent; do not disable the native Selected image to hide its art, because its live enabled/active state is an input to selection detection. Preserve native input caret/selection graphics. Track reparented owned surfaces for cleanup, and restore native chrome, input styling and moved rects on undress. See docs/map-materials.md.