化身为吸血鬼苏醒。在附近的定居点猎取鲜血以恢复力量,躲避灼热的阳光以求生存。建造你的城堡,在充满神秘、不断变化的开放世界中繁荣发展。在线招募盟友,征服生者的领地。
预设配置详情
V Rising BepInEx
注意:当前服务器版本被 V Rising 开发者标记为早期访问版本。随着更新发布,实际体验可能会有所不同。
注意:首次启动时,服务器启动可能需要长达 15 分钟!!!
作者 / 贡献者
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center">
<a href="https://github.com/redthirten">
<img src="https://avatars.githubusercontent.com/u/4533989" width="50px;" alt=""/><br /><sub><b>Red-Thirten</b></sub>
</a>
<br />
<a href="https://github.com/pelican-eggs/games-steamcmd/commits?author=redthirten" title="代码">💻</a>
<a href="https://github.com/pelican-eggs/games-steamcmd/commits?author=redthirten" title="贡献者">💡</a>
</td>
<td align="center">
<a href="https://github.com/kapatheus">
<img src="https://avatars.githubusercontent.com/u/59861026" width="50px;" alt=""/><br /><sub><b>Kapatheus</b></sub>
</a>
<br />
<a href="https://github.com/pelican-eggs/games-steamcmd/commits?author=kapatheus" title="代码">💻</a>
<a href="https://github.com/pelican-eggs/games-steamcmd/commits?author=kapatheus" title="贡献者">💡</a>
</td>
<td align="center">
<a href="https://github.com/upd4ting">
<img src="https://avatars.githubusercontent.com/u/6763934" width="50px;" alt=""/><br /><sub><b>Upd4ting</b></sub>
</a>
<br />
<a href="https://github.com/pelican-eggs/games-steamcmd/commits?author=upd4ting" title="代码">💻</a>
<a href="https://github.com/pelican-eggs/games-steamcmd/commits?author=upd4ting" title="维护者">🔨</a>
</td>
<td align="center">
<a href="https://github.com/gOOvER">
<img src="https://avatars.githubusercontent.com/u/116325" width="50px;" alt=""/><br /><sub><b>gOOvER</b></sub>
</a>
<br />
<a href="https://github.com/pelican-eggs/games-steamcmd/commits?author=gOOvER" title="代码">💻</a>
<a href="https://github.com/pelican-eggs/games-steamcmd/commits?author=gOOvER" title="维护者">🔨</a>
</td>
</tr>
</table>
<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->
游戏描述
来自 Stunlock Studios 的官方网站:
觉醒为吸血鬼。在附近的定居点狩猎鲜血以恢复力量,并躲避灼热的阳光以求生存。建造你的城堡,在一个充满神秘、不断变化的开放世界中茁壮成长。在线结交盟友,征服生者的土地。
容器功能
- 当前通过 Wine 运行服务器的 Windows 版本。当发布合适的原生 Linux 服务器二进制文件时,此容器将进行更新。
- 可配置为在启动时通过 SteamCMD 自动检查服务器更新。强制验证也是可配置的。
- 所有
ServerHostSettings.json设置均可通过启动变量自动配置。- 包括:服务器名称、游戏设置预设、密码、最大玩家数、自动保存设置等...
- 支持 RCON(*需要额外端口 – 请参阅服务器端口)。有关更多信息,请参阅手动配置主题下的 RCON 部分。
- 加载 BepInEx,以便你可以在服务器上安装模组。
服务器端口
- 默认服务器端口如下所列,但所有三个端口都可以自由更改。
- 唯一必需的端口是游戏端口,但查询端口是服务器出现在服务器列表中所需的(没有查询端口仍可进行直接连接)。也有报告称,服务器只有受欢迎才会出现在服务器列表中,因此在排查问题时请考虑这一点。
- 客户端通过游戏端口连接。
- RCON 端口是可选的,仅在服务器所有者启用/使用 RCON 时需要。
| 端口 | 默认值 | 协议 |
|---|---|---|
| 游戏(主端口) | 9876 | UDP |
| 查询 | 9877 | UDP |
| RCON | 25575 | TCP |
安装/系统要求
| 最低要求 | 推荐配置 | |
|---|---|---|
| 处理器 | 近期 x86/64(AMD/Intel)处理器。不支持 32 位或 ARM。 | 未经证实的报告称,启用 RCON 会显著增加 CPU 使用率,但我本人无法复现。 |
| 内存 | 3072 MiB | 4096-6144 MiB |
| 存储空间 | 3.5 GB | 5-10 GB(或更多,取决于存档大小或频率) |
| 游戏所有权 | 完全不需要。 | ---- |
手动配置主题
以下是容器无法自动处理的各种手动配置流程主题,可能对服务器所有者有用:
存档文件和自定义设置位置
你可以在 ~/save-data/ 目录中找到游戏设置和存档。
服务器游戏设置
可以通过“游戏设置预设”启动参数应用标准化的游戏设置。如果你想要更自定义的设置数组进行调整,可以将位于 ~/VRisingServer_Data/StreamingAssets/Settings/ 的 ServerGameSettings.json 文件复制到 ~/save-data/Settings/,并根据需要进行调整。同时,确保“游戏设置预设”设置为空/空值。一份包含每个设置说明及适用最小/最大值的设置列表,可以在此处找到。
成为管理员
要在游戏中成为管理员,你首先需要打开 ~/VRisingServer_Data/StreamingAssets/Settings/ 下的 adminlist.txt 文件,并添加你的 steamID64(每行一个 steamID64)。这可以在不重启服务器的情况下完成。要在游戏中成为管理员,你需要在选项菜单中启用控制台,使用 ~ 键打开控制台,并使用 adminauth 控制台命令进行身份验证。成为管理员后,你可以使用许多管理命令,例如 banuser、bancharacter、banned、unban 和 kick。
如果你通过游戏内控制台封禁用户,服务器将自动修改 banlist.txt 文件,但你也可以手动修改此文件(每行一个 steamID64)。
将本地/客户端存档转移到服务器
请非常仔细地按照开发者的这些说明操作。注意:-saveName <name> 命令行参数和 GameSettingsPreset 设置分别由容器的“存档名称”和“游戏设置预设”启动参数自动处理。此外,如果由于任何原因在 ~/save-data/Settings 目录中存在自定义的 ServerGameSettings.json 文件,请将其删除。
RCON
RCON 允许远程向服务器发送常规公告和重启公告(控制台命令行当前不支持这些功能)。你可以通过正确配置服务器“启动”选项卡下的相关变量来启用 RCON。必须为服务器分配 RCON 端口。点击此处查看有效命令列表和推荐的 RCON 客户端。
registry.cn-shanghai.aliyuncs.com/pterodactyl-images/yolks:wine_staging
WINEDLLOVERRIDES="winhttp=n,b"; xvfb-run wine ./VRisingServer.exe -persistentDataPath save-data -address 0.0.0.0
| 变量名 | 变量 | 描述 | 默认值 | 规则 | 可查看 | 可编辑 |
|---|---|---|---|---|---|---|
| [必需] 服务器查询端口 | QUERY_PORT |
Steam服务器列表功能的UDP端口。 | 9877 |
required|integer|between:1024,65536
必填 整数 介于 1024-65536 之间
|
||
| 自动更新 | AUTO_UPDATE |
启动时快速检查服务器更新,并在必要时进行更新。 | 1 |
boolean
布尔
|
||
| 游戏设置预设 | GAME_SETTINGS_PRESET |
服务器应运行的游戏设置预设。部分设置在存档文件首次创建后可能无法生效。若使用单人模式上传的存档或 `~/save-data/Settings/` 目录下的自定义 ServerGameSettings.json 文件,请留空/设为 null。 | |
nullable|string|in:,DuoPvP,HardcorePvP,Level30PvE,Level30PvP,Level50PvE,Level50PvP,Level70PvE,Level70PvP,SoloPvP,StandardPvE_Easy,StandardPvE_Hard,StandardPvE,StandardPvP_Easy,StandardPvP_Hard,StandardPVP
可选 字符串 选项: ,DuoPvP,HardcorePvP,Level30PvE,Level30PvP,Level50PvE,Level50PvP,Level70PvE,Level70PvP,SoloPvP,StandardPvE_Easy,StandardPvE_Hard,StandardPvE,StandardPvP_Easy,StandardPvP_Hard,StandardPVP
|
||
| 服务器名称 | SERVER_NAME |
在服务器列表中显示的服务器名称。 | V Rising Dedicated Server |
required|string
必填 字符串
|
||
| 服务器描述 | DESCRIPTION |
服务器用途、规则及每日消息的简短描述。 | Welcome to the server! |
nullable|string
可选 字符串
|
||
| 最大连接用户数 | MAX_PLAYERS |
服务器上最大并发玩家数。 | 40 |
required|integer|min:1
必填 整数 最小 1
|
||
| 最大连接管理员数 | MAX_ADMINS |
服务器满员时允许连接的最大管理员数量。 | 4 |
required|integer|min:0
必填 整数 最小 0
|
||
| 服务器密码 | SERVER_PASSWORD |
加入服务器需要密码。留空则无需密码。 | |
nullable|string
可选 字符串
|
||
| 保存名称 | SAVE_NAME |
保存文件/目录的名称。 | world1 |
required|string
必填 字符串
|
||
| 自动保存计数 | SAVE_COUNT |
保留的自动存档数量。 | 50 |
required|integer|min:0
必填 整数 最小 0
|
||
| 自动保存间隔 | SAVE_INTERVAL |
每次自动保存之间的间隔(秒)。 | 600 |
required|integer|min:1
必填 整数 最小 1
|
||
| 在主服务器上列出 | SERVER_LIST |
设置为 true 以在服务器列表中显示,否则设置为 false。 | true |
required|string|in:true,false
必填 字符串 选项: true,false
|
||
| [修复] 验证服务器文件 | VALIDATE |
留空(无值)表示关闭,或输入 "true" 或 "1" 表示开启。当自动更新启用时,验证所有服务器文件。注意:这将显著增加服务器启动时间,因此建议仅在需要时启用此功能。 | |
string|nullable
可选 字符串
|
||
| [高级] 服务器 FPS | FPS |
服务器刷新频率。(默认值:30) | 30 |
required|integer|min:1
必填 整数 最小 1
|
||
| [高级] 启用 RCON | RCON |
关于如何连接和使用RCON的信息,请参见以下链接:https://github.com/StunlockStudios/vrising-dedicated-server-instructions#rcon | false |
required|string|in:true,false
必填 字符串 选项: true,false
|
||
| [高级] RCON 密码 | RCON_PASS |
启用RCON时连接所需的密码。 | somepassword |
required|string
必填 字符串
|
||
| [高级] RCON 端口 | RCON_PORT |
用于连接RCON的端口。必须分配给服务器才能使RCON正常工作。 | 25575 |
required|integer|between:1024,65536
必填 整数 介于 1024-65536 之间
|
||
| [高级] 安全服务器 | SERVER_SECURE |
(真或假) | true |
required|string|in:true,false
必填 字符串 选项: true,false
|
||
| [高级] 仅管理员调试事件 | ADMIN_ONLY_DEBUG_EVENTS |
(真或假) | true |
required|string|in:true,false
必填 字符串 选项: true,false
|
||
| [高级] 禁用调试事件 | DEBUG_EVENTS |
(真或假) | false |
required|string|in:true,false
必填 字符串 选项: true,false
|
||
| [高级] V Rising 专用服务器应用 ID | SRCDS_APPID |
用于安装和更新。通常无需更改。 | 1829350 |
required|integer
必填 整数
|
||
| [高级] 使用 Windows 分支 | WINDOWS_INSTALL |
告知安装程序/更新程序仅下载服务器的Windows分支(目前唯一可用的分支),以便其能在Wine上运行。此设置不可更改。 | 1 |
required|string|in:1
必填 字符串 选项: 1
|
||
| WINEDEBUG | WINEDEBUG |
-all |
required|string|max:20
必填 字符串 最大 20
|
|||
| WINEPATH | WINEPATH |
/home/container |
required|string|max:20
必填 字符串 最大 20
|
|||
| XVFB | XVFB |
1 |
boolean
布尔
|
|||
| WINETRICKS_RUN | WINETRICKS_RUN |
mono |
required|string|max:50
必填 字符串 最大 50
|
|||
| WINEARCH | WINEARCH |
win64 |
required|string|max:20
必填 字符串 最大 20
|
registry.cn-shanghai.aliyuncs.com/pterodactyl-images/installers:debian
/bin/bash
#!/bin/bash
## File: Pterodactyl V Rising Egg - egg-v-rising.json
## Authors: David Wolfe (Red-Thirten), Kapatheus
## Date: 2022/05/28
## License: MIT License
## Image to install with is 'registry.cn-shanghai.aliyuncs.com/pterodactyl-images/installers:debian'
clear
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
# Install packages. Default packages below are skipped if using image noted above, thus speeding up the install process.
apt -y update
apt -y --no-install-recommends install curl jq unzip wget
# Download and install SteamCMD
echo -e "${YELLOW}download and install steamcmd${NC}"
export HOME=/mnt/server
cd /tmp
mkdir -p $HOME/steamcmd $HOME/steamapps
curl -sSL -o steamcmd.tar.gz https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar -xzvf steamcmd.tar.gz -C $HOME/steamcmd
cd $HOME/steamcmd
# SteamCMD fails otherwise for some reason, even running as root.
# This is changed at the end of the install process anyways.
chown -R root:root /mnt
# Install game server using SteamCMD
echo -e "${YELLOW}install V Rising with SteamCMD${NC}"
./steamcmd.sh +force_install_dir $HOME +login anonymous $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} +quit
# Set up 32 and 64 bit libraries
mkdir -p $HOME/.steam/sdk{32,64}
cp -v linux32/steamclient.so $HOME/.steam/sdk32/steamclient.so
cp -v linux64/steamclient.so $HOME/.steam/sdk64/steamclient.so
# Enable BEPINEX (Credits to: https://github.com/ricin/vrising-bepinex-linux/blob/main/scripts/start-server.sh)
echo -e "${YELLOW}installing BepInex${NC}"
#variables
BEPINEX_VR_TS_URL=https://v-rising.thunderstore.io/package/BepInEx/BepInExPack_V_Rising/
CUR_V="$(find ${HOME} -maxdepth 1 -name "BepInEx-*" | cut -d '-' -f2)"
BEPINEX_VR_API_DATA="$(curl -s -X GET https://thunderstore.io/c/v-rising/api/v1/package/b86fcaaf-297a-45c8-82a0-fcbd7806fdc4/ -H "accept: application/json")"
LAT_V="$(echo ${BEPINEX_VR_API_DATA} | jq -r '.versions[0].version_number')"
if [ -z "${LAT_V}" ] && [ -z "${CUR_V}" ]; then
echo -e "${RED}Can't get latest version of BepInEx for V Rising!${NC}"
echo -e "${RED}Please try to run without BepInEx for V Rising. Exiting.${NC}"
exit 1
fi
if [ -f ${HOME}/BepInEx.zip ]; then
rm -rf ${HOME}/BepInEx.zip
fi
if [ -f ${HOME}/doorstop_config.ini ]; then
sed -i "/enabled=false/c\enabled=true" ${HOME}/doorstop_config.ini
fi
echo -e "${YELLOW}BepInEx for V Rising Version Check${NC}"
echo -e "${YELLOW}More info: ${BEPINEX_VR_TS_URL}${NC}"
BEPINEX_VR_TS_DOWNLOAD_URL="$(echo ${BEPINEX_VR_API_DATA} | jq -r '.versions[0].download_url')"
if [ -z "${CUR_V}" ]; then
echo -e "${YELLOW}BepInEx for V Rising not found, downloading and installing v${LAT_V} ...${NC}"
cd ${HOME}
rm -rf ${HOME}/BepInEx-*
if wget -q -nc --show-progress --progress=bar:force:noscroll -O ${HOME}/BepInEx.zip --user-agent=Mozilla --content-disposition -E -c "${BEPINEX_VR_TS_DOWNLOAD_URL}" ; then
echo -e "${GREEN}Successfully downloaded BepInEx for V Rising v${LAT_V}${NC}"
else
echo -e "${RED}Something went wrong, can't download BepInEx for V Rising v${LAT_V}. Exiting.${NC}"
exit 1
fi
mkdir -p /tmp/BepInEx
unzip -o ${HOME}/BepInEx.zip -d /tmp/BepInEx
if [ $? -eq 0 ];then
touch ${HOME}/BepInEx-${LAT_V}
cp -rf /tmp/BepInEx/BepInEx*/* ${HOME}/
cp /tmp/BepInEx/README* ${HOME}/README_BepInEx_for_VRising.txt
rm -rf ${HOME}/BepInEx.zip /tmp/BepInEx
else
echo -e "${RED}Unable to unzip BepInEx archive! Exiting.${NC}"
exit 1
fi
elif [ "$CUR_V" != "${LAT_V}" ]; then
echo -e "${YELLOW}Version missmatch, BepInEx v$CUR_V installed, downloading and installing v${LAT_V} ...${NC}"
cd ${HOME}
rm -rf ${HOME}/BepInEx-$CUR_V
mkdir /tmp/Backup
cp -R ${HOME}/BepInEx/config /tmp/Backup/
if wget -q -nc --show-progress --progress=bar:force:noscroll -O ${HOME}/BepInEx.zip --user-agent=Mozilla --content-disposition -E -c "${BEPINEX_VR_TS_DOWNLOAD_URL}" ; then
echo -e "${GREEN}Successfully downloaded BepInEx for V Rising v${LAT_V}${NC}"
else
echo -e "${RED}Unable to download BepInEx for V Rising v${LAT_V}. Exiting.${NC}"
exit 1
fi
unzip -o ${HOME}/BepInEx.zip -d /tmp/BepInEx
if [ $? -eq 0 ];then
cp -rf /tmp/BepInEx/BepInEx*/* ${HOME}/
cp /tmp/BepInEx/README* ${HOME}/README_BepInEx_for_VRising.txt
touch ${HOME}/BepInEx-${LAT_V}
cp -R /tmp/Backup/config ${HOME}/BepInEx/
rm -rf ${HOME}/BepInEx.zip /tmp/BepInEx /tmp/Backup
else
echo -e "${RED}Unable to unzip BepInEx archive! Exiting.${NC}"
exit 1
fi
elif [ "${CUR_V}" == "${LAT_V}" ]; then
echo -e "${GREEN}BepInEx v$CUR_V up-to-date!${NC}"
fi
rm -fR /mnt/server/dotnet
## V Rising Setup
mkdir -p $HOME/save-data/Settings && cd "$_"
cat > ServerHostSettings.json << EOF
{
"Name": "${SERVER_NAME}",
"Description": "${DESCRIPTION}",
"Port": ${SERVER_PORT},
"QueryPort": ${QUERY_PORT},
"MaxConnectedUsers": ${MAX_PLAYERS},
"MaxConnectedAdmins": ${MAX_ADMINS},
"ServerFps": ${FPS},
"SaveName": "${SAVE_NAME}",
"Password": "${SERVER_PASSWORD}",
"Secure": ${SERVER_SECURE},
"ListOnMasterServer": ${SERVER_LIST},
"AutoSaveCount": ${SAVE_COUNT},
"AutoSaveInterval": ${SAVE_INTERVAL},
"GameSettingsPreset": "${GAME_SETTINGS_PRESET}",
"AdminOnlyDebugEvents": ${ADMIN_ONLY_DEBUG_EVENTS},
"DisableDebugEvents": ${DEBUG_EVENTS},
"Rcon": {
"Enabled": ${RCON},
"Password": "${RCON_PASS}",
"Port": ${RCON_PORT}
}
}
EOF
## cleanup to prevent errors
echo -e "${BLUE}-------------------------------------------------${NC}"
echo -e "${RED}deleting old wine dirs... please wait...${NC}"
echo -e "${BLUE}-------------------------------------------------${NC}"
if [ ! -d "/mnt/server/.wine" ]; then
rm -fR /mnt/server/.wine
rm -fR /mnt/server/.config
rm -fR /mnt/server/.cache
rm -fR /mnt/server/.local
rm -fR /mnt/server/appcache
fi
echo -e "${GREEN}..done..${NC}"
echo -e "${BLUE}-------------------------------------------------${NC}"
echo -e "${GREEN}Installation completed${NC}"
echo -e "${BLUE}-------------------------------------------------${NC}"
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v2",
"update_url": "https://eggs.pterodactyl.top/eggs/132/download/egg-v-rising-bepinex.json"
},
"exported_at": "2024-12-26T10:54:32+01:00",
"name": "V Rising BepInEx",
"author": "red_thirten@yahoo.com",
"description": "化身为吸血鬼苏醒。在附近的定居点猎取鲜血以恢复力量,躲避灼热的阳光以求生存。建造你的城堡,在充满神秘、不断变化的开放世界中繁荣发展。在线招募盟友,征服生者的领地。",
"features": [
"steam_disk_space"
],
"docker_images": {
"registry.cn-shanghai.aliyuncs.com/pterodactyl-images/yolks:wine_staging": "registry.cn-shanghai.aliyuncs.com/pterodactyl-images/yolks:wine_staging"
},
"file_denylist": [],
"startup": "WINEDLLOVERRIDES=\"winhttp=n,b\"; xvfb-run wine ./VRisingServer.exe -persistentDataPath save-data -address 0.0.0.0",
"config": {
"files": "{\r\n \"save-data/Settings/ServerHostSettings.json\": {\r\n \"parser\": \"json\",\r\n \"find\": {\r\n \"Name\": \"{{server.build.env.SERVER_NAME}}\",\r\n \"Description\": \"{{server.build.env.DESCRIPTION}}\",\r\n \"Port\": \"{{server.build.default.port}}\",\r\n \"QueryPort\": \"{{server.build.env.QUERY_PORT}}\",\r\n \"MaxConnectedUsers\": \"{{server.build.env.MAX_PLAYERS}}\",\r\n \"MaxConnectedAdmins\": \"{{server.build.env.MAX_ADMINS}}\",\r\n \"ServerFps\": \"{{server.build.env.FPS}}\",\r\n \"SaveName\": \"{{server.build.env.SAVE_NAME}}\",\r\n \"Password\": \"{{server.build.env.SERVER_PASSWORD}}\",\r\n \"Secure\": \"{{server.build.env.SERVER_SECURE}}\",\r\n \"ListOnSteam\": \"{{server.build.env.SERVER_LIST}}\",\r\n \"ListOnEOS\": \"{{server.build.env.SERVER_LIST}}\",\r\n \"AutoSaveCount\": \"{{server.build.env.SAVE_COUNT}}\",\r\n \"AutoSaveInterval\": \"{{server.build.env.SAVE_INTERVAL}}\",\r\n \"GameSettingsPreset\": \"{{server.build.env.GAME_SETTINGS_PRESET}}\",\r\n \"AdminOnlyDebugEvents\": \"{{server.build.env.ADMIN_ONLY_DEBUG_EVENTS}}\",\r\n \"DisableDebugEvents\": \"{{server.build.env.DEBUG_EVENTS}}\",\r\n \"Rcon.Enabled\": \"{{server.build.env.RCON}}\",\r\n \"Rcon.Password\": \"{{server.build.env.RCON_PASS}}\",\r\n \"Rcon.Port\": \"{{server.build.env.RCON_PORT}}\"\r\n }\r\n }\r\n}",
"startup": "{\r\n \"done\": \"Loaded ServerGameSettings\"\r\n}",
"logs": "{}",
"stop": "^C"
},
"scripts": {
"installation": {
"script": "#!/bin/bash\r\n\r\n## File: Pterodactyl V Rising Egg - egg-v-rising.json\r\n## Authors: David Wolfe (Red-Thirten), Kapatheus\r\n## Date: 2022/05/28\r\n## License: MIT License\r\n## Image to install with is 'registry.cn-shanghai.aliyuncs.com/pterodactyl-images/installers:debian'\r\n\r\nclear\r\nRED='\\033[0;31m'\r\nGREEN='\\033[0;32m'\r\nYELLOW='\\033[1;33m'\r\nBLUE='\\033[0;34m'\r\nNC='\\033[0m'\r\n\r\n# Install packages. Default packages below are skipped if using image noted above, thus speeding up the install process.\r\napt -y update\r\napt -y --no-install-recommends install curl jq unzip wget\r\n# Download and install SteamCMD\r\necho -e \"${YELLOW}download and install steamcmd${NC}\"\r\n\r\nexport HOME=/mnt/server\r\ncd /tmp\r\nmkdir -p $HOME/steamcmd $HOME/steamapps\r\ncurl -sSL -o steamcmd.tar.gz https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C $HOME/steamcmd\r\ncd $HOME/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root /mnt\r\n\r\n# Install game server using SteamCMD\r\necho -e \"${YELLOW}install V Rising with SteamCMD${NC}\"\r\n\r\n./steamcmd.sh +force_install_dir $HOME +login anonymous $( [[ \"${WINDOWS_INSTALL}\" == \"1\" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} +quit\r\n\r\n# Set up 32 and 64 bit libraries\r\nmkdir -p $HOME/.steam/sdk{32,64}\r\ncp -v linux32/steamclient.so $HOME/.steam/sdk32/steamclient.so\r\ncp -v linux64/steamclient.so $HOME/.steam/sdk64/steamclient.so\r\n\r\n# Enable BEPINEX (Credits to: https://github.com/ricin/vrising-bepinex-linux/blob/main/scripts/start-server.sh)\r\necho -e \"${YELLOW}installing BepInex${NC}\"\r\n\r\n#variables\r\nBEPINEX_VR_TS_URL=https://v-rising.thunderstore.io/package/BepInEx/BepInExPack_V_Rising/\r\nCUR_V=\"$(find ${HOME} -maxdepth 1 -name \"BepInEx-*\" | cut -d '-' -f2)\"\r\nBEPINEX_VR_API_DATA=\"$(curl -s -X GET https://thunderstore.io/c/v-rising/api/v1/package/b86fcaaf-297a-45c8-82a0-fcbd7806fdc4/ -H \"accept: application/json\")\"\r\nLAT_V=\"$(echo ${BEPINEX_VR_API_DATA} | jq -r '.versions[0].version_number')\"\r\n\r\nif [ -z \"${LAT_V}\" ] && [ -z \"${CUR_V}\" ]; then\r\n echo -e \"${RED}Can't get latest version of BepInEx for V Rising!${NC}\"\r\n echo -e \"${RED}Please try to run without BepInEx for V Rising. Exiting.${NC}\"\r\n exit 1\r\nfi\r\n\r\nif [ -f ${HOME}/BepInEx.zip ]; then\r\n rm -rf ${HOME}/BepInEx.zip\r\nfi\r\nif [ -f ${HOME}/doorstop_config.ini ]; then\r\n sed -i \"/enabled=false/c\\enabled=true\" ${HOME}/doorstop_config.ini\r\nfi\r\n\r\necho -e \"${YELLOW}BepInEx for V Rising Version Check${NC}\"\r\necho -e \"${YELLOW}More info: ${BEPINEX_VR_TS_URL}${NC}\"\r\n\r\nBEPINEX_VR_TS_DOWNLOAD_URL=\"$(echo ${BEPINEX_VR_API_DATA} | jq -r '.versions[0].download_url')\"\r\nif [ -z \"${CUR_V}\" ]; then\r\n echo -e \"${YELLOW}BepInEx for V Rising not found, downloading and installing v${LAT_V} ...${NC}\"\r\n \r\n cd ${HOME}\r\n rm -rf ${HOME}/BepInEx-*\r\n if wget -q -nc --show-progress --progress=bar:force:noscroll -O ${HOME}/BepInEx.zip --user-agent=Mozilla --content-disposition -E -c \"${BEPINEX_VR_TS_DOWNLOAD_URL}\" ; then\r\n echo -e \"${GREEN}Successfully downloaded BepInEx for V Rising v${LAT_V}${NC}\"\r\n else\r\n echo -e \"${RED}Something went wrong, can't download BepInEx for V Rising v${LAT_V}. Exiting.${NC}\"\r\n exit 1\r\n fi\r\n \r\n mkdir -p /tmp/BepInEx\r\n unzip -o ${HOME}/BepInEx.zip -d /tmp/BepInEx\r\n if [ $? -eq 0 ];then\r\n touch ${HOME}/BepInEx-${LAT_V}\r\n cp -rf /tmp/BepInEx/BepInEx*/* ${HOME}/\r\n cp /tmp/BepInEx/README* ${HOME}/README_BepInEx_for_VRising.txt\r\n rm -rf ${HOME}/BepInEx.zip /tmp/BepInEx\r\n else\r\n echo -e \"${RED}Unable to unzip BepInEx archive! Exiting.${NC}\"\r\n exit 1\r\n fi\r\nelif [ \"$CUR_V\" != \"${LAT_V}\" ]; then\r\n echo -e \"${YELLOW}Version missmatch, BepInEx v$CUR_V installed, downloading and installing v${LAT_V} ...${NC}\"\r\n \r\n cd ${HOME}\r\n rm -rf ${HOME}/BepInEx-$CUR_V\r\n mkdir /tmp/Backup\r\n cp -R ${HOME}/BepInEx/config /tmp/Backup/\r\n if wget -q -nc --show-progress --progress=bar:force:noscroll -O ${HOME}/BepInEx.zip --user-agent=Mozilla --content-disposition -E -c \"${BEPINEX_VR_TS_DOWNLOAD_URL}\" ; then\r\n echo -e \"${GREEN}Successfully downloaded BepInEx for V Rising v${LAT_V}${NC}\"\r\n else\r\n echo -e \"${RED}Unable to download BepInEx for V Rising v${LAT_V}. Exiting.${NC}\"\r\n exit 1\r\n fi\r\n \r\n unzip -o ${HOME}/BepInEx.zip -d /tmp/BepInEx \r\n \r\n if [ $? -eq 0 ];then\r\n cp -rf /tmp/BepInEx/BepInEx*/* ${HOME}/\r\n cp /tmp/BepInEx/README* ${HOME}/README_BepInEx_for_VRising.txt\r\n touch ${HOME}/BepInEx-${LAT_V}\r\n cp -R /tmp/Backup/config ${HOME}/BepInEx/\r\n rm -rf ${HOME}/BepInEx.zip /tmp/BepInEx /tmp/Backup\r\n else\r\n echo -e \"${RED}Unable to unzip BepInEx archive! Exiting.${NC}\"\r\n exit 1\r\n fi\r\nelif [ \"${CUR_V}\" == \"${LAT_V}\" ]; then\r\n echo -e \"${GREEN}BepInEx v$CUR_V up-to-date!${NC}\"\r\nfi\r\n\r\nrm -fR /mnt/server/dotnet\r\n\r\n## V Rising Setup\r\nmkdir -p $HOME/save-data/Settings && cd \"$_\"\r\ncat > ServerHostSettings.json << EOF\r\n{\r\n \"Name\": \"${SERVER_NAME}\",\r\n \"Description\": \"${DESCRIPTION}\",\r\n \"Port\": ${SERVER_PORT},\r\n \"QueryPort\": ${QUERY_PORT},\r\n \"MaxConnectedUsers\": ${MAX_PLAYERS},\r\n \"MaxConnectedAdmins\": ${MAX_ADMINS},\r\n \"ServerFps\": ${FPS},\r\n \"SaveName\": \"${SAVE_NAME}\",\r\n \"Password\": \"${SERVER_PASSWORD}\",\r\n \"Secure\": ${SERVER_SECURE},\r\n \"ListOnMasterServer\": ${SERVER_LIST},\r\n \"AutoSaveCount\": ${SAVE_COUNT},\r\n \"AutoSaveInterval\": ${SAVE_INTERVAL},\r\n \"GameSettingsPreset\": \"${GAME_SETTINGS_PRESET}\",\r\n \"AdminOnlyDebugEvents\": ${ADMIN_ONLY_DEBUG_EVENTS},\r\n \"DisableDebugEvents\": ${DEBUG_EVENTS},\r\n \"Rcon\": {\r\n \"Enabled\": ${RCON},\r\n \"Password\": \"${RCON_PASS}\",\r\n \"Port\": ${RCON_PORT}\r\n }\r\n}\r\nEOF\r\n\r\n## cleanup to prevent errors\r\necho -e \"${BLUE}-------------------------------------------------${NC}\"\r\necho -e \"${RED}deleting old wine dirs... please wait...${NC}\"\r\necho -e \"${BLUE}-------------------------------------------------${NC}\"\r\n\r\nif [ ! -d \"/mnt/server/.wine\" ]; then\r\n rm -fR /mnt/server/.wine\r\n rm -fR /mnt/server/.config\r\n rm -fR /mnt/server/.cache\r\n rm -fR /mnt/server/.local\r\n rm -fR /mnt/server/appcache\r\nfi\r\necho -e \"${GREEN}..done..${NC}\"\r\n\r\necho -e \"${BLUE}-------------------------------------------------${NC}\"\r\necho -e \"${GREEN}Installation completed${NC}\"\r\necho -e \"${BLUE}-------------------------------------------------${NC}\"",
"container": "registry.cn-shanghai.aliyuncs.com/pterodactyl-images/installers:debian",
"entrypoint": "/bin/bash"
}
},
"variables": [
{
"name": "[必需] 服务器查询端口",
"description": "Steam服务器列表功能的UDP端口。",
"env_variable": "QUERY_PORT",
"default_value": "9877",
"user_viewable": true,
"user_editable": false,
"rules": "required|integer|between:1024,65536",
"field_type": "text"
},
{
"name": "自动更新",
"description": "启动时快速检查服务器更新,并在必要时进行更新。",
"env_variable": "AUTO_UPDATE",
"default_value": "1",
"user_viewable": true,
"user_editable": true,
"rules": "boolean",
"field_type": "text"
},
{
"name": "游戏设置预设",
"description": "服务器应运行的游戏设置预设。部分设置在存档文件首次创建后可能无法生效。若使用单人模式上传的存档或 `~/save-data/Settings/` 目录下的自定义 ServerGameSettings.json 文件,请留空/设为 null。",
"env_variable": "GAME_SETTINGS_PRESET",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string|in:,DuoPvP,HardcorePvP,Level30PvE,Level30PvP,Level50PvE,Level50PvP,Level70PvE,Level70PvP,SoloPvP,StandardPvE_Easy,StandardPvE_Hard,StandardPvE,StandardPvP_Easy,StandardPvP_Hard,StandardPVP",
"field_type": "text"
},
{
"name": "服务器名称",
"description": "在服务器列表中显示的服务器名称。",
"env_variable": "SERVER_NAME",
"default_value": "V Rising Dedicated Server",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
"field_type": "text"
},
{
"name": "服务器描述",
"description": "服务器用途、规则及每日消息的简短描述。",
"env_variable": "DESCRIPTION",
"default_value": "Welcome to the server!",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string",
"field_type": "text"
},
{
"name": "最大连接用户数",
"description": "服务器上最大并发玩家数。",
"env_variable": "MAX_PLAYERS",
"default_value": "40",
"user_viewable": true,
"user_editable": true,
"rules": "required|integer|min:1",
"field_type": "text"
},
{
"name": "最大连接管理员数",
"description": "服务器满员时允许连接的最大管理员数量。",
"env_variable": "MAX_ADMINS",
"default_value": "4",
"user_viewable": true,
"user_editable": true,
"rules": "required|integer|min:0",
"field_type": "text"
},
{
"name": "服务器密码",
"description": "加入服务器需要密码。留空则无需密码。",
"env_variable": "SERVER_PASSWORD",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string",
"field_type": "text"
},
{
"name": "保存名称",
"description": "保存文件/目录的名称。",
"env_variable": "SAVE_NAME",
"default_value": "world1",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
"field_type": "text"
},
{
"name": "自动保存计数",
"description": "保留的自动存档数量。",
"env_variable": "SAVE_COUNT",
"default_value": "50",
"user_viewable": true,
"user_editable": true,
"rules": "required|integer|min:0",
"field_type": "text"
},
{
"name": "自动保存间隔",
"description": "每次自动保存之间的间隔(秒)。",
"env_variable": "SAVE_INTERVAL",
"default_value": "600",
"user_viewable": true,
"user_editable": true,
"rules": "required|integer|min:1",
"field_type": "text"
},
{
"name": "在主服务器上列出",
"description": "设置为 true 以在服务器列表中显示,否则设置为 false。",
"env_variable": "SERVER_LIST",
"default_value": "true",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|in:true,false",
"field_type": "text"
},
{
"name": "[修复] 验证服务器文件",
"description": "留空(无值)表示关闭,或输入 \"true\" 或 \"1\" 表示开启。当自动更新启用时,验证所有服务器文件。注意:这将显著增加服务器启动时间,因此建议仅在需要时启用此功能。",
"env_variable": "VALIDATE",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "string|nullable",
"field_type": "text"
},
{
"name": "[高级] 服务器 FPS",
"description": "服务器刷新频率。(默认值:30)",
"env_variable": "FPS",
"default_value": "30",
"user_viewable": true,
"user_editable": true,
"rules": "required|integer|min:1",
"field_type": "text"
},
{
"name": "[高级] 启用 RCON",
"description": "关于如何连接和使用RCON的信息,请参见以下链接:https://github.com/StunlockStudios/vrising-dedicated-server-instructions#rcon",
"env_variable": "RCON",
"default_value": "false",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|in:true,false",
"field_type": "text"
},
{
"name": "[高级] RCON 密码",
"description": "启用RCON时连接所需的密码。",
"env_variable": "RCON_PASS",
"default_value": "somepassword",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
"field_type": "text"
},
{
"name": "[高级] RCON 端口",
"description": "用于连接RCON的端口。必须分配给服务器才能使RCON正常工作。",
"env_variable": "RCON_PORT",
"default_value": "25575",
"user_viewable": true,
"user_editable": false,
"rules": "required|integer|between:1024,65536",
"field_type": "text"
},
{
"name": "[高级] 安全服务器",
"description": "(真或假)",
"env_variable": "SERVER_SECURE",
"default_value": "true",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|in:true,false",
"field_type": "text"
},
{
"name": "[高级] 仅管理员调试事件",
"description": "(真或假)",
"env_variable": "ADMIN_ONLY_DEBUG_EVENTS",
"default_value": "true",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|in:true,false",
"field_type": "text"
},
{
"name": "[高级] 禁用调试事件",
"description": "(真或假)",
"env_variable": "DEBUG_EVENTS",
"default_value": "false",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|in:true,false",
"field_type": "text"
},
{
"name": "[高级] V Rising 专用服务器应用 ID",
"description": "用于安装和更新。通常无需更改。",
"env_variable": "SRCDS_APPID",
"default_value": "1829350",
"user_viewable": false,
"user_editable": false,
"rules": "required|integer",
"field_type": "text"
},
{
"name": "[高级] 使用 Windows 分支",
"description": "告知安装程序/更新程序仅下载服务器的Windows分支(目前唯一可用的分支),以便其能在Wine上运行。此设置不可更改。",
"env_variable": "WINDOWS_INSTALL",
"default_value": "1",
"user_viewable": false,
"user_editable": false,
"rules": "required|string|in:1",
"field_type": "text"
},
{
"name": "WINEDEBUG",
"description": "",
"env_variable": "WINEDEBUG",
"default_value": "-all",
"user_viewable": false,
"user_editable": false,
"rules": "required|string|max:20",
"field_type": "text"
},
{
"name": "WINEPATH",
"description": "",
"env_variable": "WINEPATH",
"default_value": "/home/container",
"user_viewable": false,
"user_editable": false,
"rules": "required|string|max:20",
"field_type": "text"
},
{
"name": "XVFB",
"description": "",
"env_variable": "XVFB",
"default_value": "1",
"user_viewable": false,
"user_editable": false,
"rules": "boolean",
"field_type": "text"
},
{
"name": "WINETRICKS_RUN",
"description": "",
"env_variable": "WINETRICKS_RUN",
"default_value": "mono",
"user_viewable": false,
"user_editable": false,
"rules": "required|string|max:50",
"field_type": "text"
},
{
"name": "WINEARCH",
"description": "",
"env_variable": "WINEARCH",
"default_value": "win64",
"user_viewable": false,
"user_editable": false,
"rules": "required|string|max:20",
"field_type": "text"
}
]
}附属文件
暂无附属文件
提交历史
Fork 关系
查看关系图暂无 Fork,成为第一个 Fork 的人吧!