3分钟搞定幻兽帕鲁联机,手动搭建专属服务器
创始人
2025-01-17 00:02:27
0次

《幻兽帕鲁》的热潮正在席卷游戏界。对于那些更喜欢与熟悉的伙伴们共同探险的玩家来说,搭建一个私人服务器无疑是最佳选择。拥有个人服务器不仅意味着更高的隐私性,还允许你根据喜好调整游戏参数,比如改变游戏内的工作速度倍率、经验值获取倍率等,从而打造一个定制化的游戏环境。本教程将带你快速步入搭建《幻兽帕鲁》服务器的过程,让你在几分钟之内就能和朋友们开启专属的冒险之旅。

image.png

准备工作

1.一台服务器
image.png
硬件要求:

参数数值备注
CPU4核推荐
内存16GB建议使用 32GB 以上才能稳定运行。用8GB启动服务器是可以的,但是玩得越久,服务器就会因为内存不足而崩溃。
网络UDP 端口 8211(默认)

2.系统镜像选择

有Windows、Linux可供选择,建议使用Linux系统,得益于其极佳的稳定性。

3.选购服务器

腾讯云:推荐腾讯云轻量应用服务器4C8G配置,系统推荐CentOS7.6

捕获.PNG

阿里云:阿里云游戏联机服务器专题页,点击 一键购买及部署 即可快速搭建出你的专属幻兽帕鲁服务器。

image.png

安装部署

PalServer安装

1.安装软件库

yum install glibc.i686 libstdc++.i686 

2.创建用户

sudo useradd -m steam sudo passwd steam sudo -u steam -s cd /home/steam 

3.下载SreamCMD

mkdir ~/Steam && cd ~/Steam curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf - 

4.下载PalServer

./steamcmd.sh +login anonymous +app_update 2394010 validate +quit 

下载完成后,必须进入到游戏目录中,尝试运行。

cd steamapps/common/PalServer ./PalServer.sh 

如果出现报错

.steam/sdk64/steamclient.so: cannot open shared object file: No such file or directory 

打开steamcmd目录,输入以下命令行

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

重新启动游戏服务端

cd steamapps/common/PalServer ./PalServer.sh 

如果出现以下信息为正常情况

sh: xdg-user-dir: command not found 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/steam/.steam/sdk64/steamclient.so' OK.  (First tried local 'steamclient.so') CAppInfoCacheReadFromDiskThread took 1 milliseconds to initialize 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. 

编辑配置文件

默认配置文件位置[/home/steam/Steam/steamapps/common/PalServer/DefaultPalWorldSettings.ini]

cp /home/steam/Steam/steamapps/common/PalServer/DefaultPalWorldSettings.ini  /home/steam/Steam/steamapps/common/PalServer/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini  vim /home/steam/Steam/steamapps/common/PalServer/Pal/Saved/Config/LinuxServer/PalWorldSettings.ini 

配置文件参数

参数英文机翻
DayTimeSpeedRateDay time speed白天速度
NightTimeSpeedRateNight time speed夜间速度
ExpRateEXP rate经验率
PalCaptureRatePal capture rate好友捕获率
PalSpawnNumRatePal appearance ratePal出现率
PalDamageRateAttackDamage from pals multipiler好友倍增器造成的伤害
PalDamageRateDefenseDamage to pals multipiler对好友倍增器造成伤害
PlayerDamageRateAttackDamage from player multipiler玩家倍增造成的伤害
PlayerDamageRateDefenseDamage to player multipiler对玩家造成的伤害乘数
PlayerStomachDecreaceRatePlayer hunger depletion rate玩家饥饿消耗率
PlayerStaminaDecreaceRatePlayer stamina reduction rate玩家体力减少率
PlayerAutoHPRegeneRatePlayer auto HP regeneration rate玩家自动HP回复率
PlayerAutoHpRegeneRateInSleepPlayer sleep HP regeneration rate玩家睡眠HP回复率
PalStomachDecreaceRatePal hunger depletion rate伙伴饥饿消耗率
PalStaminaDecreaceRatePal stamina reduction rate帕尔耐力减少率
PalAutoHPRegeneRatePal auto HP regeneration ratePal自动HP回复率
PalAutoHpRegeneRateInSleepPal sleep health regeneration rate (in Palbox)Pal 睡眠健康恢复率(Palbox 中)
BuildObjectDamageRateDamage to structure multipiler多层结构损坏
BuildObjectDeteriorationDamageRateStructure determination rate结构测定率
CollectionDropRateGetherable items multipiler可收集物品倍增器
CollectionObjectHpRateGetherable objects HP multipiler可收集的物体 HP 倍增器
CollectionObjectRespawnSpeedRateGetherable objects respawn interval可收集物体的重生间隔
EnemyDropItemRateDropped Items Multipiler掉落物品倍增器
DeathPenaltyDeath penalty None : No lost, Item : Lost item without equipment, ItemAndEquipment : Lost item and equipment, All : Lost All item, equipment, pal(in inventory)死亡后 None : 没有丢失, Item : 丢失的没有装备的物品, ItemAndEquipment : 丢失的物品和装备, All : 丢失所有物品、装备、朋友(库存中)
GuildPlayerMaxNumMax player of Guild公会最大玩家数
PalEggDefaultHatchingTimeTime(h) to incubate massive egg孵化大蛋的时间(h)
ServerPlayerMaxNumMaximum number of people who can join the server服务器最多可加入人数
ServerNameServer name服务器名称
ServerDescriptionServer description服务器描述
AdminPasswordAdminPassword管理员密码
ServerPasswordSet the server password.设置服务器密码。
PublicPortPublic port number公共端口号
PublicIPPublic IP公共IP
RCONEnabledEnable RCON启用RCON
RCONPortPort number for RCONRCON 的端口号

