帕鲁

幻兽帕鲁搭建教程 - (基于Windows-server2022系统)

假期帮朋友在云服务器上面搭建了幻兽帕鲁服务端,并全程负责了维护,简单记录一下搭建的过程、维护用的工具和一些心得。

基本步骤

  • 创建主机,选择Windows2022并开启端口
  • 依赖环境安装
  • 登录Steam账号,

创建和登录主机

  • 配置越高越流畅,建议16G以上
  • 至少选择4C16G5M主机, 适合3-4人,

主机创建好后,访问控制台

  • 添加UDP 8211端口和 TCP 3389端口,
  • 登录云主机,通过控制台,或者通过远程桌面登录主机
  • 在电脑上同时按键“windows+R”,打开运行 ,输入 mstsc ,点击确定打开远程桌面

弹出远程桌面连接框,输入主机的公网IP

选择更多选项,使用其它账户,账户名是administrator, 密码主机的密码

安装依赖环境

安装 DirectX

访问 DirectX下载地址 ,选择语言是中文进行下载(如果访问地址没展示可下载内容,建议换个浏览器,或者本地计算机下载后,复制到云主机中)

点击下载的程序dxwebsetup 进行安装

安装 Microsoft visual C++

访问 visual C++ 地址 进行下载, 点击下载的VC_redist.x64 进行安装

安装Steam CMD

访问Steam CMD地址, 进行下载

解压缩下载的steamcmd安装包,点击steamcmd 安装程序进行安装

安装完成,如果进度有卡住可以同时按“Ctrl+C” , 刷新查看最新进度

在启动的服务中,输入 login anonymous 匿名登录steam服务器

输入 app_update 2394010 validate ,下载游戏服务端

访问 \steamcmd\steamapps\common\PalServer 地址, 启动PalSever.exe 程序

启动后效果

登录幻兽帕鲁

在自己的电脑上登录Steam账号, 并购买幻兽帕鲁(Palworld),在“库”中搜索幻兽帕鲁, 并且进行下载

下载好后,点击开始游戏

选择加入“加入多人游戏”

输入服务器实例地址和端口,

世界配置

Default setting 默认设置

Default settings are located in steamapps/common/PalServer/DefaultPalWorldSettings.ini It is recommended to copy and use.
默认设置位于steamapps/common/PalServer/DefaultPalWorldSettings.ini中 建议复制并使用。

Configuration parameters 配置参数

C:\down\1\steamapps\common\PalServer

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/WindowsServer/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=0.500000,BuildObjectDeteriorationDamageRate=0.000000,CollectionDropRate=1.000000,CollectionObjectHpRate=1.000000,CollectionObjectRespawnSpeedRate=1.000000,EnemyDropItemRate=1.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,PalEggDefaultHatchingTime=0.000000,WorkSpeedRate=1.000000,bIsMultiplay=False,bIsPvP=False,bCanPickupOtherGuildDeathPenaltyDrop=False,bEnableNonLoginPenalty=True,bEnableFastTravel=True,bIsStartLocationSelectByMap=True,bExistPlayerAfterLogout=False,bEnableDefenseOtherGuildPlayer=False,CoopPlayerMaxNum=4,ServerPlayerMaxNum=8,ServerName=”Genshin launched”,ServerDescription=””,AdminPassword=”ilovenahida”,ServerPassword=”654321”,PublicPort=8211,PublicIP=””,RCONEnabled=False,RCONPort=25575,Region=””,bUseAuth=True,BanListURL=”https://api.palworldgame.com/api/banlist.txt“)

We recommend that you copy the default settings to a configuration file and then change only the necessary settings. Also, line breaks are not allowed in the middle of a line. *Note that there are parameters reserved for future updates.
建议将默认设置复制到配置文件中,然后只更改必要的设置。 此外,不允许在直线的中间使用换行符。 *请注意,有一些参数是为将来的更新保留的。

