服务器迁移

保存: /Pal/Saved路径下的Saved文件夹。到要迁移的服务器,先正常进入游戏一次,创建角色,然后在服务器内将Saved文件夹删除,替换之前保存的,如果进去发现角色没了,先创建角色,然后删除Saved文件夹换更行的Saved文件夹即可。

角色迁移教程:

以下方法我已亲自尝试过,可行
教程来自:
https://github.com/xNul/palworld-host-save-fix

简单来说,如果进入服务器,你需要新建用户,而之前是在服务器中玩过的,然而你的id已经完全变了,所以会让你新建用户,这时候可以尝试我下面的方法,将旧的用户存档移动到新创建的存档中。
此方法还可用于:

  • 将 Windows 合作保存移至 Windows 专用服务器将迫使主机创建新角色并丢失其保存。
  • 将 Windows 专用服务器的保存移至 Linux 专用服务器将迫使所有玩家创建新角色并丢失其保存。
  • 将 Linux 专用服务器的保存移至 Windows 专用服务器将迫使所有玩家创建新角色并丢失其保存。
  • 将 Windows 合作保存移至 Linux 专用服务器将迫使所有玩家创建新角色并丢失保存。
  • 等等
    该错误的发生是因为玩家通过 GUID 被识别并与其保存相关联。这些不同类型的服务器生成的玩家 GUID 不同,因此当玩家加入时,服务器会生成一个与旧保存的 GUID 不匹配的新 GUID,因此,不会意识到玩家已经有一个保存。

解决办法,确保你新存档已经进入游戏,进入服务器后台保存/Pal/Saved/SaveGames/0/<你的服务器存档>这个文件夹
首先下载https://github.com/xNul/palworld-host-save-fix这个库,点击绿色Code按钮,选择Download ZIP,即可下载,下载后解压,然后打开文件夹,按住shift键,右键,选择在此处打开powershell窗口,然后输入以下命令:
再去下载https://github.com/trumank/uesave-rs/releases/tag/v0.3.0,其中的uesave.exe保存到一个盘的路径中,例如我保存在“E:\0JHX\uesave-x86_64-pc-windows-msvc\uesave.exe”
接下来使用以下命令:
命令:
python fix-host-save.py <uesave.exe>
<uesave.exe>- uesave.exe 的路径
- 保存文件夹的路径
- 新服务器上玩家的 GUID
- 旧服务器上玩家的 GUID

例子:

1
python fix-host-save.py "E:\0JHX\uesave-x86_64-pc-windows-msvc\uesave.exe"  "E:\0JHX\uesave-x86_64-pc-windows-msvc\0457826F8FD74E3E850C512CCD0258E8" 22A3DC09000000000000000000000000 FE66F1D6000000000000000000000000

注意:运行命令的路径在你下载的https://github.com/xNul/palworld-host-save-fix库的路径下,否则没有文件来运行。
玩家的 GUID在服务器的/Pal/Saved/SaveGames/0/<你的服务器存档>/Players 文件夹下,可以通过观察法观察哪个是旧存档,哪个是新存档(比如存档大小,更新时间等等)。
运行命令后等待几分钟,如果没有报错,就说明成功了,然后整个文件夹,也就是<你的服务器存档>这个文件夹,复制到你的服务器的/Pal/Saved/SaveGames/0/文件夹下,然后重启服务器,进入游戏,就可以看到你的角色了。

docker

命令:
关闭docker

systemctl stop docker

启动docker

systemctl start docker

安装

安装 Docker(非大陆服务器)

1
wget -qO- get.docker.com | bash  
1
systemctl enable docker  # 设置开机自动启动  

安装 Docker-compose(非大陆服务器)

1
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose  
1
sudo chmod +x /usr/local/bin/docker-compose  
1
docker-compose --version  #查看 docker-compose 版本  

安装

