DayZ
Architect Nov 18, 2023 @ 4:41am
BEC / Dart / BattlEye / Bat File Help
Hi

I know this is mentioned on a regular basis but I'm currently having an issue with my BEC, BattlEye and bat files.

I've filled out all the parameters, opened a specific port, filled in the necessary file paths for this to work.

Is BEC defunct? Is Dart defunct? is my batch file correct?

(I had this working last year when I ran a server... maybe I've forgotten, or somethings changed since then)

See below:

Server is running on x64

BEC Config (BEServer_x64.cfg)
RConPassword xxxx RestrictRCon 0 RConport 2304

BattlEye Config (Config.cfg)
#-------------------------------------------------------------------------------------------------------- [Bec] #-------------------------------------------------------------------------------------------------------- # Set the ip to your server. normally 127.0.0.1 will be fine. # Note: If you are running BEC on the same machine as your server you should keep this as 127.0.0.1! Otherwise you wll likely have issues. Ip = 127.0.0.1 # Set the RCon port to the server. # The recommended port is game port + 3 (so 2305 by default). # You must have a RCon port specified in BEServer_x64.cfg. Example: "RConPort 2305" Port = 2304 # Set the path to the BattlEye directory that is currently in use by the server. BePath = C:\Program Files (x86)\Steam\steamapps\common\DayZServer\config\BattlEye # Set the path to your Admins.xml file containing your admins. Admins = Admins.xml # Set the path to your Commands.xml file. Commands = Commands.xml

Host (System32)
# Copyright (c) 1993-2009 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host # localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost 127.0.0.1 ibattle.org 127.0.0.1 www.ibattle.org

.bat file (Agusanz version)
@echo off TITLE DayZ SA Server - Status COLOR 0A mode con:cols=60 lines=2 :: Variables:: ::SteamCMD.exe path set STEAM_CMD_LOCATION="C:\Program Files (x86)\Steam\steamapps\common\DayZServer\steamcmd" set STEAM_USERNAME="xxxxx" ::DayZServer_64.exe path set DAYZ-SA_SERVER_LOCATION="C:\Program Files (x86)\Steam\steamapps\common\DayZServer" ::Bec.exe path set BEC_LOCATION="C:\Program Files (x86)\Steam\steamapps\common\BEC" ::IMPORTANT: Modify line 70 to your correct parameters :::::::::::::: echo Agusanz goto checksv pause :checksv tasklist /FI "IMAGENAME eq DayZServer_x64.exe" 2>NUL | find /I /N "DayZServer_x64.exe">NUL if "%ERRORLEVEL%"=="0" goto checkbec cls echo Server is not running, taking care of it.. goto killsv :checkbec tasklist /FI "IMAGENAME eq Bec.exe" 2>NUL | find /I /N "Bec.exe">NUL if "%ERRORLEVEL%"=="0" goto loopsv cls echo Bec is not running, taking care of it.. goto startbec :loopsv FOR /L %%s IN (30,-1,0) DO ( cls echo Server is running. Checking again in %%s seconds.. timeout 1 >nul ) goto checksv :killsv taskkill /f /im Bec.exe taskkill /f /im DayZServer_x64.exe goto updatesv :updatesv cls echo Updating DayZ SA Server. timeout 1 >nul cls echo Updating DayZ SA Server.. timeout 1 >nul cls echo Updating DayZ SA Server... cd "%STEAM_CMD_LOCATION%" start /wait "" steamcmd.exe +login "%STEAM_USERNAME%" +force_install_dir %~dp0 +app_update 223350 validate +quit goto startsv :startsv cls echo Starting DayZ SA Server. timeout 1 >nul cls echo Starting DayZ SA Server.. timeout 1 >nul cls echo Starting DayZ SA Server... cd "%DAYZ-SA_SERVER_LOCATION%" start DayZServer_x64.exe -config=serverDZ.cfg -port=2302 "-profiles=config" -dologs -adminlog -netlog -freezecheck -noFilePatching -BEpath=C:\Program Files (x86)\Steam\steamapps\common\DayZServer\config\BattlEye -cpuCount=8 -maxMem=4096 -limitFPS=200 "-mod=@CF;@DF;@VPPADMIN;@A2WEAPONS;@CANNABIS;@CODELOCK;@DOGTAGS;@EXPANSIONCORE;@EXPANSION;@EXPANSIONLICENSED;@EXPANSIONBUNDLE;@MUCHSTUFF;@MYSTERY;@REV;@TRANSFERTOCRATE;@UNCUEPAS;@UNDERGROUND;@UNLIMITEDSTAMINA;@WINDSTRIDE" FOR /L %%s IN (30,-1,0) DO ( cls echo Initializing server, wait %%s seconds to initialize Bec.. timeout 1 >nul ) goto startbec :startbec cls echo Starting Bec. timeout 1 >nul cls echo Starting Bec.. timeout 1 >nul cls echo Starting Bec... timeout 1 >nul cd "%BEC_LOCATION%" start Bec.exe -f Config.cfg --dsc goto checksv
< >
Showing 1-13 of 13 comments
Idaho Nov 18, 2023 @ 7:03am 
It's probably just the formatting in the bat file. Check around online for a simpler bat file, just to get it going, then go from there.
Idaho Nov 18, 2023 @ 7:05am 
@echo off
:start
::Server name
set serverName=zzzzzzzzzzzzzzzzzzzzzzzz
::Server files location
set serverLocation="C:\DayZServer\DayZServer_x64"
::Bec Location
set BEC_LOCATION="C:\Dayzserver\BattlEye\BEC\Bec
::Server Port
set serverPort=2302
::Server config
set serverConfig=serverDZ.cfg
::Logical CPU cores to use (Equal or less than available)
set serverCPU=2
::Sets title for terminal (DONT edit)
title %serverName% batch
::DayZServer location (DONT edit)
cd "%serverLocation%"
echo (%time%) %serverName% started.
::Launch parameters (edit end: -config=|-port=|-profiles=|-doLogs|-adminLog|-netLog|-freezeCheck|-filePatching|-BEpath=|-cpuCount=)
start "DayZ Server" /min "DayZServer_x64.exe" -config=%serverConfig% -port=2302 -profiles=Profilesfolder "-servermod=@RealWeaponDurability" "-mod= " -BEpath=C:\DayZServer\BattlEye -cpuCount=%serverCPU% -adminlog
::Time in seconds before kill server process (14400 = 4 hours)
timeout 10800
taskkill /im DayZServer_x64.exe /F
::Time in seconds to wait before..
timeout 10
::Go back to the top and repeat the whole cycle again
goto start
Idaho Nov 18, 2023 @ 7:06am 
this is one i was using. it ran BEC and my scheduler, ban list, name list, etc just fine.
_KC76_ Nov 18, 2023 @ 7:25am 
It's nice to see people post a lot of detailed information when asking for help, for a change. It would be helpful too though, if you said what the Problem is ..

Is the server not starting at all? or does the server start, you just can't see it on the network? or can you see it and join, you just don't have Battleye Admin tools?

The only glaring thing I see is that you have old server files, downloaded using SteamCMD, rather than downloading the DayZ Server App from the Steam Library, which gets updated along with the Game Client (current version 1.23)
Architect Nov 18, 2023 @ 8:24am 
The server runs absolutely fine, players can join etc. It's just the BEC not detecting if the server is on or not. It just boot loops with the comment:

16:23:01 : Please wait... Connecting to the Server when the Timeout has expired! 16:23:35 : Connecting to Battleye server 127.0.0.1:2304 16:23:37 : No Valid response. Trying to reconnect.!
_KC76_ Nov 18, 2023 @ 8:26am 
Is it possibly a Firewall issue with Battleye not having a direct "in/out rule" to the Server?
What OS is your Server running? (forced auto-updates that may have altered settings?)
Last edited by _KC76_; Nov 18, 2023 @ 8:28am
Architect Nov 18, 2023 @ 8:33am 
Could possibly be that. What firewall parameters do I need to input for BattlEye?
OS Windows Server 2019 (x64)
_KC76_ Nov 18, 2023 @ 8:39am 
Originally posted by Nicol:
Could possibly be that. What firewall parameters do I need to input for BattlEye?
OS Windows Server 2019 (x64)
I am not familiar with Server 2019 directly, but I would guess you need to create the same rules for Battleye as you did for the DayZ Server, opening Port X inbound rule and converse Outbound Rule. I think generally speaking, your in.out rules should be set up to use a "range" of Ports, like "2300 to 2307", rather than just the one "2304" Port.
Idaho Nov 18, 2023 @ 8:43am 
definitely sounds like a port/firewall issue.
_KC76_ Nov 18, 2023 @ 8:48am 
Originally posted by Nicol:
The server runs absolutely fine, players can join etc. It's just the BEC not detecting if the server is on or not. It just boot loops with the comment:

16:23:01 : Please wait... Connecting to the Server when the Timeout has expired! 16:23:35 : Connecting to Battleye server 127.0.0.1:2304 16:23:37 : No Valid response. Trying to reconnect.!

Please, excuse my ignorance of this, as I only run Local Servers using Admin Tool Mods, not Battleye Admin tools .. But, is that the correct address for Battleye? Should Battleye be connecting to the Battleye website also, or only to your server? (Is battleye self-contained, or does it need to access the web-database to function?)
Architect Nov 18, 2023 @ 9:22am 
Yeah, I opened all those but to no avail. I'll just have to revert back to my old bat file without Bec
_KC76_ Nov 18, 2023 @ 9:28am 
Originally posted by Nicol:
Yeah, I opened all those but to no avail. I'll just have to revert back to my old bat file without Bec

Edit: disregard, misread the Host file.
Last edited by _KC76_; Nov 18, 2023 @ 10:23am
Architect Nov 18, 2023 @ 9:38am 
Has the battleye changed it's address from a year ago? Please bare in mind I've been using old tutorials online to get this server up and running again.
< >
Showing 1-13 of 13 comments
Per page: 1530 50

Date Posted: Nov 18, 2023 @ 4:41am
Posts: 13