orbit/data/comms.json

81 lines
3.7 KiB
JSON

{
"$comment": "COMMS — the characters of the ship speaking to the player (OAC first). Three comm types: 'ack' pauses the action and holds the box open (muted looping video + text + voice) until the player clicks ACKNOWLEDGE; 'visual' shows the box (video plays once + text + voice) and fades out when the voice ends; 'audio' is voice only — no box, no pause. Comms are EVENTS: each one binds a trigger (when) + a sender (who) + text + a speech clip (what). Trigger vocabulary: 'newGame' is live (the fresh-run welcome); the reservedTriggers list below is the proposed event set to discuss and assign comms to (researchComplete, researchNew, questNew, questComplete, discovery, landing, jump, buildComplete) — none of them fire yet. Assets are loaded ON DEMAND by the hub (js/comms/CommsHub.js) when a comm is due — never in a scene's preload, so the initial load stays lean.",
"enabled": true,
"audio": {
"$comment": "The comm's voice plays at its OWN volume (volume) — the manager's master is left untouched (in v4 `sound.setVolume` IS the master, so ducking it would quiet the voice too). While the voice talks, the other playing sounds (the game music) are ducked PER-SOUND by musicDuck (a fraction of each one's own volume) and restored exactly when the voice ends.",
"volume": 1.0,
"musicDuck": 0.3
},
"characters": {
"$comment": "The senders. label = the box's header; role = the small line beside it; video = the character clip (left panel of the box, ALWAYS played muted — the voice is the speech clip, never the video).",
"oac": {
"label": "O.A.C.",
"role": "ONBOARD A.I. COMPUTER",
"video": "assets/videos/characters/oac.mp4"
}
},
"comms": [
{
"$comment": "The fresh-run welcome: OAC introduces the ship. type 'ack' — the action pauses and the box holds (video loops silently) until ACKNOWLEDGE. delayMs beats the opening toast so the signal is clean.",
"id": "oac-intro",
"from": "oac",
"type": "ack",
"trigger": "newGame",
"text": "So you want to explore the galaxy do you?... Welcome to your ship... she's not much but she's got room to grow. I'm O.A.C. your Onboard A I Computer, and I'm here to help you get around.",
"audio": "assets/speech/oac/intro-01.mp3",
"once": true,
"delayMs": 1400
}
],
"reservedTriggers": [
"researchComplete",
"researchNew",
"questNew",
"questComplete",
"discovery",
"landing",
"jump",
"buildComplete"
],
"box": {
"$comment": "The wide comm box, docked just below the mineral bar (its right edge sticks to the bar's right edge; topPad px of padding below the bar). Left: the sender's clip in a bracketed feed panel (muted, contain-fit). Right: the comm text decoding in, and — for 'ack' only — the ACKNOWLEDGE button below it. The height grows to the content; long comms just get taller.",
"width": 560,
"topPad": 12,
"pad": 14,
"headerGap": 8,
"videoSize": 150,
"videoGap": 14,
"text": {
"fontSize": 13,
"lineHeight": 18,
"letterSpacing": 0.4
},
"button": {
"label": "ACKNOWLEDGE",
"gap": 10,
"fontSize": 11,
"paddingX": 16,
"paddingY": 7,
"letterSpacing": 2
},
"animation": {
"inMs": 260,
"outMs": 420,
"visualHoldMs": 350,
"$comment": "visualHoldMs = the beat the box holds after the voice ends (visual comms) before it fades."
},
"colors": {
"panel": "#0a1120",
"panelAlpha": 0.94,
"border": "#22405f",
"borderAlpha": 0.9,
"notch": 10,
"neon": "#00e5ff",
"ink": "#eaf6ff",
"dim": "#7d92c4",
"faint": "#3d4c74",
"amber": "#ffc94d"
}
}
}