Foreword

幻兽帕鲁,宝可梦版方舟,还缝合了一点塞尔达,The Survivalists,有意思,啥时候GF能做个这样的宝可梦游戏啊

本身支持小服务器4人联机,也支持大服务器32人联机,刚好有独立服务器,可以开一个玩一下。

服务器需求

  • CPU,4cores
  • RAM,8G
  • Network,Port UDP 8211

这是推荐配置,我直接8c,16g,防止出问题,使用Ubuntu来安装

linux

首先安装steamcmd

sudo add-apt-repository multiverse; sudo dpkg --add-architecture i386; sudo apt update
sudo apt install steamcmd

安装PalServer

steamcmd +login anonymous +app_update 2394010 validate +quit
cd ~/Steam/steamapps/common/PalServer
./PalServer.sh

路由上开放UDP端口8211即可

常见问题

连不上steam

安装PalServer可能会一直重试,最后失败,这是由于连不上steam,所以服务器最好挂个代理

Loading Steam API...dlmopen steamservice.so failed: steamservice.so: cannot open shared object file: No such file or directory
Connecting anonymously to Steam Public...Retrying. . . 
Retrying. . . 
Retrying. . . 
Retrying. . . 


FAILED (No Connection)

修改默认网关,走透明代理,我这里自己的网关

route add default gw 192.168.6.232

恢复网关

route add default gw 192.168.6.1

挂上透明代理以后,正常安装了

缺少sdk

第一次运行./PalServer.sh大概率会出现类似的错误

/home/el/.steam/sdk64/steamclient.so: cannot open shared object file: No such file or directory
[S_API] SteamAPI_Init(): Sys_LoadModule failed to load: /home/el/.steam/sdk64/steamclient.so

安装一下相关的sdk

mkdir -p ~/.steam/sdk64/
steamcmd +login anonymous +app_update 1007 +quit
cp ~/Steam/steamapps/common/Steamworks\ SDK\ Redist/linux64/steamclient.so ~/.steam/sdk64/

就恢复正常了

缺少steamclient.so

第二次运行./PalServer.sh,可能会提示steamclient.so找不到,这个问题可以忽略,实际上找到了

$ ./PalServer.sh
Shutdown handler: initalize.
Increasing per-process limit of core file size to infinity.
dlopen failed trying to load:
steamclient.so
with error:
steamclient.so: cannot open shared object file: No such file or directory
[S_API] SteamAPI_Init(): Loaded '/home/ubuntu/.steam/sdk64/steamclient.so' OK.  (First tried local 'steamclient.so')

其他可能服务器太老了,包没更新之类的问题

sudo apt update
sudo add-apt-repository --remove ppa:whatever/ppa
sudo apt install steam
sudo apt-get -f install

服务器设置

修改游戏设置

Pal/Saved/Config/LinuxServer/PalWorldSettings.ini

默认这个文件是空的

cd ~/Steam/steamapps/common/PalServer/DefaultPalWorldSettings.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,PalEggDefaultHatchingTime=72.000000,WorkSpeedRate=1.000000,bIsMultiplay=False,bIsPvP=False,bCanPickupOtherGuildDeathPenaltyDrop=False,bEnableNonLoginPenalty=True,bEnableFastTravel=True,bIsStartLocationSelectByMap=True,bExistPlayerAfterLogout=False,bEnableDefenseOtherGuildPlayer=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")

