--- title: negatecondition - X4 schema type summary: negatecondition: X4 attribute schema type: base types, constraints and value alternatives. section: reference kind: guide status: reference updated: 2026-10-27 tags: ["XSD","schema","types"] sources: ["https://wiki.egosoft.com/X4%20Foundations%20Wiki/Modding%20Support/","https://www.w3.org/TR/xmlschema11-2/"] --- ## Meaning negatecondition: X4 attribute schema type: base types, constraints and value alternatives. An XSD type constrains XML, rather than declaring a Lua return or the payload type of event.param. A valid schema value does not prove a successful game effect. ## Schema structure `libraries/common.xsd` | Property | Value | | --- | --- | | Construction | `restriction` | | Base type | [`boolean`](wiki:schema-boolean-bf84d3d6) | restriction narrows a base type; union accepts one of its branches; list describes whitespace-separated items. Enumeration values in one restriction are alternatives. Pattern syntax is XML Schema regex, not Lua patterns or JavaScript RegExp. Constraints inherited from the base type still apply. ## Example and result Use the attribute pages below for contextual examples. A generic executable example is not inferred from a type name alone. ## Used by | Element | Attribute | Schema | | --- | --- | --- | | [`check_any`](wiki:api-md-check-any-aee0eb8b) | `negate` | `libraries/aiscripts.xsd` | | [`check_any`](wiki:api-md-check-any-aee0eb8b) | `negate` | `libraries/md.xsd` | | [`check_value`](wiki:api-md-check-value-b80c0225) | `negate` | `libraries/common.xsd` | | [`debug_text`](wiki:api-md-debug-text-0b83c97f) | `negate` | `libraries/common.xsd` | | [`do_elseif`](wiki:api-md-do-elseif-e704f272) | `negate` | `libraries/aiscripts.xsd` | | [`do_elseif`](wiki:api-md-do-elseif-e704f272) | `negate` | `libraries/md.xsd` | | [`do_if`](wiki:api-md-do-if-696c18e7) | `negate` | `libraries/aiscripts.xsd` | | [`do_if`](wiki:api-md-do-if-696c18e7) | `negate` | `libraries/md.xsd` | | [`do_while`](wiki:api-md-do-while-57a71a14) | `negate` | `libraries/aiscripts.xsd` | | [`do_while`](wiki:api-md-do-while-57a71a14) | `negate` | `libraries/md.xsd` | | [`remove_value`](wiki:api-md-remove-value-0abb2c7a) | `negate` | `libraries/common.xsd` | | [`set_value`](wiki:api-md-set-value-006f7cfd) | `negate` | `libraries/common.xsd` | [All schema types](wiki:schema-types) ยท [Lua / MD value types](wiki:types)