-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathark.sh
executable file
·114 lines (109 loc) · 3.42 KB
/
ark.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/bin/sh
#------------------------------------------------
# 启动 ARK 服务(docker 内执行)
# 更多配置参数见: https://ark.fandom.com/wiki/Server_configuration
#------------------------------------------------
# 示例:bin/run_ark.sh
# [-s ${ServerName}] # 服务器名称(在 steam 服务器上看到的)
# [-m ${MapName}] # 地图名
# [-c ${PlayerAmount}] # 最大玩家数
# [-p ${ServerPassword}] # 服务器密码
# [-a ${AminPassword}] # 管理员密码
# [-d ${Difficulty}] # 游戏难度
# [-h ${HarvestAmount}] # 资源获得倍率
# [-t ${TamingSpeed}] # 驯服恐龙倍率
# [-r ${ResourcesRespawnPeriod}] # 资源重生倍率
# [-g ${CropGrowthSpeed}] # 作物生长倍率
# [-x ${XPMultiplier}] # 经验获得倍率
# [-i ${ModIds}] # 地图 MOD ID 列表,用英文逗号分隔
#------------------------------------------------
# ARK 服务端安装路径
STEAM_ARK_DIR="/home/steam/games/ark"
# 服务器名称(在 steam 服务器列表上看到的名称)
SERVER_NAME="EXP_ARK_Server"
# 地图名
SERVER_MAP="TheIsland"
# 创意工坊的 MOD ID 列表,用英文逗号分隔
GAME_MOD_IDS=""
# 最大玩家数
MAX_PLAYERS=10
# 玩家加入服务器时需要提供的密码
SERVER_PASSWORD="EXP123456"
# 管理员通过 RCON 在线管理服务器的密码
ADMIN_PASSWORD="ADMIN654321"
# 服务端管理工具 RCON 的连接端口
RCON_PORT=32330
# 游戏难度
DIFFICULTY_MULT="0.2"
# 资源获得倍率
HARVEST_MULT="1.0"
# 驯服恐龙倍率
TAMING_MULT="1.0"
# 资源重生倍率
RESOURCE_MULT="1.0"
# 作物生长倍率
GROWTH_MULT="1.0"
# 经验获得倍率
XP_MULT="1.0"
set -- `getopt s:m:c:p:a:d:h:t:r:g:x:i: "$@"`
while [ -n "$1" ]
do
case "$1" in
-s) SERVER_NAME="$2"
shift ;;
-m) SERVER_MAP="$2"
shift ;;
-c) MAX_PLAYERS="$2"
shift ;;
-p) SERVER_PASSWORD="$2"
shift ;;
-a) ADMIN_PASSWORD="$2"
shift ;;
-d) DIFFICULTY_MULT="$2"
shift ;;
-h) HARVEST_MULT="$2"
shift ;;
-t) TAMING_MULT="$2"
shift ;;
-r) RESOURCE_MULT="$2"
shift ;;
-g) GROWTH_MULT="$2"
shift ;;
-x) XP_MULT="$2"
shift ;;
-i) GAME_MOD_IDS="$2"
shift ;;
esac
shift
done
nohup ${STEAM_ARK_DIR}/ShooterGame/Binaries/Linux/ShooterGameServer ${SERVER_MAP}?listen\
?SessionName=${SERVER_NAME}\
?MaxPlayers=${MAX_PLAYERS}\
?ServerPassword=${SERVER_PASSWORD}\
?ServerAdminPassword=${ADMIN_PASSWORD}\
?serverPVE=True\
?RCONEnabled=True\
?RCONPort=${RCON_PORT}\
?GameModIds=${GAME_MOD_IDS}\
?ActiveMods=${GAME_MOD_IDS}\
?EnableExtraStructurePreventionVolumes=False\
?PVEAllowStructuresAtSupplyDrops=True\
?AllowCaveBuildingPVE=True\
?ShowFloatingDamageText=True\
?AllowFlyerCarryPvE=True\
?bAllowPlatformSaddleMultiFloors=True\
?DifficultyOffset=${DIFFICULTY_MULT}\
?HarvestAmountMultiplier=${HARVEST_MULT}\
?TamingSpeedMultiplier=${TAMING_MULT}\
?ResourcesRespawnPeriodMultiplier=${RESOURCE_MULT}\
?CropGrowthSpeedMultiplier=${GROWTH_MULT}\
?XPMultiplier=${XP_MULT}\
?ServerAutoForceRespawnWildDinosInterval\
-AutoDestroyStructures \
-NoBattlEye \
-crossplay \
-usecache \
-server \
-servergamelog \
-log \
&