Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
# 什么是 WukongMP?

WukongMP 是我们为 **《黑神话:悟空》** 打造的社区多人项目。我们开发它的目标,是让玩家能够在共享的多人体验中相聚,使大家可以一起合作探索世界、与朋友并肩挑战 Boss,并加入由社区运营的自定义服务器。
WukongMP 是我们为 **《黑神话:悟空》**
打造的社区多人项目。我们开发它的目标,是让玩家能够在共享的多人体验中相聚,使大家可以一起合作探索世界、与朋友并肩挑战 Boss,并加入由社区运营的自定义服务器。

## WukongMP 的设计目标

WukongMP 围绕社区驱动的多人玩法而设计。借助它,玩家可以创建并加入自定义服务器,通过自动模组同步实现一键连接,并使用我们内置的服务器工具启动专用服务器。我们还计划继续扩展该平台,加入自定义游戏模式以及公平竞技 / 安全功能。
WukongMP
围绕社区驱动的多人玩法而设计。借助它,玩家可以创建并加入自定义服务器,通过自动模组同步实现一键连接,并使用我们内置的服务器工具启动专用服务器。我们还计划继续扩展该平台,加入自定义游戏模式以及公平竞技
/ 安全功能。

## 我们为什么要打造它

我们的目标,是把原本的单人体验转变为一个可模组化、由社区驱动的多人平台。我们希望为玩家和创作者提供工具,让他们能够打造属于自己的玩法、分享自定义体验,并围绕这些内容发展社区。WukongMP 旨在以类似于 FiveM 对 *Grand Theft Auto V* 所做到的方式,推动自定义多人玩法的普及与民主化。
我们的目标,是把原本的单人体验转变为一个可模组化、由社区驱动的多人平台。我们希望为玩家和创作者提供工具,让他们能够打造属于自己的玩法、分享自定义体验,并围绕这些内容发展社区。WukongMP
旨在以类似于 FiveM 对 *Grand Theft Auto V* 所做到的方式,推动自定义多人玩法的普及与民主化。

## 当前开放情况

目前,我们正在邀请玩家报名申请 SDK 抢先体验,与社区一起继续塑造 WukongMP 的未来。WukongMP 并非 **《黑神话:悟空》** 的官方服务,也与 Game Science 没有关联
目前,我们正在邀请玩家报名申请 SDK 抢先体验,与社区一起继续塑造 WukongMP 的未来。WukongMP 并非 **《黑神话:悟空》**
的官方服务,也与 Game Science 没有关联.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ The WukongMP server is currently distributed in the following formats:
- Docker image **(coming soon)**

