Browse Source

Improved Project Zomboid Support

- updated config (removed IDs, they will be generated at server start)
- added ip and admin password start parameter
- added more variables to details
pull/954/head
Marvin Lehmann 9 years ago
parent
commit
278388ff39
  1. 26
      ProjectZomboid/cfg/lgsm-default.ini
  2. 5
      ProjectZomboid/pzserver
  3. 2
      lgsm/functions/check_deps.sh
  4. 15
      lgsm/functions/info_config.sh

26
ProjectZomboid/cfg/lgsm-default.ini

@ -14,10 +14,8 @@ SafetyToggleTimer=100
SafetyCooldownTimer=120
SpawnItems=
DefaultPort=16261
ResetID=834499345
Mods=
Map=Muldraugh, KY
SpawnRegions=servertest_spawnregions.lua
DoLuaChecksum=true
Public=false
PublicName=pzserver
@ -33,7 +31,7 @@ NoFireSpread=false
NoFire=false
AnnounceDeath=false
MinutesPerPage=1.0
HoursForCorpseRemoval=0
HoursForCorpseRemoval=0.0
SaveWorldEveryMinutes=0
PlayerSafehouse=false
AdminSafehouse=false
@ -44,3 +42,25 @@ SafehouseAllowRespawn=false
SafehouseDaySurvivedToClaim=0
SafeHouseRemovalTime=144
AllowDestructionBySledgehammer=true
KickFastPlayers=false
RCONPort=27015
RCONPassword=
Password=
MaxAccountsPerUser=0
SleepAllowed=false
SleepNeeded=false
SteamPort1=8766
SteamPort2=8767
WorkshopItems=
SteamScoreboard=true
SteamVAC=true
UPnP=true
UPnPLeaseTime=86400
UPnPZeroLeaseTimeFallback=true
UPnPForce=true
CoopServerLaunchTimeout=20
CoopMasterPingTimeout=60
server_browser_announced_ip=
UseTCPForMapDownloads=false
PlayerRespawnWithSelf=false
PlayerRespawnWithOther=false

5
ProjectZomboid/pzserver

@ -10,7 +10,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi
version="210516"
version="290716"
#### Variables ####
@ -31,11 +31,12 @@ steamuser="anonymous"
steampass=""
# Start Variables
adminpassword="CHANGE_ME"
ip="0.0.0.0"
updateonstart="off"
fn_parms(){
parms=""
parms="-ip ${ip} -adminpassword \"${adminpassword}\""
}
#### Advanced Variables ####

2
lgsm/functions/check_deps.sh

@ -163,6 +163,7 @@ if [ -n "$(command -v dpkg-query)" ]; then
# Brainbread 2 and Don't Starve Together
elif [ "${gamename}" == "Brainbread 2" ]||[ "${gamename}" == "Don't Starve Together" ]; then
array_deps_required+=( libcurl4-gnutls-dev:i386 )
# Project Zomboid
elif [ "${engine}" == "projectzomboid" ]; then
array_deps_required+=( openjdk-7-jre )
# Unreal engine
@ -209,6 +210,7 @@ elif [ -n "$(command -v yum)" ]; then
# Brainbread 2 and Don't Starve Together
elif [ "${gamename}" == "Brainbread 2" ]||[ "${gamename}" == "Don't Starve Together" ]; then
array_deps_required+=( libcurl.i686 )
# Project Zomboid
elif [ "${engine}" == "projectzomboid" ]; then
array_deps_required+=( java-1.7.0-openjdk )
# Unreal engine

15
lgsm/functions/info_config.sh

@ -70,17 +70,26 @@ fn_info_config_dontstarve(){
fn_info_config_projectzomboid(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
serverpassword="${unavailable}"
rconpassword="${unavailable}"
slots="${zero}"
port="${zero}"
gameworld="${unavailable}"
else
servername=$(grep "PublicName=" "${servercfgfullpath}" | sed 's/PublicName=//g' | tr -d '=", \n')
servername=$(grep "PublicName=" "${servercfgfullpath}" | sed 's/PublicName=//g' | tr -d '\')
serverpassword=$(grep "^Password=$" "${servercfgfullpath}" | sed 's/Password=//g' | tr -d '\')
rconpassword=$(grep "RCONPassword=" "${servercfgfullpath}" | sed 's/RCONPassword=//g' | tr -d '\')
slots=$(grep "MaxPlayers=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
port=$(grep "DefaultPort=" "${servercfgfullpath}" | tr -cd '[:digit:]')
gameworld=$(grep "Map=" "${servercfgfullpath}" | sed 's/Map=//g' | tr -d '\n')
# Not Set
servername=${servername:-"NOT SET"}
slots=${slots:-"0"}
port=${port:-"0"}
serverpassword=${serverpassword:-"NOT SET"}
rconpassword=${rconpassword:-"NOT SET"}
slots=${slots:-"NOT SET"}
port=${port:-"NOT SET"}
gameworld=${gameworld:-"NOT SET"}
fi
}

Loading…
Cancel
Save