--- title: xs:nonNegativeInteger - X4 schema type summary: xs:nonNegativeInteger: An integer greater than or equal to zero. 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 xs:nonNegativeInteger: An integer greater than or equal to zero. 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 `W3C XML Schema` | Property | Value | | --- | --- | | Construction | `builtin` | | Base type | [`xs:integer`](wiki:schema-xs-integer-5c99925f) | | Constraint | Value | | --- | --- | | `minInclusive` | `0` | 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 ```text 0 ``` **What happens:** 0 and 12 satisfy this base type; -1 does not. Object and group variables must already exist in the correct MD / AI context. These are learning fragments, not a complete runnable mission. ## Used by | Element | Attribute | Schema | | --- | --- | --- | | [`run_script`](wiki:api-md-run-script-b4213c2b) | `sinceversion` | `libraries/aiscripts.xsd` | | [`select`](wiki:api-md-select-7d56c04d) | `min` | `libraries/drops.xsd` | | [`select`](wiki:api-md-select-7d56c04d) | `weight` | `libraries/objectspawnrules.xsd` | | [`wait`](wiki:api-md-wait-bde93e56) | `sinceversion` | `libraries/aiscripts.xsd` | [All schema types](wiki:schema-types) ยท [Lua / MD value types](wiki:types)