{
  "bundleVersion": "3.0.0",
  "name": "Mood Meter",
  "description": "A small meter in the corner that shows how the main character feels about the player. The AI moves it as the story goes, and the player can press Cheer up.",
  "tags": [
    "interface",
    "relationship"
  ],
  "createdAt": "2026-11-30T00:00:00.000Z",
  "entries": [
    {
      "id": "mood-guide",
      "name": "Mood meter guide",
      "content": "The main character's mood toward {{user}} is {{mood}} out of 100. 0 to 29: cold and short. 30 to 69: ordinary. 70 to 100: warm and open. Let it shape how they speak.",
      "role": "system",
      "section": "system-presets",
      "position": 0,
      "enabled": true,
      "alwaysSend": true,
      "keywords": [],
      "conditions": [],
      "conditionLogic": "all"
    }
  ],
  "variables": [
    {
      "id": "mood",
      "name": "Mood",
      "type": "number",
      "defaultValue": 50,
      "min": 0,
      "max": 100,
      "description": "How the main character feels about the player",
      "behaviorRules": "Raise by 3 to 10 when the player is kind, funny or helpful. Lower by 3 to 10 when the player is rude or cold. At most 10 per turn."
    }
  ],
  "rules": [],
  "reactions": [
    {
      "id": "cheer-up",
      "name": "Cheer up button",
      "when": {
        "eventType": "action:fired",
        "match": {
          "actionId": {
            "operator": "eq",
            "value": "cheer_up"
          }
        }
      },
      "conditions": [],
      "conditionLogic": "all",
      "then": [
        {
          "type": "set",
          "path": "mood",
          "operation": "add",
          "value": 10
        }
      ],
      "priority": 0,
      "enabled": true
    }
  ],
  "audioTracks": [],
  "rootComponent": {
    "id": "mood-meter-ui",
    "name": "Mood Meter",
    "entryFile": "index.tsx",
    "files": {
      "index.tsx": "export default function MoodMeter() {\n  const api = useYumina();\n  const mood = Number(api.variables.mood ?? 50);\n  const color = mood < 30 ? \"#6b8cff\" : mood < 70 ? \"#e0b44c\" : \"#ff6b8a\";\n  return (\n    <div style={{ position: \"fixed\", top: 64, right: 12, zIndex: 50, width: 168, padding: \"10px 12px\", borderRadius: 14, background: \"rgba(20,22,32,0.82)\", color: \"#fff\", fontSize: 13, fontFamily: \"system-ui, sans-serif\", boxShadow: \"0 6px 18px rgba(0,0,0,0.3)\" }}>\n      <div style={{ display: \"flex\", justifyContent: \"space-between\" }}>\n        <span>Mood</span>\n        <b>{mood}</b>\n      </div>\n      <div style={{ height: 6, borderRadius: 3, background: \"rgba(255,255,255,0.15)\", margin: \"8px 0\" }}>\n        <div style={{ width: mood + \"%\", height: \"100%\", borderRadius: 3, background: color, transition: \"width .4s\" }} />\n      </div>\n      <button type=\"button\" disabled={api.readOnly} onClick={() => api.executeAction(\"cheer_up\")}\n        style={{ width: \"100%\", border: \"none\", borderRadius: 8, padding: \"6px 0\", cursor: \"pointer\", background: color, color: \"#1b1e2b\", fontWeight: 700 }}>\n        Cheer up\n      </button>\n    </div>\n  );\n}\n"
    },
    "updatedAt": "2026-11-30T00:00:00.000Z"
  }
}