Difficulty 困难 Difficulty 困难
DayTimeSpeedRate Day time speed 白天速度
NightTimeSpeedRate 夜间速度 Night time speed 夜间速度
ExpRate EXP rate EXP费率
PalCaptureRate Pal capture rate Pal捕获率
PalSpawnNumRate Pal appearance rate Pal出现率
PalDamageRateAttack Damage from pals multipiler 好友多人攻击造成的伤害
PalDamageRateDefense Damage to pals multipiler 对好友多人攻击造成的伤害
PlayerDamageRateAttack 玩家伤害率攻击 Damage from player multipiler 玩家多人攻击造成的伤害
PlayerDamageRateDefense 播放器损坏率防御 Damage to player multipiler 对玩家多人攻击造成伤害
PlayerStomachDecreaceRate 玩家胃部反应迟钝 Player hunger depletion rate 玩家饥饿消耗率
PlayerStaminaDecreaceRate Player stamina reduction rate 玩家耐力降低率
PlayerAutoHPRegeneRate 播放器自动HP再生速率 Player auto HP regeneration rate 玩家自动生命值再生率
PlayerAutoHpRegeneRateInSleep 播放器自动更新日期睡眠 Player sleep HP regeneration rate 玩家睡眠生命值再生率
PalStomachDecreaceRate Pal胃部反应迟钝 Pal hunger depletion rate 帕尔饥饿消耗率
PalStaminaDecreaceRate PalStamina反应迟钝 Pal stamina reduction rate 帕尔耐力降低率
PalAutoHPRegeneRate PalAutoHP再生速率 Pal auto HP regeneration rate Pal自动HP再生率
PalAutoHpRegeneRateInSleep PalAutoHpRegenerRateInSleep Pal sleep health regeneration rate (in Palbox) Pal睡眠健康再生率(在Palbox中)
BuildObjectDamageRate 建筑对象损坏率 Damage to structure multipiler 结构多卷机损坏
BuildObjectDeteriorationDamageRate 建筑对象退化损坏率 Structure determination rate 结构确定率
CollectionDropRate Getherable items multipiler
CollectionObjectHpRate 集合对象HpRate Getherable objects HP multipiler Getherable对象HP多编译器
CollectionObjectRespawnSpeedRate Getherable objects respawn interval Getherable object respawn interval
EnemyDropItemRate Dropped Items Multipiler
DeathPenalty 死刑 Death penalty None : No lost, Item : Lost item without equipment, ItemAndEquipment : Lost item and equipment, All : Lost All item, equipment, pal(in inventory) 死刑 无:没有丢失,物品:没有设备的丢失物品,物品和设备:丢失的物品和设备,全部:丢失的所有物品,设备,朋友(库存中)
GuildPlayerMaxNum Max player of Guild 帮会最大玩家
PalEggDefaultHatchingTime PalEggDefault孵化时间 Time(h) to incubate massive egg 孵化大量卵子的时间(h)
ServerPlayerMaxNum 服务器播放器最大数量 Maximum number of people who can join the server 可以加入服务器的最大人数
ServerName Server name 服务器名称
ServerDescription 服务器描述 Server description 服务器描述
AdminPassword 管理员密码 AdminPassword 管理员密码
ServerPassword 服务器密码 Set the server password. 设置服务器密码。
PublicPort Public port number 公共端口号
PublicIP Public IP 公共IP
RCONEnabled RCON已启用 Enable RCON 启用RCON
RCONPort RCON端口 Port number for RCON RCON的端口号

开通端口方式

防火墙 - 开启目标端口

防火墙是对您轻量云主机的网络访问的安全控制,防火墙只对轻量云主机的入流量进行控制,出流量默认允许所有请求,您可以配置防火墙规则,允许或禁止公网IP对轻量云主机的访问。

防火墙规则内容

类型:常用应用类型,例如SSH 或HTTP 等,也可选择自定义TCP或UDP。

协议:根据应用类型选择,显示所属协议类型。

目标端口:配置入站规则,目标端口指轻量云主机实例的端口,端口取值1-65535,可填写单一端口如“22”或端口范围如“20/22”。

如您在规则类型中选择常用应用,目标端口会直接显示为对应默认端口,不需要设置;如您选择自定义TCP/自定义UDP,可自定义端口范围。

源IP:允许访问的IP地址,IPv4地址,如填写0.0.0.0/0表示允许所有IP地址访问。

备注:标识规则用途,最多可输入256字符。

配置防火墙策略

访问用户控制台,查看已购的轻量云主机列表。

选择一个主机,点击操作中的查看按钮。

在实例详情页,点击防火墙进行访问。

点击添加规则,添加一个防火墙策略。

例如,如果访问某个应用需要使用9009端口,那么设置开通目标端口是9009,允许所有IP地址访问该端口,点击保存后自动生效。

如何更新服务端

Windows环境下具体升级步骤如下:

双击桌面文件夹中的steamcmd文件,打开steamcmd.exe窗口

输入:login anonymous

执行完成后输入:app_update 2394010 validate

再次执行完成后输入:quit

如果不动弹就按一下Ctrl + c就能显示了

然后重启服务器,重新登陆开启服务即可重新进入游戏

管理员登录

登录

要成为服务器上的管理员,需要使用配置的管理员密码登录。

  1. 连接到您的Palworld服务器。
  2. Enter 打开聊天室。
  3. 输入命令 /AdminPassword <Password>

如何在Palworld服务器上使用管理命令

Palworld服务器管理员可以使用一系列有用的命令,如消息广播命令和传送命令。
注意:为了使用管理命令,您需要以管理员身份连接。


Palworld Admin Commands Palworld管理命令

