Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Translate] translate quickguide_create_a_mod.md #11

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 20 additions & 18 deletions docs/content/schinese/Asset Management/quickguide_create_a_mod.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
+++
title = "Creating a Module - Quick Guide"
title = "创建一个Mod - 快速入门"
weight = 1
+++

Modules can contain assets ranging from meshes to physics bodies, scenes, gameplay entities like factions, lords, troops, items, sounds, scripts and behaviours that can run any gameplay logic. In this guide, the process of creating one will be explained.
Mod 可以包含从网格到物理实体、场景、游戏实体(如派系、领主、部队、物品)以及可以运行任何游戏逻辑的脚本和行为等资源。在本指南中,将解释创建一个 Mod 的过程。

##### Creating A New Module
##### 新建一个Mod

Modules reside inside the "Modules" folder in the root directory. It must contain an XML file named SubModule.xml. This file contains basic information like "Name", "ID" and "Version" nodes. Also, one can define dependent modules inside the "DepenendedModules" node. If you want to make a Single Player mod, it should also contain a "SingleplayerModule" node. After this, the module will be visible at the Launcher.
Mod 位于根目录下的 "Modules" 文件夹内,它必须包含名为 SubModule.xml 的 xml 文件。这个文件提供 "Name""ID" "Version" 节点等基本信息。另外,还可以在 "DepenendedModules" 节点里面定义依赖模块。如果你想制作一个单人模式 Mod,它的 "DepenendedModules" 也应该包含一个 "SingleplayerModule" 节点。此后,该 Mod 将在游戏启动器中出现。

SubModules can define DLL's to be loaded at runtime. These DLL's should contain a Class which inherits from "MBSubModuleBase" and the name should match with the "SubModuleClassType" node inside the xml. That class will be constructed and certain callbacks willl be called so that od can registers its behaviours to the game.
子Mod 可以定义在运行时加载的 DLL。这些 DLL 应该包含继承自 "MBSubModuleBase" 的 Class,其名称应该与 xml 中的 "SubModuleClassType" 节点一致。该类将被构造,并被调用某些回调,这样 od 就可以将其行为注册到游戏中。

##### Module Hierarchy
##### Mod 层次结构

Modules can have several folders which contains different types of content:
Mod 可以具有多个文件夹,其中包含不同类型的内容:

{{% notice info %}}
* bin: The compiled DLL's should be put inside the "bin\Win64_Shipping_Client" folder so that the game can find and load the DLL.
* Atmospheres: This folder contains the different atmosğhere templates that can be used through the game. New atmosğhere can be saved to any module from the Editor.
* AssetSources: This folder contains the sources for the assets. Editor imports assets to this folder. This folder may be filtered out before publishing the mod. For more information about adding new content to the module, see <strong>[Adding & Overriding Assets]({{< ref "overriding_assets.md" >}})</strong>.
* Assets: This folder contains the asset data derived from the content sources. It is only used at the mod development phase. This folder may be filtered out before publishing the mod.
* AssetPackages: After the content work is done for the module, content creator should start the Publish operation to ready the content for release. Th,s fodler contains the "Published" assets.
* GUI: This folder contains any new GUI element, prefab or brush that can be used through the game.
* ModuleData: This folder contains many of the important xml files for gameplay logic. "project.mbproj" file governs the xml's that will be loaded inside the folder. These xml's range from animations and sets to factions, trops, items etc.
* NavMeshPrefabs: Navigation mesh face groups can be saved in editor as templates to easily insert into multiple scenes. This folder contains those.
* Prefabs: This folder contains the prefabs XML's. For more information, see <strong>[Entities & Prefabs]({{< ref "prefabs.md" >}})</strong>.
* SceneObj: This fodler holds the Scene Data which is stripped from any Edit Data. Scenes witout terrain only resides in this folder.
* SceneEditData: Contains the terrain edit data for every scene. This folder may be filtered out before publishing the mod.

* bin: 编译后的DLL应该放在 "bin/Win64_Shipping_Client"文件夹内,这样游戏才能找到并加载DLL。
* Atmospheres: 此文件夹包含可在游戏中使用的不同大气层模板。可以从编辑器将新的大气层保存到任何 Mod。
WuZhuoran marked this conversation as resolved.
Show resolved Hide resolved
* AssetSources: 此文件夹包含资源的来源。编辑器将资源导入此文件夹。在发布 Mod 之前可以过滤掉这个文件夹。关于向模块添加新内容的更多信息,请参见 <strong>[Adding & Overriding Assets]({{< ref "overriding_assets.md" >}})</strong>.
* Assets: 此文件夹包含从内容源派生的资源数据。它仅在 mod 开发阶段使用。在发布 mod 之前,该文件夹可能会被过滤掉。
* AssetPackages: 当模块的内容工作完成后,内容创建者应该开始 "Publish" 操作,为内容的发布做好准备。此文件夹包含了被发布的资源。
* GUI: 此文件夹包含任何新的可供游戏使用的GUI元素,预制件或笔刷。
* ModuleData: 此文件夹有许多包含了重要游戏逻辑的 xml 文件。"project.mbproj" 文件管理着将被加载到该文件夹内的 xml 文件。这些 xml 涵盖了从动画和套装到派系、部队、物品等内容。
WuZhuoran marked this conversation as resolved.
Show resolved Hide resolved
* NavMeshPrefabs: 导航网面组可以在编辑器中保存为模板,方便插入到多个场景中。此文件夹包含了这些内容。
* Prefabs: 此文件夹包含了预制件的XML。更多信息,请看 <strong>[Entities & Prefabs]({{< ref "prefabs.md" >}})</strong>.
* SceneObj: 此文件夹保存着从任何编辑数据中剥离出来的场景数据。没有地形的场景只能存放在这个文件夹中。
* SceneEditData: 包含每个场景的地形编辑数据。此文件夹可以在发布mod之前过滤掉。

{{% /notice %}}