Hallo zusammen,
ich brauch ein mal eure Hilfe.
Ich möchte mir für 7 Days to die eine start Script schreiben. Was mir in der Serverconfig.xml Den Serverport, ControlPanel port, die Slots einträgt.
Die Serverconfig.xml datei sieht so aus:
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 | <?xml version="1.0"?> <ServerSettings> <property name="ServerPort" value="38471"/> <!-- Port you want the server to listen on. --> <property name="ServerIsPublic" value="true"/> <!-- Should this server register to master server --> <property name="ServerName" value="My Game Host"/> <!-- Whatever you want the name to be. --> <property name="ServerPassword" value=""/> <!-- Password to gain entry to the server --> <property name="ServerMaxPlayerCount" value="8"/> <!-- Maximum Concurrent Players --> <property name="ServerDescription" value="A 7 Days to Die server"/> <!-- Whatever you want the description to be. --> <property name="ServerWebsiteURL" value=""/> <!-- Website URL for the server --> <property name="GameWorld" value="Navezgane"/> <!-- Navezgane, MP Wasteland Horde, MP Wasteland Skirmish, MP Wasteland War, Random Gen --> <property name="GameName" value="My Game"/> <!-- Whatever you want the game name to be THIS CONTROLS THE RANDOM GENERATION SEED --> <property name="GameDifficulty" value="2"/> <!-- 0 - 4, 0=easiest, 4=hardest --> <property name="GameMode" value="GameModeSurvivalMP"/> <!-- GameModeSurvivalMP, GameModeSurvivalSP (MP has land protection) --> <property name="ZombiesRun" value="0" /> <!-- 0 = default day/night walk/run, 1 = never run, 2 = always run --> <property name="BuildCreate" value="false" /> <!-- cheat mode on/off --> <property name="DayNightLength" value="40" /> <!-- 40 minutes --> <property name="FriendlyFire" value="false" /> <!-- Can friendly players damage each other (PvP) --> <property name="PersistentPlayerProfiles" value="true" /> <!-- If disabled a player can join with any selected profile. If true they will join with the last profile they joined with --> <property name="ControlPanelEnabled" value="true"/> <!-- Enable/Disable the control panel --> <property name="ControlPanelPort" value="38471"/> <!-- Port of the control panel webpage --> <property name="ControlPanelPassword" value="CHANGEME"/> <!-- Password to gain entry to the control panel --> <property name="TelnetEnabled" value="false"/> <!-- Enable/Disable the telnet --> <property name="TelnetPort" value="38471"/> <!-- Port of the telnet server --> <property name="TelnetPassword" value="CHANGEME"/> <!-- Password to gain entry to telnet interface --> <property name="DisableNAT" value="true"/> <!-- set this to true if your router doesn't support NAT --> <property name="AdminFileName" value="serveradmin.xml"/> <!-- Server admin file name --> <property name="DropOnDeath" value="0" /> <!-- 0 = everything, 1 = toolbelt only, 2 = backpack only, 3 = delete all --> <property name="DropOnQuit" value="1" /> <!-- 0 = nothing, 1 = everything, 2 = toolbelt only, 3 = backpack only --> <property name="CraftTimer" value="1" /> <!-- 0 = None (instant), 1 = Normal, 2 = Fast (double speed) --> <property name="LootTimer" value="1" /> <!-- 0 = None (instant), 1 = Normal, 2 = Fast (double speed) --> <property name="EnemySenseMemory" value="60" /> <!-- Time, in seconds, that a zombie will pursue something that has been sensed. --> <property name="EnemySpawnMode" value="3" /> <!-- 0 = Disabled 0%, 1 = Very Low 50%, 2 = Low 75%, 3 = Medium 100%, 4 = High 125%, 5 = Very High 150% --> <property name="EnemyDifficulty" value="0" /> <!-- 0 = Normal, 1 = Feral --> <property name="NightPercentage" value="35" /> <!-- percentage in whole numbers --> <property name="BlockDurabilityModifier" value="100" /> <!-- percentage in whole numbers --> <property name="LootAbundance" value="100" /> <!-- percentage in whole numbers --> <property name="LootRespawnDays" value="7" /> <!-- days in whole numbers --> <property name="LandClaimSize" value="7"/> <!-- Size in blocks that is protected by a keystone --> <property name="LandClaimDeadZone" value="30"/> <!-- Keystones must be this many blocks apart (unless you are friends with the other player) --> <property name="LandClaimExpiryTime" value="3"/> <!-- The number of days a player can be offline before their claims expire and are no longer protected --> <property name="LandClaimDecayMode" value="0"/> <!-- Controls how offline players land claims decay. All claims have full protection for the first 24hrs. 0=Linear, 1=Exponential, 2=Full protection until claim is expired. --> <property name="LandClaimOnlineDurabilityModifier" value="4"/> <!-- How much protected claim area block hardness is increased when a player is online. 0 means infinite (no damage will ever be taken). Default is 32x --> <property name="LandClaimOfflineDurabilityModifier" value="4"/> <!-- How much protected claim area block hardness is increased when a player is offline. 0 means infinite (no damage will ever be taken). Default is 32x --> <property name="AirDropFrequency" value="72"/> <!-- How often airdrop occur in game-hours, 0 == never --> <property name="MaxSpawnedZombies" value="60"/> <!-- Making this number too large (more than about 80) may cause servers to run at poor framerates which will effect lag and play quality for clients. --> <property name="EACEnabled" value="true"/> <!-- Enables/Disables EasyAntiCheat --> <!--property name="SaveGameFolder" value="absolute path" /--> <!-- use this to override the default save game path --> </ServerSettings> |
Meine Start.sh sieht so aus:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #!/bin/sh cd "`dirname "$0"`" export LD_LIBRARY_PATH=. if [ -f serverconfig.xml ]; then sed -s '/^<property name="ServerPort" value="*"/> /d' serverconfig.xml > serverconfig.xml.bak sed -s '/^<property name="ServerMaxPlayerCount" value="*"/> /d' serverconfig.xml > serverconfig.xml.bak sed -s '/^<property name="TelnetPort" value="*"/> /d' serverconfig.xml > serverconfig.xml.bak mv serverconfig.xml.bak serverconfig.xml rm serverconfig.xml.bak echo "" >> serverconfig.xml echo "<property name=""ServerPort"" value="$1""/> >> serverconfig.xml echo "<property name=""ServerMaxPlayerCount"" value="$2""/> >> serverconfig.xml echo "<property name=""ControlPanelPort"" value="$1""/> >> serverconfig.xml fi chmod 0774 * #if [ "$(uname -m)" == "x86_64" ]; then # ./7DaysToDie.x86_64 -logfile 7DaysToDie_Data/output_log.txt $@ #else ./7DaysToDie.x86 7DaysToDie.x86 -quit -batchmode -nographics -configfile=serverconfig.xml -logfile test.log -dedicated $@ |
Vom Webinterface aus wir mir mit Folgen befehlen:( $1 = ServerPort, $2 = ServerMaxPlayerCount, $1 = ControlPanelPort ) an die start.sh übertragen
Was mache ich falsch? bitte mit Beispiel.
Mit freundlichen Grüßen Ino89