以下是当前可用的Palworld服务器管理命令列表。其中一些命令不能在服务器中使用

Command 命令 Description 说明
/Shutdown [Seconds] [Message Text] 此命令将在秒延迟到期后关闭带有指定消息的服务器。
/DoExit 使用此命令立即停止服务器。
/Broadcast [Message Text] 从服务器向每个连接的玩家广播消息。
/KickPlayer [Player ID or Steam ID] 断开指定播放器与服务器的连接。
/BanPlayer [Player ID or Steam ID] 禁止指定的玩家进入服务器。当前没有取消登录命令,要取消玩家的登录,您需要从 Pal/Saved/SaveGames/banlist.txt 中删除他们的姓名#
/TeleportToPlayer [Player ID or Steam ID] 将您传送到指定玩家的位置。无法从控制台运行此命令。
/TeleportToMe [Player ID or Steam ID] 将指定的玩家传送到您的位置。此命令也不能从控制台使用。
/ShowPlayers 显示所有连接玩家的玩家ID和Steam ID等信息。
/Info 显示有关服务器的信息。
/Save 这个命令部队保存世界数据。

管理员身份踢出/禁用

Palworld服务器管理员可以使用kick和ban命令将破坏性或不需要的玩家踢出或禁止其服务器。


**Retrieving Player Information 正在检索玩家信息 **

要删除你的好友世界服务器上的玩家,你必须首先知道他们的玩家ID或Steam ID。

  1. Connect to your Palworld server as an admin.
    以管理员身份连接到您的Palworld服务器。
  2. Press Enter to open the chat.
    Enter 打开聊天室。
  3. Enter the command /ShowPlayers.
    输入命令 /ShowPlayers
  4. Take note of either the Player ID or the Steam ID of the player you would like to punish.
    记下你想惩罚的玩家的玩家ID或Steam ID。

**Kicking a Player 踢球员 **

Once you know the ID of the player you would like to punish, you can kick them using the proper command.
一旦你知道了你想惩罚的球员的ID,你就可以用正确的命令踢他们。

  1. Connect to your Palworld server as an admin.
    以管理员身份连接到您的Palworld服务器。
  2. Open the chat, then enter the command /KickPlayer <Player ID or Steam ID>.
    打开聊天室,然后输入命令 /KickPlayer <Player ID or Steam ID>

**Banning a Player 禁止玩家 **

Once you know the ID of the player you would like to punish, you can ban them permanently using the proper command.
一旦你知道了你想惩罚的玩家的ID,你就可以使用适当的命令永久禁止他们。

  1. Connect to your Palworld server as an admin.
    以管理员身份连接到您的Palworld服务器。
  2. Open the chat, then enter the command /BanPlayer <Player ID or Steam ID>.
    打开聊天室,然后输入命令 /BanPlayer <Player ID or Steam ID>

**Locating Local World Files 定位本地世界文件 **

You can directly access your save files from an open folder button found in-game.
您可以从游戏中的“打开文件夹”按钮直接访问保存文件。

  1. Open Palworld, and click Start Game to view your world list.
    打开好友世界,然后单击开始游戏查看您的世界列表。
  2. Select your desired world, then click the folder icon in the bottom left.
    选择您想要的世界,然后单击左下角的文件夹图标。
  3. You should now see your world files, put these to the side, but keep them ready to upload.
    你现在应该看到你的世界文件,把它们放在一边,但要准备好上传。

**Uploading an Existing World 上传现有世界 **

Once you have located your existing Palworld world files, you can replace your server’s existing world files with them.
一旦您找到了现有的Palworld世界文件,您就可以用它们替换服务器的现有世界文件。

  1. Navigate to your control panel and Stop your server.
    导航到控制面板并停止服务器。

  2. Connect to your server using an external FTP program, we recommend FileZilla.
    使用外部FTP程序连接到您的服务器,我们建议使用FileZilla。

  3. Navigate to /Pal/Saved/SaveGames/0, then open the last folder which will usually be named a random string of characters.
    导航到 /Pal/Saved/SaveGames/0 ,然后打开最后一个文件夹,该文件夹通常由随机字符串命名。

  4. Delete all the files within this folder, they will need to be replaced by your existing world files.
    删除此文件夹中的所有文件,它们将需要替换为现有的世界文件。

    Feel free to download or backup these files if you would like to use them again in the future, but they cannot be in this folder anymore.
    如果您将来想再次使用这些文件,请随时下载或备份这些文件,但它们不能再在此文件夹中。

  5. Upload your existing world files, excluding the WorldOption.sav file, to the now empty server directory.
    将您现有的世界文件(不包括WorldOption.sav文件)上载到现在为空的服务器目录中。

    If you upload the WorldOption.sav file, your server configuration options will be completely overridden.
    如果您上传WorldOption.sav文件,您的服务器配置选项将被完全覆盖。

  6. Start your server. 启动服务器。