### Downloads
| Platform | Architecture | Download |
| --- | --- | --- |
| Linux | x64 | [Download for Linux](https://readymstorage.blob.core.windows.net/wukong-server-releases/wukong-server-linux64-alpha.zip) |
| Windows | x64 | [Download for Windows](https://readymstorage.blob.core.windows.net/wukong-server-releases/wukong-server-win64-alpha.zip) |
| Platform | Architecture | Download |
| -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------ |
| Linux | x64 | [Download for Linux](https://readymstorage.blob.core.windows.net/wukong-server-releases/wukong-server-linux64-alpha.zip) |
| Windows | x64 | [Download for Windows](https://readymstorage.blob.core.windows.net/wukong-server-releases/wukong-server-win64-alpha.zip) |

## Installation

Expand All @@ -30,12 +30,13 @@ server/

Start the server by running the `server.exe` binary.

On first launch, the server creates a `data/` directory inside the server folder.
This directory contains the `web.db` database file, where persistent data is stored.
On first launch, the server creates a `data/` directory inside the server
folder. This directory contains the `web.db` database file, where persistent
data is stored.

The server listens on the following ports:

| Port | Protocol | Purpose |
| --- | --- | --- |
| 9050 | UDP | Game traffic (player connections, game state synchronization, etc.) |
| 9050 | HTTP | [Admin panel](admin-panel) |
| Port | Protocol | Purpose |
| ---- | -------- | ------------------------------------------------------------------- |
| 9050 | UDP | Game traffic (player connections, game state synchronization, etc.) |
| 9050 | HTTP | [Admin panel](admin-panel) |
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import setupPinImg from '/img/docs/admin-panel-setup-pin.png';
import terminalImg from '/img/docs/admin-panel-terminal.png';
import signInImg from '/img/docs/admin-panel-sign-in.png';
import setupPinImg from '/img/docs/admin-panel-setup-pin.png'; import
terminalImg from '/img/docs/admin-panel-terminal.png'; import signInImg from
'/img/docs/admin-panel-sign-in.png';

# Admin panel

The admin panel is available over HTTP on port `8900`.

If the server is running on your local machine, you can open it at http://localhost:8900.
If the server is running on your local machine, you can open it at
http://localhost:8900.

## First-time setup

When launching the server for the first time, you will need to create an administrator account.
When launching the server for the first time, you will need to create an
administrator account.

During startup, the server prints a one-time setup PIN in the console output:

Expand All @@ -27,30 +29,32 @@ $ ./server.exe
Enter this PIN in the admin panel to begin the setup process.

<img
src={setupPinImg}
width={500}
alt="Setup PIN code view"
src={setupPinImg}
width={500}
alt="Setup PIN code view"
/>

## Sign in with ReadyM

After entering the PIN, you will be asked to sign in with your ReadyM account.

<img
src={signInImg}
width={500}
alt="Admin panel sign-in"
src={signInImg}
width={500}
alt="Admin panel sign-in"
/>

You will be redirected to the ReadyM authentication page, where you can enter your credentials.
You will be redirected to the ReadyM authentication page, where you can enter
your credentials.

Once authentication is successful, you will be redirected back to the admin panel automatically.
Once authentication is successful, you will be redirected back to the admin
panel automatically.

## Admin panel interface

After signing in, you can access the admin panel interface.

<img
src={terminalImg}
alt="Admin panel terminal"
/>
src={terminalImg}
alt="Admin panel terminal"
/>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Modding overview

:::info[Work in progress]
This feature is not documented yet.
:::
:::info[Work in progress]\
This feature is not documented yet.\
:::
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Server-side mods

:::warning[Work in progress]
This feature is under development and will be available in a future version of the SDK.
:::
:::warning[Work in progress]\
This feature is under development and will be available in a future version of
the SDK.\
:::
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';

# Console commands

The WukongMP SDK includes a command console accessible by pressing <kbd>F1</kbd> on your keyboard.
The WukongMP SDK includes a command console accessible by pressing <kbd>F1</kbd>
on your keyboard.

## Keyboard shortcuts

| Binding | Action |
| --------|--------|
| <kbd>TAB</kbd> | Auto-complete the selected command |
| <kbd>Alt</kbd> + <kbd>↑</kbd> | Previous command |
| <kbd>Alt</kbd> + <kbd>↓</kbd> | Next command |
| Binding | Action |
| ----------------------------- | ---------------------------------- |
| <kbd>TAB</kbd> | Auto-complete the selected command |
| <kbd>Alt</kbd> + <kbd>↑</kbd> | Previous command |
| <kbd>Alt</kbd> + <kbd>↓</kbd> | Next command |

## Defining custom commands

Use the [Console API](/docs/wukongmp-api-reference/WukongMp.Sdk.Api/WukongMp.Sdk.Api.IWukongConsoleApi.md) to define custom commands.
Use the [Console
API](/docs/wukongmp-api-reference/WukongMp.Sdk.Api/WukongMp.Sdk.Api.IWukongConsoleApi.md)
to define custom commands.


### Register commands without parameters
Expand Down Expand Up @@ -44,8 +46,9 @@ rebirth_shrine

### Require parameters

The command parameters are deducted from the handler signature - supported types are `string`, `int`, `float`, `double`, and `bool`.
Parameters can be optional, in which case a default value must be provided.
The command parameters are deducted from the handler signature - supported types
are `string`, `int`, `float`, `double`, and `bool`. Parameters can be optional,
in which case a default value must be provided.

<Tabs>
<TabItem value="code" label="Source code">
Expand All @@ -71,7 +74,9 @@ teleport_shrine 2005 # teleports to shrine 2005

### Define auto-completed paremeters

You can define a list of parameter values that will be displayed when the command is typed in. These values will be selectable with arrow keys and auto-completeable with <kbd>TAB</kbd>.
You can define a list of parameter values that will be displayed when the
command is typed in. These values will be selectable with arrow keys and
auto-completeable with <kbd>TAB</kbd>.

<Tabs>
<TabItem value="code" label="Source code">
Expand All @@ -89,7 +94,8 @@ void SpawnMonster(string monsterType) { ... }
</TabItem>
<TabItem value="console" label="In-game console">

Immediately upon finishing the command name, the available parameter values will be shown:
Immediately upon finishing the command name, the available parameter values will
be shown:

```shell
spawn
Expand All @@ -113,4 +119,4 @@ wolf_sentinel
---

</TabItem>
</Tabs>
</Tabs>
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Custom components

The WukongMP SDK allows for defining custom data components attached to entities in the game. These can be anything from primitive values to complex structures.
The WukongMP SDK allows for defining custom data components attached to entities
in the game. These can be anything from primitive values to complex structures.

---

:::warning[Work in progress]
This feature is under development and will be available in a future version of the SDK.
:::
:::warning[Work in progress]\
This feature is under development and will be available in a future version of
the SDK.\
:::
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Custom RPC

The WukongMP SDK allows for defining arbitrary Remote Procedure Call (RPC) functions. These can have arbitrary payloads and support a number of [Relay Modes](/docs/wukongmp-api-reference/ReadyM.Api.Multiplayer.Protocol.Enums/ReadyM.Api.Multiplayer.Protocol.Enums.RelayMode.md).
The WukongMP SDK allows for defining arbitrary Remote Procedure Call (RPC)
functions. These can have arbitrary payloads and support a number of [Relay
Modes](/docs/wukongmp-api-reference/ReadyM.Api.Multiplayer.Protocol.Enums/ReadyM.Api.Multiplayer.Protocol.Enums.RelayMode.md).

---

:::warning[Work in progress]
This feature is under development and will be available in a future version of the SDK.
:::
:::warning[Work in progress]\
This feature is under development and will be available in a future version of
the SDK.\
:::
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

---

:::warning[Work in progress]
This feature is under development and will be available in a future version of the SDK.
:::
:::warning[Work in progress]\
This feature is under development and will be available in a future version of
the SDK.\
:::
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Game events

The WukongMP SDK provides means to react to the most common events in the game. Refer to the [Events API](/docs/wukongmp-api-reference/WukongMp.Sdk.Api/WukongMp.Sdk.Api.IWukongEventApi.md) for a complete list.
The WukongMP SDK provides means to react to the most common events in the game.
Refer to the [Events
API](/docs/wukongmp-api-reference/WukongMp.Sdk.Api/WukongMp.Sdk.Api.IWukongEventApi.md)
for a complete list.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Key bindings

The [Input API](/docs/wukongmp-api-reference/WukongMp.Sdk.Api/WukongMp.Sdk.Api.IWukongInputApi.md) provides a way to register custom keyboard and controller bindings.
The [Input
API](/docs/wukongmp-api-reference/WukongMp.Sdk.Api/WukongMp.Sdk.Api.IWukongInputApi.md)
provides a way to register custom keyboard and controller bindings.

## Examples

Expand All @@ -24,7 +26,9 @@ WukongApi.Input.RegisterKeyBind(ModifierKeys.Alt, Key.X, () =>

## Register controller bindings

Use the [RegisterGamePadBind](/docs/wukongmp-api-reference/WukongMp.Sdk.Api/WukongMp.Sdk.Api.IWukongInputApi#-registergamepadbindgamepadbutton-action) method to bind to one of the following buttons:
Use the
[RegisterGamePadBind](/docs/wukongmp-api-reference/WukongMp.Sdk.Api/WukongMp.Sdk.Api.IWukongInputApi#-registergamepadbindgamepadbutton-action)
method to bind to one of the following buttons:

```csharp
public enum GamePadButton
Expand Down Expand Up @@ -55,7 +59,10 @@ public enum GamePadButton

## Using `CanApplyInput`

Key bindings run every time a key is pressed, regardless of context. If you want to ensure that pressing 'K' when typing in chat will not trigger any command logic, gate it behind the call to [CanApplyInput](/docs/wukongmp-api-reference/WukongMp.Sdk.Api/WukongMp.Sdk.Api.IWukongInputApi#-canapplyinput).
Key bindings run every time a key is pressed, regardless of context. If you want
to ensure that pressing 'K' when typing in chat will not trigger any command
logic, gate it behind the call to
[CanApplyInput](/docs/wukongmp-api-reference/WukongMp.Sdk.Api/WukongMp.Sdk.Api.IWukongInputApi#-canapplyinput).

```csharp showLineNumbers
WukongApi.Input.RegisterKeyBind(Key.K, () =>
Expand All @@ -65,4 +72,4 @@ WukongApi.Input.RegisterKeyBind(Key.K, () =>
// toggle chat window visibility
}
});
```
```
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Save file management

The WukongMP SDK allows for a few modes of operation when it comes to save files.
The WukongMP SDK allows for a few modes of operation when it comes to save
files.

## Loading save files

Expand All @@ -19,6 +20,7 @@ During the game, you may choose to:

---

:::warning[Work in progress]
This feature is under development and will be available in a future version of the SDK.
:::
:::warning[Work in progress]\
This feature is under development and will be available in a future version of
the SDK.\
:::
Loading
Loading