修改玩家死亡惩罚设置
你想在游戏中死亡后保留物品栏吗?
还是全部丢失?
或者只丢失一部分?
下面将说明如何调整相应设置。
推荐:Hytale 使用 JSON 格式来保存设置。
建议始终在以下网站验证该格式的配置:
- https://jsonformatter.curiousconcept.com/
- https://jsonlint.com/
同时请务必注意配置项的大小写。
建议始终在以下网站验证该格式的配置:
- https://jsonformatter.curiousconcept.com/
- https://jsonlint.com/
同时请务必注意配置项的大小写。
下载配置文件
重要:你必须使用 FTP 客户端,例如 FileZilla 或 WinSCP。
- FileZilla: https://filezilla-project.org/
在此下载客户端
- WinSCP: https://winscp.net/eng/index.php
- FileZilla: https://filezilla-project.org/
在此下载客户端
- WinSCP: https://winscp.net/eng/index.php
- 如果尚未启动,请先启动你的服务器。
重要:否则所需的 FTP 无法使用。 - 然后停止服务器。
- 使用 FTP 客户端连接到 游戏服务器 FTP。
所需的登录信息可在服务器设置的 FTP 中找到。 - 进入以下目录:
hytale-data/Server/universe/worlds/NameDeinerWelt
默认的世界名称为Default - 下载
config.json。
编辑配置文件
使用例如 Notepad 打开 config.json。
与死亡相关的可用设置如下:
| 设置项 | 说明 | 取值 |
|---|---|---|
| ItemsLossMode | 控制玩家死亡时的总体行为 | None:全部保留 All:全部丢失 Configured:允许更精细的设置 |
| ItemsAmountLossPercentage | 仅在模式为 Configured 时生效。 控制死亡时每个物品堆会丢失的百分比 | 0 - 100 |
| ItemsDurabilityLossPercentage | 仅在模式为 Configured 时生效。 物品耐久度损失的百分比 | 0 - 100 |
- 找到以下这一行:
"GameplayConfig": "Default", - 在其下一行插入以下片段:
"Death": {
"RespawnController": {
"Type": "HomeOrSpawnPoint"
},
"ItemsLossMode": "Configured",
"ItemsAmountLossPercentage": 50.0,
"ItemsDurabilityLossPercentage": 10.0
},
- 该部分现在应如下所示:
"GameplayConfig": "Default",
"Death": {
"RespawnController": {
"Type": "HomeOrSpawnPoint"
},
"ItemsLossMode": "Configured",
"ItemsAmountLossPercentage": 50.0,
"ItemsDurabilityLossPercentage": 10.0
},
- 根据需要调整
ItemsLossMode、ItemsAmountLossPercentage和ItemsDurabilityLossPercentage的取值。 - 保存修改。
上传配置文件
- 请确保服务器仍处于停止状态。
- 使用 FTP 客户端连接到 游戏服务器 FTP。
- 将修改后的
config.json上传到以下目录:hytale-data/Server/universe/worlds/NameDeinerWelt
请确保覆盖已有的config.json。 - 重新启动服务器。