tarinai/docs/CONTENT_GUIDE.md
2026-06-22 02:03:19 +09:00

4.7 KiB

Content and visual guide

Visual source of truth

Do not invent tool-UI-only item designs. js/item_visual_registry.js is the canonical descriptor table for drift-prone item visuals; field drawing in js/items.js and generated previews must consume the same concepts. Tool icons in assets/ui/tool_*.webp are generated previews and must match field rendering. Update scripts/generate_item_icons.py when changing item helper silhouettes; regenerate icons before shipping.

Canonical helper mapping:

  • Weather rain overlay: drawRain in render.js; diagonal blue line streaks only, never item droplets.
  • Horizontal item droplet: drawOvalWaterDropSprite; used by fallen water items, zunda juice, mercury. Same silhouette; recolor only.
  • Water bowl: water_bowl descriptor in js/item_visual_registry.js; bowl and inner horizontal water palette are registry-owned.
  • Sleep drug: drawSleepTabletSprite.
  • Laxative: drawLaxativeTabletSprite; zunchi-motif tablet.
  • Mystery drug: drawMysteryTabletSprite; question-mark tablet.
  • Ammo: drawBulletSprite; bullet silhouette.
  • Protein/niteropu: powder-pile rendering in the parameter-item branch.

Tool groups

TOOL_CATEGORIES in js/data.js owns the runtime-generated tool palette. CSS colors/icons are tied to data-tool-category and data-tool values:

  • Operation/observation: observe, delete, poke, pinch, new, water hose.
  • Food/water/grass: zunda mochi, love mochi, fight mochi, grass, water bowl, zunda juice.
  • Medicine/effects: sleep drug, laxative, protein, niteropu, ammo, mystery drug, mercury, giant drug, dwarf drug.
  • Habitat/living things: zunchi, bed, nest box, ant nest, ball.
  • Hazards/obstacles: stone, genkotsu, firecracker, vertical fence, horizontal fence.

When adding or renaming a tool, update TOOL_DEFINITIONS, TOOL_CATEGORIES, TEXT_CATALOG.toolTips, CSS icon mapping, generated assets/ui/tool_*.webp, and docs. Do not duplicate category membership in index.html.

Gameplay data registries

  • Item effects: TarinaiEffectRegistry owns labels, display colors, modifiers, exclusivity/removal metadata, behavior callbacks, and mystery-drug candidates. Tarinai item-effect methods are the integration layer and should route apply/tick/remove behavior through the registry.
  • Diseases: TarinaiDiseaseRegistry owns disease flags, labels, symptoms/display text, base infection chances, cure-rule notes, and mystery-drug eligibility.
  • Food: TarinaiFoodRegistry owns labels, serving classes, nutrition, hunger relief, decay multipliers, hygiene penalties, and special effect IDs. Serving-food eating paths must read nutrition and hunger relief from this registry.
  • Weather: TarinaiWeatherSystem owns weather transitions and rain-spawned water items. Rain visuals are diagonal line streaks only. Rain-spawned water items, water bowls, zunda juice, and mercury are separate item/object concepts.
  • Ants: ANT_EXTENSION_HOOKS documents future ecology slots only. Do not change worker count, queen founding, carrying, or nest removal balance as part of registry/event cleanup.

UI copy and labels

Most visible UI remains Japanese. Keep user-facing naming consistent: the former lifestyle chart label is now the mental-state label; selected Tarinai combat summary shows fight win rate, not cumulative defeats. The selected Tarinai data panel must show both daily personality-change causes and the rolling recentChangeCauses history.

Bubble text inventory

Active Tarinai/world bubble text classes:

  • Symbols: !, ?, , ....
  • Sleep: Zzz....
  • Eating/poop: short munching and poop sounds.
  • Fear/fight: short panic, shout, and breathing sounds.
  • Disease/recovery: short weak or relief sounds.
  • Random small voice: short Tarinai voice variants.
  • Item effects: ???.

When adding bubbles, keep them short; every bubble may also trigger audio.bubble.

Audio

Sound settings are in the top-right sound menu, not inside Event UI. Categories: Tarinai voice, notification, operation. js/sound_pack.js is the canonical metadata source for sound IDs, categories, gains, cooldowns, sample paths, and ID mapping; js/audio.js is the playback engine. Missing samples fall back to synthetic audio. Notification and operation sounds are intentionally louder than voice sounds.

The Event card owns in-page push toast settings for log kinds: death, accident, birth, fight, food, weather, grass, relation. Those settings are separate from audio categories and persist through localStorage.

Ecology and credits

Ecology dialog card copy and images come from TEXT_CATALOG.ecologyCards; image paths should use real assets or generated WebP assets. Credits are hardcoded in index.html; update them when adding new external media sources.