Skip to main content

Ubuntu 搭建幻兽帕鲁服务

服务器环境

系统:Ubuntu 22.04.3 LTS
配置:8C16G

创建用户

# 创建steam用户
sudo useradd -m steam
# 增加steam用户sudo权限
sudo usermod -aG sudo steam
# 修改steam用户密码
sudo passwd steam
# 切换至steam用户
sudo -u steam -s
# 进入steam用户家目录
cd /home/steam

安装SteamCmd

# 启用 Multiverse 存储库
sudo add-apt-repository multiverse
# 增加i386架构支持
sudo dpkg --add-architecture i386
# 更新软件包缓存
sudo apt update
# 安装steamcmd
sudo apt install steamcmd

安装Manually

# 安装lib32gcc-s1库
sudo apt-get install lib32gcc-s1
# 创建steam目录
mkdir ~/Steam
# 进入steam目录
cd ~/Steam
# 安装Manually
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -

下载服务器

使用SteamCMD登录到Steam服务器并更新ID为2394010的游戏
# 进入steam目录
cd ~/Steam
# 运行steamcmd
./steamcmd.sh
# 匿名模式登陆:
login anonymous
# (显示OK后就登陆成功了)
# 下载
app_update 2394010
# 还需要下载一个服务器依赖的包
app_update 1007
# 下载可能有点慢,多等等
# 退出SteamCMD
quit

配置

# 新建.steam文件夹
mkdir ~/.steam
# 新建sdk64文件夹
mkdir ~/.steam/sdk64
# 复制动态库
cp ~/Steam/steamapps/common/Steamworks\ SDK\ Redist/linux64/steamclient.so ~/.steam/sdk64/

修改配置文件

# 进入PalServer目录
cd /home/steam/Steam/steamapps/common/PalServer
# 启动PalServer
./PalServer.sh
# 使用ctrl+C退出
# 复制默认配置文件至配置文件目录
cp DefaultPalWorldSettings.ini Pal/Saved/Config/LinuxServer/PalWorldSettings.ini
# 修改配置文件
vim Pal/Saved/Config/LinuxServer/PalWorldSettings.ini

配置自动启动

# 编辑自启文件
sudo 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
Restart=always

[Install]
WantedBy=default.target
设置自动启动
# 设置开机自启
sudo systemctl enable palserver
# 启动
sudo systemctl start palserver
# 查看状态
sudo systemctl status palserver

配置文件参数

Difficulty英文机翻
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 的端口号

可视化配置