--- title: shiptypeexprlookup - X4 架构类型 summary: shiptypeexprlookup: X4 属性架构类型:基础类型、约束与可选值。 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/"] --- ## 含义 shiptypeexprlookup: X4 属性架构类型:基础类型、约束与可选值。 XSD 类型约束 XML,并不声明 Lua 返回值或 event.param 的数据类型。通过架构验证不能证明游戏效果已经发生。 ## 架构结构 `libraries/common.xsd` | 属性 | 值 | | --- | --- | | 构造方式 | `union` | | 联合类型成员 | [`expression`](wiki:schema-expression-b8bc0e4f) | 其他内线工会分支: | 属性 | 值 | | --- | --- | | 构造方式 | `restriction` | | 基础类型 | [`xs:string`](wiki:schema-xs-string-d5652e9b) | | 约束 | 值 | | --- | --- | | `enumeration` | `shiptype.personalvehicle` | | `enumeration` | `shiptype.police` | | `enumeration` | `shiptype.xsdrone` | | `enumeration` | `shiptype.escapepod` | | `enumeration` | `shiptype.distressdrone` | | `enumeration` | `shiptype.lasertower` | | `enumeration` | `shiptype.scout` | | `enumeration` | `shiptype.fighter` | | `enumeration` | `shiptype.heavyfighter` | | `enumeration` | `shiptype.interceptor` | | `enumeration` | `shiptype.courier` | | `enumeration` | `shiptype.smalldrone` | | `enumeration` | `shiptype.bomber` | | `enumeration` | `shiptype.frigate` | | `enumeration` | `shiptype.corvette` | | `enumeration` | `shiptype.gunboat` | | `enumeration` | `shiptype.transporter` | | `enumeration` | `shiptype.miner` | | `enumeration` | `shiptype.personnelcarrier` | | `enumeration` | `shiptype.scavenger` | | `enumeration` | `shiptype.destroyer` | | `enumeration` | `shiptype.freighter` | | `enumeration` | `shiptype.largeminer` | | `enumeration` | `shiptype.carrier` | | `enumeration` | `shiptype.resupplier` | | `enumeration` | `shiptype.builder` | | `enumeration` | `shiptype.battleship` | | `enumeration` | `shiptype.tug` | | `enumeration` | `shiptype.compactor` | | `enumeration` | `shiptype.explorer` | | `enumeration` | `shiptype.miningrig` | | `enumeration` | `shiptype.expeditionary` | | `enumeration` | `shiptype.envoy` | restriction 收紧基础类型的限制;union 接受其中一个类型分支;list 描述由空白分隔的项目。同一个限制中的 enumeration 值互为可选项。pattern 使用 XML Schema 正则表达式,不是 Lua 模式或 JavaScript RegExp。从基础类型继承的约束仍然有效。 ## 示例与结果 根据下面的属性页面进行文本示例. 单独从类型名称中推断一个通用可执行的例子. ## 使用位置 | 元素 | 属性 | 架构 | | --- | --- | --- | | [`find_object`](wiki:api-md-find-object-573637c1) | `shiptype` | `libraries/common.xsd` | | [`find_object_component`](wiki:api-md-find-object-component-4060ecbe) | `shiptype` | `libraries/common.xsd` | | [`find_ship`](wiki:api-md-find-ship-00f7a52e) | `shiptype` | `libraries/common.xsd` | | [`find_ship_by_true_owner`](wiki:api-md-find-ship-by-true-owner-ef45104b) | `shiptype` | `libraries/common.xsd` | | [`match_content`](wiki:api-md-match-content-247d1aba) | `shiptype` | `libraries/common.xsd` | [所有架构类型](wiki:schema-types) · [Lua / MD 值类型](wiki:types)