Project Zomboid 服务器可以上传本地世界和玩家数据,以继续本地已取得的任何进度。 上传世界简单又快速;不过,转移玩家数据需要用户编辑其 SQL 数据库。 通过转移现有玩家数据,只要存档兼容,用户就可以使用现有角色体验各种 更新 和可用的新构建版本。
要求:开始前,请按照世界上传指南将本地世界转移到服务器。
1。 登录 BisectHosting Starbase 面板。
2。 停止服务器。
3。 前往 Files 标签页。
4。 找到以下目录:/home/container/.cache/Saves/Multiplayer
5。 打开所需的世界文件夹。
6。 下载服务器中的 players.db 文件。
7。 下载后,从服务器中删除该文件。
8。 在 文件资源管理器中,创建一个新的 Workspace 文件夹。
9。 放置下载的文件到 Workspace 文件夹中。
10。 重命名该文件为 Oldplayers.db。
11。 下载 SQLite Database Browser。
12。 打开 DB Browser,按 File,然后选择 Open Database。
13。 找到已创建的 Workspace 文件夹,并打开 Oldplayers.db 文件。
14。 前往 Browse Data 标签页和 localPlayers 表。 如果表中列出了玩家,则确认这是正确的文件。
15。 在玩家表中,复制所有要转移的玩家的 X、Y 和 Z 坐标,并将它们粘贴到你偏好的任何记事软件中,例如 记事本。
16。 右键点击要转移玩家的 Data 字段,然后按 Copy as SQL。
17。 粘贴 SQL 到包含 XYZ 坐标的文档中。
18。 删除字符串开头和结尾处的括号(())和分号(;)。
19。 返回 BisectHosting Starbase 面板。
20。 启动服务器以生成新的 players.db 文件。
21。 加入服务器。
22。 创建一个稍后要替换的角色,然后按 Play。
注意:任何其他要转移的玩家也需要加入服务器并创建一个占位角色。
23。 加载完成后,停止服务器。
24。 返回到 World Folder,并下载新的 players.db 文件。
25。 下载后,从服务器中删除该文件。
26。 放置下载的文件到 Workspace 文件夹中。
27。 重命名该文件为 Newplayers.db。
28。 打开 DB Browser,按 File,然后选择 Open Database。
29。 打开 Newplayers.db 文件(位于 Workspace 文件夹)。
30。 选择 Execute SQL 标签页。
31。 复制并粘贴以下模板到代码区域:
-- Update player data
UPDATE "main"."REPLACE_WITH_TABLE" -- Select which table you'd like to modify.
SET data = NULL -- Replace “NULL” with value inside the copied SQL command VALUES(); method
WHERE id = 1; -- The ID is the row you're replacing the value of for the character you created earlier.
-- Update player X coord
UPDATE "main"."REPLACE_WITH_TABLE" -- Select which table you'd like to modify.
SET x = 0 -- Replace with the X coordinate of the player.
WHERE id = 1; -- The ID is the row you're replacing the value of for the character you created.
-- Update player Y coord
UPDATE "main"."REPLACE_WITH_TABLE" -- Select which table you'd like to modify.
SET y = 0 -- Replace with the Y coordinate of the player.
WHERE id = 1; -- The ID is the row you're replacing the value of for the character you created.
-- Update player Z coord
UPDATE "main"."REPLACE_WITH_TABLE" -- Select which table you'd like to modify.
SET z = 0 -- Replace with the Z coordinate of the player.
WHERE id = 1; -- The ID is the row you're replacing the value of for the character you created.32。 替换所有 "REPLACE_WITH_TABLE" 部分为 "networkPlayers"。
33。 确保 WHERE id = 已设置为 networkPlayers 表中指定玩家的栏位。
34。 替换 SET data = 后面的 NULL 为该玩家的 SQL 语句,从 X' 开始。
35。 将 X、Y 和 Z 值替换为步骤 16 中之前记录的值。
36。 替换所有值后,按 Execute all/selected SQL。
注意:对每位要转移的玩家重复步骤 32-37。 确保记录 networkPlayers 表中每个玩家的栏位,以设置其
WHERE id =,并确保他们的“SQL”和“XYZ”与从Oldplayers.db记录的信息匹配。
37。 选择 File,然后按 Write Changes 以及 Save All。
38。 导航到 Workspace 文件夹,并将 Newplayers.db 重命名为 players.db。
39。 返回 BisectHosting Starbase 面板。
40。 上传 players.db 文件到世界文件夹。
41。 启动服务器。