Difference between revisions of "Modding Guide/zh"

From Space Engineers Wiki
Jump to: navigation, search
(文件格式)
 
(24 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{under Construction}}
 
{{DISPLAYTITLE:MOD制作指南}}
 
{{DISPLAYTITLE:MOD制作指南}}
 
{{tocright}}
 
{{tocright}}
 
==说明==
 
==说明==
 
:本页主要提供入门模组制作前的基本信息,辅助了解各种模组制作可涉及的范畴和能力。
 
:本页主要提供入门模组制作前的基本信息,辅助了解各种模组制作可涉及的范畴和能力。
:可先阅览 '''[https://www.spaceengineersgame.com/modding-guides/ 官方的模组制作指引页面(英文)]''',基本上大部分过去的维基内容都包括进去了🐶。
+
:可先阅览 '''[https://www.spaceengineersgame.com/modding-guides/ 官方的模组制作指引页面(英文)]'''
  
==模改想法==
+
==模改时 需知目录问题==
:颜色不行;纹理不合理;模型真丑;功能有问题;使用不方便;想加入某某需求系统;PS.中文机翻是不是说明Good.AI😇无用;微软拼音一身反骨。
+
mod文件夹必须包含一个名为Data的子文件夹,其中包含添加或更新的mod的定义文件。几乎所有内容都可以由modder替换/更新(音频、视频、纹理、模型、gui等)。Mods仅限于一个世界,不能改变这个世界范围之外的任何东西。例如,虽然你可以替换块mod的GUI图标之类的东西,但你不能替换整个UI的图形,因为它存在于加载mod的世界之外。?
:通常都是体验过游戏的玩家才会提出各种希望改进私人体验的梦想作为前提。
 
  
==游戏资源==
+
==教程和指引 Tutorials/Guides==
:游戏是对各种数据合理组织后才能将内容表现出来的程序。模改则需要尽可能多的了解这些内容相互影响的程度才能在改动时,避免不必要的结果(比如:做到一半行不通或出现了自己都无法理解的崩溃)。
+
* [[How to Mod Blocks]]
 