6.连接到游戏服务器

服务器控制台防火墙放通udp8211

7.在游戏中使用管理员命令

按下Enter调出聊天框,输入/adminpassword 你设置的管理员密码 即可获得管理员权限

管理员命令

命令描述机翻描述
/Shutdown {Seconds} {MessageText}The server is shut down after the number of Seconds Will be notified of your MessageText.服务器关闭后的秒数将通知您的 MessageText。
/DoExitForce stop the server.强制停止服务器。
/Broadcast {MessageText}Send message to all player in the server.向服务器中的所有玩家发送消息。
/KickPlayer {SteamID}Kick player from the server.将玩家从服务器中踢出。
/BanPlayer {SteamID}BAN player from the server.从服务器禁止玩家。
/TeleportToPlayer {SteamID}Teleport to current location of target player.传送到目标玩家的当前位置。
/TeleportToMe {SteamID}Target player teleport to your current location目标玩家传送到您当前的位置
/ShowPlayersShow information on all connected players.显示所有已连接玩家的信息。
/InfoShow server information.显示服务器信息。
/SaveSave the world data.保存世界数据。

9.获取steamID

在获取管理员权限后,按下 ESC 后点击 选项 即可看到steamid,右键单击两次即可复制

10.添加启动服务

Ctrl+C停止游戏服务程序,输入以下命令挂起程序

切到root用户

sudo su sudo usermod -aG wheel steam 
vim /etc/systemd/system/palserver.service 

填写以下配置

[Unit] Description=PalServer After=network.target  [Service] User=steam ExecStart=/usr/bin/sudo -u steam /home/steam/Steam/steamapps/common/PalServer/Pal/Binaries/Linux/PalServer-Linux-Test Pal "" Restart=always  [Install] WantedBy=default.target 

保存后输入systemctl daemon-reload重载配置

设置开机自启 sudo systemctl enable palserver 启动 sudo systemctl start palserver 查看状态 sudo systemctl status palserver 停止 sudo systemctl stop palserver 重启 sudo systemctl restart palserver 

11.配置虚拟内存以及定时清理缓存

配置虚拟内存

查看当前虚拟内存空间

free -h 

设置虚拟内存为12G,建议根据机型调整

内存小于等于 2GB: 设置为内存的两倍。 内存大于 2GB 且小于 8GB: 设置为内存的1.5倍。 内存大于 8GB 且小于 64GB:等于内存大小。 内存大于 64GB: 设置为64GB。

sudo fallocate -l 12G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab 

检查虚拟内存空间

free -h 
配置定时清理缓存
vim clean.sh 
#!/bin/bash sync echo 1 > /proc/sys/vm/drop_caches 
vim /etc/crontab 

这里设置的是每2h执行一次,可以根据服务器配置进行调整。

0 */2 * * * root /path/to/sync.sh 

参考文献

幻兽帕鲁官网教程:https://tech.palworldgame.com/dedicated-server-guide

相关内容

热门资讯

一分钟揭秘辅助!微乐小程序游戏... 一分钟揭秘辅助!微乐小程序游戏破解器,微乐家乡小程序修改器-一直真的有辅助挂1)微乐小程序游戏破解器...
技术分享开挂!微信小程序微乐辅... 技术分享开挂!微信小程序微乐辅助器,微乐贵阳捉鸡麻将能不能开挂-一贯是真的有辅助工具在进入微信小程序...
科技介绍开挂!微乐小程序家乡自... 科技介绍开挂!微乐小程序家乡自建房辅助app,微乐自建房脚本如何下载-其实是有辅助神器1、超多福利:...
重大通报辅助!微信小程序微乐辅... 重大通报辅助!微信小程序微乐辅助器教程,微乐小程序微乐家乡辅助器-都是真的有辅助插件重大通报辅助!微...
玩家必备教程辅助!微信小程序游... 玩家必备教程辅助!微信小程序游戏破解微乐游戏,微信小程序微乐安徽辅助苹果-确实有辅助脚本1、完成微信...
科技分享开挂!微乐手游辅助脚本... 科技分享开挂!微乐手游辅助脚本平台,微乐小程序辅助器免费-其实有辅助神器一、微乐手游辅助脚本平台可以...
发现玩家辅助!微乐小程序辅助工... 您好,微乐小程序辅助工具这款游戏可以开挂的,确实是有挂的,需要了解加去威信【136704302】很多...
推荐一款透视挂!微乐小程序家乡... 推荐一款透视挂!微乐小程序家乡自建房辅助app,微乐河南小程序微乐辅助脚本-原来存在有辅助挂微乐小程...
一起来探讨开挂!微乐小程序开挂... 一起来探讨开挂!微乐小程序开挂黑科技,微乐自建房免费黑科技推荐-本来真的是有辅助脚本小薇(辅助器软件...
2024教程辅助!微信小程序微... 2024教程辅助!微信小程序微乐辅助免费,微乐小程序辅助教程-都是是真的有辅助挂1、点击下载安装,微...