{
  "tab": "ai",
  "section": "generateCharacterBackground",
  "title": "Character Background",
  "summary": "Fires on demand when a player inspects a character's detailed profile. Generates biographical history — distinct from basicInfo/hiddenInfo. Because it fires on demand rather than continuously, it suits detailed backstory constraints that would waste budget in `generateStory`.",
  "uiLocation": "AI Tasks → Character Background",
  "uiSubtitle": "\"Character Background Instructions\"",
  "editor": "Graphical form (labeled textareas)",
  "sizeLimits": [
    {
      "field": "Each string leaf under a task (`aiInstructions.<task>.<key>`)",
      "limit": "5,000 chars",
      "sections": [
        "ai/aiInstructions",
        "ai/generateStory",
        "ai/generateInitialStart",
        "ai/generateCharacterBackground",
        "ai/generateNPCDetails",
        "ai/generateNPCUpdates",
        "ai/generateLocationDetails",
        "ai/generateRegionDetails",
        "ai/generateFactionDetails",
        "ai/generateEncounters",
        "ai/generateItemGenerationAndUsage",
        "ai/generateActionInfo",
        "ai/generateNPCIntents",
        "ai/generateNewNPC",
        "ai/generateLearnedAbilities"
      ]
    },
    {
      "field": "Per task (`aiInstructions.<task>` total, sum of instruction chars)",
      "limit": "20,000 chars",
      "sections": [
        "ai/aiInstructions",
        "ai/generateStory",
        "ai/generateInitialStart",
        "ai/generateCharacterBackground",
        "ai/generateNPCDetails",
        "ai/generateNPCUpdates",
        "ai/generateLocationDetails",
        "ai/generateRegionDetails",
        "ai/generateFactionDetails",
        "ai/generateEncounters",
        "ai/generateItemGenerationAndUsage",
        "ai/generateActionInfo",
        "ai/generateNPCIntents",
        "ai/generateNewNPC",
        "ai/generateLearnedAbilities"
      ]
    }
  ],
  "related": "generateNPCDetails - NPC detail fill-in on first scene appearance (distinct task); npcs - basicInfo and hiddenInfo are the in-play fields",
  "wikiUrl": "/ai/generateCharacterBackground",
  "schema": null,
  "body": "## Schema\r\n\r\n```json\r\n{\r\n  \"aiInstructions\": {\r\n    \"generateCharacterBackground\": {\r\n      \"prompt\": \"string\",\r\n      \"custom\": \"string\"\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n\r\n## Example\r\n\r\n```json\r\n{\r\n  \"aiInstructions\": {\r\n    \"generateCharacterBackground\": {\r\n      \"prompt\": \"Write a character profile in two sections.\\n\\nBackground (6–8 sentences): Who they are now, where they're from, what shaped them, how they gained their abilities. End with forward momentum.\\n\\nAppearance (3 sentences): Height and build, coloration, one distinctive permanent feature. No clothing, gear, or interpretive language ('wise-looking', 'mysterious').\",\r\n      \"custom\": \"## Tone\\nHeroic optimism. Frame hardship as a source of strength. These are characters at the start of their story, not the end of it.\"\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n\r\n## Fields\r\n\r\n### prompt\r\n\r\nThe full background generation prompt. Three states:\r\n\r\n| State | Effect |\r\n|-------|--------|\r\n| Omit `prompt` | Use the engine default |\r\n| Set to your custom string | Replace the default wholesale |\r\n| Set to `\" \"` (a single space) | Disable the default without replacing it |\r\n\r\n### custom\r\n\r\nAppended AFTER `prompt` as additional guidance. Does not replace the default, regardless of what `prompt` contains.\r\n\r\n## Authoring pattern\r\n\r\nBecause this task fires on demand rather than continuously, it suits detailed backstory constraints that would waste budget in `generateStory`.\r\n\r\n**Legacy keys** (backwards-compatible, do not use in new worlds): `character_profile_generator`, `character_profile_background`, `character_profile_appearance`, `do_not_include`, `style`, `structure`, `context`, `final_notes`. These are accepted by the engine for older worlds but should not be authored in new content."
}