/** Static markdown documentation exposed as MCP resources */ export declare const EVENT_FORMAT_DOC = "# Valkyrie Event System\n\n## Overview\nEvents are the core quest logic mechanism. Each event is an INI section starting with \"Event\".\n\n## Fields\n| Field | Type | Description |\n|-------|------|-------------|\n| display | bool | Whether to show dialog (default: true) |\n| buttons | int | Number of buttons (any count). **CRITICAL**: Valkyrie only parses event1..eventN where N=buttons. If buttons < highest eventN index, higher event references are silently dropped on re-save |\n| eventN | string | Space-separated event/spawn names for button N. Valkyrie runs the **first** listed event whose tests pass (or a random enabled one with randomevents=true). Only parsed up to the buttons count |\n| eventNCondition | string | Vartests on button N itself (e.g. \"VarOperation:key,>,0\"). When it fails the button is disabled (default) or hidden |\n| eventNConditionAction | string | What a failing button condition does: disable (default), hide, or none (button stays usable) |\n| trigger | string | Only these fire: EventStart, StartRound, EndRound, EndRound, StartFinalRound, Mythos, BeforeMonsterActivation, EndInvestigatorTurn, Eliminated (an investigator is eliminated), NoMorale, Defeated/DefeatedUnique (also Defeated), Var (an operation sets @name above 0). There is **no token trigger**: a token runs its own event1 when clicked |\n| conditions | string | **Legacy** \u2014 old AND-only form of vartests (\"var,comparator,value\"). Ignored entirely when vartests is also set. Prefer vartests |\n| highlight | bool | Camera focuses on the event's board position |\n| xposition | float | X position on board (for token placement) |\n| yposition | float | Y position on board |\n| operations | string | Space-separated variable operations (e.g., \"$end,=,1\") |\n| vartests | string | Variable tests (e.g., \"VarOperation:#round,>=,5\"). If they fail, this event does not run at all \u2014 it never routes between buttons |\n| add | string | Space-separated component names to show |\n| remove | string | Space-separated component names to hide, or keywords: #monsters, #boardcomponents, #shop (any format); #uicomponents, #doors, #tiles, #qitems, #tokens (format 20+) |\n| audio | string | Audio clip name to play |\n| randomevents | bool | Randomly select from event list instead of showing all |\n| quota | int | Success threshold for skill tests |\n| buttoncolorN | string | Button N color override (e.g., \"red\") |\n| minhero / maxhero | int | Only run with at least / at most this many investigators |\n| mincam | bool | Set minimum camera position |\n| maxcam | bool | Set maximum camera position |\n\n## Variable Operations (the `operations` field)\nFormat: `variable,operator,value`\n- Operators: =, +, -, *, /\n- Special variables: $end (ends scenario), $mythosMinor, $mythosMajor, $mythosDeadly, #round, #heroes\n\n**IMPORTANT:** `operations` is for **variable assignment** only (e.g., `counter,+,1`). It is NOT for placing components on the board. Use the `add` field (space-separated component names) to show tiles, tokens, and spawns, and the `remove` field to hide them.\n\n## Variable Tests\nFormat: `VarOperation:variable,comparator,value`\n- Comparators: ==, !=, >, <, >=, <=\n- Logical operators go between tests: `VarOperation:a,>=,1 VarTestsLogicalOperator:OR VarOperation:b,>=,1` (left to right, starting as AND; a trailing operator has no effect)\n\n## Common Patterns\n\n### Buttons vs Event References\nValkyrie only parses event1 through eventN where N = buttons. This means:\n- buttons=2 \u2192 only event1 and event2 are loaded\n- If event3 is set but buttons=2, event3 is **silently ignored and dropped on re-save**\n- Even display=false auto-advancing events need buttons=1 if they have event1\n- buttons=0 is only safe when there are NO eventN fields (e.g. a terminal remove-only event)\n\n### TokenInvestigators Removal\nCommunity quests always remove TokenInvestigators after setup so the start position marker doesn't stay interactable:\n```\nEventSetup: buttons=1, add=TokenInvestigators, event1=EventRemoveInv\nEventRemoveInv: display=false, buttons=0, remove=TokenInvestigators\n```\nNote: EventRemoveInv uses buttons=0 because it has no event1. EventSetup needs buttons=1 for its event1 to be parsed.\n\n## Triggers\n- **EventStart**: Fires when scenario begins\n- **Mythos**: Fires during mythos phase. **IMPORTANT**: Must have buttons>=1, otherwise Valkyrie auto-confirms and skips sub-events entirely\n- **StartRound**: Fires at start of each round\n- **EndRound**: Fires at end of each round\n- **Eliminated**: Fires when all investigators eliminated\n- **DefeatedMonster***: Fires when a specific monster type is defeated (e.g., DefeatedMonsterCultist)\n- **DefeatedCustomMonster***: Fires when a custom monster is defeated (e.g., DefeatedCustomMonsterBoss)\n\n## Button Labels\nSet via localization: `EventName.button1`, `EventName.button2`, etc.\nCommon patterns: `{qst:CONTINUE}`, `{qst:PASS}`, `{qst:FAIL}`\n\n## Camera, highlight and sound\n- An event (or spawn) with `xposition`/`yposition` moves the camera there when it runs; `highlight=true` also pulses a circle at that spot. Spawns use it to show where the monster goes.\n- `audio` plays a one-off sound on top of whatever is playing, when the event runs (also for hidden events and clicked tokens). It keeps playing after the dialog closes, so a long clip overlaps the next one. `music` replaces the background music (the previous track fades out). Both take catalog Audio IDs or `.ogg` files in the scenario folder (Valkyrie's editor lists only .ogg). A translated clip in a language folder (`audio/German/x.ogg` or `German/audio/x.ogg`) is played instead when the game runs in that language.\n- `generate_narration` speaks an event's text into `audio/narration/.ogg` and sets `audio` (see the /narration skill).\n- `generate_sound_effect` makes a sound from a description into `audio/sfx/.ogg` and sets `audio` (see the /sound-effects skill). For an effect and narration on one moment, put the effect on a hidden event (`display=false`, `buttons=1`) whose `event1` is the narrated event.\n\n## Text codes (in any dialog text)\n- `{c:ComponentName}` prints a component's name: a tile's name and pack icon (use it in placement dialogs so players take the right tile), or the item a random QItem picked. For an event, it prints the `{rnd:hero}` that event chose.\n- `{rnd:hero}` picks a random investigator's name; `{c:EventName}` repeats it later.\n- `{var:VarName}` prints a variable's current value.\n- `{qst:KEY}` inserts another localization entry. Icons: `{action}`, `{strength}`, `{agility}`, `{observation}`, `{lore}`, `{influence}`, `{will}`, `{success}`, `{clue}`, `{health}`, `{sanity}`.\n\n## Trigger timing (MoM)\n- `Mythos` events run in the Mythos phase in no fixed order with the base-game mythos events. `BeforeMonsterActivation` always runs after the mythos events, so it is the predictable choice.\n- `EndInvestigatorTurn` is the natural place to check end conditions.\n- `Eliminated` does not fire immediately: after the first investigator is eliminated, one more full round is played, then the event runs once. Word the defeat event accordingly (\"As the last of you falls\u2026\"). Setting `#eliminated` to 1 starts the same countdown.\n"; export declare const LOCALIZATION_FORMAT_DOC = "# Valkyrie Localization Format\n\n## File Format\nCSV-like format with header line.\n\n```\n.,English\nkey,value\nkey,\"value with, commas\"\n```\n\n## Key Patterns\n| Pattern | Example | Description |\n|---------|---------|-------------|\n| quest.name | quest.name | Scenario display name |\n| quest.description | quest.description | Scenario description |\n| quest.authors | quest.authors | Author credits |\n| Component.text | EventStart.text | Main text for component |\n| Component.button1 | EventStart.button1 | Button label |\n| Component.uitext | UIBG.uitext | UI element text |\n| KEYWORD | CONTINUE | Reusable text referenced with {qst:KEYWORD} |\n\n## Substitution Tags\n| Tag | Description |\n|-----|-------------|\n| {qst:KEY} | Reference another localization key |\n| {ffg:KEY} | Reference game content localization |\n| {c:ComponentName} | Reference component display name |\n| {action} | Action icon |\n| {clue} | Clue icon |\n| {strength} | Strength skill icon |\n| {agility} | Agility skill icon |\n| {observation} | Observation skill icon |\n| {lore} | Lore skill icon |\n| {influence} | Influence skill icon |\n| {will} | Will skill icon |\n\n## Newlines\nUse \\n for newlines within values.\n"; export declare const PATTERN_REFERENCE_DOC = "# Valkyrie Scenario Pattern Reference\n\n## Standard Tile Placement Chain\nEvery tile reveal follows this sequence \u2014 each phase ALWAYS calls the next:\n```\nPlaceTile \u2192 PlaceDecoration \u2192 PlaceConnections \u2192 PlaceItems \u2192 PlacePeople \u2192 MoveOneSpace\n```\n- PlaceTile: add=TileX, display=false, buttons=1\n- PlaceDecoration: add walls/barriers\n- PlaceConnections: add explore tokens to adjacent areas\n- PlaceItems: add search/interact tokens\n- PlacePeople: add NPC tokens; trigger spawns via event1 (`event1=SpawnX EventNext`), never add\n- MoveOneSpace: operations=moveOneSpace,=,1, buttons=0 (terminal)\n\n## Silent Event Rules\n- Silent events MUST have BOTH `display=false` AND `buttons=0` (when no eventN fields). `buttons=0` alone is not sufficient \u2014 Valkyrie still tries to render the event dialog without `display=false`.\n- If `event1` is set, MUST have `buttons>=1` (even with `display=false`)\n- `buttons=0` only safe when NO eventN fields exist\n- Example silent passthrough: `display=false, buttons=1, event1=EventNext`\n- Example silent terminal: `display=false, buttons=0, remove=TokenOld`\n\n## Mythos Initialization Formula\n```\ndeadlyRound = 20 - #heroes\nmajorRound = deadlyRound / 2\n```\nInitialize in EventStart chain. Use StartRound triggers with `>=` (not `==`) for round checks.\n\n## Event Loop Structure\n```\nInit (set counter=0) \u2192 Controller \u2192 Exit (vartests counter>=limit) or Body (increment, loop back)\n```\n- Controller: `display=false, buttons=1, event1=EventLoopExit EventLoopBody`\n- EventLoopExit has `vartests=VarOperation:counter,>=,3` \u2014 it runs once the limit is reached\n- Otherwise the exit is skipped and EventLoopBody (no tests) runs\n\n## Token Swap Pattern\nReplace tokens in a single silent event:\n```\ndisplay=false, buttons=1, remove=OldToken, add=NewToken, event1=NextEvent\n```\n\n## Variable Types Quick Reference\n| Prefix | Type | Examples |\n|--------|------|----------|\n| (none) | Quest variable | cluesFound, doorUnlocked |\n| $ | System variable | $end, $mythosMinor, $mythosMajor, $mythosDeadly |\n| # | Read-only | #round, #heroes, #heroName, #rand6, #BtT |\n| @ | Trigger | Set by game events |\n\n## How Tests Branch (vartests)\nA component's vartests decide whether **it** runs; they never pick a button.\n- Failing vartests: the event is skipped as if it were not listed.\n- A hidden event (display=false) always follows its first enabled button \u2014 so with an unconditional button 1, event2+ **never** run.\n- To branch, list the candidates in one button, most specific first: `event1=EventFire EventSkip`.\n Valkyrie runs the first one whose vartests pass. Give EventFire the vartests; leave EventSkip untested as the fallback.\n- To enable/disable a *button* instead, use `eventNCondition`.\n\n## conditions (legacy)\n`conditions=var,op,val var2,op,val2` is the pre-vartests syntax, converted to AND-ed vartests.\nIt is **ignored** whenever `vartests` is set, so never combine them \u2014 write\n`vartests=VarOperation:a,==,0 VarTestsLogicalOperator:AND VarOperation:#round,>=,3`.\n\n## UI Layering Order\nElements render in add order. Buttons MUST be added LAST to remain clickable.\nAlways use `vunits=True` for resolution independence.\n\n## Item Distribution Modes\n| Mode | Fields | Behavior |\n|------|--------|----------|\n| Random by trait | traits=weapon | Random item matching trait |\n| Specific item | itemname=ItemCommonKnife | Exact item |\n| Pool | itemname=Item1 Item2 Item3 | Random from list |\n| Trait with exclusion | traits=common, itemname=Excluded1 | Random trait, exclude listed |\n| Starting | starting=True | Given at scenario start (every other item needs starting=false) |\n\n## Multi-Question Dialogue Structure\nN questions with pass/fail \u2192 2^N permutation events.\nFor 3 questions: Q1 \u2192 Q2(pass/fail) \u2192 Q3(PP/PF/FP/FF) \u2192 8 outcomes.\nAlternative: track successes with a variable, check threshold at end.\n\n## One-Shot Events\nGate with `vartests=VarOperation:fired,==,0` and set `operations=fired,=,1` in the same (or the next) event.\nAdd further tests with `VarTestsLogicalOperator:AND` rather than a separate conditions field.\n"; export declare const COMPONENT_FORMAT_DOC = "# Valkyrie Component Types\n\n## Board Coordinates\nx grows east, y grows north. A catalog tile hangs east and south from its (xposition, yposition), which is its top-left corner, border included: a large tile at (0, 0) covers x 0..7, y -7..0. Small tiles are 7x3.5. rotation turns the tile counter-clockwise around that corner. A customImage tile is centred on its position instead. Tokens and MPlaces are centred on their position and must lie inside a tile. Use place_tile_relative, get_map_ascii and render_map instead of computing positions by hand.\n\n## Tiles (tiles.ini)\nPrefix: `Tile`\n| Field | Required | Description |\n|-------|----------|-------------|\n| side | Yes* | TileSide name from game content. **Must be a valid catalog ID** \u2014 invalid sides crash Valkyrie |\n| customImage | Yes* | *Instead of side (format 21+):* image path relative to the scenario folder, e.g. img/cellar.png. A missing file crashes Valkyrie |\n| top / left | No | Pixel anchor inside customImage (default: image center) |\n| xposition | Yes | X board position |\n| yposition | Yes | Y board position |\n| rotation | No | 0, 90, 180, or 270 degrees |\n\n*One of side or customImage is required.\n\n## Tokens (tokens.ini)\nPrefix: `Token`\n| Field | Required | Description |\n|-------|----------|-------------|\n| type | Yes | TokenSearch, TokenExplore, TokenInteract, TokenInvestigators, TokenWallOutside, TokenWallInside \u2014 or a catalog Monster ID to show that monster's image (format 21+) |\n| xposition | Yes | X position |\n| yposition | Yes | Y position |\n| buttons | No | Number of interaction buttons |\n| event1 | No | Event triggered on interaction |\n| vartests | No | While failing, clicking the token does nothing. The token is still shown \u2014 use add/remove to show or hide it |\n| rotation | No | Rotation for wall tokens |\n| tokensize | No | *Format 21+:* small (1x1), medium (2x1), huge (2x2), massive (3x2), Original (image's own size), or a number of squares. Case-sensitive |\n| clickeffect | No | *Format 21+:* false = decorative, not clickable (no event1 needed) |\n| customImage | No | *Format 21+:* image path relative to the scenario folder; replaces the type's image (type then defaults to TokenSearch) |\n\n### Token-Event Linking\nTo make a token interactive, set BOTH `buttons` and `event1`:\n```\n[TokenSearch1]\ntype=TokenSearch\nxposition=5\nyposition=10\nbuttons=1\nevent1=EventSearched\n```\n**Common mistake:** Setting `event1` without `buttons=1`. Valkyrie only reads event1..eventN up to the buttons count, so `event1` without `buttons>=1` is silently ignored.\n\n## Spawns (spawns.ini)\nPrefix: `Spawn`\n\n**IMPORTANT:** A spawn is an event. It runs when listed in another event's `eventN` \u2014 **not** via `add` (Valkyrie ignores spawns in add; validate_scenario reports it). Chain like the golden scenario: `event1=SpawnGhost EventNext` on the caller, and `event1=EventNext` on the spawn so the story continues. If the spawn's vartests fail, the caller falls through to EventNext.\n\nOptional `xposition`/`yposition`: Valkyrie pans the camera there and shows the monster figure at that square during the spawn. Without them no placement hint is shown.\n\n| Field | Required | Description |\n|-------|----------|-------------|\n| monster | Yes | Monster type name(s), space-separated |\n| xposition / yposition | No | Where to show the monster placement |\n| buttons | No | Button count |\n| event1 | No | Next event |\n| vartests | No | While failing, the spawn is skipped when triggered |\n| add | No | Space-separated component names to show |\n| uniquehealth | No | Health **added** to the monster type's own health (with unique=true) |\n| uniquehealthhero | No | Health added per investigator, on top of the monster type's own |\n\n## Items (items.ini)\nPrefix: `QItem`\n| Field | Required | Description |\n|-------|----------|-------------|\n| itemname | No | Space-separated catalog item IDs (e.g., ItemCommonKnife, ItemCommonKeroseneLantern). Must use catalog IDs, not display names |\n| starting | **Always set** | true = given at the start. **A missing value counts as true** (legacy), so items handed out by searches need starting=false. upsert_item writes false by default |\n| traits | No | Space-separated: weapon, lightsource, equipment, common, spell |\n| traitpool | No | Alternative trait matching |\n| inspect | No | Event reference triggered on item inspection |\n\n## Puzzles (other.ini) \u2014 upsert_puzzle\nPrefix: `Puzzle`. A puzzle is an **event**: a button starts it (`event1=PuzzleSafe`), never `add=`. Its window shows no text; `.button1` labels the finish button, enabled once solved, which runs `event1`. \"Close\" keeps progress and runs nothing.\n| Field | Required | Description |\n|-------|----------|-------------|\n| class | No | slide (default), code, image, tower |\n| skill | No | Skill icon shown in the window: {observation}, {lore}, {agility}, {strength}, {will}, {influence} |\n| puzzlelevel | No | code: positions (default 4); image: columns; slide/tower: minimum moves (difficulty) |\n| puzzlealtlevel | No | code: number of symbols 1..N (default 3); image: rows; unused otherwise |\n| puzzlesolution | No | code only: fixed answer, space-separated symbols (\"3 6 1\"); random when empty |\n| image | No | image: the picture (catalog puzzle image or scenario file); code: symbol or element for icons instead of digits |\n| buttons / event1 | Yes | buttons=1, event1 = what happens after solving |\n| vartests | No | While failing, the puzzle event is skipped |\n\n## UI Elements (ui.ini)\nPrefix: `UI`\n| Field | Required | Description |\n|-------|----------|-------------|\n| image | No | Built-in image (ImageCutsceneBG, ImageInvestigatorSelectTitle, ...) or scenario file (img/Letter.jpg; a copy in a language folder such as English/img/Letter.jpg wins for that language) |\n| size | No | Height (vunits: fraction of screen height); width follows the image aspect ratio, or textaspect for text |\n| vunits | No | True: sizes and positions in screen heights (recommended) |\n| xposition / yposition | No | Offset from the screen **centre** (0,0 = centred; negative = left/up) unless halign/valign anchor it to an edge |\n| halign / valign | No | left/right, top/bottom: anchor to that screen edge; the position becomes the distance from it |\n| textsize / textaspect / textcolor / textbackgroundcolor / textAlignment / richText | No | Text styling; the text is `.uitext` |\n| buttons / event1 | No | buttons=1 makes the element clickable and runs event1 |\n| border / clickeffect / fadespeed | No | Frame, click animation (default true), fade (fast) |\n\n## Custom Monsters (spawns.ini or monsters.ini) \u2014 upsert_custom_monster\nPrefix: `CustomMonster`\n| Field | Required | Description |\n|-------|----------|-------------|\n| base | Yes | Base monster type from catalog |\n| health | No | Base health |\n| healthperhero | No | Per-hero health modifier |\n| horror / awareness | No | Horror and awareness overrides |\n| traits | No | Monster traits |\n| image | No | Portrait image (file in scenario folder or content image ID) |\n| imageplace | No | Board image; placed at its own size (Valkyrie 3.20+) |\n| activation | No | **MoM: one Event name** (`activation=EventBossActivation`), run every monster phase. Make it a silent event with `randomevents=true` listing move/attack events. Alternatively, Activation component names **without** the `Activation` prefix (`activation=BossRage` uses ActivationBossRage). Empty = the base monster's activations |\n| evadeevent / horrorevent | No | Event queued instead of the standard evade / horror check |\n| attacks | No | Attack overrides |\n\nLocalization: `.monstername` (display name), `.info`.\n\n## Activations (other.ini) \u2014 upsert_activation\nPrefix: `Activation`. Custom monster attack/move cards, chosen at random among those whose vartests pass.\n| Field | Required | Description |\n|-------|----------|-------------|\n| minionfirst / masterfirst | No | Which monster acts first |\n\nLocalization: `.ability`, `.minion`, `.master`, `.movebutton`, `.move`.\n\n## Monster Placements (other.ini) \u2014 upsert_mplace\nPrefix: `MPlace`. Board position for placing a spawned monster.\n| Field | Required | Description |\n|-------|----------|-------------|\n| xposition / yposition | Yes | Board position |\n| master | No | Position for the master (not minion) figure |\n| rotate | No | Rotate the figure |\n| tokensize | No | *Format 21+:* small, medium, huge, massive, Original, or a number (same as tokens) |\n\n## Quest Settings (quest.ini) \u2014 set_quest_config\n| Field | Description |\n|-------|-------------|\n| difficulty | 0.0-1.0 |\n| lengthmin / lengthmax | Play time in minutes |\n| minhero / maxhero | Supported investigator count, 1-5 (Valkyrie defaults to 2-5; shown on the scenario list) |\n| image | Cover image |\n| format | Managed automatically: 19, raised to 20/21 when newer features are used. Valkyrie 3.20+ reads 21; older versions refuse newer formats |\n\nFields Valkyrie does not read for a component type are reported by validate_scenario as field-schema warnings \u2014 they are silently ignored in game.\n"; //# sourceMappingURL=format-docs.d.ts.map