{
  "contract": "control-options",
  "version": 2,
  "summary": "This contract covers which physical inputs produce each action on every platform. It also covers complete input methods, named control presets, remapping, press styles, simpler alternatives, and device-motion inputs. This contract does not cover action prompts, input timing help, the choice between actions that share one input, or event order. The Action legibility contract covers action prompts and the choice between actions that share one input, the Input forgiveness contract covers input timing help, and the Event resolution contract covers event order.",
  "questions": {
    "remapping-default": {
      "asks": "By default, how can players change the controls?",
      "rationale": "A platform may offer fixed controls, presets, or free changes. This answer is the default answer. A platform row can choose another answer.",
      "when": {
        "row-count": {
          "platform-control-sets": "non-empty"
        }
      },
      "otherwise": "With no platform control set, this adoption makes no default remapping promise.",
      "options": {
        "fixed-bindings": {
          "meaning": "The controls cannot be changed in the game. A puzzle game always keeps rotate on the space bar.",
          "semantics": "No player-facing setting changes an action's physical input or press style."
        },
        "swap-only": {
          "meaning": "Existing controls can only exchange actions. A platformer can swap jump and dash, but an unused button cannot receive either action.",
          "semantics": "A supported binding can exchange its current action with another supported binding; no action can move independently to an otherwise unused input."
        },
        "presets-only": {
          "meaning": "Players can choose only between presets. An action game offers the presets Default and Alternate, and no single button can be changed.",
          "semantics": "The player may select a complete declared preset but cannot change one binding independently inside that preset. The platform offers at least two presets whose availability is starting-and-selectable or player-selectable."
        },
        "any-action-any-input": {
          "meaning": "Any action can move to any supported input. A strategy game can move end turn from Enter to an unused mouse button.",
          "semantics": "Every covered action can be assigned independently to any supported remappable input, including an otherwise unassigned input; conflicts are resolved visibly before use."
        },
        "action-and-press-style": {
          "meaning": "Both the input and the press style can change. An adventure game can move interact to another button and change a hold into one press.",
          "semantics": "Every covered action can change to a supported input and to any press style that its cited platform rule offers for that action."
        }
      }
    },
    "demanding-input-default": {
      "asks": "By default, what happens when an action needs a demanding press?",
      "rationale": "A hold, rapid presses, a double press, or a button combination can stop a player from using an action that the player knows. This answer is the default answer.",
      "when": {
        "row-count": {
          "platform-control-sets": "non-empty"
        }
      },
      "otherwise": "With no platform control set, this adoption makes no default demanding-input promise.",
      "options": {
        "no-demanding-presses": {
          "meaning": "No action needs a demanding press. A card game plays a selected card with one ordinary activation.",
          "semantics": "No covered binding requires timed, held, rapid, repeated, double, simultaneous, directional-sequence, or device-motion input as its only route to the action."
        },
        "simpler-alternative": {
          "meaning": "Every demanding press has a distinct simpler route with no setting change. A repair game offers a separate tap button beside its hold-to-repair control.",
          "semantics": "Every covered demanding binding has a declared alternative that performs the same action without configuration."
        },
        "player-can-change-it": {
          "meaning": "A setting can make the press easier. A racing game can change a held pit command into one ordinary press.",
          "semantics": "A player-facing setting replaces each covered demanding press with a declared easier press style before play uses the binding."
        },
        "required-as-written": {
          "meaning": "The demanding press remains required. A rhythm special still needs two buttons together and has no simpler route from this contract.",
          "semantics": "The covered demanding binding has no simpler alternative or press-style setting promised by this adoption."
        }
      }
    }
  },
  "declares": {
    "values": {},
    "rows": {
      "platform-control-sets": {
        "description": "Supported platforms or editions and their complete control policies. A separate row is required whenever mappings or options differ.",
        "when-empty": "No platform receives a physical-control promise from this adoption.",
        "record": {
          "id": {
            "type": "string",
            "required": true,
            "pattern": "kebab-case",
            "unique": true,
            "description": "A short name for the platform or edition in your game's words, such as pc or console-gamepad."
          },
          "platform-declared-in": {
            "type": "citation",
            "required": true,
            "description": "Where your game's rules name one platform or edition and its supported devices. Use another row when the control behavior differs."
          },
          "methods-declared-in": {
            "type": "citation",
            "required": true,
            "description": "Where your game's rules list the complete input methods and any required switch between them. A PC row may name keyboard and pointer as one mixed method."
          },
          "input-method-coverage": {
            "type": "string",
            "required": true,
            "options": [
              "one-method-covers-all",
              "player-chooses-method",
              "mixed-methods-needed"
            ],
            "description": "Whether one named method covers every action bound on the platform, several named methods each do so, or the named methods must be mixed. A console may offer complete gamepad and accessibility-controller methods."
          },
          "remapping": {
            "type": "string",
            "required": true,
            "options": [
              "use-game-default",
              "fixed-bindings",
              "swap-only",
              "presets-only",
              "any-action-any-input",
              "action-and-press-style"
            ],
            "description": "The platform's remapping policy. Use the default answer, or choose another answer for this row. A console edition may offer presets while the PC edition allows free assignment."
          },
          "settings-rule-declared-in": {
            "type": "citation",
            "required": true,
            "description": "Where your game's rules state the platform's control menu. The rules also state what the platform's effective remapping answer needs: preset selection, conflict handling, or the press styles offered for each action. When bindings are fixed, the rules state explicitly that no changes are possible."
          }
        }
      },
      "control-presets": {
        "description": "Named complete binding sets offered on a platform. A preset maps every action bound on its platform.",
        "when-empty": "No named control preset is offered.",
        "record": {
          "id": {
            "type": "string",
            "required": true,
            "pattern": "kebab-case",
            "unique": true,
            "description": "A short name for the preset in your game's words, such as gamepad-default or gamepad-alternate."
          },
          "platform-control-set": {
            "type": "string",
            "required": true,
            "pattern": "kebab-case",
            "description": "The supported platform or edition that offers this preset."
          },
          "label": {
            "type": "string",
            "required": true,
            "description": "The player-facing preset name, such as Standard or Southpaw."
          },
          "availability": {
            "type": "string",
            "required": true,
            "options": [
              "starting-and-selectable",
              "player-selectable",
              "mode-selected"
            ],
            "description": "Whether this preset is the starting set and remains selectable, is another selectable set, or follows a cited player mode. An assisted-play mode may select its own complete preset."
          },
          "selection-rule-declared-in": {
            "type": "citation",
            "required": true,
            "description": "Where your game's rules state the route that selects this preset and makes its matching action-binding rows current."
          }
        }
      },
      "action-bindings": {
        "description": "Physical inputs that produce actions on a platform or inside one named preset.",
        "when-empty": "No physical input is promised to produce a game action.",
        "record": {
          "id": {
            "type": "string",
            "required": true,
            "pattern": "kebab-case",
            "unique": true,
            "description": "A short name in your game's words for the platform, the action, and the input, such as pc-jump-space. A per-character control set names the character too."
          },
          "platform-control-set": {
            "type": "string",
            "required": true,
            "pattern": "kebab-case",
            "description": "The supported platform or edition where this binding exists."
          },
          "preset": {
            "type": "string",
            "pattern": "kebab-case",
            "description": "The preset that contains this binding. When this field is absent, the binding belongs to the platform's current base set or its freely remappable set. On a platform where players can change controls, the preset is the starting set. Accepted changes change only the current copy, not the preset."
          },
          "context-declared-in": {
            "type": "citation",
            "description": "Where your game's rules state the context in which this binding exists, such as a vehicle layer, menu, training mode, or unlock gate. When this field is absent, the binding exists throughout the selected control set."
          },
          "action-declared-in": {
            "type": "citation",
            "required": true,
            "description": "Where your game's rules name the game action that this binding contributes as a candidate."
          },
          "physical-input-declared-in": {
            "type": "citation",
            "required": true,
            "description": "Where your game's rules name the physical input and the device that supplies it. The physical input is a key, button, axis, touch region, gesture, directional sequence, or device-motion input."
          },
          "action-input": {
            "type": "string",
            "pattern": "kebab-case",
            "description": "A name for the one input that the game receives from this physical activation. Give the name when several bindings use the same physical activation."
          },
          "press-style": {
            "type": "string",
            "required": true,
            "options": [
              "press",
              "release",
              "timed-press",
              "hold",
              "rapid-presses",
              "repeated-presses",
              "double-press",
              "simultaneous-inputs",
              "continuous-axis",
              "gesture",
              "input-sequence"
            ],
            "description": "The physical performance required by this binding. A timed press has a target moment, rapid presses have a rate, repeated presses have a count, and an input sequence is a directional sequence completed by a press."
          },
          "motion-use": {
            "type": "string",
            "required": true,
            "options": [
              "no-motion",
              "optional-motion",
              "required-motion"
            ],
            "description": "Whether this binding uses no device motion, is an optional device-motion route beside another binding, or requires device motion. A handheld aim action may offer tilt as an alternative to the stick. A required-motion binding is demanding because of its motion. A press-style setting does not make it easier, so its easier route is a simpler alternative or another binding. An optional-motion binding has a no-motion binding for the same action on the same platform and preset."
          },
          "demanding-input": {
            "type": "string",
            "required": true,
            "options": [
              "use-game-default",
              "no-demanding-presses",
              "simpler-alternative",
              "player-can-change-it",
              "required-as-written"
            ],
            "description": "The demanding-input answer of this action binding. Use the default answer, or choose another answer for this row. A repeated crafting input may allow a hold even when combat combinations remain fixed. No binding answers required-as-written on a platform whose effective remapping is action-and-press-style."
          }
        }
      },
      "simpler-inputs": {
        "description": "Separate simpler inputs that work without a setting change, for bindings whose effective demanding-input answer promises one.",
        "when-empty": "No demanding binding promises a separate simpler input without a setting change.",
        "record": {
          "id": {
            "type": "string",
            "required": true,
            "pattern": "kebab-case",
            "unique": true,
            "description": "A short name for the alternative in your game's words, such as repair-tap-alternative."
          },
          "action-binding": {
            "type": "string",
            "required": true,
            "pattern": "kebab-case",
            "description": "The demanding binding for which this route is the simpler alternative."
          },
          "alternative-declared-in": {
            "type": "citation",
            "required": true,
            "description": "Where your game's rules name the physical input and the ordinary press style that perform the same game action without a setting change."
          },
          "distinction-rule-declared-in": {
            "type": "citation",
            "required": true,
            "description": "Where your game's rules prove that a successful use of this alternative cannot be mistaken for a failure to finish the demanding input."
          }
        }
      }
    }
  },
  "rules": {
    "press-style-change-needs-a-setting-answer": {
      "forbid": {
        "all": [
          {
            "flag": {
              "remapping-default": [
                "action-and-press-style"
              ]
            }
          },
          {
            "flag": {
              "demanding-input-default": [
                "required-as-written"
              ]
            }
          }
        ]
      },
      "message": "Controls that let players change a press style cannot also require every demanding press exactly as written."
    }
  },
  "origin": "https://opengdd.org/contracts/control-options-2",
  "mechanism": [
    "This text decides the order of the steps for platform selection, preset choice, remapping, physical-input matching, press style, simpler alternatives, device-motion use, and creation of action inputs. The questions and rows supply choices and cited game rules. They do not change the order.",
    "A **control set** is the complete current mapping for one platform and input method. A **preset** is a named immutable source set that can become current. A **binding** joins one physical input and press style to one candidate action. An **action input** is the one signal that the game receives from a physical activation; it carries every matched binding's action as a candidate. Bindings that can be current together and share one physical activation share its optional `action-input` name, while a lone binding's name may remain implicit. A **demanding input** is a timed, held, rapid, repeated, double, simultaneous, input-sequence, or required-device-motion input.",
    "1. Select exactly one matching platform-control-set from the running platform, edition, and supported device rules.",
    "2. Resolve the platform's effective remapping answer. A row value other than `use-game-default` applies. Otherwise `remapping-default` applies.",
    "3. Establish the starting control set from the platform's cited rule. When a preset is selected, copy its complete matching action-binding rows into the current set. The preset itself remains unchanged.",
    "4. Apply control changes only through the effective remapping answer. Fixed bindings refuse all changes. Swap-only exchanges two existing assignments. Presets-only replaces the whole set with another declared preset. Free assignment moves one action independently and resolves conflicts before use. Action-and-press-style also permits a supported press-style change.",
    "5. After an accepted change, the resulting complete set becomes current. Every later binding lookup reads that set, and each binding row's promises follow its action to the input the current set assigns. Presentation of the current binding is owned by Action legibility when adopted, otherwise by the game's UI rules.",
    "6. On physical input, read every binding with a matching physical input and performance in the current platform, device, method, and preset-derived set. A press, release, hold, repeated activation, double activation, simultaneous group, axis, gesture, directional input sequence, or device-motion input matches only under its cited Fixed rule. An optional binding context makes the match provisional. Whether that context holds is decided at the accepted moment. Step 11 says how the accepted moment is determined. Rows that can be current together and share one physical activation agree on one `action-input` value. A physical input cited by a `simpler-inputs` row matches as if it were its named binding: it emits that binding's action input and contributes the same action.",
    "7. Resolve the binding's effective demanding-input answer. A row value other than `use-game-default` applies. Otherwise `demanding-input-default` applies.",
    "8. Under no-demanding-presses, the covered action has an ordinary route. Under player-can-change-it, the selected setting supplies the easier current press style. Under required-as-written, an incomplete demanding input produces no action input from this contract.",
    "9. Under simpler-alternative, the demanding route and every matching simpler row remain available together without configuration. The alternative produces the same action only through its distinct cited input; failure to finish the demanding route never becomes the alternative by itself.",
    "10. A `no-motion` binding reads no device motion. An `optional-motion` binding contributes the same action as its non-device-motion alternative when its gesture completes. A `required-motion` binding produces no action input from a non-device-motion attempt.",
    "11. First, the physical input occurs. Then this contract emits the action input. Then Input forgiveness, when adopted, may shift the accepted moment. Then Action legibility, when adopted, selects the offered candidate at the accepted moment. The result is one action proposal. Thus an interact buffered during a cutscene evaluates candidates in the situation where the input is accepted, not the situation where it was pressed. The emitted action input carries every matched binding's action as a candidate; it is one input with N candidates, never N inputs.",
    "12. When Action legibility is adopted, its shared-input case consumes that one action input and selects one candidate. Otherwise the game's cited Fixed selection rule resolves shared candidates, and the game's UI rules own their presentation. Event resolution begins only after the one action proposal exists.",
    "The order of the steps is: platform, defaults, starting set, accepted control change, current set, physical match, demanding-input answer, simpler route, device-motion rule, one action-input creation, accepted-moment shared-action choice, and one action proposal."
  ],
  "pack": "sha256:af872c7dbbd7b7faeacfbfb6f9015a7e9988a6e44b4726318aa9f91e20fe39b2",
  "answers": {
    "remapping-default": "fixed-bindings",
    "demanding-input-default": "required-as-written"
  },
  "values": {},
  "rows": {
    "platform-control-sets": [
      {
        "id": "arcade",
        "platform-declared-in": "platforms.arcade",
        "methods-declared-in": "controls.arcade-stick",
        "input-method-coverage": "one-method-covers-all",
        "remapping": "use-game-default",
        "settings-rule-declared-in": "controls.fixed-arcade-layout"
      }
    ],
    "control-presets": [],
    "action-bindings": [
      {
        "id": "arcade-rising-strike",
        "platform-control-set": "arcade",
        "action-declared-in": "combat.rising-strike",
        "physical-input-declared-in": "controls.forward-down-forward-punch",
        "press-style": "input-sequence",
        "motion-use": "no-motion",
        "demanding-input": "use-game-default"
      },
      {
        "id": "arcade-break-guard",
        "platform-control-set": "arcade",
        "action-declared-in": "combat.break-guard",
        "physical-input-declared-in": "controls.light-and-medium-buttons",
        "press-style": "simultaneous-inputs",
        "motion-use": "no-motion",
        "demanding-input": "use-game-default"
      }
    ],
    "simpler-inputs": []
  }
}