Difficulty=None - Doesn't seem to matter for dedicated servers.
DayTimeSpeedRate=1.000000 - Changes how long daytime lasts.
NightTimeSpeedRate=1.000000 - Changes how long night lasts.
ExpRate=1.000000 - Modifies how much experience you get.
PalCaptureRate=1.000000 - How likely you are to capture Pals.
PalSpawnNumRate=1.000000 - How frequently Pals spawn.
PalDamageRateAttack=1.000000 - How much damage Pals do.
PalDamageRateDefense=1.000000 - How much damage Pals take.
PlayerDamageRateAttack=1.000000 - How much damage players do.
PlayerDamageRateDefense=1.000000 - How much damage players take.
PlayerStomachDecreaceRate=1.000000 - Rate at which hunger decreases.
PlayerStaminaDecreaceRate=1.000000 - Rate at which stamina decreases
PlayerAutoHPRegeneRate=1.000000 - How quickly HP will be automatically restored when hurt.
PlayerAutoHpRegeneRateInSleep=1.000000 - How much HP is regenerated while sleeping.
PalStomachDecreaceRate=1.000000 - Rate at which Pal hunger decreases.
PalStaminaDecreaceRate=1.000000 - Rate at which Pal stamina decreases
PalAutoHPRegeneRate=1.000000 - How quickly Pal HP will be automatically restored when hurt.
PalAutoHpRegeneRateInSleep=1.000000 - How much Pal HP is regenerated while sleeping.
BuildObjectDamageRate=1.000000 - Damage to objects.
BuildObjectDeteriorationDamageRate=1.000000 - How much damage built objects will take over time.
CollectionDropRate=1.000000 - Rate at which items are gathered from things like trees or rocks.
CollectionObjectHpRate=1.000000 - How much HP breakable world items have.
CollectionObjectRespawnSpeedRate=1.000000 - How quickly obects like trees respawn.
EnemyDropItemRate=1.000000 - Frequency enemies will drop items.
DeathPenalty=All - Determines what is dropped on death. Can be set to none.
bEnableAimAssistPad=True - Lets you enable or disable aim assist
bEnableAimAssistKeyboard=False - Lets you enable or disable aim assist
DropItemMaxNum=3000 - Max amount of dropped items allowed at one time.
BaseCampMaxNum=128 - Max amount of bases that can be built at once.
BaseCampWorkerMaxNum=15 - Max amount of worker Pals that can be at a camp.
DropItemAliveMaxHours=1.000000 - How long dropped items will stay spawned before disappearing.
bAutoResetGuildNoOnlinePlayers=False - If true, a guild will be disbanded if no players are online.
AutoResetGuildTimeNoOnlinePlayers=72.000000 - How quickly an inactive guild will be disbanded.
GuildPlayerMaxNum=20 - Max guild player number.
PalEggDefaultHatchingTime=72.000000 - How long it takes to hatch Pal eggs.
WorkSpeedRate=1.000000 - How quickly Pals work.
CoopPlayerMaxNum=4 - Max amount of players in a party.
ServerPlayerMaxNum=32 - Max players allowed on a server (caps at 32).
ServerName="Default Palworld Server"
ServerDescription="" - What is shown when selecting the server in the list.
AdminPassword="" - Password used to grant admin access.
ServerPassword="" - Password needed for regular players to join.

设置密码

ServerPassword="123456"

设置服务器名称

此处都可以用文中

ServerName="Default Palworld Server"

服务器描述

ServerDescription="点击链接加入QQ频道【elmagnifico's游戏屋】:https://pd.qq.com/s/enyor3z9m"

人数上限

ServerPlayerMaxNum=32

管理员密码

AdminPassword=""

死亡掉落

死亡全掉落

DeathPenalty=All

死亡不掉落

DeathPenalty=None

测试

服务器正常启动提示:

dlmopen steamservice.so failed: steamservice.so: cannot open shared object file: No such file or directory
Setting breakpad minidump AppID = 2394010
[S_API FAIL] Tried to access Steam interface SteamUser021 before SteamAPI_Init succeeded.
[S_API FAIL] Tried to access Steam interface SteamFriends017 before SteamAPI_Init succeeded.
[S_API FAIL] Tried to access Steam interface STEAMAPPS_INTERFACE_VERSION008 before SteamAPI_Init succeeded.
[S_API FAIL] Tried to access Steam interface SteamNetworkingUtils004 before SteamAPI_Init succeeded.

服务器开久了好像FPS会下降,刚开始是60稳定的

正式启动

安装screen

apt install screen

使用一个独立的终端运行服务器

screen -S pal

欢迎来玩,暂时没有设置密码

管理员

用管理员密码登录服务器

显示当前玩家
/ShowPlayers

踢出
/KickPlayer [UserID]/[SteamID64]

封禁
/BanPlayer [UserID]/[SteamID64]


传送
/TeleportToPlayer {SteamID}

拉人
/TeleportToMe {SteamID}

存档
/Save

强制服务器退出
/DoExit


通知服务器在线玩家n秒后服务器关闭
/Shutdown {Seconds} {MessageText}

Summary

简单配好以后就可以正常游玩了

Quote

https://developer.valvesoftware.com/wiki/SteamCMD#Linux

https://tech.palworldgame.com/dedicated-server-guide#windows

https://techraptor.net/gaming/guides/palworld-server-guide

https://tech.palworldgame.com/server-commands

https://tech.palworldgame.com/optimize-game-balance