新建 docker-compose.yml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
services:
palworld:
image: thijsvanloef/palworld-server-docker
restart: unless-stopped
container_name: palworld-server
ports:
- 8211:8211/udp
- 27015:27015/udp
environment:
- PORT=8211
- PUID=1000
- PGID=1000
- PLAYERS=32
- MULTITHREADING=FALSE
- COMMUNITY=false # Enable this if you want your server to show up in the community servers tab, USE WITH SERVER_PASSWORD!
# Enable the environment variables below if you have COMMUNITY=true
# - SERVER_PASSWORD="worldofpals"
# - SERVER_NAME="World of Pals"
# - ADMIN_PASSWORD="someAdminPassword"
volumes:
- /path/palworld/:/palworld/

docker-compose up -d

我的推荐

配置文件夹在Pal/Saved/Config/LinuxServer/PalWorldSettings.ini.

1
2
3
4
5
6
; This configuration file is a sample of the default server settings.
; Changes to this file will NOT be reflected on the server.
; To change the server settings, modify Pal/Saved/Config/LinuxServer/PalWorldSettings.ini.
[/Script/Pal.PalGameWorldSettings]
OptionSettings=(Difficulty=None,DayTimeSpeedRate=1.000000,NightTimeSpeedRate=1.000000,ExpRate=2.000000,PalCaptureRate=5.000000,PalSpawnNumRate=1.000000,PalDamageRateAttack=1.000000,PalDamageRateDefense=1.000000,PlayerDamageRateAttack=1.000000,PlayerDamageRateDefense=1.000000,PlayerStomachDecreaceRate=1.000000,PlayerStaminaDecreaceRate=1.000000,PlayerAutoHPRegeneRate=2.000000,PlayerAutoHpRegeneRateInSleep=5.000000,PalStomachDecreaceRate=1.000000,PalStaminaDecreaceRate=1.000000,PalAutoHPRegeneRate=2.000000,PalAutoHpRegeneRateInSleep=1.000000,BuildObjectDamageRate=1.000000,BuildObjectDeteriorationDamageRate=1.000000,CollectionDropRate=4.000000,CollectionObjectHpRate=1.000000,CollectionObjectRespawnSpeedRate=1.000000,EnemyDropItemRate=4.000000,DeathPenalty=None,bEnablePlayerToPlayerDamage=False,bEnableFriendlyFire=False,bEnableInvaderEnemy=True,bActiveUNKO=False,bEnableAimAssistPad=True,bEnableAimAssistKeyboard=False,DropItemMaxNum=3000,DropItemMaxNum_UNKO=100,BaseCampMaxNum=128,BaseCampWorkerMaxNum=20,DropItemAliveMaxHours=1.000000,bAutoResetGuildNoOnlinePlayers=False,AutoResetGuildTimeNoOnlinePlayers=72.000000,GuildPlayerMaxNum=20,PalEggDefaultHatchingTime=0.000000,WorkSpeedRate=4.000000,bIsMultiplay=False,bIsPvP=False,bCanPickupOtherGuildDeathPenaltyDrop=False,bEnableNonLoginPenalty=True,bEnableFastTravel=True,bIsStartLocationSelectByMap=True,bExistPlayerAfterLogout=False,bEnableDefenseOtherGuildPlayer=False,CoopPlayerMaxNum=4,ServerPlayerMaxNum=32,ServerName="",ServerDescription="",AdminPassword="",ServerPassword="",PublicPort=8211,PublicIP="",RCONEnabled=False,RCONPort=25575,Region="",bUseAuth=True,BanListURL="https://api.palworldgame.com/api/banlist.txt")

重启docker

systemctl restart docker

控制台指令

/AdminPassword 密码

  • 传送到目标玩家位置

    /TeleportToPlayer <玩家ID,成为管理员后即可在选项界面,对着玩家右击两次复制id>

  • 传送玩家到你位置

    /TeleportToMe <玩家ID,成为管理员后即可在选项界面,右击两次复制id>

  • 展示玩家列表
    /ShowPlayers

  • 踢出玩家
    /BanPlayer <玩家ID,成为管理员后即可在选项界面,右击两次复制id>