api

Instance Conditions

Conditions for matching OpenMW objects, player state, location, ownership, and world state.

Instance conditions are YAML predicates. Put them in an instance rule's conditions array; every condition entry must pass. A table-valued condition is normally an OR-list when written as a YAML sequence, while map-shaped values are passed to the condition as one structured value. The exception is global_value, whose entries are ANDed. Conditions are normalized before evaluation; do not rely on YAML order.

These references document the instance-module format. Static replacement modules use replace_meshes and cannot be combined with instances.

Choose a reference

NeedReference
Cells, regions, coordinates, files, and identityLocation and identity
Meshes, names, inventory, tags, locks, and object propertiesObject properties
Target actors, stats, factions, spells, and dispositionActors and target state
Player state, quests, globals, time, equipment, and weatherPlayer and world state
Inverting conditions and exclusionsLogic conditions
Comparison bounds and one-sided rangesComparison ranges

Common rule shape

instances:
  - conditions:
      - object_type: Container
      - cell_match: tomb
    actions:
      - disable: true

Conditions do not roll chance. Add chance to an action block when the match should sometimes produce an effect. See action execution order and random action ranges.

Evaluation

SSS may reorder conditions internally for efficient evaluation. Do not rely on YAML condition order.

Unless an entry says otherwise, a false or type-incompatible condition simply prevents the rule from matching; conditions do not persist state. Invalid condition names and invalid OpenMW type names raise errors. YAML shape and value constraints are enforced by the schema; runtime behavior outside schema validation is not a supported authoring contract.