+
* [[How to Mod the Skybox]]
===游戏目录===
+
* [[How to Mod Characters]]
:打开 '''steam''' > '''库''' > '''Space Engineers''' > '''⚙管理''' > '''属性...''' > <i>属性对话框:</i>'''已安装文件''' > '''浏览'''
+
* [[How to Mod Character Animations]]
:'''X:\steam\steamapps\common\SpaceEngineers\'''
+
* [[How to Mod Ore]]
::{|style="text-align:left;"
+
* [[How to Mod Production]]
!Bin64
+
* [[How to Mod Script]]
|执行文件和功能[[API]]说明文件
+
* [[How to Mod Respawn Ships]]
|-
+
* [[How to Mod NPC Cargo Ships]]
!style="vertical-align:top;"|[[#数据|Content]]
+
* [[How to Mod Exploration]]
|class="mw-collapsible mw-collapsed" data-expandtext="v" data-collapsetext="^"|游戏资源和数据目录<div class="mw-collapsible-content">
+
* [[How to Mod Scenarios]]
----
 
:{|
 
!Data
 
|主要数据表,翻译对照表等
 
|vs、vsc、resx、sbx、sbs、sbc、sbcB5、gsc、png
 
|-
 
!Audio
 
|音乐音效
 
|wav、xwm
 
|-
 
!Brains
 
|不知
 
|brain
 
|-
 
!CustomWorlds
 
|游戏内容目录:自定义游戏
 
|scf、sbc、sbs、sbsB5、vs、jpg、vx2
 
|-
 
!DataPlatform
 
|不知
 
|空目录
 
|-
 
!Fonts
 
|位图字体
 
|dds、xml
 
|-
 
!InventoryScenes
 
|不知
 
|sbc、sbs、sbsB5
 
|-
 
!Models
 
|模型
 
|hkt(HavokTagfile)、mwm(SE3dModelFile)
 
|-
 
!Mods
 
|不知
 
|空目录
 
|-
 
!Particles
 
|粒子库
 
|mwl
 
|-
 
!Scenarios
 
|游戏内容目录:剧情
 
|scf、sbc、sbs、sbsB5、jpg、png、vx2、sbl、resx、vs、vsc
 
|-
 
!ShaderCache
 
|没必要
 
|cache、hash
 
|-
 
!Shaders
 
|着色器脚本
 
|inl、hlsli、hlsl、xml
 
|-
 
!Textures
 
|材质贴图
 
|B5、dds、png、tai
 
|-
 
!Videos
 
|视频
 
|wmv
 
|-
 
!VisualScripts
 
|额外脚本支持
 
|sbl、resx、vs、vsc
 
|-
 
!VoxelMaps
 
|体素贴图:
 
|vx2
 
|}</div>
 
|-
 
![[#工具|Tools]]
 
|游戏模改或分析用,官方自带辅助工具,真是怀念啊虾米音乐。
 
|-
 
!DeluxeDLC
 
|购买了DeluxeDLC后会有这个目录,里面有游戏原始版本全部执行和数据文件的备份,一批原画设定和音轨;不作为数据源提供给游戏。
 
|-
 
!ContentPC
 
|冗余目录
 
|-
 
!TempContent
 
|冗余目录
 
|}
 
----
 
===文件格式===
 
 
 
{|class="wikitable" style="text-align:left;"
 
!扩展名
 
!编码
 
!语法
 
!用途
 
|-
 
!hlsli
 
|txt
 
|HLSL
 
|-
 
!hlsl
 
|text
 
|HLSL
 
|-
 
!inl
 
|text
 
|C++
 
|C++内联函数?文件,就是C++,出现在着色器目录,D3DX_DXGIFormatConvert.inl,看名字像解DDS的。。
 
|-
 
!mwm
 
|colspan=2|SpaceEngineer3DModelFile
 
|太空工程师模型数据文件,游戏有附赠工具
 
|-
 
!vx2
 
|colspan=2|SpaceEngineerVoxelObjectDataFile
 
|看到多个都和星体(星球、陨星)等体素对象相关记录
 
|-
 
!hkt
 
|colspan=2|HavokTagfile
 
|Havok的模型文件?没有太广泛的应用,似乎也有同名的 mwm文件,应该只是备份档案..
 
|-
 
|mwl
 
|rowspan=13|text windows NOBOM UTF-8
 
|rowspan=13|XML
 
|粒子定义表
 
|-
 
|resx
 
|Microsoft ResX Schema;游戏里主要用作翻译对照表。
 
|-
 
|brain
 
|看样子像是给GoodAi理解怎么进行下一个提示的脚本,有点像状态机又有点像行为树,不知道有啥用。
 
|-
 
|gsc
 
|GuiScreen定义?但只有5个文件?够吗?不懂。
 
|-
 
|scf
 
|和系统的桌面格式一样所以会匿扩展名的文件,campaign战役头文件,也是游戏 Scenarios 剧情内容指向的实体内容头文件。
 
|-
 
|sbx
 
|一些中转的数据格式。
 
|-
 
|sbc
 
|最多的数据定义文件。
 
|-
 
|sbl
 
|常见与翻译战役或地图的翻译数据。
 
|-
 
|sbs
 
|全游戏见过多个 SANDBOX_0_0_0_.sbs 和一个 EasyStart1Objects.sbs 采用该扩展名;存档也是;看起来像是记录宇宙的详细信息。
 
|-
 
|vs
 
|VisualScript,类似于状态机的或行为树。
 
|-
 
|vsc
 
|VisualScriptCollection
 
|-
 
|xml
 
|\Content\Fonts\内的*.xml主要是字体位图索引表 \Bin64\中用作API说明 \Content\Shaders\CacheGenerator.xml不该碰,其它目录中的xml无关数据问题。
 
|-
 
|tai
 
|似乎是及时把一个DDS(用作素材集合的DDS)按分拆成多个单独的DDS素材用的,比如鼠标瞄准贴图。
 
|-
 
|B5
 
|不知B5是指什么B树?5代?
 
|
 
|只有此文件使用该扩展名 mipMapTextureCache2.B5;未知作用,看名字像是贴图缓冲
 
|-
 
!sbcB5
 
|原型数据编码
 
|
 
|作为同名sbc文件的保护文件存在,在正常调用的情况下,确保sbc不被误改,删除后,游戏会以sbc为源重新生成一个sbcB5确保最新的sbc不被更改
 
|-
 
!sbsB5
 
|原型数据编码
 
|
 
|整个游戏只见过 SANDBOX_0_0_0_.sbsB5,应该是作为sbs文件的防篡改用途。
 
|-
 
|wav
 
|-
 
|xwm
 
|XAudio2
 
|-
 
|wmv
 
|-
 
|jpg
 
|-
 
|png
 
|-
 
|dds
 
|-
 
|cache
 
|N/A
 
|-
 
|hash
 
|N/A
 
|}
 
 
 
===Steam模组目录===
 
:'''X:\steam\steamapps\workshop\content\244850\'''
 
::{steam模组ID}...
 
 
 
===用户目录===
 
:'''C:\Users\{你的windows用户名}\AppData\Roaming\SpaceEngineers\'''
 
:Saves\{你的steamID}  你的本地存档目录<span id=存档目录></span>
 
:IngameScripts 本地编程块脚本目录
 
:Blueprints 本地蓝图目录
 
:Mods 本地模组目录<span id=模组目录></span>
 
:Screenshots 游戏中按steam截图键?截图存档
 
:ProfileOptimization
 
:Promo
 
:ShaderCache2
 
:Storage
 
:temp
 
:cache
 
:WorkshopBrowser
 
:WorkshopWorlds
 
 
 
== 游戏数据 ==
 
这个文件夹包含方块定义文件、物理项目、体素材料
 
(体素材质)、透明材质(粒子效果)、组件、蓝图和一些其他东西。通过这些xml文件(扩展名是.sbc),你可以添加或修改大部分游戏对象,例如一个新的方块。当修改这些文件时,请确认你删除了.xml缓存文件(指的存档里的吧)。他可以创建例如圆形装甲块、新的推进器、陀螺仪、不同的驾驶舱等等
 
 
 
 
 
 
 
 
 
文件类型:
 
{|
 
!名称或扩展名
 
!文件规范
 
!用途简述
 
|-
 
|Sandbox.sbc
 
|xml
 
|基础的世界描述文件
 
|-
 
|SANDBOX_0_0_0_.sbs
 
|定义世界细节, 对象的位置和细节(在这里不做过多说明,但它本身应该很清晰 – 做一些实验你就知道了)
 
|-
 
|SANDBOX_0_0_0_.sbsB5
 
|编码后的sbs文件
 
|-
 
|*.vox
 
|小行星的二进制voxel(体素)数据 (括号内容同上 嗯>_<)
 
|-
 
|*.vx2
 
|Space Engineers Voxel Object Data File 小行星的二进制voxel(体素)数据 (括号内容同上 嗯>_<)
 
|-
 
|*.xmlcache
 
|不要修改这些文件,他们是缓存文件,会在每次保存时自动生成
 
|-
 
|*.wmw
 
|
 
|-
 
|*.scf
 
|
 
:scerinor 剧情主文件
 
因为和windows Explorer Command文件同扩展名,所以在文件浏览器中会被隐藏扩展名(系统自带的显示扩展名选项对此无效)
 
|%\Content\Scenarios\各剧情目录\..
 
|-
 
|}
 
 
 
Every world you generate is saved in its own folder that can be found in '''C:\Users\{WINDOWS USERNAME}\AppData\Roaming\SpaceEngineers\Saves\{STEAM ID}\'''
 
 
 
File types:
 
 
 
* Sandbox.sbc – basic description of a world.  For more details, see: [[save file sbc]]
 
 
 
* SANDBOX_0_0_0_.sbs – detail definition of a world, positions and states of objects For more details see: [[save file sbs]]
 
 
 
* *.vox – binary voxel data for an asteroid (outdated, current game converts these to vx2 format on initial load)
 
* *.vx2 - proprietary octree voxel storage format
 
 
 
* [OBSOLETE] *.xmlcache – don’t modify these files, they are cache files regenerated on each save
 
 
 
==模组目录==
 
Each mod has its own folder located in '''%AppData%\SpaceEngineers\Mods\{MOD NAME}'''
 
 
 
The mod folder has to contain a sub-folder called Data with definition files of added or updated mods. Almost everything can be replaced/updated by the modder (audio, video, textures, models, gui, etc). Mods are restricted to a single world and cannot change anything that exists outside the scope of that world.  For example, while you can replace things like GUI Icons for block mods, you can't replace the graphics for the entire UI because it exists outside of a world that would load the mod.
 
 
 
 
 
== 着色器脚本 Shaders==
 
包含两种类型的文件.FX和.FXH,分别是vertex(顶点)和pixel(像素) 着色器,它们对应各种渲染操作,你可以在面的路径中找到:
 
insteamapps\common\SpaceEngineers\Content\Effects2\
 
 
 
每个渲染文件会在游戏启动时被重新编译.如果你在修改一个后重启游戏时游戏崩溃,那么崩溃可能就是因为你的修改导致
 
 
 
Files with *.fx and *.fxh extension are vertex/pixel shaders for various rendering operations and can be found in '''steamapps\common\SpaceEngineers\Content\Effects2\'''.
 
 
 
Every shader file gets recompiled on game launch. If you modify one, restart the game. If the game crashes on launch, it’s probably due to a compilation error caused by your changes.
 
 
 
 
 
==材质贴图 Textures==
 
几乎所有材质都是DDS格式(DXT压缩). 你需要一个编辑程序操作他们. 如果你使用Adobe Photoshop, 我们推荐安装这个插件: developer.nvidia.com/nvidia-texture-tools-adobe-photoshop并使用这个设置导出::
 
 
 
[[File:6367154.jpg|材质导出设置]]
 
 
 
材质可以在这里找到: steamapps\common\SpaceEngineers\Content\Textures\
 
这里有多种材质文件:GUI, 粒子, 灯光, 模型, voxels(体素), 等.
 
模型材质文件名中有“_ns”的文件是“法线贴图”在RGB通道和Alpha通道中的“高光”。
 
模型材质文件名中有“_de”的文件是“漫反射( diffuse)”在RGB通道和Alpha通道中的“发射率”
 
 
 
Some textures are in the DirectX *.dds format (DXT5 compression). You will need an editing program that can manipulate them. If you use Adobe Photoshop, we recommend [https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop installing this plugin] and using these settings for exporting:
 
 
 
[[File:6367154.jpg|framed|center|Settings for exporting textures]]
 
  
Textures can be found in: '''steamapps\common\SpaceEngineers\Content\Textures\'''.
+
*[https://www.spaceengineersgame.com/visual-scripting-tool/ Visual Script Tool]
There are multiple categories of texture files: GUI, particles, lights, models, voxels, etc.
+
*[https://www.spaceengineersgame.com/plugins/ Plugin]
Model textures with “_ns” in their name contain the "normal map" in the RGB channels and the "specular map" in the ALPHA channel.  
+
*[https://www.spaceengineersgame.com/troubleshooting/ 查错]
Model textures with “_de” in their name contain the "diffuse map" in the RGB channels and "emissive map" in the ALPHA channel.
 
  
The textures which can use the above method are limited primarily to GUI Graphics such as Block or menu icons.
+
*[https://www.spaceengineersgame.com/modding/ Modding Basics]
 +
*[https://www.spaceengineersgame.com/modding-guides/space-engineers-workshop-guide/ How to use Workshop in Space Engineers]()
 +
*[https://www.spaceengineersgame.com/modding-guides/ship-speed/ Modding Guide: Ship Speed]()
 +
*[https://www.spaceengineersgame.com/modding-guides/modding-guide-weather-effects/ Modding Guide: Weather Effects]()
 +
*[https://www.spaceengineersgame.com/modding-guides/modding-guide-automatic-weather-system/ Modding Guide: Automatic Weather System]()
 +
*[https://www.spaceengineersgame.com/modding/advanced-3d-models-guide/ Advanced 3D Models Guide]()
 +
*[https://www.spaceengineersgame.com/modding/moddable-collision-models/ Moddable Collision Models]()
 +
*[https://www.spaceengineersgame.com/modding/model-viewer/ Model-viewer]()
  
===随着Space Engineers从DX9 PBR纹理转移到DX11 PBR纹理,创建纹理的方法发生了变化===
+
==FAQ==
<!--===With Space Engineers moving from DX9 to DX11 PBR textures, the Method for creating textures has changed.===-->
+
===着色器脚本 Shaders 问题===
 +
:版本1.202.124 着色器脚本 是 hlsl 和 hlsli
 +
:<s>旧版游戏着色器脚本由 fx fxh 组成每次执行会根据 fx 编译 fxo在游戏目录\Content\Effects2\中</s>
  
The easiest method is to create PNG or TIFF files for each texture and use the [http://steamcommunity.com/sharedfiles/filedetails/?id=635927143 Texture Packing Tool] to compile them into a .dds texture.
+
===材质贴图 Textures问题===
DX11 textures use a different compression type (BC3 to BC7), therefore the plugins for DX9 will not work to open or save textures in this format.
+
:[[File:6367154.jpg|framed|PS插件DDS导出设置]]
The DX11 textures are:
+
:DirectX *.dds 格式(DXT5压缩) 需要对应工具才能处理,
 +
:若你可以使用Adobe Photoshop,推荐用[https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop 安装此插件]来导出。
 +
:游戏的贴图素材目录有些子分类比如: GUI界面, particles粒子, lights光, models模型, voxels体素 等
 +
*贴图尾缀“_ns” 代表了三色通道均为 "normal map" 且 ALPHA 通道则是"specular map"。
 +
*贴图尾缀“_de” 代表了三色通道均为 "diffuse map"且 ALPHA 通道则是"emissive map"。
 +
:这些贴图形式主要用于方块或菜单图标的GUI内容。
 +
;随着Space Engineers从DX9 PBR<ref>Physicallly-Based Rendering 物理性渲染</ref>纹理转移到DX11 PBR纹理,创建纹理的方法发生了变化
 +
:最简单的方法是将制作的材质图片素材存档为 PNG 或TIFF格式并通过[http://steamcommunity.com/sharedfiles/filedetails/?id=635927143 Texture Packing Tool]编码为 DDS 贴图
 +
:DX11贴图采用了多种压缩方式(BC3到BC7)<ref>[https://learn.microsoft.com/zh-cn/windows/win32/direct3d11/texture-block-compression-in-direct3d-11 Direct3D 11 中的纹理块压缩]</ref>由此导致仍然停留在DX9的图形插件无法打开和存为这种DDS
 +
:这些DX11贴图是有这些命名尾缀
 +
*“_cm”-颜色(反照率)和Metaness贴图(alpha)。
 +
*“_ng”-法线贴图和光泽贴图(alpha)。
 +
*“_add”-添加纹理-尚未指定AO(红色通道)、G(发射)和B通道以及自定义颜色遮罩(alpha通道)。
 +
*“_alphamask”-阿尔法映射。
 +
<!--
 
* “_cm” - Color(albedo) and Metalness map (alpha).
 
* “_cm” - Color(albedo) and Metalness map (alpha).
 
* “_ng” - Normal map and Gloss map (alpha).
 
* “_ng” - Normal map and Gloss map (alpha).
 
* “_add” - Add texture - AO (Red channel), G (emissive) and B channels are not specified yet and Custom Color mask (alpha channel).
 
* “_add” - Add texture - AO (Red channel), G (emissive) and B channels are not specified yet and Custom Color mask (alpha channel).
 
* “_alphamask” - alpha map.
 
* “_alphamask” - alpha map.
 +
-->
 +
:<hr/>
 +
:[https://steamcommunity.com/sharedfiles/filedetails/?id=395248715 here]提供了更多信息,虽然这个链接是《太空工程师》的姊妹游戏《中世纪工程师》的链接,但游戏共享一个共同的代码库,两款游戏的修改过程几乎相同。
  
More information can be found [https://steamcommunity.com/sharedfiles/filedetails/?id=395248715 here]. While this link is for Space Engineer's sister title, Medieval Engineers, the games share a common code base and the modding process is nearly the same for both games.
+
<references/>
 
 
==3D建模==
 
MwmBuilder是由fbx文件生成mwm模型的工具。
 
 
 
注意:你可能需要管理员权限在Program Files文件夹里复制或创建文件;你可以复制MwmBuilder 和dll文件到一个不同的文件夹(话说steam版这个文件也没在PF里啊 = =)。
 
 
 
MwmBuilder位置(看吧 - -):
 
{Steam安装目录}\SteamApps\common\SpaceEngineers\Tools\MwmBuilder.exe
 
 
 
模型存储在: steamapps\common\SpaceEngineers\Content\Models\
 
 
 
用法说明:
 
1) 复制FBX模型到MwmBuilder.exe所在文件夹
 
2) 创建一个与FBX模型同名的XML文件. 例如你有一个Giraffe.fbx就创建一个Giraffe.xml.
 
3) 运行MwmBuilder.exe
 
4) 你将看到.mwm文件出现在文件夹里,没有就出错了 嗯嗯>_<
 
MwmBuilder is the utility built by the devs for converting fbx files to mwm models.
 
  
''Note: You may need administrator rights to copy or create files in Program Files folder; you can copy MwmBuilder and dlls into a different folder.''
+
===建模方式问题===
 +
mwm模型是由MwmBuilder基于fbx文件生成的
 +
fbx? filmboX 模型交换格式.adobe fbx
  
 
MwmBuilder Location:
 
MwmBuilder Location:
Line 377: Line 88:
 
Moddable collision models: [http://www.spaceengineersgame.com/moddable-collision-models.html Adding new model with collision geometry].
 
Moddable collision models: [http://www.spaceengineersgame.com/moddable-collision-models.html Adding new model with collision geometry].
  
==可编程功能支持库 API==
+
===模改脚本方式===
 
Creating a working script is a difficult process for a single individual to do, and to facilitate easy creation of scripts an API is required to guide a prospective modder in the correct direction.  Initially the community did this themselves with the [[Mod:SEModAPI]], but in [[Update 01.048]] Keen released an official API as well. SEModAPI is no longer in development and should no longer be used. This guide and others like it on the official wiki will only discuss how to use the official API.
 
Creating a working script is a difficult process for a single individual to do, and to facilitate easy creation of scripts an API is required to guide a prospective modder in the correct direction.  Initially the community did this themselves with the [[Mod:SEModAPI]], but in [[Update 01.048]] Keen released an official API as well. SEModAPI is no longer in development and should no longer be used. This guide and others like it on the official wiki will only discuss how to use the official API.
  
Line 388: Line 99:
 
The current implementation of the API includes all three methods. Since these mods can be subscribed to and downloaded within Steam's infrastructure, certain limitations are in place to make sure that malicious mods cannot do irreversible damage (such as deleting files on the hard drive, etc).  As such, not every in-game or out-of-game function can be used.  See the [[Scripting Whitelist]] page for more information.
 
The current implementation of the API includes all three methods. Since these mods can be subscribed to and downloaded within Steam's infrastructure, certain limitations are in place to make sure that malicious mods cannot do irreversible damage (such as deleting files on the hard drive, etc).  As such, not every in-game or out-of-game function can be used.  See the [[Scripting Whitelist]] page for more information.
  
===插件模组 Plug-in DLL mods===
+
====插件模组 Plug-in DLL mods====
 
These can bypass all protections in place in the game for preventing malicious code. That is what makes them so powerful as they can use functions normally restricted. They can do things like changing the GUI menus to add custom screens or add custom functions to blocks which are normally hard coded in the game. They are not available as workshop mods and are manually downloaded and loaded in the game with a specially created shortcut to SpaceEngineers.exe. It is advisable to only use plugins from a trusted programmer, or one that has the plugin source publicly viewable. Some plugins also have their own mods that need to be subscribed and added to a world through the Steam Workshop in addition to manually installing the plugin.  Because of the potential for plugins to cause damage to not only the game saves, but to an individual PC, they are not officially supported by KSH.
 
These can bypass all protections in place in the game for preventing malicious code. That is what makes them so powerful as they can use functions normally restricted. They can do things like changing the GUI menus to add custom screens or add custom functions to blocks which are normally hard coded in the game. They are not available as workshop mods and are manually downloaded and loaded in the game with a specially created shortcut to SpaceEngineers.exe. It is advisable to only use plugins from a trusted programmer, or one that has the plugin source publicly viewable. Some plugins also have their own mods that need to be subscribed and added to a world through the Steam Workshop in addition to manually installing the plugin.  Because of the potential for plugins to cause damage to not only the game saves, but to an individual PC, they are not officially supported by KSH.
  
==教程和指引 Tutorials/Guides==
+
===另见 See also===
 
 
* [[How to Mod Blocks]]
 
* [[How to Mod the Skybox]]
 
* [[How to Mod Characters]]
 
* [[How to Mod Character Animations]]
 
* [[How to Mod Ore]]
 
* [[How to Mod Production]]
 
* [[How to Mod Script]]
 
* [[How to Mod Respawn Ships]]
 
* [[How to Mod NPC Cargo Ships]]
 
* [[How to Mod Exploration]]
 
* [[How to Mod Scenarios]]
 
 
 
==另见 See also==
 
 
* [https://github.com/gilgame/SEWorkbench SE Workbench] - an [https://forum.keenswh.com/threads/beta-space-engineers-workbench-a-feature-rich-ide-for-space-engineers-program-development.7375609/ independent] scripting [[wikipedia:Integrated development environment|IDE]]
 
* [https://github.com/gilgame/SEWorkbench SE Workbench] - an [https://forum.keenswh.com/threads/beta-space-engineers-workbench-a-feature-rich-ide-for-space-engineers-program-development.7375609/ independent] scripting [[wikipedia:Integrated development environment|IDE]]
  
 
+
===工具===
==工具==
 
 
There are many different workflows used by various modders. There is also not a universal workflow that works for everyone. However, the following tools are recommend by most modders and make it much easier to create mods:
 
There are many different workflows used by various modders. There is also not a universal workflow that works for everyone. However, the following tools are recommend by most modders and make it much easier to create mods:
 
* Notepad++ (For XML, SBC, and general text editing)
 
* Notepad++ (For XML, SBC, and general text editing)
Line 416: Line 112:
 
* Harag's [http://forum.keenswh.com/threads/se-block-tools-for-blender.7285972/ plugin] for easily configuring blender and exporting 3d models into VRage format.
 
* Harag's [http://forum.keenswh.com/threads/se-block-tools-for-blender.7285972/ plugin] for easily configuring blender and exporting 3d models into VRage format.
 
* Paint.NET (Photoshop also works if you have [https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop this] plugin for exporting in the dds format)
 
* Paint.NET (Photoshop also works if you have [https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop this] plugin for exporting in the dds format)
 
 
 
 
  
 
----
 
----

Latest revision as of 07:06, 29 August 2023

🚧🚧🚧 Under Construction 🚧🚧🚧
Attention - This page is currently being actively worked on, and may contain incomplete information


说明

本页主要提供入门模组制作前的基本信息,辅助了解各种模组制作可涉及的范畴和能力。
可先阅览 官方的模组制作指引页面(英文)

模改时 需知目录问题

mod文件夹必须包含一个名为Data的子文件夹,其中包含添加或更新的mod的定义文件。几乎所有内容都可以由modder替换/更新(音频、视频、纹理、模型、gui等)。Mods仅限于一个世界,不能改变这个世界范围之外的任何东西。例如,虽然你可以替换块mod的GUI图标之类的东西,但你不能替换整个UI的图形,因为它存在于加载mod的世界之外。?

教程和指引 Tutorials/Guides

FAQ

着色器脚本 Shaders 问题

版本1.202.124 着色器脚本 是 hlsl 和 hlsli
旧版游戏着色器脚本由 fx fxh 组成每次执行会根据 fx 编译 fxo在游戏目录\Content\Effects2\中

材质贴图 Textures问题

PS插件DDS导出设置
DirectX *.dds 格式(DXT5压缩) 需要对应工具才能处理,
若你可以使用Adobe Photoshop,推荐用安装此插件来导出。
游戏的贴图素材目录有些子分类比如: GUI界面, particles粒子, lights光, models模型, voxels体素 等
  • 贴图尾缀“_ns” 代表了三色通道均为 "normal map" 且 ALPHA 通道则是"specular map"。
  • 贴图尾缀“_de” 代表了三色通道均为 "diffuse map"且 ALPHA 通道则是"emissive map"。
这些贴图形式主要用于方块或菜单图标的GUI内容。
随着Space Engineers从DX9 PBR[1]纹理转移到DX11 PBR纹理,创建纹理的方法发生了变化
最简单的方法是将制作的材质图片素材存档为 PNG 或TIFF格式并通过Texture Packing Tool编码为 DDS 贴图
DX11贴图采用了多种压缩方式(BC3到BC7)[2]由此导致仍然停留在DX9的图形插件无法打开和存为这种DDS
这些DX11贴图是有这些命名尾缀
  • “_cm”-颜色(反照率)和Metaness贴图(alpha)。
  • “_ng”-法线贴图和光泽贴图(alpha)。
  • “_add”-添加纹理-尚未指定AO(红色通道)、G(发射)和B通道以及自定义颜色遮罩(alpha通道)。
  • “_alphamask”-阿尔法映射。

here提供了更多信息,虽然这个链接是《太空工程师》的姊妹游戏《中世纪工程师》的链接,但游戏共享一个共同的代码库,两款游戏的修改过程几乎相同。
  1. Physicallly-Based Rendering 物理性渲染
  2. Direct3D 11 中的纹理块压缩

建模方式问题

mwm模型是由MwmBuilder基于fbx文件生成的 fbx? filmboX 模型交换格式.adobe fbx

MwmBuilder Location: {Steam installations directory}\SteamApps\common\SpaceEngineers\Tools\MwmBuilder.exe

Models are stored in: steamapps\common\SpaceEngineersModSDK\OriginalContent\Models\

Models have been moved to the SpaceEngineers ModSDK. For information on obtaining the SDK on Steam check here

SIMPLE USAGE:

  1. ) Copy FBX models to the same directory as MwmBuilder.exe
  2. ) Create an XML file with the same name as the model. Giraffe.fbx will have Giraffe.xml.
  3. ) Run MwmBuilder.exe
  4. ) You'll find .mwm files in the same folder

For advanced usage see here: ADVANCED 3D MODELS GUIDE

Moddable collision models: Adding new model with collision geometry.

模改脚本方式

Creating a working script is a difficult process for a single individual to do, and to facilitate easy creation of scripts an API is required to guide a prospective modder in the correct direction. Initially the community did this themselves with the Mod:SEModAPI, but in Update 01.048 Keen released an official API as well. SEModAPI is no longer in development and should no longer be used. This guide and others like it on the official wiki will only discuss how to use the official API.

There are three planned "levels" of script modding for the official API:

  • Plug-ins(DLLs) - will be the most powerful (and most difficult to create). This involves creating a set of custom methods, objects, and interfaces in Visual Studio and compiling the project into a .DLL file.
  • ModAPI script mods - will allow access to objects at the world level as opposed to a single ship grid with in-game scripts. This level of script can, for example, add an effect to all blocks of a certain type on all ships regardless of owner. One such early script mod was used to create a teleporter.
  • In-game scripts - will provide the quickest form of modification for simple or low-scope scripts. These are loaded via the Programmable Block's Menu. They can be written directly into the the text panel of the block or downloaded from a subscribed script in the workshop by clicking on a button in the same panel.


The current implementation of the API includes all three methods. Since these mods can be subscribed to and downloaded within Steam's infrastructure, certain limitations are in place to make sure that malicious mods cannot do irreversible damage (such as deleting files on the hard drive, etc). As such, not every in-game or out-of-game function can be used. See the Scripting Whitelist page for more information.

插件模组 Plug-in DLL mods

These can bypass all protections in place in the game for preventing malicious code. That is what makes them so powerful as they can use functions normally restricted. They can do things like changing the GUI menus to add custom screens or add custom functions to blocks which are normally hard coded in the game. They are not available as workshop mods and are manually downloaded and loaded in the game with a specially created shortcut to SpaceEngineers.exe. It is advisable to only use plugins from a trusted programmer, or one that has the plugin source publicly viewable. Some plugins also have their own mods that need to be subscribed and added to a world through the Steam Workshop in addition to manually installing the plugin. Because of the potential for plugins to cause damage to not only the game saves, but to an individual PC, they are not officially supported by KSH.

另见 See also

工具

There are many different workflows used by various modders. There is also not a universal workflow that works for everyone. However, the following tools are recommend by most modders and make it much easier to create mods:

  • Notepad++ (For XML, SBC, and general text editing)
  • Visual Studio (For scripting)
  • Blender (For creating 3d models)
  • Harag's plugin for easily configuring blender and exporting 3d models into VRage format.
  • Paint.NET (Photoshop also works if you have this plugin for exporting in the dds format)