Skip to content

Commit d724934

Browse files
authored
Merge branch 'main' into main
2 parents 10f46e7 + 3567b23 commit d724934

File tree

13 files changed

+217
-216
lines changed

13 files changed

+217
-216
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This command generates static content into the `build` directory and can be serv
2929
Using SSH:
3030

3131
```bash
32-
USE_SSH=true yarn deploy
32+
USE_SSH=true yarn deploy
3333
```
3434

3535
Not using SSH:

docs/dev/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"label": "Mods 开发",
2+
"label": "Mod Development",
33
"position": 4,
44
"link": {
55
"type": "generated-index"

docs/dev/advance/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"label": "高级",
2+
"label": "Advanced",
33
"position": 5,
44
"link": {
55
"type": "generated-index"

docs/dev/look-persudo.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,61 @@
22
sidebar_position: 100
33
---
44

5-
# 查看游戏代码
5+
# Viewing the Game's Code
66

7-
本教程将指导你游戏代码流程。
7+
This tutorial will guide you on how to inspect the game's code.
88

99
:::info
1010

11-
**Dead Cells** 使用 **Haxe** 编写并运行在 **HashLink 虚拟机**上,而不是 **.NET 虚拟机**
11+
**Dead Cells** is written in **Haxe** and runs on the **HashLink virtual machine**, not the **.NET virtual machine**.
1212

1313
:::
1414

1515
:::tip
1616

17-
在开始之前,建议阅读 [wiki](https://github.com/HaxeFoundation/hashlink/wiki) 了解 **HashLink 虚拟机** 的基本信息。
17+
Before you begin, it is recommended to read the [wiki](https://github.com/HaxeFoundation/hashlink/wiki) to understand the basics of the **HashLink virtual machine**.
1818

1919
:::
2020

21-
## 使用 crashlink
21+
## Using crashlink
2222

23-
详见 [crashlink 文档](https://n3rdl0rd.github.io/crashlink/)
23+
For details, please see the [crashlink documentation](https://n3rdl0rd.github.io/crashlink/).
2424

25-
## 使用 hlbc-gui
25+
## Using hlbc-gui
2626

27-
详见 [README](https://github.com/Gui-Yom/hlbc)
27+
For details, please see the [README](https://github.com/Gui-Yom/hlbc).
2828

29-
## 使用 GamePseudocode
29+
## Using GamePseudocode
3030

3131
:::warning
3232

33-
- **GamePseudocode** 是由 **Dead Cells** **HashLink Bytecode** 转换而来。仅仅用于查看游戏代码流程。
34-
- 为了反编译结果的可读性, **GamePseudocode** **HashLink Bytecode** 并非一一对应关系。
35-
- **GamePseudocode** 的结果可能是错误的,请结合 [crashlink](#使用-crashlink) [hlbc](#使用-hlbc-gui) 使用。
33+
- **GamePseudocode** is converted from the **HashLink Bytecode** of **Dead Cells**. It is only intended for viewing the game's code flow.
34+
- For the readability of the decompiled results, **GamePseudocode** does not have a one-to-one correspondence with **HashLink Bytecode**.
35+
- The results from **GamePseudocode** may be incorrect. Please use it in conjunction with [crashlink](#using-crashlink) or [hlbc-gui](#using-hlbc-gui).
3636

3737
:::
3838

39-
### 修改配置文件
39+
### Modifying the Configuration File
4040

4141
:::tip
4242

43-
配置文件的位置:`coremod/config/modcore.json`
43+
Configuration file location: `coremod/config/modcore.json`
4444

45-
初次启动后该文件会自动生成。
45+
This file is automatically generated after the first launch.
4646

4747
:::
4848

49-
- 打开配置文件,找到 `GeneratePseudocodeAssembly` 将其值修改为 `true`
50-
- 保存配置文件。
49+
- Open the configuration file, find `GeneratePseudocodeAssembly`, and change its value to `true`.
50+
- Save the configuration file.
5151

52-
### 启动游戏
52+
### Launching the Game
5353

54-
- 启动游戏,游戏会自动生成 **GamePseudocode** ,请耐心等待。
55-
- 等待进入主菜单后,关闭游戏。
54+
- Launch the game. The game will automatically generate the **GamePseudocode**, please be patient.
55+
- After reaching the main menu, close the game.
5656

57-
### 打开 GamePseudocode
57+
### Opening the GamePseudocode
5858

59-
- 进入目录 `coremod/cache` 应该可以发现 `GamePseudocode.dll` 文件。
60-
- 如果不存在,请确认操作是否正确。
61-
- 使用你喜欢的 **.NET 反编译器** 打开 `GamePseudocode.dll`
62-
- 推荐使用 [DnSpy](https://github.com/dnSpyEx/dnSpy)
59+
- Navigate to the `coremod/cache` directory, where you should find the `GamePseudocode.dll` file.
60+
- If it does not exist, please confirm that you have followed the steps correctly.
61+
- Open `GamePseudocode.dll` with your preferred **.NET decompiler**.
62+
- [DnSpy](https://github.com/dnSpyEx/dnSpy) is recommended.

docs/dev/tutorial/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"label": "开始制作 Mod",
2+
"label": "Writing your first mod",
33
"position": 1,
44
"link": {
55
"type": "generated-index"

docs/dev/tutorial/first-mod.md

Lines changed: 44 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,55 @@
22
sidebar_position: 2
33
---
44

5-
# 创造第一个 Mod
5+
# Creating Your First Mod
66

7-
本教程将指导你创建一个简单的 Mod ,实现修改游戏内某个基础功能的功能。
7+
This tutorial will guide you through creating a simple mod that modifies a basic in-game function.
88

99
:::warning
1010

11-
虽然编写 **Mod** 时使用 **C#** ,但请记住 **Dead Cells** 使用 **Haxe** 编写并运行在 **HashLink 虚拟机**上,而不是 **.NET 虚拟机**
11+
Although you will be writing the **Mod** in **C#**, remember that **Dead Cells** is written in **Haxe** and runs on the **HashLink virtual machine**, not the **.NET virtual machine**.
1212

13-
本教程假设你拥有以下技能:
13+
This tutorial assumes you have the following skills:
1414

15-
- C# 编程基础
16-
- Dead Cells 基础 Mod 制作 ([教程](https://www.bilibili.com/opus/681293864647000128))
15+
- Basic C# programming
16+
- Basic Dead Cells mod creation ([Tutorial](https://www.bilibili.com/opus/681293864647000128))
1717

1818
:::
1919

2020
:::tip
2121

22-
在开始之前,建议阅读 [wiki](https://github.com/HaxeFoundation/hashlink/wiki) 了解 **HashLink 虚拟机** 的基本信息。
22+
Before you begin, it is recommended to read the [wiki](https://github.com/HaxeFoundation/hashlink/wiki) to understand the basics of the **HashLink virtual machine**.
2323

2424
:::
2525

2626
:::info
27-
本教程的 Mod 代码储存在 [Github](https://github.com/dead-cells-core-modding/docs-zh/blob/main/modproject/FirstDeadCellsMod) 上。
27+
The mod code for this tutorial is stored on [Github](https://github.com/dead-cells-core-modding/docs-zh/blob/main/modproject/FirstDeadCellsMod).
2828
:::
2929

30-
## 创建 Mod 项目
30+
## Creating the Mod Project
3131

32-
- 打开命令行工具
33-
- 创建一个新的库项目:
32+
- Open your command-line tool.
33+
- Create a new class library project:
3434

3535
```bash
3636
dotnet new classlib -n FirstDeadCellsMod -f net9.0
3737
```
3838

39-
- 进入项目目录:
39+
- Navigate into the project directory:
4040

4141
```bash
4242
cd FirstDeadCellsMod
4343
```
4444

45-
- 添加 Dead Cells Modding MDK 的NuGet包引用:
45+
- Add a reference to the Dead Cells Modding MDK NuGet package:
4646

4747
```bash
4848
dotnet add package DeadCellsCoreModding.MDK
4949
```
5050

51-
## 创建 Mod 主类文件
51+
## Creating the Mod's Main Class File
5252

53-
创建 Mod 主类文件`ModEntry.cs`:
53+
Create the mod's main class file, `ModEntry.cs`:
5454

5555
```csharp
5656
using ModCore.Events.Interfaces.Game;
@@ -67,81 +67,79 @@ namespace FirstDeadCellsMod
6767
}
6868
public override void Initialize()
6969
{
70-
Logger.Information("你好,世界");
70+
Logger.Information("Hello, World");
7171
}
7272

7373
void IOnGameExit.OnGameExit()
7474
{
75-
Logger.Information("游戏正在退出");
75+
Logger.Information("The game is exiting");
7676
}
7777
}
7878
}
7979
```
8080

81-
## 配置 Mod 项目
81+
## Configuring the Mod Project
8282

83-
编辑项目文件`FirstDeadCellsMod.csproj`,添加以下内容:
83+
Edit the project file, `FirstDeadCellsMod.csproj`, and add the following content:
8484

8585
```xml
8686
<PropertyGroup>
87-
<!--模组类型-->
87+
<!--Mod Type-->
8888
<ModType>mod</ModType>
8989

90-
<!--模组主类的FullName-->
90+
<!--The FullName of the mod's main class-->
9191
<ModMain>FirstDeadCellsMod.FirstDeadCells</ModMain>
92-
93-
<!--在生成时自动安装Mod-->
92+
<!--Automatically install the mod on build-->
9493
<!--<AutoInstallMod Condition="'$(Configuration)' == 'Debug'">true</AutoInstallMod>-->
9594
</PropertyGroup>
9695

9796
```
9897

99-
## 构建 Mod
98+
## Building the Mod
10099

101-
在项目目录下运行构建命令:
100+
Run the build command in the project directory:
102101

103102
```bash
104103
dotnet build
105104
```
106105

107-
构建成功后,会在`bin\Debug\net9.0\output``$(OutputPath)\output`)目录下生成 Mod 文件
106+
After a successful build, the mod files will be generated in the `bin\Debug\net9.0\output` (`$(OutputPath)\output`) directory.
108107

109-
## 测试 Mod
108+
## Testing the Mod
110109

111-
- 按照[教程](/docs/tutorial/install-mods.md)安装 Mod
112-
- 通过 `DeadCellsModding.exe` 启动游戏
113-
- 检查游戏日志确认Mod加载
110+
- Install the mod by following the [tutorial](/docs/tutorial/install-mods.md).
111+
- Launch the game using `DeadCellsModding.exe`.
112+
- Check the game logs to confirm the mod has loaded.
114113

115114
:::info
116-
你应该能看到类似这样的日志条目:
115+
You should see a log entry similar to this:
117116

118117
```text
119-
[13:47:52 INF][FirstDeadCells] 你好,世界
120-
```
118+
[13:47:52 INF][FirstDeadCells] Hello, World```
121119
122120
:::
123121
124-
## 常见问题
122+
## Common Issues
125123
126-
### Q1: 构建失败
124+
### Q1: Build fails
127125
128-
- 确保已安装 .NET 9 SDK
129-
- 检查项目引用的 NuGet 包是否可用
130-
- 尝试清理解决方案后重新构建:
126+
- Ensure the .NET 9 SDK is installed.
127+
- Check that the NuGet packages referenced in the project are available.
128+
- Try cleaning the solution and then rebuilding:
131129
132130
```powershell
133131
dotnet clean
134132
dotnet build
135133
```
136134

137-
### Q2: Mod 不加载
135+
### Q2: Mod doesn't load
138136

139-
1. 检查 `modinfo.json` 中的 `name` 是否与文件夹名称完全一致
140-
2. 确认 `ModMain` 指定的类路径正确
141-
3. 查看日志中的错误信息
137+
1. Check that the `name` in `modinfo.json` exactly matches the folder name.
138+
2. Confirm that the class path specified in `ModMain` is correct.
139+
3. Check the logs for error messages.
142140

143-
### Q3: 游戏崩溃
141+
### Q3: Game crashes
144142

145-
- 检查 Mod 代码是否有异常
146-
- 尝试禁用其他 Mod 进行隔离测试
147-
- 查看日志获取详细信息
143+
- Check your mod code for any exceptions.
144+
- Try disabling other mods to isolate the issue.
145+
- Check the logs for detailed information.

0 commit comments

Comments
 (0)