FTP远程通讯

第一种方案(Windows Server 自带 IIS 搭建)

1,添加IIS角色 > 选择 “左下角开始” > 服务器管理器”, 单击“添加角色和功能”;

2,选择下一步;

3,选择下一步;

4,选择下一步;

5,选择“Web服务器(IIS)”,点击“添加功能”,然后点击下一步;

6,这个应该是不用点什么的,图片里面那个.NET安装了一个还是两个无所谓

7,选择“FTP服务器”,这俩可以都勾选上,点击下一步;

8,选择安装,耐心等待,安装完成后,点击关闭,至此IIS安装完毕。

9,添加用于登录FTP站点的用户,如果你的FTP站点是完全对外开放的,可以不创建用户,匿名登录即可;

选择“开始 > Windows管理工具”,打开“计算机管理”;选择“系统用户 > 本地用户和组 > 用户”,在右侧空白处右击,选择“新用户”,设置用户名、密码,点击创建即可,至此FTP登录用户添加完毕。

10,添加FTP站点,选择“开始 > Windows管理工具”,打开IIS管理器,选择“网站”,右击“添加FTP站点”;

11,设置站点名称和站点目录;这个目录应该就是要共享的文件夹

12,绑定IP地址保持默认即可,SSL选择:“无SSL”;

13,身份验证和授权配置,至此FTP站点添加完毕。

身份验证这里选择了“基本”意思是需要用户提供有效用户名和密码才能访问内容。

如果选择匿名,则是允许任何仅提供用户名 “anonymous” 或 “FTP” 的用户访问内容。

授权这里选择了指定用户,仅指定的用户才能访问相应内容,这个指定用户见第9步中添加的用户;

权限选择了读取和写入;

14,设置FTP站点根目录访问权限,打开FTP文件夹属性,选择“安全”,点击“编辑”;

15,点击“添加”>选择指定用户 >点击“高级”>点击“立即查找”,选择FTP用户,点击“确定”;

16,设置FTPuser对FTP目录的权限为完全控制,至此FTP站点根目录访问权限设置完毕。

17,测试连接;(不能连接就执行后面的步骤)

18.配置防火墙

(1)

选择允许应用或功能通过Windows防火墙

添加Windows主服务通过防火墙

选择 C:\Windows\System32\svchost.exe 点击确定

点击确定保存设置

(2)

左下角开始,打开控制面板。

选择windows防火墙,高级设置。

左侧选择入站规则,右侧选择新建规则。

选择端口,输入ftp服务的默认端口21,选择允许连接,输入规则名称,完成。

控制面板,windows防火墙,允许应用或者功能通过Windows防火墙。
选择允许其他应用,浏览。

找到”C:\Windows\System32\svchost.exe”,双击选择添加。(找不到的话就不添加,跳过这步) [

19,出现报错:

报错1:

无法连接到服务器

解决方法:

打开京东云控制台-轻量云主机-主机列表,点击“查看”

点击“防火墙”

添加规则,类型为ftp,源IP为0.0.0.0/0,点击保存(因为我添加过了所以已经有这条规则了)

报错2:

解决方法:

win10服务器端打开IE浏览器-设置(齿轮图案)-Internet选项

在高级选项卡中下拉找到“使用被动FTP”,关闭这个功能,点击应用

本地端也进行相同操作

Win11直接搜索Internet选项,进行相同操作即可

报错3:

这个报错的原因是:Windows资源管理器默认是使用被动模式连接,而FTP是多通道协议(控制通道和数据通道)。VPC的ECS网卡只有一个私网IP地址,FTP服务器没有指定被动模式的公网IP地址,导致客户端和服务器建立数据通道的连接时,服务器返回的数据通道的连接地址是私网IP地址,公网路由不可达从而导致连接失败。

解决方法:

打开FTP服务器的IIS,打开FTP防火墙支持功能

注意:不是FTP站点里的FTP防火墙支持;

设置被动模式的端口范围,指定服务器的公网IP地址,点击“应用”;

注意:被动模式的端口范围取值大于1023即可

重启IIS;

再次测试连接正常,且可以正常传输数据。

总结

1、 FTP的工作方式有2种,主动和被动;

主动模式下控制层端口为21,数据层端口20;

被动模式下控制层端口未21,数据层端口随机,可设置端口范围;

2、 使用Windows资源管理器连接FTP时,默认是被动模式,需要取消被动以主动模式连接;

3、 实际工作中,FTP问题,推荐使用被动模式,方便配置,也更安全。

————————————————
最后的最后:特别感谢Thijs van Loef大佬在github上分享的小工具,它给了我很大的帮助
项目链接