Jump to content

7 Days To Die


Dennis

Recommended Posts

7 Days To Die


 

Installation

  1. Download the config
  2. Go to TCAdmin > System > Settings > Game & Voice Hosting > Game & Other Voice Servers > Import
  3. Save the config as a new config or chose "Overwrite existing config" if you which to overwrite your current 7 Days to Die config. Remember to select 7 Days to Die in the 'Update Game' field if you do
  4. Leave all other settings

Features

  • Shut down properly using custom script with rcon commands
  • Support for A20
  • Support for Alloc's Server Fixes (easy install)
  • Support for "Darkness Falls: They mostly come out at night..." (easy install)
  • Configuration files are 100% configurable using Configuration Editor
  • Easy backup of worlds and configuration files

If you want any mods added, let me know. I'll see what I can do.

Switch between versions

Experimental config is available from here:

To switch between Alpha and Experimental, you should enable Game Switching: https://help.tcadmin.com/Manage_Game_%26_Voice_Services#Game_Switching

Once this has been enabled, you can switch between the versions. Please note that your server will be completely wiped when doing this.


 

Link to comment
Share on other sites

  • 3 weeks later...

Yea same here.

We tried adding to the serverconfigmain.xml but it doesnt work.

<property name="ServerIP" value="$[Service.IpAddress]"/>

I am not sure if 7 days has removed this or changed the way IP addresses get handled but i cannot find anything on Google.

Edited by SHAD0WRAIDERZA
Link to comment
Share on other sites

  • 1 month later...

So this may be silly but I am having an issue with this config in that whenever telnet is enabled, tcadmin is using it to stop the instance constantly.  The only work around was to disable telnet.  Does anyone know why this would be happening and/or how to prevent it?  Running the A19 release.

Link to comment
Share on other sites

  • 3 months later...
49 minutes ago, mspsmuge said:

Heya,

I have an issue and im wondering if anyone has a way to fix it. Sometimes when generating a 8000 size map it'll max out all cores of a 16 core CPU while generating

Its not an issue it just takes bloody long and kills the server at the same time. We do not allow any 7 days servers to generate maps on our nodes due it spiking the CPU

So rather what we do is tell clients/users to generate the map on their PC with the GPU or CPU and then upload it via FTP.

Link to comment
Share on other sites

There's really no way to solve it. We can limit the CPU usage by assigning it to a certain number of cores, but that will just slow down the generating. It's not an issue with TCAdmin or the config, it's just how the server generates the map.

You can use the following scripts to allocate a certain amount of cores and set CPU priority to low while it's starting:

Operating system: Windows
Script Engine: IronPython
Event: Before started
Tick 'Ignore execution errors'

import random
import clr
import System
from System import Environment
from System.Diagnostics import ProcessPriorityClass

# Returns random affinity for x cores
def GetRandomAffinity():
  StartCores = 3 #Change the number to how many cores the service should start with
  
  # Get the number of cores available on the system
  cores = int(Environment.GetEnvironmentVariable("NUMBER_OF_PROCESSORS")) - 1
  
  # Initiate a list that we're gonna use. Each core will be added to the list like [1, 2, 3, 4...]. We're gonna reverse this list later
  core_list = []
  for i in xrange(cores):
    i = i+1
    core_list.append(i)
    
  # Reverse the list. On a system with 8 cores, we're gonna end up with [8, 7, 6, 5, 4, 3, 2, 1]. 
  core_list.reverse()
  
  # Select 'StartCores' random cores
  random_cores = random.sample(core_list, StartCores)
  
  number = ""
  # Iterate through the list of cores and get binary number - if we pass a number from random_cores, we add 1 number variable. If not, we add 0.
  # Example with 8 cores with 3 and 5 as random cores: 00010100
  # When we have the binary number, we need to convert it to dec and return this. 00010100 will return 20 - and this is CPU 3 and 5.
  for i in core_list:
    if i in random_cores:
      number += "1"
    else:
      number += "0"
  dec = int(number, 2)
  return dec
  

# Set temporary affinity and priority used while the game server is starting
ThisServiceController.ServiceConfig["Service.OriginalPriority"]=ThisServiceController.ServiceConfig["Service.Priority"]
ThisServiceController.ServiceConfig["Service.Priority"] = ProcessPriorityClass.Idle
ThisServiceController.ServiceConfig["Service.OriginalAffinity"]=ThisServiceController.ServiceConfig["Service.Affinity"]
ThisServiceController.ServiceConfig["Service.Affinity"] = GetRandomAffinity()

if ThisServiceController.ServiceConfig["Service.OriginalAffinity"] == 0:
  ThisServiceController.ServiceConfig["Service.OriginalAffinity"] = ThisServiceController.GetAffinityOfAllProcessors()

