diff --git a/docs/content/english/Multiplayer/hosting_server.md b/docs/content/english/Multiplayer/hosting_server.md index 82b1647..f0c2d0a 100644 --- a/docs/content/english/Multiplayer/hosting_server.md +++ b/docs/content/english/Multiplayer/hosting_server.md @@ -40,7 +40,7 @@ You can administrate your server by typing commands in your server’s console ( By typing `list` and pressing `enter`, you will get all the available commands in the dedicated server: - + For example, to get a simple server running, you can type the following commands into your console: @@ -91,37 +91,100 @@ By using the command `set_automated_battle_count` before `enable_automated_battl For example, `set_automated_battle_count 10` will have the server play 10 missions and shut down. If you would like to have an unlimited number of missions, set it to `-1`. -#### Helper Modules -We supply the optional `DedicatedCustomServerHelper` module to help server hosts. There are several submodules within for distinct purposes. For the server side modules to be usable from the outside, you will need to make TCP port 7210 accessible as well. +#### Additional Features +With patch v1.2.x the below striken through text is no longer relevant. The `DedicatedCustomServerHelper` module and its functionality has been merged into the base game. -Note that although the module is optional for server hosts, if you as the host do load the module, the players will also need to have it loaded. Otherwise, a mismatch in modules will prevent players from joining. +~~We supply the optional `DedicatedCustomServerHelper` module to help server hosts. There are several submodules within for distinct purposes.~~ For the server side modules to be usable from the outside, you will need to make TCP port 7210 accessible as well. + +~~Note that although the module is optional for server hosts, if you as the host do load the module, the players will also need to have it loaded. Otherwise, a mismatch in modules will prevent players from joining.~~ ##### Administration Web Panel This module launches a web panel to interact with your custom server, through a general management page and a terminal page: -You can find the URL for the web panel in your server console once it has been initialized. +You can access the web panel with your server's IP address and port once it has been initialized. The web panel is password protected by the server’s configured `AdminPassword` option. **By default, this option is left blank, so be sure to change it to a secure password**. If you do not want the web panel to be accessible from outside the local network or machine, and also do not need the map download feature below, you are free to block TCP port 7210 from external access. -##### In-Game Map Downloads -We also present a way to allow players to download your server’s map files through an in-game panel. As the server host, there are some conditions you must ensure to get this functioning: +##### In-Game Map Downloads [Map Downloader] +We also present a way to allow players to download your server's map files through an in-game panel. As the server host, there are some conditions you must ensure to get this functioning: -* The maps to be served must be located within **ONLY** the `DedicatedCustomServerHelper` module’s `SceneObj` directory, in the same way a typical module contains scenes. You can create the directory by hand if it is missing. -* The maps to be served must be “registered” through either the `Map` configuration option or the `add_map_to_automated_battle_pool` command. In other words, only maps playable on the server are served. +* The maps to be served must be located within ONLY the Multiplayer module's `SceneObj` directory, in the same way a typical module contains scenes. You can create the directory by hand if it is missing. +* The maps to be served must be "registered" through either the `Map` configuration option, the `add_map_to_automated_battle_pool` or `add_map_to_usable_maps` commands. In other words, only maps playable on the server are served. Note that having the scene loaded in multiple modules will cause issues such as the scene not being shown on the download panel. -For the players to be able to open the download panel, they will need to launch the game with the `DedicatedCustomServerHelper` module loaded. Now, they can right click on a custom server list entry, which will open a context menu with the option to open the download panel for the server. Once a map is successfully downloaded, there is no need to restart the game, they should be able to join your server as is. +Players will then get prompted to download all of the missing maps as they try to join the server or they can right click on the custom server list entry, which will open a context menu with the option to open the download panel for the server. Once all missing maps are successfully downloaded, there is no need to restart the game, they should be able to join your server as is. - + Note that this feature is intended to support simple use cases. This is not a module manager feature, and will not be able to support maps that require other assets (ModuleData, Prefabs, etc.) spread throughout a given module. Only the `SceneObj` directory contents are transferred between the server and the client. -If the lack of prefab support is a concern, you may be able to make the scene usable through the helper module by breaking the prefabs. Open the scene in the editor, select all entity objects, right click and select *Break Prefab*. +If the lack of prefab support is a concern, you may be able to make the scene usable through the Map Downloader by breaking the prefabs. Open the scene in the editor, select all entity objects, right click and select *Break Prefab*. + +##### In-game admin panel & admin features +The in-game admin panel provides an easy way to organize and moderate events. + +The admin features are only available to those that enter the server as an admin by providing the admin password (right-click on the server and then `Join as Admin`). You can then access the admin panel via the Escape menu. The `AdminPassword` can be set from the server config. + +| | | +| ------ | ----------- | +| | | + +The in-game panel has two main operational buttons: + +* `Apply and Start Mission` -> This will apply all of the changes made and start a new mission immediately. +* `Apply Changes` -> This will apply all of the changes made. The ones that are listed under Immediate Effects will go into effect right away. Those that are listed under Mission Options will be applied on the next mission. + +The in-game admin panel comes with the following options: + +###### Require mission restart +* Game Type + * Lists all available game types (Siege, TeamDeathmatch, Captain, Skirmish, Duel, Battle) +* Map + * Lists all the maps that have been passed to the server inside the config with the `add_map_to_usable_maps [MapName] [GameType],[GameType]` command + * For example: `add_map_to_usable_maps mymap Siege,Skirmish` (please note that the GameType must be correctly capitalized) +* Attacker & Defender Cultures +* Number of Rounds +* Map Time Limit +* Round Time Limit +* Warmup Time Limit +* Maximum Number of Players + +###### Have immediate effect +* Welcome Message +* Team Balance Threshold +* Friendly Damages +* Class Limits (Allow, Disallow) + +###### Others +* End Warmup + * Overrides the warmup timer and ends the warmup in 30 seconds. +* Mute/Unmute Player + * Mutes a player, preventing them from using chat. +* Kick Player + * Kicks a player from the server. Kicked players are able to immediately rejoin the server. +* Ban Player + * Bans a player from the server. Banned players are not able to rejoin the server until it restarts. + +Here are some behaviours you should expect while changing Game Types, Maps and Cultures: + +* If you leave Game Type, Map and Cultures UNSELECTED -> The game will run the current Game Type being played and give the players the option to vote on the available maps (those passed with `add_map_to_automated_battle_pool`) and cultures. +* If you leave Game Type, Map and Cultures UNSELECTED AND the Game Type isn't the one that the server initially launched with -> The game will run the current Game Type being played and use a random map from the available maps (those passed with `add_map_to_usable_maps`) and give the players the option to vote on cultures. +* If you select a Game Type but leave Map and Cultures UNSELECTED AND the selected Game Type isn't the one that the server initially launched with -> The game will run the current Game Type being played and use a random map from the available maps (those passed with `add_map_to_usable_maps`) and give the players the option to vote on cultures. +* If you select a Game Type and Map but leave Cultures UNSELECTED -> The game will run the selected Game Type with the selected Map and give the players the option to vote on cultures. +* If you select a Game Type, Map and Cultures -> The game will run the selected Game Type, Map and Cultures with no voting screen. +* If you provide no maps for a specific Game Type using the `add_map_to_usable_maps` parameter, that specific Game Type will be disabled in the admin panel. +* Official maps will only work with the intended Game Types. Trying to use them with another Game Type with `add_map_to_usable_maps` will not display them in the admin panel. + +###### Admin Announcements +You can also make use of the admin announcements system which pushes out text to everyone on the server by typing the following into chat: + +* `/ab [text]` - Admin Broadcast - Displays the announcement in the middle of the screen as well as in chat alongside a sound notification. +* `/ac [text]` - Admin Chat - Displays the announcement in chat. ## FAQ ##### Does Steam need to stay open for hosting? @@ -134,13 +197,13 @@ Yes. Right now, Steam is the only way to download it. We are planning to add it to other game platforms and are also discussing using a Docker host for distributing the server files in the future. ##### Will you provide Linux support? -Yes. In fact, we are using Linux servers on our backend, but the system requires further development to make it publicly available. +Linux server files are already available! ##### Will my server be accessible by everyone? Yes, your server will be accessible by everyone unless you make it password protected. ##### How many servers can I host? -There is a limit to the number of servers you can host simultaneously. Currently, you can host up to 5 servers. +There is a limit to the number of servers you can host simultaneously. Currently, you can host up to 50 servers. ##### What are the hardware requirements? It depends on the game mode and the player count. With the default configurations, we are hosting our games: @@ -156,10 +219,4 @@ You can also try to host a very small game with a single core machine as well bu It depends on the player count. By default, we are sending 60 packets to each player and each packet is less than 1.5 kilobytes. For most configurations, any dedicated server provider should be able to provide a sufficient network connection. ##### Is there any modification support? -Yes! - -##### What about anti-cheat with modifications? -Anti-cheat is disabled for modified games. Note that any player who has modified their game will not be able to join the official servers. - -##### Will there be an in-game administration panel for quicker and easier administration? -We are planning to make one. +Yes! Go to https://moddocs.bannerlord.com/multiplayer/custom_game_mode/ to learn more. diff --git a/docs/content/russian/Multiplayer/hosting_server.md b/docs/content/russian/Multiplayer/hosting_server.md index b6a1f98..f0c2d0a 100644 --- a/docs/content/russian/Multiplayer/hosting_server.md +++ b/docs/content/russian/Multiplayer/hosting_server.md @@ -8,11 +8,11 @@ weight = 5 Enable Tools within your Steam Library. `Mount & Blade II: Dedicated Server` should appear on your list. Download and install it. ## Hosting +By default, dedicated servers use UDP port 7210. You must have a visible (public) IP address on the internet as well as the aforementioned port being accessible. + Anonymous hosting is not supported. You will have to create a server token by going in-game first. ### Generating a Token -By default, dedicated servers use UDP port 7210. You must have a visible (public) IP address on the internet as well as the aforementioned port being accessible. - Launch `Mount & Blade II: Bannerlord` multiplayer and log into the game lobby: @@ -40,7 +40,7 @@ You can administrate your server by typing commands in your server’s console ( By typing `list` and pressing `enter`, you will get all the available commands in the dedicated server: - + For example, to get a simple server running, you can type the following commands into your console: @@ -91,37 +91,100 @@ By using the command `set_automated_battle_count` before `enable_automated_battl For example, `set_automated_battle_count 10` will have the server play 10 missions and shut down. If you would like to have an unlimited number of missions, set it to `-1`. -#### Helper Modules -We supply the optional `DedicatedCustomServerHelper` module to help server hosts. There are several submodules within for distinct purposes. For the server side modules to be usable from the outside, you will need to make TCP port 7210 accessible as well. +#### Additional Features +With patch v1.2.x the below striken through text is no longer relevant. The `DedicatedCustomServerHelper` module and its functionality has been merged into the base game. -Note that although the module is optional for server hosts, if you as the host do load the module, the players will also need to have it loaded. Otherwise, a mismatch in modules will prevent players from joining. +~~We supply the optional `DedicatedCustomServerHelper` module to help server hosts. There are several submodules within for distinct purposes.~~ For the server side modules to be usable from the outside, you will need to make TCP port 7210 accessible as well. + +~~Note that although the module is optional for server hosts, if you as the host do load the module, the players will also need to have it loaded. Otherwise, a mismatch in modules will prevent players from joining.~~ ##### Administration Web Panel This module launches a web panel to interact with your custom server, through a general management page and a terminal page: -You can find the URL for the web panel in your server console once it has been initialized. +You can access the web panel with your server's IP address and port once it has been initialized. The web panel is password protected by the server’s configured `AdminPassword` option. **By default, this option is left blank, so be sure to change it to a secure password**. If you do not want the web panel to be accessible from outside the local network or machine, and also do not need the map download feature below, you are free to block TCP port 7210 from external access. -##### In-Game Map Downloads -We also present a way to allow players to download your server’s map files through an in-game panel. As the server host, there are some conditions you must ensure to get this functioning: +##### In-Game Map Downloads [Map Downloader] +We also present a way to allow players to download your server's map files through an in-game panel. As the server host, there are some conditions you must ensure to get this functioning: -* The maps to be served must be located within **ONLY** the `DedicatedCustomServerHelper` module’s `SceneObj` directory, in the same way a typical module contains scenes. You can create the directory by hand if it is missing. -* The maps to be served must be “registered” through either the `Map` configuration option or the `add_map_to_automated_battle_pool` command. In other words, only maps playable on the server are served. +* The maps to be served must be located within ONLY the Multiplayer module's `SceneObj` directory, in the same way a typical module contains scenes. You can create the directory by hand if it is missing. +* The maps to be served must be "registered" through either the `Map` configuration option, the `add_map_to_automated_battle_pool` or `add_map_to_usable_maps` commands. In other words, only maps playable on the server are served. Note that having the scene loaded in multiple modules will cause issues such as the scene not being shown on the download panel. -For the players to be able to open the download panel, they will need to launch the game with the `DedicatedCustomServerHelper` module loaded. Now, they can right click on a custom server list entry, which will open a context menu with the option to open the download panel for the server. Once a map is successfully downloaded, there is no need to restart the game, they should be able to join your server as is. +Players will then get prompted to download all of the missing maps as they try to join the server or they can right click on the custom server list entry, which will open a context menu with the option to open the download panel for the server. Once all missing maps are successfully downloaded, there is no need to restart the game, they should be able to join your server as is. - + Note that this feature is intended to support simple use cases. This is not a module manager feature, and will not be able to support maps that require other assets (ModuleData, Prefabs, etc.) spread throughout a given module. Only the `SceneObj` directory contents are transferred between the server and the client. -If the lack of prefab support is a concern, you may be able to make the scene usable through the helper module by breaking the prefabs. Open the scene in the editor, select all entity objects, right click and select *Break Prefab*. +If the lack of prefab support is a concern, you may be able to make the scene usable through the Map Downloader by breaking the prefabs. Open the scene in the editor, select all entity objects, right click and select *Break Prefab*. + +##### In-game admin panel & admin features +The in-game admin panel provides an easy way to organize and moderate events. + +The admin features are only available to those that enter the server as an admin by providing the admin password (right-click on the server and then `Join as Admin`). You can then access the admin panel via the Escape menu. The `AdminPassword` can be set from the server config. + +| | | +| ------ | ----------- | +| | | + +The in-game panel has two main operational buttons: + +* `Apply and Start Mission` -> This will apply all of the changes made and start a new mission immediately. +* `Apply Changes` -> This will apply all of the changes made. The ones that are listed under Immediate Effects will go into effect right away. Those that are listed under Mission Options will be applied on the next mission. + +The in-game admin panel comes with the following options: + +###### Require mission restart +* Game Type + * Lists all available game types (Siege, TeamDeathmatch, Captain, Skirmish, Duel, Battle) +* Map + * Lists all the maps that have been passed to the server inside the config with the `add_map_to_usable_maps [MapName] [GameType],[GameType]` command + * For example: `add_map_to_usable_maps mymap Siege,Skirmish` (please note that the GameType must be correctly capitalized) +* Attacker & Defender Cultures +* Number of Rounds +* Map Time Limit +* Round Time Limit +* Warmup Time Limit +* Maximum Number of Players + +###### Have immediate effect +* Welcome Message +* Team Balance Threshold +* Friendly Damages +* Class Limits (Allow, Disallow) + +###### Others +* End Warmup + * Overrides the warmup timer and ends the warmup in 30 seconds. +* Mute/Unmute Player + * Mutes a player, preventing them from using chat. +* Kick Player + * Kicks a player from the server. Kicked players are able to immediately rejoin the server. +* Ban Player + * Bans a player from the server. Banned players are not able to rejoin the server until it restarts. + +Here are some behaviours you should expect while changing Game Types, Maps and Cultures: + +* If you leave Game Type, Map and Cultures UNSELECTED -> The game will run the current Game Type being played and give the players the option to vote on the available maps (those passed with `add_map_to_automated_battle_pool`) and cultures. +* If you leave Game Type, Map and Cultures UNSELECTED AND the Game Type isn't the one that the server initially launched with -> The game will run the current Game Type being played and use a random map from the available maps (those passed with `add_map_to_usable_maps`) and give the players the option to vote on cultures. +* If you select a Game Type but leave Map and Cultures UNSELECTED AND the selected Game Type isn't the one that the server initially launched with -> The game will run the current Game Type being played and use a random map from the available maps (those passed with `add_map_to_usable_maps`) and give the players the option to vote on cultures. +* If you select a Game Type and Map but leave Cultures UNSELECTED -> The game will run the selected Game Type with the selected Map and give the players the option to vote on cultures. +* If you select a Game Type, Map and Cultures -> The game will run the selected Game Type, Map and Cultures with no voting screen. +* If you provide no maps for a specific Game Type using the `add_map_to_usable_maps` parameter, that specific Game Type will be disabled in the admin panel. +* Official maps will only work with the intended Game Types. Trying to use them with another Game Type with `add_map_to_usable_maps` will not display them in the admin panel. + +###### Admin Announcements +You can also make use of the admin announcements system which pushes out text to everyone on the server by typing the following into chat: + +* `/ab [text]` - Admin Broadcast - Displays the announcement in the middle of the screen as well as in chat alongside a sound notification. +* `/ac [text]` - Admin Chat - Displays the announcement in chat. ## FAQ ##### Does Steam need to stay open for hosting? @@ -134,13 +197,13 @@ Yes. Right now, Steam is the only way to download it. We are planning to add it to other game platforms and are also discussing using a Docker host for distributing the server files in the future. ##### Will you provide Linux support? -Yes. In fact, we are using Linux servers on our backend, but the system requires further development to make it publicly available. +Linux server files are already available! ##### Will my server be accessible by everyone? Yes, your server will be accessible by everyone unless you make it password protected. ##### How many servers can I host? -There is a limit to the number of servers you can host simultaneously. Currently, you can host up to 5 servers. +There is a limit to the number of servers you can host simultaneously. Currently, you can host up to 50 servers. ##### What are the hardware requirements? It depends on the game mode and the player count. With the default configurations, we are hosting our games: @@ -156,10 +219,4 @@ You can also try to host a very small game with a single core machine as well bu It depends on the player count. By default, we are sending 60 packets to each player and each packet is less than 1.5 kilobytes. For most configurations, any dedicated server provider should be able to provide a sufficient network connection. ##### Is there any modification support? -Yes! - -##### What about anti-cheat with modifications? -Anti-cheat is disabled for modified games. Note that any player who has modified their game will not be able to join the official servers. - -##### Will there be an in-game administration panel for quicker and easier administration? -We are planning to make one. +Yes! Go to https://moddocs.bannerlord.com/multiplayer/custom_game_mode/ to learn more. diff --git a/docs/content/schinese/Multiplayer/hosting_server.md b/docs/content/schinese/Multiplayer/hosting_server.md index 6689564..f0c2d0a 100644 --- a/docs/content/schinese/Multiplayer/hosting_server.md +++ b/docs/content/schinese/Multiplayer/hosting_server.md @@ -1,162 +1,222 @@ +++ -title = "搭建一个自定义服务器" -description = "本文档为搭建自定义服务器的教程,从安装到部署整个流程包括在内。同时,文档内还有关于服务器参数的讲解,以及一些注意事项和可能碰到的问题的说明。在文档最后,还有常见问题一节,用来回答开发者们可能会问的一些普遍的问题。" +title = "Hosting a Custom Server" +description = "" weight = 5 - +++ -## 安装 -在你的 Steam 库中选到“工具”,你会在列表里看到 `Mount & Blade II: Dedicated Server`。下载并安装它。 +## Installing +Enable Tools within your Steam Library. `Mount & Blade II: Dedicated Server` should appear on your list. Download and install it. -## 搭建 +## Hosting By default, dedicated servers use UDP port 7210. You must have a visible (public) IP address on the internet as well as the aforementioned port being accessible. -服务器不支持匿名搭建,你需要先进入游戏生成一个令牌(Token)。 +Anonymous hosting is not supported. You will have to create a server token by going in-game first. -### 生成一个令牌(Token) -启动游戏 `Mount & Blade II: Bannerlord` 多人模式并登录到联机大厅: +### Generating a Token +Launch `Mount & Blade II: Bannerlord` multiplayer and log into the game lobby: -通过按键 `ALT` + `波浪号键(~)` 打开游戏控制台: +Open the game console by pressing `ALT` + `tilde key (~)`: -在输入框中输入 `customserver.gettoken` 并按下 `Enter` 键: +Type `customserver.gettoken` in the textbox and press enter: -你的令牌生成了并保存到了 `Documents\Mount & Blade II Bannerlord\Tokens` 目录下: +Your token has been generated and saved under your `Documents\Mount & Blade II Bannerlord\Tokens` folder: -如果你计划在安装了《霸主》的同一台计算机上搭建独立服务器,那么针对令牌的操作到这一步就可以了。但如果你计划在另外一台不同的计算机上搭建服务器,请复制你的令牌文件到目标电脑上的 `Documents\Mount & Blade II Bannerlord\Tokens` 目录下。还有一种方法是通过程序启动参数来输入令牌,在下面的“启动参数”一节说明。 +If you are planning to host the dedicated server on the same computer where you installed Bannerlord, this is all you have to do. But if you are planning to host using a different computer, please copy this token file to the target computer’s `Documents\Mount & Blade II Bannerlord\Tokens` folder. There is also one other alternative method shown in the Launch Arguments section below. -注意,这个生成的令牌文件是绑定你的《霸主》账户的,如果有任何滥用令牌的行为,我们都可以追溯到创建令牌的用户。**我们建议你只自己用**,并且不要将它分享给其他人。 +Beware that the generated token is tied to your Bannerlord account. Any abuse would be traced back to the user who originally generated the token. **We recommend keeping it private**, and not sharing it with other people. -另外请记住,因安全起见,**你的令牌会在 3 个月后过期**,届时你可以重新生成并更换令牌。 +Also remember that **your token expires after 3 months** due to security reasons at which point you can replace it by generating a new one. -### 服务器管理 -你可以在你的服务器控制台(在启动服务器时会显示)里输入命令来管理你的服务器。 +### Server Administration +You can administrate your server by typing commands in your server’s console (that opens up when launching the server). -通过输入 `list` 然后按下 `enter` 键,你可以获取到独立服务器的所有可用命令: +By typing `list` and pressing `enter`, you will get all the available commands in the dedicated server: - + -例如,想要简单启动一个服务器,你可以在控制台输入以下命令: +For example, to get a simple server running, you can type the following commands into your console: * `ServerName Custom Dedicated Beta Test` * `GameType TeamDeathmatch` * `start_game` * `start_mission` -通过执行这些命令,你的自定义服务器将出现在服务器列表,并且所有玩家都可以访问。 +By executing these commands, you will make your custom server visible and accessible to all players. -通过 `ServerName` 和 `GameType` 命令,你可以轻松地设置你的服务器名字和游戏模式。 +With the `ServerName` and `GameType` commands, you are simply setting the name of your server and setting your game mode. -通过 `start_game` 命令,你可以启动你搭建的服务器。你的服务器将变为所有玩家可见,任何进入服务器的玩家都会在中场休息状态下等待。 +With the `start_game` command, you are starting to host your server. Your server becomes visible to all players. Any player who enters your server will wait in the intermission state. -通过 `start_mission` 命令,你的服务器将会切换到行动模式,并且玩家能够正式开始游玩。 +With the `start_mission` command, your server will switch into mission mode and players will be able to play the game. -你可以使用简写 `start_game_and_mission` 来替代上述两个命令。 +You can also use the shorthand `start_game_and_mission` instead of the two commands. -#### 提示 & 技巧 +#### Tips & Tricks -##### 配置文件 -你可以指定一个配置文件在初始化时加载运行,该文件的内容将被逐行执行,而不是通过服务器控制台一条一条的来输入命令。 +##### Configuration Files +Instead of executing commands one at a time with the server console, you can specify a configuration file to run on initialization, which will have its contents executed line by line. -你可以在 Native 模组目录下找到示例配置文件(`Modules\Native\ds_config_*.txt`)。请注意,目前为止,你自己的配置文件也必须位于该目录下,才能被服务器读取到。关于如何指定要运行的配置文件,请参考下文中提到的“启动参数”。 +You can find sample configuration files within the Native module directory (`Modules\Native\ds_config_*.txt`). Note that currently, your own configuration files must also reside within this same directory to be found by the server. See the launch arguments section below for how you can specify a configuration file to be run. -##### 启动参数 -目前,有几个特别有用的启动参数: +##### Launch Arguments +There are a few particularly useful launch arguments at the moment: -`/dedicatedcustomserverconfigfile [配置文件名]` - 指定一个要加载的配置文件,如上文“配置文件”一节中所提到的那样。 +`/dedicatedcustomserverconfigfile [configuration_file_name]` +Specify a configuration file to be run as seen in the Configuration Files section above. -`/dedicatedcustomserverauthtoken [认证令牌内容]` - 当令牌通过启动参数传入,包含令牌的本地文件就不需要了。 +`/dedicatedcustomserverauthtoken [authentication_token_contents]` +When the token is passed through the launch argument, a local file containing the token is not required. -`/DisableErrorReporting ` - 禁用崩溃报告上传(Crash Uploader)弹出和自动错误上报。 +`/DisableErrorReporting` +Disables the Crash Uploader popup and automatic error reporting. -`/LogOutputPath [输出目录] ` - 设置服务器日志文件的输出目录,路径应该用双引号括起来。 +`/LogOutputPath [output_path]` +Sets the log output directory of the server. Path should be in double quotes. `/port [number]` Optionally specify a port number to run the server from, useful for using ports other than the default. -##### 日志文件 -默认情况下,Windows 的自定义服务器的日志文件可以在你的 ProgramData 目录(`%programdata%\Mount and Blade II Bannerlord\logs`)下找到。 +##### Log Files +By default, log files for the custom server can be found in your ProgramData directory on Windows (`%programdata%\Mount and Blade II Bannerlord\logs`). + +##### Automated Battle Count +By using the command `set_automated_battle_count` before `enable_automated_battle_switching`, you can set the number of missions to be played before the server shuts down. -##### 自动换图次数 -通过在 `enable_automated_battle_switching` 之前使用命令 `set_automated_battle_count` 你可以设置在服务器关闭前可以游玩的行动数量。 +For example, `set_automated_battle_count 10` will have the server play 10 missions and shut down. If you would like to have an unlimited number of missions, set it to `-1`. -例如,`set_automated_battle_count 10` 会让服务器运行 10 个行动后关闭,如果你想设置为无限行动数量,将值设为 -1。 +#### Additional Features +With patch v1.2.x the below striken through text is no longer relevant. The `DedicatedCustomServerHelper` module and its functionality has been merged into the base game. -#### 辅助模组 -我们提供可选模组 `DedicatedCustomServerHelper` 来辅助搭建服务器,其中有几个子模组可以实现不同的功能。为了使服务端模组可以通过外部网络使用,你需要开放 TCP 端口 7210。 +~~We supply the optional `DedicatedCustomServerHelper` module to help server hosts. There are several submodules within for distinct purposes.~~ For the server side modules to be usable from the outside, you will need to make TCP port 7210 accessible as well. -请注意,尽管该模组对于服务器搭建来说是可选的,但如果你加载了此模组,那么玩家也必须加载此模组。否则,模组不匹配的玩家将无法加入服务器。 +~~Note that although the module is optional for server hosts, if you as the host do load the module, the players will also need to have it loaded. Otherwise, a mismatch in modules will prevent players from joining.~~ -##### 网页管理面板 -这个模组启动了一个网页面板,通过一个通用的管理页面和终端页面与你的自定义服务器进行交互: +##### Administration Web Panel +This module launches a web panel to interact with your custom server, through a general management page and a terminal page: -你的网页面板初始化完成后,你可以在你的服务器控制台看到它的 URL 地址。 +You can access the web panel with your server's IP address and port once it has been initialized. -该网页面板受服务器所配置的 `AdminPassword` 选项的密码保护。**默认情况下,该选项的值为空,所以一定要设置一个安全的密码。** +The web panel is password protected by the server’s configured `AdminPassword` option. **By default, this option is left blank, so be sure to change it to a secure password**. -如果你不希望除本地网络或机器以外的地方能访问网页面板,同时也不需要下面的地图下载功能,那么你只需要拦截外部对 TCP 端口 7210 的访问即可。 +If you do not want the web panel to be accessible from outside the local network or machine, and also do not need the map download feature below, you are free to block TCP port 7210 from external access. -##### 游戏内地图下载 -我们还提供了一种允许玩家通过游戏内面板下载服务器的地图文件的方式。作为服务器主机,你必须要满足一些条件才能让这个功能发挥作用: +##### In-Game Map Downloads [Map Downloader] +We also present a way to allow players to download your server's map files through an in-game panel. As the server host, there are some conditions you must ensure to get this functioning: -* 地图文件必须置于 **ONLY** `DedicatedCustomServerHelper` 模组的 `SceneObj` 目录下,就像一个典型的包含场景的模组一样。如果没有该目录,你可以手动新建一个。 -* 要把这个地图提供给玩家,必须通过 `Map` 选项或 `add_map_to_automated_battle_pool` 命令“注册”到服务器。 +* The maps to be served must be located within ONLY the Multiplayer module's `SceneObj` directory, in the same way a typical module contains scenes. You can create the directory by hand if it is missing. +* The maps to be served must be "registered" through either the `Map` configuration option, the `add_map_to_automated_battle_pool` or `add_map_to_usable_maps` commands. In other words, only maps playable on the server are served. Note that having the scene loaded in multiple modules will cause issues such as the scene not being shown on the download panel. -为了让玩家能够打开下载面板,他们需要在加载了 `DedicatedCustomServerHelper` 模组后启动游戏。现在,他们可以鼠标右击自定义服务器列表项,然后会打开一个上下文菜单,其中会有打开该服务器下载面板的选项。地图下载成功后,无需重新启动游戏,他们应该就能直接加入你的服务器。 +Players will then get prompted to download all of the missing maps as they try to join the server or they can right click on the custom server list entry, which will open a context menu with the option to open the download panel for the server. Once all missing maps are successfully downloaded, there is no need to restart the game, they should be able to join your server as is. + + + +Note that this feature is intended to support simple use cases. This is not a module manager feature, and will not be able to support maps that require other assets (ModuleData, Prefabs, etc.) spread throughout a given module. Only the `SceneObj` directory contents are transferred between the server and the client. + +If the lack of prefab support is a concern, you may be able to make the scene usable through the Map Downloader by breaking the prefabs. Open the scene in the editor, select all entity objects, right click and select *Break Prefab*. + +##### In-game admin panel & admin features +The in-game admin panel provides an easy way to organize and moderate events. + +The admin features are only available to those that enter the server as an admin by providing the admin password (right-click on the server and then `Join as Admin`). You can then access the admin panel via the Escape menu. The `AdminPassword` can be set from the server config. + +| | | +| ------ | ----------- | +| | | + +The in-game panel has two main operational buttons: + +* `Apply and Start Mission` -> This will apply all of the changes made and start a new mission immediately. +* `Apply Changes` -> This will apply all of the changes made. The ones that are listed under Immediate Effects will go into effect right away. Those that are listed under Mission Options will be applied on the next mission. + +The in-game admin panel comes with the following options: + +###### Require mission restart +* Game Type + * Lists all available game types (Siege, TeamDeathmatch, Captain, Skirmish, Duel, Battle) +* Map + * Lists all the maps that have been passed to the server inside the config with the `add_map_to_usable_maps [MapName] [GameType],[GameType]` command + * For example: `add_map_to_usable_maps mymap Siege,Skirmish` (please note that the GameType must be correctly capitalized) +* Attacker & Defender Cultures +* Number of Rounds +* Map Time Limit +* Round Time Limit +* Warmup Time Limit +* Maximum Number of Players + +###### Have immediate effect +* Welcome Message +* Team Balance Threshold +* Friendly Damages +* Class Limits (Allow, Disallow) - +###### Others +* End Warmup + * Overrides the warmup timer and ends the warmup in 30 seconds. +* Mute/Unmute Player + * Mutes a player, preventing them from using chat. +* Kick Player + * Kicks a player from the server. Kicked players are able to immediately rejoin the server. +* Ban Player + * Bans a player from the server. Banned players are not able to rejoin the server until it restarts. -请注意,这个功能是用于支持这一简单的使用场景。这不是一个模组管理器功能,也无法支持获取给定的模组分布在其他资产(如 ModuleData、Prefabs 等)中的地图。只有 `SceneObj` 目录下的内容会在服务端和客户端之间传输。 +Here are some behaviours you should expect while changing Game Types, Maps and Cultures: -If the lack of prefab support is a concern, you may be able to make the scene usable through the helper module by breaking the prefabs. Open the scene in the editor, select all entity objects, right click and select *Break Prefab*. +* If you leave Game Type, Map and Cultures UNSELECTED -> The game will run the current Game Type being played and give the players the option to vote on the available maps (those passed with `add_map_to_automated_battle_pool`) and cultures. +* If you leave Game Type, Map and Cultures UNSELECTED AND the Game Type isn't the one that the server initially launched with -> The game will run the current Game Type being played and use a random map from the available maps (those passed with `add_map_to_usable_maps`) and give the players the option to vote on cultures. +* If you select a Game Type but leave Map and Cultures UNSELECTED AND the selected Game Type isn't the one that the server initially launched with -> The game will run the current Game Type being played and use a random map from the available maps (those passed with `add_map_to_usable_maps`) and give the players the option to vote on cultures. +* If you select a Game Type and Map but leave Cultures UNSELECTED -> The game will run the selected Game Type with the selected Map and give the players the option to vote on cultures. +* If you select a Game Type, Map and Cultures -> The game will run the selected Game Type, Map and Cultures with no voting screen. +* If you provide no maps for a specific Game Type using the `add_map_to_usable_maps` parameter, that specific Game Type will be disabled in the admin panel. +* Official maps will only work with the intended Game Types. Trying to use them with another Game Type with `add_map_to_usable_maps` will not display them in the admin panel. -## 常见问题 -##### 在服务器搭建时需要 Steam 保持运行吗? -不,你只需要用 Steam 保持你的服务器文件为最新就行,你可以随意拷贝服务器文件到其它计算机上搭建。但我们强烈推荐你带一个 Steam 以保证文件是最新的。不像《战团》,目前而言,任何旧版本的服务器文件都不兼容我们的系统。 +###### Admin Announcements +You can also make use of the admin announcements system which pushes out text to everyone on the server by typing the following into chat: -##### 你们计划支持其他的游戏平台吗? -是的。 +* `/ab [text]` - Admin Broadcast - Displays the announcement in the middle of the screen as well as in chat alongside a sound notification. +* `/ac [text]` - Admin Chat - Displays the announcement in chat. -##### 如果我不想用任何游戏平台来获取服务器文件,会有其他选择吗? -目前,Steam 是下载服务器文件的唯一渠道。我们计划将服务器文件添加到其他游戏平台,同时也在考虑未来使用 Docker 分发服务器文件这样一个方案。 +## FAQ +##### Does Steam need to stay open for hosting? +No. You only need Steam for keeping your server files up to date. You are free to copy your server files to some other computer to host it. But we strongly recommend you to use it with Steam in order to keep it up to date. Unlike Warband, currently, any older versions of the server files will be incompatible with our system. -##### 你们会提供 Linux 支持吗? -是的。事实上,我们的后端使用的就是 Linux 服务器,但要给公众使用的话,还需要对系统进行进一步开发。 +##### Are you planning to add support for other game platforms? +Yes. -##### 我的服务器所有人都可以访问吗? -是的,你的服务器所有人都可以访问,除非说你设置了密码来保护。 +##### What if I don’t want to use any game platform to retrieve the server files, will there be any other option? +Right now, Steam is the only way to download it. We are planning to add it to other game platforms and are also discussing using a Docker host for distributing the server files in the future. -##### 我可以搭建多少服务器? -你可以同时运行的服务器数量是有限的。目前,你最多可以同时运行 5 个服务器。 +##### Will you provide Linux support? +Linux server files are already available! -##### 硬件要求是什么? -这需要看是何种游戏模式以及玩家数量。这是我们搭建游戏服务器时,默认的配置: +##### Will my server be accessible by everyone? +Yes, your server will be accessible by everyone unless you make it password protected. -* 小型战斗(遭遇战和决斗):2 核 CPU (2GHz 到 3GHz) 和 4GB 内存 -* 大型战斗(围攻战、团队死斗和领军战):4 核 CPU (2GHz 到 3GHz) 和 8GB 内存 +##### How many servers can I host? +There is a limit to the number of servers you can host simultaneously. Currently, you can host up to 50 servers. -但举例来说,你总是可以在一台 2 核机器上搭建一个较少玩家的攻城服务器。 +##### What are the hardware requirements? +It depends on the game mode and the player count. With the default configurations, we are hosting our games: -你也可以尝试使用单核机器来搭建一台非常小型的服务器,但你可能在游戏中碰到一些使用率突增卡顿的情况。 +* For smaller battles (Skirmish and Duel): 2 core CPUs (2GHz to 3GHz) with 4GB Memory +* For bigger battles (Siege, Team Deathmatch and Captain): 4 core CPUs (2GHz to 3GHz) with 8GB Memory -##### 带宽要求是什么? -这取决于玩家数量。默认情况下,我们会给每个玩家发送 60 个数据包,并且每个数据包少于 1.5 kb(千字节)。对于大多数配置,任何专用服务器供应商都应该能够提供足够的网络连接。 +But, for instance, you can always host a siege mode with less players on a 2 core machine as well. -##### 游戏支持任何自定义模组吗? -是的! +You can also try to host a very small game with a single core machine as well but you might get some spikes during the game. -##### 自定义时的反作弊功能是怎样的? -对于自定义游戏反作弊是关闭的。请注意,任何修改过游戏的玩家都无法加入官方服务器。 +##### What are the bandwidth requirements? +It depends on the player count. By default, we are sending 60 packets to each player and each packet is less than 1.5 kilobytes. For most configurations, any dedicated server provider should be able to provide a sufficient network connection. -##### 会有游戏内管理面板来帮助更快更方便地管理服务器吗? -我们打算做一个。 +##### Is there any modification support? +Yes! Go to https://moddocs.bannerlord.com/multiplayer/custom_game_mode/ to learn more. diff --git a/docs/static/img/hosting_server/adminpanel1.png b/docs/static/img/hosting_server/adminpanel1.png new file mode 100644 index 0000000..d6767d3 Binary files /dev/null and b/docs/static/img/hosting_server/adminpanel1.png differ diff --git a/docs/static/img/hosting_server/adminpanel2.png b/docs/static/img/hosting_server/adminpanel2.png new file mode 100644 index 0000000..b710fc4 Binary files /dev/null and b/docs/static/img/hosting_server/adminpanel2.png differ diff --git a/docs/static/img/hosting_server/consolecommands.png b/docs/static/img/hosting_server/consolecommands.png new file mode 100644 index 0000000..2af17a9 Binary files /dev/null and b/docs/static/img/hosting_server/consolecommands.png differ diff --git a/docs/static/img/hosting_server/downloadpanel.png b/docs/static/img/hosting_server/downloadpanel.png new file mode 100644 index 0000000..687ee26 Binary files /dev/null and b/docs/static/img/hosting_server/downloadpanel.png differ