Files
PzConfigStudio/README.md
2025-12-26 18:10:39 +08:00

49 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# PZ 配置 WebUI 编辑器server.ini + server_SandboxVars.lua
这个小工具用于在浏览器里逐项编辑《僵尸毁灭工程 / Project Zomboid》的两个配置文件
- `server.ini`
- `server_SandboxVars.lua`
支持:
- 精确到每一项设置的表单编辑(布尔/数字/下拉枚举/文本)
- 每项设置显示中文说明(`server.ini` 直接读取文件内的中文注释;`server_SandboxVars.lua` 使用 `i18n/sandboxvars_zh.json`
- 一键导出修改后的配置(下载 zip或选择“保存覆盖本地”
## 运行
在本目录(包含两个配置文件)打开终端:
```powershell
python -m pip install -r requirements.txt
python .\\pz_webui.py
```
然后浏览器打开:
```
http://127.0.0.1:5050
```
## 导出
- 点击页面底部 `下载配置 ZIP`:不会改动本地文件,会下载一个 zip里面包含修改后的两个文件。
- 点击 `保存覆盖本地`:会直接覆盖写回当前路径下的两个文件(建议先下载 zip 备份)。
## 可选:自定义文件路径/端口
```powershell
python .\\pz_webui.py --ini .\\server.ini --lua .\\server_SandboxVars.lua --host 127.0.0.1 --port 5050
```
## 重新生成 SandboxVars 中文说明(可选)
`i18n/sandboxvars_zh.json` 是离线映射文件。如果你的 `server_SandboxVars.lua` 更新了(新增/变更项),可以重新生成:
```powershell
python .\\tools\\generate_sandboxvars_zh.py --lua .\\server_SandboxVars.lua --out .\\i18n\\sandboxvars_zh.json --resume
```
说明:生成脚本会使用 Google Translate 的公开接口做机翻,仅用于生成本地离线文件。