★遊戲設置參數(設置路徑在文章後半部)
- 白天流逝速度 DayTimeSpeedRate=0.700000
- 夜晚流逝速度 NightTimeSpeedRate=1.300000
- 帕魯出現倍率 PalSpawnNumRate=1.500000
- 是否為多人遊戲(是) bIsMultiplay=True
- 公會人數上限 GuildPlayerMaxNum=100
- 伺服器人數 ServerPlayerMaxNum=16
- 經驗值倍數 ExpRate=3.000000
- 道具採集倍率 CollectionDropRate=1.000000
- 道具掉落率 EnemyDropItemRate=1.500000
- 死亡懲罰(不掉落)
- DeathPenalty=None
- DeathPenalty=All
- 據點帕魯工作數量上限 BaseCampWorkerMaxNum=20
- 玩家生命自然恢復率 PlayerAutoHPRegeneRate=1.500000
- 玩家睡覺時生命值自然恢復率 PlayerAutoHpRegeneRateInSleep=1.500000
- 帕魯生命自然恢復率 PalAutoHPRegeneRate=2.000000
- 帕魯睡覺、終端生命恢復率 PalAutoHpRegeneRateInSleep=2.000000
- 世界內掉落物上限 DropItemMaxNum=2000
- 蛋孵化時間 PalEggDefaultHatchingTime=24.000000
- 公會據點上限 BaseCampMaxNumInGuild=4
- 帕魯捕獲機率 PalCaptureRate=2
- 工作效率 WorkSpeedRate=3
apt update -y
add-apt-repository multiverse; sudo dpkg --add-architecture i386
apt install steamcmd -y #安裝會跳出提醒,直接下一步與同意即可
timedatectl set-timezone Asia/Taipei
2.建立使用者
adduser steam #建立使用者
- 依照資訊隨便輸入
usermod -aG sudo steam #讓用戶加入sudo,擁有近乎root權限
vi /etc/ssh/sshd_config
#------------ #禁止自己使用者被SSH連線,(空白隔開可以輸入多個用戶)
DenyUsers steam
#---------------
systemctl restart ssh #重啟ssh配置
su steam #登入使用者
3.安裝帕魯
export PATH=$PATH:/usr/games #設定環境變數
mkdir -p /home/steam/data #建立安裝路徑的文件夾
cd /home/steam/data #前往路徑
steamcmd #啟動steam
force_install_dir /home/steam/data/ #設定預設路徑
login anonymous #登入任何人
app_update 2394010 validate #安裝
exit #離開
/home/steam/data/./PalServer.sh #啟動
#log 中出現 Setting breakpad minidump AppID = 2394010 那就是啟動成功了
#複製預設參數到實際使用文件
cp /home/steam/data/DefaultPalWorldSettings.ini /home/steam/data/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
#如果運行時出現以下錯誤找不到的情況
steamclient.somkdir -p /home/steam/.steam/sdk64
ln -s /home/steam/data/linux64/steamclient.so
/home/steam/.steam/sdk64/steamclient.so
/home/steam/data/./PalServer.sh #啟動
5.設定systemd服務
sudo vi /etc/systemd/system/palserver.service
#----加入以下-----------
[Unit]
Description=Palworld Server
Wants=network-online.target
[Service]
Type=simple
User=steam
WorkingDirectory=/home/steam/data/
ExecStart=/bin/bash -c "./PalServer.sh"
# 如果要啟用非同步,多線程可以用下面的指令,把上面的 ExecStart 給 # 註解
#ExecStart=/bin/bash -c "./PalServer.sh -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS"
Restart=always
[Install]
WantedBy=multi-user.target
#--------------
sudo systemctl daemon-reload
sudo systemctl enable palserver
sudo systemctl start palserver
sudo systemctl status palserver
6.防火牆設定
ufw allow 8211
ufw allow 27015
★幻獸帕魯配置文件設定值
vi /home/steam/data/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
[/Script/Pal.PalGameWorldSettings]
OptionSettings=(Difficulty=None,RandomizerType=None,RandomizerSeed="",DayTimeSpeedRate=1.000000,NightTimeSpeedRate=3.000000,ExpRate=3.000000,PalCaptureRate=2.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,BuildObjectHpRate=1.000000,BuildObjectDamageRate=1.000000,BuildObjectDeteriorationDamageRate=1.000000,CollectionDropRate=3.000000,CollectionObjectHpRate=1.000000,CollectionObjectRespawnSpeedRate=1.000000,EnemyDropItemRate=3.000000,DeathPenalty=None,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=10,PalEggDefaultHatchingTime=0.000000,WorkSpeedRate=3.000000,AutoSaveSpan=30.000000,bIsMultiplay=False,bIsPvP=False,bHardcore=False,bPalLost=False,bCanPickupOtherGuildDeathPenaltyDrop=False,bEnableNonLoginPenalty=True,bEnableFastTravel=True,bIsStartLocationSelectByMap=True,bExistPlayerAfterLogout=False,bEnableDefenseOtherGuildPlayer=False,bInvisibleOtherGuildBaseCampAreaFX=False,bBuildAreaLimit=False,ItemWeightRate=1.000000,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",RESTAPIEnabled=False,RESTAPIPort=8212,bShowPlayerList=False,ChatPostLimitPerMinute=10,AllowConnectPlatform=Steam,bIsUseBackupSaveData=True,LogFormatType=Text,SupplyDropSpan=180,EnablePredatorBossPal=True,MaxBuildingLimitNum=0,ServerReplicatePawnCullDistance=15000.000000)
★如何更新伺服器版本##Linux server版本更新:steamcmd #啟動steam
su steam
steamcmd #啟動steam
force_install_dir /home/steam/data/ #設定預設路徑
login anonymous #登入任何人
app_update 2394010 validate #安裝
exit #離開
sudo systemctl restart palserver
沒有留言:
張貼留言