API 参考API reference
本页内容由 ModApiSiteExporter 从游戏代码生成。配置表的分类、行数、原版 ID 与示例值来自游戏实际加载的数据;“剧情脚本”一栏由 Export-ScriptApi.ps1 从源码解析。
Generated from the game code by ModApiSiteExporter. Table categories, row counts, built-in IDs and sample values come from data the game actually loaded; the “Story scripts” tab is parsed from source by Export-ScriptApi.ps1.
每张表对应一个 C# 类。灰色行是所有表共有的基础字段。“XML”列为 ✓ 的字段可以在 def.xml 中赋值;“首行示例值”取自原版第一行。搜索支持类名、中文分类、表文件名和字段名。
Each table is a C# class. Greyed rows are base fields shared by all tables. Fields with ✓ under “XML” can be set from def.xml; “First row value” is taken from the first built-in row. Search matches class, category, file and field names.
Mod 作者会接触到的公开类型。引擎内部的成员也一并列出并注明,请勿依赖它们。 Public types mod authors deal with. Engine-internal members are listed and marked; don't rely on them.
manifest.xml
def.xml
role-customize.xml
ShipTextures.xml 由专用解析器读取,格式见资源 Mod。ShipTextures.xml has its own parser; see Resource mods.
剧情脚本中 mission 对象(C# 类 ScriptInterface)的全部公共方法,按源码分组。签名与注释从源码原样抄录;每个方法标出官方 300+ 个剧情脚本中的调用次数,次数多的更可靠。除带说明的条目外,行为未逐一验证。用法见剧本 Mod。
Every public method of the mission object (C# class ScriptInterface) available to story scripts, grouped as in the source. Signatures and comments are copied from source; each method shows how often the 300+ official story scripts call it — frequently used ones are the safest. Apart from entries with a description, behaviour has not been verified one by one. Usage: Scenario mods.
用法与平台差异见 Lua 程序 Mod。Usage and platform notes: Lua program mods.