简述和几个朋友在游戏刚出的时候玩过一段时间，最近大更新加上之前的樱岛更新内容更多了，平常除了Dota2实在没什么其他玩的了，遂沟通了一下干脆继续玩这个吧，刚好手上还有一台腾讯云的4H16G机器，做个搭建记录。下载并安装Steamcmdmkdir -p /opt/steamcmd && cd /opt/steamcmd wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz tar xvf steamcmd_linux.tar.gz ./steamcmd.sh安装完成后提示如下，会自动运行steamcmd，能看到Steam>并且能打命令说明安装运行成功了[----] Installing update... [----] Installing update... [----] Installing update... [----] Installing update... [----] Cleaning up... [----] Update complete, launching Steamcmd... UpdateUI: skip show logosteamcmd.sh[1747725]: Restarting steamcmd by request... Redirecting stderr to '/root/.local/share/Steam/logs/stderr.txt' Logging directory: '/root/.local/share/Steam/logs' [ 0%] Checking for available updates... [----] Verifying installation... UpdateUI: skip show logoSteam Console Client (c) Valve Corporation - version 1733269577 -- type 'quit' to exit -- Loading Steam API...OK Steam> 登录使用公用账号anonymous登录，也可使用私人steam账号登录login anonymous登录过程参考如下：Steam>login anonymous Connecting anonymously to Steam Public... OK Waiting for client config...OK Waiting for user info...OK下载游戏下载游戏到默认路径app_update 2394010 validate中间如果卡住了可以敲下回车，下载过程如下：Steam>app_update 2394010 validate Update state (0x3) reconfiguring, progress: 0.00 (0 / 0) Update state (0x3) reconfiguring, progress: 0.00 (0 / 0) Update state (0x61) downloading, progress: 3.82 (78382436 / 2050956361) Update state (0x61) downloading, progress: 12.99 (266404586 / 2050956361) Update state (0x61) downloading, progress: 26.55 (544586372 / 2050956361) Update state (0x61) downloading, progress: 29.98 (614847170 / 2050956361) Update state (0x61) downloading, progress: 33.18 (680478545 / 2050956361) Update state (0x61) downloading, progress: 36.56 (749746180 / 2050956361) Update state (0x61) downloading, progress: 37.73 (773863428 / 2050956361) Update state (0x61) downloading, progress: 39.11 (802174980 / 2050956361) Update state (0x61) downloading, progress: 40.59 (832406033 / 2050956361) Update state (0x61) downloading, progress: 41.76 (856523281 / 2050956361) Update state (0x61) downloading, progress: 43.19 (885883408 / 2050956361) Update state (0x61) downloading, progress: 44.35 (909554840 / 2050956361) Update state (0x61) downloading, progress: 45.42 (931613902 / 2050956361) Update state (0x61) downloading, progress: 46.88 (961395002 / 2050956361) Update state (0x61) downloading, progress: 48.10 (986562992 / 2050956361) Update state (0x61) downloading, progress: 49.60 (1017376153 / 2050956361) Update state (0x61) downloading, progress: 50.64 (1038664418 / 2050956361) Update state (0x61) downloading, progress: 51.77 (1061732851 / 2050956361) Update state (0x61) downloading, progress: 52.97 (1086371436 / 2050956361) Update state (0x61) downloading, progress: 54.20 (1111559380 / 2050956361) Update state (0x61) downloading, progress: 55.58 (1139871392 / 2050956361) Update state (0x61) downloading, progress: 57.17 (1172583506 / 2050956361) Update state (0x61) downloading, progress: 58.50 (1199846560 / 2050956361) Update state (0x61) downloading, progress: 59.73 (1225012857 / 2050956361) Update state (0x61) downloading, progress: 60.89 (1248827430 / 2050956361) Update state (0x61) downloading, progress: 62.47 (1281333784 / 2050956361) Update state (0x61) downloading, progress: 63.65 (1305450100 / 2050956361) Update state (0x61) downloading, progress: 64.67 (1326421629 / 2050956361) Update state (0x61) downloading, progress: 66.10 (1355781581 / 2050956361) Update state (0x61) downloading, progress: 67.13 (1376752476 / 2050956361) Update state (0x61) downloading, progress: 68.76 (1410307725 / 2050956361) Update state (0x61) downloading, progress: 70.04 (1436522115 / 2050956361) Update state (0x61) downloading, progress: 71.27 (1461687912 / 2050956361) Update state (0x61) downloading, progress: 72.31 (1482957887 / 2050956361) Update state (0x61) downloading, progress: 73.48 (1507073585 / 2050956361) Update state (0x61) downloading, progress: 74.66 (1531190134 / 2050956361) Update state (0x61) downloading, progress: 76.14 (1561587711 / 2050956361) Update state (0x61) downloading, progress: 77.52 (1589894968 / 2050956361) Update state (0x61) downloading, progress: 78.49 (1609818892 / 2050956361) Update state (0x61) downloading, progress: 79.77 (1636033672 / 2050956361) Update state (0x61) downloading, progress: 80.89 (1659103555 / 2050956361) Update state (0x61) downloading, progress: 81.97 (1681123581 / 2050956361) Update state (0x61) downloading, progress: 83.47 (1711916740 / 2050956361) Update state (0x61) downloading, progress: 85.05 (1744429222 / 2050956361) Update state (0x61) downloading, progress: 86.28 (1769558517 / 2050956361) Update state (0x61) downloading, progress: 87.97 (1804159303 / 2050956361) Update state (0x61) downloading, progress: 88.94 (1824082263 / 2050956361) Update state (0x61) downloading, progress: 90.52 (1856582508 / 2050956361) Update state (0x61) downloading, progress: 91.75 (1881780842 / 2050956361) Update state (0x61) downloading, progress: 93.24 (1912318006 / 2050956361) Update state (0x61) downloading, progress: 94.67 (1941543212 / 2050956361) Update state (0x61) downloading, progress: 95.99 (1968806269 / 2050956361) Update state (0x61) downloading, progress: 97.43 (1998209617 / 2050956361) Update state (0x61) downloading, progress: 98.87 (2027770981 / 2050956361) Update state (0x61) downloading, progress: 99.95 (2049907785 / 2050956361) Update state (0x81) verifying update, progress: 31.27 (641281279 / 2050956361) Update state (0x81) verifying update, progress: 77.76 (1594814821 / 2050956361) IPC function call IClientAppManager::GetUpdateInfo took too long: 64 msec Success! App '2394010' fully installed.修改参数先进入到游戏目录cd /root/.steam/steam/steamapps/common/PalServer/目录结构如下root@ShangHai:~/.steam/steam/steamapps/common/PalServer# ls -lh total 47M -rwxr-xr-x 1 root root 2.2K Dec 22 15:54 DefaultPalWorldSettings.ini drwxr-xr-x 5 root root 4.0K Dec 22 15:56 Engine drwxr-xr-x 2 root root 4.0K Dec 22 15:56 linux64 -rwxr-xr-x 1 root root 438 Dec 22 15:54 Manifest_DebugFiles_Linux.txt -rwxr-xr-x 1 root root 366 Dec 22 15:54 Manifest_NonUFSFiles_Linux.txt -rwxr-xr-x 1 root root 8.4M Dec 22 15:54 Manifest_UFSFiles_Linux.txt drwxr-xr-x 4 root root 4.0K Dec 22 15:56 Pal -rwxr-xr-x 1 root root 815 Dec 22 15:54 PalServer.sh -rwxr-xr-x 1 root root 39M Dec 22 15:54 steamclient.soDefaultPalWorldSettings.ini这个文件就是配置文件，不过要使用的话需要先改下名字，修改好名字后打开文件开始修改参数mv DefaultPalWorldSettings.ini PalWorldSettings.ini vim PalWorldSettings.ini打开文件后可以看到如下内容，他这个每项参数没有写换行还挺恶心的; 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=1.000000,PalCaptureRate=1.000000,PalSpawnNumRate=1.000000,PalDamageRateAttack=1.000000,PalDamageRateDefense=1.000000,PlayerDamageRateAttack=1.000000,PlayerDamageRateDefense=1.000000,PlayerStomachDecreaceRate=1.000000,PlayerStaminaDecreaceRate=1.000000,PlayerAutoHPRegeneRate=1.000000,PlayerAutoHpRegeneRateInSleep=1.000000,PalStomachDecreaceRate=1.000000,PalStaminaDecreaceRate=1.000000,PalAutoHPRegeneRate=1.000000,PalAutoHpRegeneRateInSleep=1.000000,BuildObjectDamageRate=1.000000,BuildObjectDeteriorationDamageRate=1.000000,CollectionDropRate=1.000000,CollectionObjectHpRate=1.000000,CollectionObjectRespawnSpeedRate=1.000000,EnemyDropItemRate=1.000000,DeathPenalty=All,bEnablePlayerToPlayerDamage=False,bEnableFriendlyFire=False,bEnableInvaderEnemy=True,bActiveUNKO=False,bEnableAimAssistPad=True,bEnableAimAssistKeyboard=False,DropItemMaxNum=3000,DropItemMaxNum_UNKO=100,BaseCampMaxNum=128,BaseCampWorkerMaxNum=15,DropItemAliveMaxHours=1.000000,bAutoResetGuildNoOnlinePlayers=False,AutoResetGuildTimeNoOnlinePlayers=72.000000,GuildPlayerMaxNum=20,BaseCampMaxNumInGuild=4,PalEggDefaultHatchingTime=72.000000,WorkSpeedRate=1.000000,AutoSaveSpan=30.000000,bIsMultiplay=False,bIsPvP=False,bCanPickupOtherGuildDeathPenaltyDrop=False,bEnableNonLoginPenalty=True,bEnableFastTravel=True,bIsStartLocationSelectByMap=True,bExistPlayerAfterLogout=False,bEnableDefenseOtherGuildPlayer=False,bInvisibleOtherGuildBaseCampAreaFX=False,CoopPlayerMaxNum=4,ServerPlayerMaxNum=32,ServerName="Default Palworld Server",ServerDescription="",AdminPassword="",ServerPassword="",PublicPort=8211,PublicIP="",RCONEnabled=False,RCONPort=25575,Region="",bUseAuth=True,BanListURL="https://api.palworldgame.com/api/banlist.txt",RESTAPIEnabled=False,RESTAPIPort=8212,bShowPlayerList=False,ChatPostLimitPerMinute=10,AllowConnectPlatform=Steam,bIsUseBackupSaveData=True,LogFormatType=Text,SupplyDropSpan=180)我们玩的话一般会修改如下几项，基本不会去修改很多东西，修改完成后记得wq保存，下列信息可供参考：DeathPenalty=None //死亡不掉落 PalEggDefaultHatchingTime=0.100000 //孵化时间0.1小时 ServerName="test123" //服务器名test123 AdminPassword="123456" //管理员密码，按需填写 ServerPassword="123" //连接服务器密码，按需填写 PublicPort=8211 //端口这里后续改着试了下无法生效，干脆直接还是用默认的8211端口了 PublicIP="1.1.1.1" //服务器ip，按实际填写运行服务器并排障先前台启动服务器测试一下有无报错./PalServer.sh果然报错了，无法用root运行，此时报错如下root@ShangHai:~/.steam/steam/steamapps/common/PalServer# ./PalServer.sh The file has been successfully copied: /root/.local/share/Steam/steamapps/common/PalServer/linux64/steamclient.so -> /root/.local/share/Steam/steamapps/common/PalServer/Pal/Binaries/Linux/steamclient.so Shutdown handler: initalize. Refusing to run with the root privileges.可以创建个用户专门用来运行服务器，创建过程中先输入两次密码，其他信息可以留空回车，时候su切换用户palsudo adduser pal Adding user `pal' ... Adding new group `pal' (1001) ... Adding new user `pal' (1001) with group `pal (1001)' ... Creating home directory `/home/pal' ... Copying files from `/etc/skel' ... New password: Retype new password: passwd: password updated successfully Changing the user information for pal Enter the new value, or press ENTER for the default Full Name []: Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] y Adding new user `pal' to supplemental / extra groups `users' ... Adding user `pal' to group `users' ... root@ShangHai:~/.steam/steam/steamapps/common/PalServer# 因为之前所有操作是在root下进行的，所以给pal用户授权一下root和对应下的目录就ok了sudo chown -R pal:pal /root sudo chmod -R +x /root此时使用pal用户运行./PalServer.sh一切正常关闭前台运行，使用后台命令运行nohup ./PalServer.sh &存档转移-合作模式存档转服务器存档之前是将服务器的存档修改成了个人存档给了一个要继续单机耍的朋友，现在需要从他那要来他玩的存档并将其修改为服务器存档，这个存档里包含后续他玩的进度，更新的进度，我们另外几人AFK前的进度参考：https://github.com/GalileoFe/PalWorld-Save-Movement-Complete-Tutorio本机安装好python3，下载作者打包好的工具下载地址：https://github.com/GalileoFe/PalWorld-Save-Movement-Complete-Tutorio/releases/download/RepairKit/PalRepairKit.zip此时合作模式个人存档uid为00000000000000000000000000000001，先删除已上传的服务器存档让我朋友登录一下，之后打包4306C2CA4F122E64EB2D24A0C0F6F2B2文件夹并下载，这个后面要用到删除Players文件夹下的所有文件让其再次登录服务端并创建人物，确定了他的uid为8A2861C3000000000000000000000000，对应文件8A2861C3000000000000000000000000.sav。删除服务器端存档，本机（本地windows电脑）按教程转换uid文件，也就是将00000000000000000000000000000001的内容转换到8A2861C3000000000000000000000000注意，转换时间比较长并且很吃cpu，请耐心等待，偶尔可以敲下回车看是不是卡住了。参考如下：C:\Users\admin\Desktop\ccc>python fix-host-save.py uesave.exe 4306C2CA4F122E64EB2D24A0C0F6F2B2 8A2861C3000000000000000000000000 00000000000000000000000000000001 WARNING: Running this script WILL change your save files and could potentially corrupt your data. It is HIGHLY recommended that you make a backup of your save folder before continuing. Press enter if you would like to continue. > File 4306C2CA4F122E64EB2D24A0C0F6F2B2/Level.sav uncompressed successfully File 4306C2CA4F122E64EB2D24A0C0F6F2B2/Level.sav (type: 50) converted to JSON successfully File 4306C2CA4F122E64EB2D24A0C0F6F2B2/Players/00000000000000000000000000000001.sav uncompressed successfully File 4306C2CA4F122E64EB2D24A0C0F6F2B2/Players/00000000000000000000000000000001.sav (type: 49) converted to JSON successfully Converted save files to JSON JSON files have been parsed Changes have been made JSON files have been exported Converted 4306C2CA4F122E64EB2D24A0C0F6F2B2/Level.sav.json to 4306C2CA4F122E64EB2D24A0C0F6F2B2/Level.sav Converted 4306C2CA4F122E64EB2D24A0C0F6F2B2/Players/00000000000000000000000000000001.sav.json to 4306C2CA4F122E64EB2D24A0C0F6F2B2/Players/00000000000000000000000000000001.sav Converted JSON files back to save files Miscellaneous files removed Fix has been applied! Have fun! C:\Users\admin\Desktop\ccc>完成后打包4306C2CA4F122E64EB2D24A0C0F6F2B2文件夹并上传至xx，目录结构如下：pal@ShangHai:/root/.steam/steam/steamapps/common/PalServer/Pal/Saved/SaveGames/0/4306C2CA4F122E64EB2D24A0C0F6F2B2$ ls -l total 9928 drwxr-xr-x 4 pal pal 4096 Dec 22 17:51 backup -rw-r--r-- 1 pal pal 1618 Dec 22 19:37 LevelMeta.sav -rw-r--r-- 1 pal pal 10024445 Dec 22 19:37 Level.sav -rw-r--r-- 1 pal pal 119673 Dec 22 17:50 LocalData.sav drwxr-xr-x 2 pal pal 4096 Dec 22 19:37 Players -rw-r--r-- 1 pal pal 2010 Dec 22 19:38 WorldOption.sav pal@ShangHai:/root/.steam/steam/steamapps/common/PalServer/Pal/Saved/SaveGames/0/4306C2CA4F122E64EB2D24A0C0F6F2B2$ pwd /root/.steam/steam/steamapps/common/PalServer/Pal/Saved/SaveGames/0/4306C2CA4F122E64EB2D24A0C0F6F2B2 pal@ShangHai:/root/.steam/steam/steamapps/common/PalServer/Pal/Saved/SaveGames/0/4306C2CA4F122E64EB2D24A0C0F6F2B2$ 修改据点最大工作帕鲁数PalWorldSettings.ini里面的BaseCampWorkerMaxNum=15参数对应此项，满级据点最大15，此项修改无法生效。在reddit找到的其他方式：https://www.reddit.com/r/Palworld/comments/19drt1a/dedicated_server_worker_pals_always_limited_to_15/合作模式修改好并上传WorldOption.sav到对应文件夹即可，此时不读取PalWorldSettings.ini，以WorldOption.sav内参数为准