Operating system: Windows
Script Engine: IronPython
Event: After started
Tick 'Ignore execution errors'

import clr

import System
from System import String, IntPtr
from System.IO import File, Path
from System.Diagnostics import Process
from System.Threading import Thread, ThreadStart
from TCAdmin.SDK import UnhandledExceptionManager

def WaitForStartupComplete():
  # An uncaught exception in a separate ironpython thread will cause a monitor/service manager crash
  try :
    # Wait until the Rust log has "Server startup complete"
    powershell = Process.Start("powershell.exe", String.Format("Get-Content '{0}7DaysToDieServer_Data\\output_log.txt' -wait | ? {{ $_ -match 'StartGame done' }} | % {{ exit }}", ThisService_RootDirectory))
                                                               
    # Create powershell pid file so we can kill if needed
    pspid=Path.Combine(ThisService_RootDirectory, "..", String.Format("{0}_ps.pid", ThisService_ServiceId));
    with File.CreateText(pspid) as pidfile :
      pidfile.Write(powershell.Id)
    
    powershell.WaitForExit()

    # We don't need the powershell pid file anymore
    if File.Exists(pspid) :
      File.Delete(pspid)
    
    # Set affinity and priority back to normal
    ThisServiceController.ServiceConfig["Service.Priority"]= ThisServiceController.ServiceConfig["Service.OriginalPriority"]
    ThisServiceController.ServiceConfig["Service.Affinity"] = ThisServiceController.ServiceConfig["Service.OriginalAffinity"]
  
    # Get all processes for this service and set priority and affinity
    pids = ThisServiceController.GetAllProcesses(False)
    for pid in pids:
      p = Process.GetProcessById(pid)
      p.PriorityClass = ThisServiceController.ServiceConfig["Service.Priority"]
      p.ProcessorAffinity = IntPtr(ThisServiceController.ServiceConfig["Service.Affinity"])
  except :
    pass
  
# Start in a separate thread to prevent start hang
t = Thread(ThreadStart(WaitForStartupComplete))
t.Start()

It'll only work on Windows, though.

Link to comment
Share on other sites

  • 5 months later...
  • 5 months later...
  • 1 month later...
  • 1 month later...

What's New in Version 1.1.0  

  • [Added] Support for "Private Rule" in Query settings
  • [Changed] Query Interval lowered to 300 seconds
  • [Changed] "Print Rcon response" has been enabled
  • [Changed] Small changes to serverconfigmain.xml
  • [Changed] "World Backup" now only saves the latest 10 backups. The number of backups to save can be changed in the script
  • [Changed] "Config File Backup" now only saves the latest 10 backups. The number of backups to save can be changed in the script
  • [Mod] Replaced "Darkness Falls: They mostly come out at night..." with the link for A20
    • Installing the mod now disables EAC automatically, as required by the mod. EAC is enabled after mod uninstallation
  • [Mods] Uninstalling any mod will also remove the mod files
  • [Removed] "Darkness Falls: They mostly come out at night..." update. This can now be updated from "Mod Manager"
Link to comment
Share on other sites

  • 2 months later...

Hi Dennis, these lines  need to be added to serversetting. In the first section.

<property name="Region"          value="Oceania" />   <!-- The region this server is in. Values: NorthAmericaEast, NorthAmericaWest, CentralAmerica, SouthAmerica, Europe, Russia, Asia, MiddleEast, Africa, Oceania -->
<property name="Language"     value="English" />     <!-- Primary language for players on this server. Values: Use any language name that you would users expect to search for. Should be the English name of the language, e.g. not "Deutsch" but "German" -->

Link to comment
Share on other sites

6 hours ago, Kosak0 said:

What's the difference between this config and the official one?

Not much - seversettings.xml will need the same line added. (whole xml on LFA one likely needs updating as some other lines have been added with game update versions.)

Link to comment
Share on other sites

13 hours ago, jungleNZ said:

Not much - seversettings.xml will need the same line added. (whole xml on LFA one likely needs updating as some other lines have been added with game update versions.)

I’m using this config & working fine so far, I’ve added the missing lines you told Dennis to add.

One difference I noticed is that this config installs the last version of Darkness Falls mod, but the official one installs an outdated version.

Link to comment
Share on other sites

@jungleNZ I'll make sure those lines are added in the next update.

On 6/5/2022 at 6:51 PM, Kosak0 said:

What's the difference between this config and the official one?

There's a few differences. This config has custom scripts that allows you to backup your world and configuration files.

The official one should be replaced by this one at some point.

Link to comment
Share on other sites

  • 3 months later...
  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Who's Online   0 Members, 0 Anonymous, 164 Guests (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use