From dd54ffd290b266e06397ad024059f526e644a720 Mon Sep 17 00:00:00 2001
From: Notealot <714804968@qq.com>
Date: Sat, 19 Nov 2022 12:50:47 +0800
Subject: [PATCH] additional translations
---
.../schinese/Multiplayer/custom_game_mode.md | 164 ++++++++++--------
.../schinese/Multiplayer/hosting_server.md | 2 +-
.../Steam Workshop/uploading_updating_mod.md | 134 +++++++-------
3 files changed, 158 insertions(+), 142 deletions(-)
diff --git a/docs/content/schinese/Multiplayer/custom_game_mode.md b/docs/content/schinese/Multiplayer/custom_game_mode.md
index 676fad3..76c7e0c 100644
--- a/docs/content/schinese/Multiplayer/custom_game_mode.md
+++ b/docs/content/schinese/Multiplayer/custom_game_mode.md
@@ -21,22 +21,24 @@ weight = 10
#### 模组定义(Module Definition)文件
再开始定义你的游戏模式行为(behaviors)前,你需要先填写模组定义的 `SubModule.xml` 文件。在该文件中,你要给你的模组一个名字、一个 ID、一个版本,并定义它的依赖和 DLL 文件。
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
从这个示例定义文件中,我们可以看到一个模组的基本需求。关于多人游戏模组的 `ModuleCategory` 节点,其值可以是 `Multiplayer` 或 `Server`。如果模组是一个 Multiplayer(多人游戏)模组, 这意味着它在客户端和服务端都会被加载。Server(服务器)模组就只在服务器端被加载,并且可以用于管理和分析需要。
@@ -45,80 +47,88 @@ weight = 10
#### SubModule 类
要在代码中定义你的游戏模式,你需要创建一个类并继承自 `MBSubModuleBase` 类。在这个类中,重写 `OnSubModuleLoad` 方法并添加此行:
- Module.CurrentModule.AddMultiplayerGameMode(new MissionMultiplayerBountyMPMode("BountyMP"))
+```c#
+Module.CurrentModule.AddMultiplayerGameMode(new MissionMultiplayerBountyMPMode("BountyMP"))
+```
传递给构造函数的字符串是你游戏模式的名字。在该示例中,我们创建了一个名为 `BountyMP` 的游戏模式。要加载有文本信息的 XML 文件,重写 `InitializeGameStarter` 方法,调用其 base 方法然后添加此行:
- game.GameTextManager.LoadGameTexts(ModuleHelper.GetModuleFullPath("BountyMP") + "ModuleData/multiplayer_strings.xml")
+```c#
+game.GameTextManager.LoadGameTexts(ModuleHelper.GetModuleFullPath("BountyMP") + "ModuleData/multiplayer_strings.xml")
+```
同样,模组名和 XML 文件名都取决于你模组中的文件的名字。
在该 XML 文件中,你可以定义如下内容,这样你的游戏模式的名字就会显示在服务器列表中。
-
-
-
-
-
-
-
+```xml
+
+
+
+
+
+
+
+```
确保 ID 与你在代码和模组定义文件中所定义的 ID 一致。
#### GameMode 类
要让服务器用你的游戏模式开始一场行动(mission),你需要新建一个类继承自 `MissionBasedMultiplayerGameMode`。在该类中,重写 `StartMultiplayerGame` 方法如下:
- public override void StartMultiplayerGame(string scene) {
- MissionState.OpenNew("BountyMP", new MissionInitializerRecord(scene),
- missionController => {
- if (GameNetwork.IsServer) {
- return new MissionBehavior[] {
- MissionLobbyComponent.CreateBehavior(),
- new MissionMultiplayerBountyMP(),
- new MissionMultiplayerBountyMPClient(),
- new MultiplayerTimerComponent(),
- new MultiplayerMissionAgentVisualSpawnComponent(),
- new SpawnComponent(new BountyMPSpawnFrameBehavior(), new BountyMPSpawningBehavior()),
- new MissionLobbyEquipmentNetworkComponent(),
- new MultiplayerTeamSelectComponent(),
- new MissionHardBorderPlacer(),
- new MissionBoundaryPlacer(),
- new MissionBoundaryCrossingHandler(),
- new MultiplayerPollComponent(),
- new MultiplayerAdminComponent(),
- new MultiplayerGameNotificationsComponent(),
- new MissionOptionsComponent(),
- new MissionScoreboardComponent(new BountyMPScoreboardData()),
- new MissionAgentPanicHandler(),
- new AgentHumanAILogic(),
- new EquipmentControllerLeaveLogic(),
- new MultiplayerPreloadHelper(),
- };
- } else {
- return new MissionBehavior[] {
- MissionLobbyComponent.CreateBehavior(),
- new MissionMultiplayerBountyMPClient(),
- new MultiplayerAchievementComponent(),
- new MultiplayerTimerComponent(),
- new MultiplayerMissionAgentVisualSpawnComponent(),
- new MissionLobbyEquipmentNetworkComponent(),
- new MultiplayerTeamSelectComponent(),
- new MissionHardBorderPlacer(),
- new MissionBoundaryPlacer(),
- new MissionBoundaryCrossingHandler(),
- new MultiplayerPollComponent(),
- new MultiplayerGameNotificationsComponent(),
- new MissionOptionsComponent(),
- new MissionScoreboardComponent(new BountyMPScoreboardData()),
- new MissionMatchHistoryComponent(),
- new EquipmentControllerLeaveLogic(),
- new MissionRecentPlayersComponent(),
- new MultiplayerPreloadHelper(),
- };
- }
+```c#
+public override void StartMultiplayerGame(string scene) {
+ MissionState.OpenNew("BountyMP", new MissionInitializerRecord(scene),
+ missionController => {
+ if (GameNetwork.IsServer) {
+ return new MissionBehavior[] {
+ MissionLobbyComponent.CreateBehavior(),
+ new MissionMultiplayerBountyMP(),
+ new MissionMultiplayerBountyMPClient(),
+ new MultiplayerTimerComponent(),
+ new MultiplayerMissionAgentVisualSpawnComponent(),
+ new SpawnComponent(new BountyMPSpawnFrameBehavior(), new BountyMPSpawningBehavior()),
+ new MissionLobbyEquipmentNetworkComponent(),
+ new MultiplayerTeamSelectComponent(),
+ new MissionHardBorderPlacer(),
+ new MissionBoundaryPlacer(),
+ new MissionBoundaryCrossingHandler(),
+ new MultiplayerPollComponent(),
+ new MultiplayerAdminComponent(),
+ new MultiplayerGameNotificationsComponent(),
+ new MissionOptionsComponent(),
+ new MissionScoreboardComponent(new BountyMPScoreboardData()),
+ new MissionAgentPanicHandler(),
+ new AgentHumanAILogic(),
+ new EquipmentControllerLeaveLogic(),
+ new MultiplayerPreloadHelper(),
+ };
+ } else {
+ return new MissionBehavior[] {
+ MissionLobbyComponent.CreateBehavior(),
+ new MissionMultiplayerBountyMPClient(),
+ new MultiplayerAchievementComponent(),
+ new MultiplayerTimerComponent(),
+ new MultiplayerMissionAgentVisualSpawnComponent(),
+ new MissionLobbyEquipmentNetworkComponent(),
+ new MultiplayerTeamSelectComponent(),
+ new MissionHardBorderPlacer(),
+ new MissionBoundaryPlacer(),
+ new MissionBoundaryCrossingHandler(),
+ new MultiplayerPollComponent(),
+ new MultiplayerGameNotificationsComponent(),
+ new MissionOptionsComponent(),
+ new MissionScoreboardComponent(new BountyMPScoreboardData()),
+ new MissionMatchHistoryComponent(),
+ new EquipmentControllerLeaveLogic(),
+ new MissionRecentPlayersComponent(),
+ new MultiplayerPreloadHelper(),
+ };
}
- );
- }
+ }
+ );
+}
+```
通过这段代码,你可以看见 `GameNetwork` 有一个变量,可以用在你的代码里,用于检查运行的游戏实例是服务端还是客户端。在该方法中,你可以看到它用来分隔客户端行为和服务器行为。这能确保正确的 `MissionBehaviors` 被加载到正确类型的游戏。其他方法中, `GameNetwork.IsClient` 和 `GameNetwork.IsServer` 可用于对不同事件采取不同处理。
@@ -133,7 +143,9 @@ weight = 10
#### 搭建使用模组的自定义服务器
要搭建一个使用模组的自定义服务器,你可以使用启动命令,如下:
- DedicatedCustomServer.Starter.exe _MODULES_*Native*Multiplayer*YOUR_MODULE_NAME_1*YOUR_MODULE_NAME_2*_MODULES_
+```powershell
+DedicatedCustomServer.Starter.exe _MODULES_*Native*Multiplayer*YOUR_MODULE_NAME_1*YOUR_MODULE_NAME_2*_MODULES_
+```
在星号之间,你可以放入任何你想要的模组的名称。
diff --git a/docs/content/schinese/Multiplayer/hosting_server.md b/docs/content/schinese/Multiplayer/hosting_server.md
index 09f6f01..f87de85 100644
--- a/docs/content/schinese/Multiplayer/hosting_server.md
+++ b/docs/content/schinese/Multiplayer/hosting_server.md
@@ -76,7 +76,7 @@ weight = 5
`/LogOutputPath [输出目录] ` - 设置服务器日志文件的输出目录,路径应该用双引号括起来。
-`/port [number]` Optionally specify a port number to run the server from, useful for using ports other than the default.
+`/port [端口号]` - 可指定服务器运行的端口,对于使用默认以外的端口很有用。
##### 日志文件
默认情况下,Windows 的自定义服务器的日志文件可以在你的 ProgramData 目录(`%programdata%\Mount and Blade II Bannerlord\logs`)下找到。
diff --git a/docs/content/schinese/Steam Workshop/uploading_updating_mod.md b/docs/content/schinese/Steam Workshop/uploading_updating_mod.md
index 46212f5..0f97b46 100644
--- a/docs/content/schinese/Steam Workshop/uploading_updating_mod.md
+++ b/docs/content/schinese/Steam Workshop/uploading_updating_mod.md
@@ -5,38 +5,38 @@ weight = 5
+++
-## Preparing Your Module For Publishing
+## 准备发布你的模组
-You need to Publish your module via the modding toolkit in order to allow/enable other players to use your module. You can deploy it for the end user, dedicated servers or other modders, all of which is explained below.
+你需要通过模组开发工具(Modding Kits)来发布(Publish)你的模组,这能让其他玩家使用你的模组。你可以为终端用户、独立服务器或其他开发者部署它,所有细节都会在接下来解释。
-### Exporting the Module via the Modding Tools
+### 通过模组开发工具导出模组
-* Open the Modding Kit via the Launcher after checking your mod in the Launcher’s module list
-* Open the Editor from the Main Menu UI
-* From the File menu on the top, select Publish Module
+* 在启动器的模组列表里选定你的模组后通过启动器打开模组开发工具(Modding Kit)
+* 通过主菜单(Main Menu)界面打开编辑器(Editor)
+* 通过顶部的文件(File)菜单,选择发布模组(Publish Module)
-In the Publishing pop-up window, the following options are available:
+在弹出的发布模组(Publishing Modules)窗口中,有这样一些选项:
-| | |
+| 模组下拉列表 | 打包类型 |
| ------ | ----------- |
| | |
-* `Client`: Your module will be packed for client use. Which means that players will need to have these packages in order to play the game. This is the least you need to do if you want your module to be played via Steam Workshop.
-* `Dedicated Server`: Your module can be run on a server too. If you’d like your mod to be available on multiplayer too, you need to check it.
-* `Editor`: Other players can open your module via the Editor and modify it. If you don’t pack for the editor, players will not be able to open your module via the Editor.
+* `Client`: 你的模组将被打包为供客户端使用。这意味着玩家必须要有这些包才能够进行游玩。如果你希望你的模组能通过 Steam 创意工坊分发供玩家游玩,这是你必须要勾选的。
+* `Dedicated Server`: 你的模组能否运行在服务器上。如果你希望你的模组能够在多人游戏中使用,你需要勾选它。
+* `Editor`: 其他玩家能否通过编辑器(Editor)来编辑你的模组。如果你没有用编辑器打包,玩家将不能够通过编辑器打开你的模组。
{{% notice warning %}}
-Do not forget to select your module in the “Module” dropdown list. Otherwise, you will most likely publish the Native module by accident which will take a significant amount of time.
+不要忘记在“模组(Module)”下拉列表中选择你的模组。否则,你很可能会意外地发布 Native 模组,这将浪费大量的时间。
{{% /notice %}}
-* After selecting these options and your module from the Modules dropdown list, proceed with the Publish button.
-* After clicking the Publish button, a pop-up window for selecting a destination directory will appear. Select the destination directory, which is a writable location on your computer, and the module will be copied there as a ready-to-upload version.
-* Then just upload the mod folder in the destination directory to the Steam Workshop, following the instructions mentioned in “**Creating a new Steam Workshop Item**” and “**Updating a Steam Workshop Item**” sections.
+* 在下拉列表选取你的模组和勾选必要的选项后,点击发布(Publish)按钮继续。
+* 在点击发布按钮后,将会出现一个弹出窗口,然后选择一个目标文件夹(Destination Directory)。选择目标文件夹,这是一个在你的计算机上可写入文件的位置,将复制一份模组到那里作为准备上传的版本。
+* 然后按照“**新建一个 Steam 创意工坊项目**”和“**更新一个 Steam 创意工坊项目**”部分中的指示,将目标文件夹中中的模组目录上传到 Steam 创意工坊。
{{% notice warning %}}
-If you, as a modder, are going to test your module after uploading to the Steam Workshop, please temporarily move your Module folder under “Steam\steamapps\common\Mount & Blade II Bannerlord\Modules” to somewhere else. If you don’t move it temporarily, then the game will try to fetch the module from Bannerlord/Modules instead of workshop/content/261550.
+如果你作为开发者想要测试上传到 Steam 创意工坊的模组,请将你“Steam\steamapps\common\Mount & Blade II Bannerlord\Modules”目录下的你的模组临时转移到其他地方。如果你不临时转移它,游戏将会从《霸主》安装目录下的 Modules 文件夹中获取你的模组,而不是通过创意工坊的“Steam\steamapps\workshop\content\261550”目录获取你的模组。
{{% /notice %}}
## 新建一个 Steam 创意工坊项目
@@ -45,31 +45,33 @@ If you, as a modder, are going to test your module after uploading to the Steam
下载[该文件](https://download.taleworlds.com/WorkshopCreate.xml)然后把它放到任何你想放的地方。或者你也可以用以下代码创建一个:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
* 使用 Notepad, Notepad++ 或是其他工具打开该文件
* 编辑匹配你模组的 `Items`
@@ -109,30 +111,32 @@ If you, as a modder, are going to test your module after uploading to the Steam
下载[该文件](https://download.taleworlds.com/WorkshopUpdate.xml)然后把它放到任何你想放的地方。或者你也可以用以下代码创建一个:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
* 使用 Notepad, Notepad++ 或其他工具打开该文件
* 编辑匹配你模组的 `Items`