-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSpaceEngineers_default.ps1
More file actions
243 lines (237 loc) · 11.1 KB
/
SpaceEngineers_default.ps1
File metadata and controls
243 lines (237 loc) · 11.1 KB
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
Function New-LaunchScriptSEserverPS {
# Space Engineers Dedicated Server
# 298740
# https://www.spaceengineersgame.com/dedicated-servers.html
################## Change Default Variables #################
# Server IP
${global:ip} = "${ip}"
# Server Port
${global:port} = "27015"
# Maxplayers
$global:maxplayers = "20"
# Server Name
$global:hostname = "SERVERNAME"
# World Name
$global:worldname = "WorldName"
# World template
$global:customworlds = "Alien Planet"
##############################/\##############################
## World templates ##
# Alien Planet
# Crashed Red Ship
# Dead Drop Arena
# Earth Planet
# Empty World
# Green Station
# Lone Survivor
# Mars Planet
# Moon Base
# Red Ship
# Rival Platforms
# Star System
###############
# You can run SpaceEngineersDedicated.executable with the following arguments
# -console: skips instance selection dialog, dedicated server configuration dialog, and goes directly to console application
# -noconsole: will run without black console window
# -path: will load config and store all files in path specified ("D:\Whatever\Something" in example)
# -ignorelastsession: ignores last automatic save of the world and uses values from config file
# -maxPlayers : overrides maximum players that can be in session
# -ip: overrides ip address of dedicated server stored in config file
# -port: overrides port value stored in config file
# taskkill /IM SpaceEngineersDedicated.executable
# This will stop the dedicated server correctly, saving the world etc.
# To stop it immediately add argument "/f", which will kill the server without asking to stop and without saving the world.
################### WorkShop Install change below #####################
# Advanced Steam WorkShop Mods COnfiguration
# Mod Directory
$global:moddir = "$serverdir\Content\Mods"
# steam appID for SE regular game (workshop content tied to this appID)
$global:reg_appID = '244850'
# list of mods to download and copy to server mod folder
$global:wsmods = "@('899070352', '877084878')"
###################### Do not change below #############################
# System Directory
$global:systemdir = "$serverdir"
# Server Executable
$global:executable = "SpaceEngineersDedicated"
# Server Executable Directory
$global:executabledir = "$serverdir\DedicatedServer64"
# Appdata\Roaming Directory
$global:saves = "SpaceEngineersDedicated"
# Gamedig Query
$global:querytype = "protocol-valve"
# Game Process
$global:process = "SpaceEngineersDedicated"
# Log Directory
$global:logdirectory = "$env:APPDATA\$saves"
# Server Log
$global:consolelog = "SpaceEngineersDedicated_*.log"
# Server Config Directory
$global:servercfgdir = "$env:APPDATA\$saves"
# Server Launch Command
$global:launchParams = '@("${executable} -console -ip ${ip} -port ${port} -maxPlayers ${maxplayers}")'
# Advanced must be set to "0"
Get-UserInput
# Install Adjustment
New-servercfgse
Add-Content $ssmlog "[$loggingdate] Creating $servercfgdir\Saves\$WORLDNAME"
New-Item "$servercfgdir\Saves\$WORLDNAME\" -ItemType directory -Force -ErrorAction SilentlyContinue | Out-File -Append -Encoding Default $ssmlog
Add-Content $ssmlog "[$loggingdate] Copy $serverfiles\Content\CustomWorlds\$CustomWorlds\* $servercfgdir\Saves\$WORLDNAME\"
copy-item "$serverfiles\Content\CustomWorlds\$CustomWorlds\*" "$servercfgdir\Saves\$WORLDNAME\" -ErrorAction SilentlyContinue | Out-File -Append -Encoding Default $ssmlog
}
Function New-servercfgse {
New-Item $servercfgdir\SpaceEngineers-Dedicated.cfg -ItemType File -Force | Out-File -Append -Encoding Default $ssmlog
Add-Content $servercfgdir\SpaceEngineers-Dedicated.cfg `
"<?xml version=`"1.0`"?>
<MyConfigDedicated xmlns:xsd=`"http://www.w3.org/2001/XMLSchema`" xmlns:xsi=`"http://www.w3.org/2001/XMLSchema-instance`">
<SessionSettings>
<GameMode>Survival</GameMode>
<InventorySizeMultiplier>3</InventorySizeMultiplier>
<BlocksInventorySizeMultiplier>1</BlocksInventorySizeMultiplier>
<AssemblerSpeedMultiplier>3</AssemblerSpeedMultiplier>
<AssemblerEfficiencyMultiplier>3</AssemblerEfficiencyMultiplier>
<RefinerySpeedMultiplier>3</RefinerySpeedMultiplier>
<OnlineMode>PUBLIC</OnlineMode>
<MaxPlayers>4</MaxPlayers>
<MaxFloatingObjects>56</MaxFloatingObjects>
<MaxBackupSaves>5</MaxBackupSaves>
<MaxGridSize>0</MaxGridSize>
<MaxBlocksPerPlayer>0</MaxBlocksPerPlayer>
<TotalPCU>100000</TotalPCU>
<PiratePCU>50000</PiratePCU>
<MaxFactionsCount>0</MaxFactionsCount>
<BlockLimitsEnabled>GLOBALLY</BlockLimitsEnabled>
<EnableRemoteBlockRemoval>true</EnableRemoteBlockRemoval>
<EnvironmentHostility>SAFE</EnvironmentHostility>
<AutoHealing>true</AutoHealing>
<EnableCopyPaste>false</EnableCopyPaste>
<WeaponsEnabled>true</WeaponsEnabled>
<ShowPlayerNamesOnHud>true</ShowPlayerNamesOnHud>
<ThrusterDamage>true</ThrusterDamage>
<CargoShipsEnabled>true</CargoShipsEnabled>
<EnableSpectator>false</EnableSpectator>
<WorldSizeKm>0</WorldSizeKm>
<RespawnShipDelete>false</RespawnShipDelete>
<ResetOwnership>false</ResetOwnership>
<WelderSpeedMultiplier>2</WelderSpeedMultiplier>
<GrinderSpeedMultiplier>2</GrinderSpeedMultiplier>
<RealisticSound>false</RealisticSound>
<HackSpeedMultiplier>0.33</HackSpeedMultiplier>
<PermanentDeath>false</PermanentDeath>
<AutoSaveInMinutes>5</AutoSaveInMinutes>
<EnableSaving>true</EnableSaving>
<InfiniteAmmo>false</InfiniteAmmo>
<EnableContainerDrops>true</EnableContainerDrops>
<SpawnShipTimeMultiplier>0</SpawnShipTimeMultiplier>
<ProceduralDensity>0.35</ProceduralDensity>
<ProceduralSeed>0</ProceduralSeed>
<DestructibleBlocks>true</DestructibleBlocks>
<EnableIngameScripts>false</EnableIngameScripts>
<ViewDistance>15000</ViewDistance>
<EnableToolShake>true</EnableToolShake>
<VoxelGeneratorVersion>4</VoxelGeneratorVersion>
<EnableOxygen>true</EnableOxygen>
<EnableOxygenPressurization>true</EnableOxygenPressurization>
<Enable3rdPersonView>true</Enable3rdPersonView>
<EnableEncounters>true</EnableEncounters>
<EnableConvertToStation>true</EnableConvertToStation>
<StationVoxelSupport>false</StationVoxelSupport>
<EnableSunRotation>true</EnableSunRotation>
<EnableRespawnShips>true</EnableRespawnShips>
<ScenarioEditMode>false</ScenarioEditMode>
<Scenario>false</Scenario>
<CanJoinRunning>false</CanJoinRunning>
<PhysicsIterations>8</PhysicsIterations>
<SunRotationIntervalMinutes>119.999992</SunRotationIntervalMinutes>
<EnableJetpack>true</EnableJetpack>
<SpawnWithTools>true</SpawnWithTools>
<StartInRespawnScreen>false</StartInRespawnScreen>
<EnableVoxelDestruction>true</EnableVoxelDestruction>
<MaxDrones>5</MaxDrones>
<EnableDrones>true</EnableDrones>
<EnableWolfs>false</EnableWolfs>
<EnableSpiders>false</EnableSpiders>
<FloraDensityMultiplier>1</FloraDensityMultiplier>
<EnableStructuralSimulation>false</EnableStructuralSimulation>
<MaxActiveFracturePieces>50</MaxActiveFracturePieces>
<BlockTypeLimits>
<dictionary />
</BlockTypeLimits>
<EnableScripterRole>false</EnableScripterRole>
<MinDropContainerRespawnTime>5</MinDropContainerRespawnTime>
<MaxDropContainerRespawnTime>20</MaxDropContainerRespawnTime>
<EnableTurretsFriendlyFire>false</EnableTurretsFriendlyFire>
<EnableSubgridDamage>false</EnableSubgridDamage>
<SyncDistance>3000</SyncDistance>
<ExperimentalMode>false</ExperimentalMode>
<AdaptiveSimulationQuality>true</AdaptiveSimulationQuality>
<EnableVoxelHand>true</EnableVoxelHand>
<RemoveOldIdentitiesH>0</RemoveOldIdentitiesH>
<TrashRemovalEnabled>true</TrashRemovalEnabled>
<StopGridsPeriodMin>15</StopGridsPeriodMin>
<TrashFlagsValue>1562</TrashFlagsValue>
<AFKTimeountMin>0</AFKTimeountMin>
<BlockCountThreshold>20</BlockCountThreshold>
<PlayerDistanceThreshold>500</PlayerDistanceThreshold>
<OptimalGridCount>0</OptimalGridCount>
<PlayerInactivityThreshold>0</PlayerInactivityThreshold>
<PlayerCharacterRemovalThreshold>15</PlayerCharacterRemovalThreshold>
<VoxelTrashRemovalEnabled>false</VoxelTrashRemovalEnabled>
<VoxelPlayerDistanceThreshold>5000</VoxelPlayerDistanceThreshold>
<VoxelGridDistanceThreshold>5000</VoxelGridDistanceThreshold>
<VoxelAgeThreshold>24</VoxelAgeThreshold>
<EnableResearch>true</EnableResearch>
<EnableGoodBotHints>true</EnableGoodBotHints>
<OptimalSpawnDistance>16000</OptimalSpawnDistance>
<EnableAutorespawn>true</EnableAutorespawn>
<EnableBountyContracts>true</EnableBountyContracts>
<EnableSupergridding>false</EnableSupergridding>
<EnableEconomy>false</EnableEconomy>
<DepositsCountCoefficient>2</DepositsCountCoefficient>
<DepositSizeDenominator>30</DepositSizeDenominator>
<HarvestRatioMultiplier>1</HarvestRatioMultiplier>
<TradeFactionsCount>15</TradeFactionsCount>
<StationsDistanceInnerRadius>10000000</StationsDistanceInnerRadius>
<StationsDistanceOuterRadiusStart>10000000</StationsDistanceOuterRadiusStart>
<StationsDistanceOuterRadiusEnd>30000000</StationsDistanceOuterRadiusEnd>
<EconomyTickInSeconds>1200</EconomyTickInSeconds>
</SessionSettings>
<LoadWorld>$servercfgdir\Saves\$WORLDNAME</LoadWorld>
<IP>0.0.0.0</IP>
<SteamPort>8766</SteamPort>
<ServerPort>27016</ServerPort>
<AsteroidAmount>0</AsteroidAmount>
<Administrators />
<Banned />
<GroupID>0</GroupID>
<ServerName>$hostname</ServerName>
<WorldName>$WORLDNAME</WorldName>
<PauseGameWhenEmpty>false</PauseGameWhenEmpty>
<MessageOfTheDay />
<MessageOfTheDayUrl />
<AutoRestartEnabled>true</AutoRestartEnabled>
<AutoRestatTimeInMin>0</AutoRestatTimeInMin>
<AutoRestartSave>true</AutoRestartSave>
<AutoUpdateEnabled>false</AutoUpdateEnabled>
<AutoUpdateCheckIntervalInMin>10</AutoUpdateCheckIntervalInMin>
<AutoUpdateRestartDelayInMin>15</AutoUpdateRestartDelayInMin>
<AutoUpdateSteamBranch />
<AutoUpdateBranchPassword />
<IgnoreLastSession>false</IgnoreLastSession>
<PremadeCheckpointPath></PremadeCheckpointPath>
<ServerDescription />
<ServerPasswordHash />
<ServerPasswordSalt>WVaBxgcY5v30SvAsj6r2zw==</ServerPasswordSalt>
<Reserved />
<RemoteApiEnabled>true</RemoteApiEnabled>
<RemoteSecurityKey>/7YM8v7xAVgy/qE09myPag==</RemoteSecurityKey>
<RemoteApiPort>8080</RemoteApiPort>
<Plugins />
<WatcherInterval>30</WatcherInterval>
<WatcherSimulationSpeedMinimum>0.05</WatcherSimulationSpeedMinimum>
<ManualActionDelay>5</ManualActionDelay>
<ManualActionChatMessage>Server will be shut down in {0} min(s).</ManualActionChatMessage>
<AutodetectDependencies>true</AutodetectDependencies>
<SaveChatToLog>false</SaveChatToLog>
</MyConfigDedicated>"
}