--- title: xs:unsignedInt - X4 架构类型 summary: xs:unsignedInt: XML Schema 无符号 32 位整数,范围为 0 至 4294967295。 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/"] --- ## 含义 xs:unsignedInt: XML Schema 无符号 32 位整数,范围为 0 至 4294967295。 XSD 类型约束 XML,并不声明 Lua 返回值或 event.param 的数据类型。通过架构验证不能证明游戏效果已经发生。 ## 架构结构 `W3C XML Schema` | 属性 | 值 | | --- | --- | | 构造方式 | `builtin` | | 基础类型 | [`xs:nonNegativeInteger`](wiki:schema-xs-nonnegativeinteger-bbdb0370) | | 约束 | 值 | | --- | --- | | `minInclusive` | `0` | | `maxInclusive` | `4294967295` | restriction 收紧基础类型的限制;union 接受其中一个类型分支;list 描述由空白分隔的项目。同一个限制中的 enumeration 值互为可选项。pattern 使用 XML Schema 正则表达式,不是 Lua 模式或 JavaScript RegExp。从基础类型继承的约束仍然有效。 ## 示例与结果 ```text 0 ``` **运行效果:** 0是有效的; -1是不有效的. 一个属性可能会加上进一步的限制. 对象与对象组变量必须已在正确的 MD / AI 上下文中创建。这些是教学片段,并非完整可运行的任务。 ## 使用位置 | 元素 | 属性 | 架构 | | --- | --- | --- | | [`level`](wiki:api-md-level-f1dfe606) | `value` | `libraries/parameters.xsd` | | [`plot`](wiki:api-md-plot-76ae4124) | `baseprice` | `libraries/parameters.xsd` | [所有架构类型](wiki:schema-types) · [Lua / MD 值类型](wiki:types)