Jump to content
Mauricio Britto

[RELEASE]BEC for DayZ SA

Recommended Posts

My BEC cannot find my BEServer.cfg Everything else seems to start up correctly. The picture is of the correct file in my Batteye location 

 

https://imgur.com/a/s4hukvQ 

 

@echo off
TITLE DayZ SA Server - Status
COLOR 0A
:: Variables::
::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\DayZServer\BEC"
::::::::::::::

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 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=777 -profiles=C:\Program Files (x86)\Steam\steamapps\common\DayZServer -dologs -adminlog -netlog -freezecheck -noFilePatching -BEpath=C:\Program Files (x86)\Steam\steamapps\common\DayZServer\battleye -cpuCount=6
FOR /L %%s IN (45,-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
goto checksv

Edited by Clint Baldwin

Share this post


Link to post
Share on other sites

I have gotten this far...

 

https://imgur.com/a/ruX5BML

Do I put my server settings in these spots?


# Set the ip to your server. normally 127.0.0.1 will be fine.
Ip = 127.0.0.1


# Set the port to the server. default port is 2302
Port = 2302

Share this post


Link to post
Share on other sites
6 hours ago, Violt said:

Here is a simple .Bat file i am using for BEC. 


@Echo off
title DayZ Server Monitor
color 02
@echo Do not close this window!


    Title DayZ Server started at %time% - %date%
    echo.
    echo DayZ Server started at %time% - %date%
    echo.
goto startup
:restart
    Title DayZ Server restarted at %time% - %date%
    echo.
    echo DayZ Server restarted at %time% - %date%
    echo.
:startup
	c:
	cd "C:\Workfolder\DayZServer\BEC"
	start /min Bec.exe -f Config.cfg --dsc
	
	cd "C:\Workfolder\DayZServer\" 
    start "" /HIGH /min /wait "DayZServer_x64.exe" -config=serverDZ.cfg -port=2302 -profiles=C:\Workfolder\DayZServer\AdminProfile\Admin -dologs -adminlog -netlog -freezecheck -noFilePatching -cpuCount=4
goto restart

 

Hi ^^

how can i use this with update funktion for the Server ?

Share this post


Link to post
Share on other sites
7 hours ago, Clint Baldwin said:

My BEC cannot find my BEServer.cfg Everything else seems to start up correctly. The picture is of the correct file in my Batteye location 

 

https://imgur.com/a/s4hukvQ 

 

@echo off
TITLE DayZ SA Server - Status
COLOR 0A
:: Variables::
::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\DayZServer\BEC

 

Chance your paths, if you use c:\program files (x86) you will have spaces in the variable and other places.

Share this post


Link to post
Share on other sites

I believe I have it set up correctly. I just cant get it to connect now.

Question: If I have the BEC running on the same pc as the server is, do I use 127.0.0.1 as the connecting Ip or do I use the PC's Internal IP? Also as goes for the Port number so I use 2302 or do I use the server's port number to the outside world?

BESERVER.cfg 

RConPassword 
RestrictRCon 1
RConIP 127.0.0.1
RConPort 2302

 

Above is the contents

Share this post


Link to post
Share on other sites

ok all good the server restarts are all working great for me know :D :D now just to add cars to the server and get some sort of admin menu in game

Edited by mrwolv

Share this post


Link to post
Share on other sites
13 hours ago, mrwolv said:

ok all good the server restarts are all working great for me know :D :D now just to add cars to the server and get some sort of admin menu in game

Any tips on getting this working? I have BEC running and looking at my server but no server messages or server restarts

My BEC Config:

# This config file is only provided as an example file.
# Edit it to sute your needs.
# For more info on how to edit this file. use the Readme.txt file or visit http://www.ibattle.org/install-and-configure


#--------------------------------------------------------------------------------------------------------
[Bec]
#--------------------------------------------------------------------------------------------------------

# Set the ip to your server. normally 127.0.0.1 will be fine.
Ip = CHANGED TO SERVER IP ADDRESS


# Set the port to the server. default port is 2302
Port = 2302


# Set the path to the BattlEye directory that is currently in use by the server.
BePath = CHANGED TO BEPATH


# 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

Scheduler = Scheduler.xml

My scheduler:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<Scheduler>
  <!-- *** Restart at 12:00:00 AM ***-->
  <job id="0">
    <day>1,2,3,4,5,6,7</day>
    <start>23:30:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 30 Minutes</cmd>
  </job>
  <job id="1">
    <day>1,2,3,4,5,6,7</day>
    <start>23:45:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 15 Minutes</cmd>
  </job>
  <job id="2">
    <day>1,2,3,4,5,6,7</day>
    <start>23:55:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 5 Minutes</cmd>
  </job>
  <job id="3">
    <day>1,2,3,4,5,6,7</day>
    <start>23:59:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 1 Minute</cmd>
  </job>
  <job id="4">
    <day>1,2,3,4,5,6,7</day>
    <start>00:00:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>#shutdown</cmd>
  </job>
  <!-- *** Restart at 4:00:00 AM ***-->
  <job id="5">
    <day>1,2,3,4,5,6,7</day>
    <start>03:30:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 30 Minutes</cmd>
  </job>
  <job id="6">
    <day>1,2,3,4,5,6,7</day>
    <start>03:45:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 15 Minutes</cmd>
  </job>
  <job id="7">
    <day>1,2,3,4,5,6,7</day>
    <start>03:55:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 5 Minutes</cmd>
  </job>
  <job id="8">
    <day>1,2,3,4,5,6,7</day>
    <start>03:59:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 1 Minute</cmd>
  </job>
  <job id="9">
    <day>1,2,3,4,5,6,7</day>
    <start>04:00:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>#shutdown</cmd>
  </job>
  <!-- *** Restart at 8:00:00 AM ***-->
  <job id="10">
    <day>1,2,3,4,5,6,7</day>
    <start>07:30:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 30 Minutes</cmd>
  </job>
  <job id="11">
    <day>1,2,3,4,5,6,7</day>
    <start>07:45:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 15 Minutes</cmd>
  </job>
  <job id="12">
    <day>1,2,3,4,5,6,7</day>
    <start>07:55:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 5 Minutes</cmd>
  </job>
  <job id="13">
    <day>1,2,3,4,5,6,7</day>
    <start>07:59:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 1 Minute</cmd>
  </job>
  <job id="14">
    <day>1,2,3,4,5,6,7</day>
    <start>08:00:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>#shutdown</cmd>
  </job>
  <!-- *** Restart at 12:00:00 PM ***-->
  <job id="15">
    <day>1,2,3,4,5,6,7</day>
    <start>11:30:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 30 Minutes</cmd>
  </job>
  <job id="16">
    <day>1,2,3,4,5,6,7</day>
    <start>11:45:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 15 Minutes</cmd>
  </job>
  <job id="17">
    <day>1,2,3,4,5,6,7</day>
    <start>11:55:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 5 Minutes</cmd>
  </job>
  <job id="18">
    <day>1,2,3,4,5,6,7</day>
    <start>11:59:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 1 Minute</cmd>
  </job>
  <job id="19">
    <day>1,2,3,4,5,6,7</day>
    <start>12:00:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>#shutdown</cmd>
  </job>
  <!-- *** Restart at 04:00:00 PM ***-->
  <job id="20">
    <day>1,2,3,4,5,6,7</day>
    <start>15:30:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 30 Minutes</cmd>
  </job>
  <job id="21">
    <day>1,2,3,4,5,6,7</day>
    <start>15:45:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 15 Minutes</cmd>
  </job>
  <job id="22">
    <day>1,2,3,4,5,6,7</day>
    <start>15:55:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 5 Minutes</cmd>
  </job>
  <job id="23">
    <day>1,2,3,4,5,6,7</day>
    <start>15:59:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 1 Minute</cmd>
  </job>
  <job id="24">
    <day>1,2,3,4,5,6,7</day>
    <start>16:00:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>#shutdown</cmd>
  </job>
  <!-- *** Restart at 08:00:00 PM ***-->
  <job id="25">
    <day>1,2,3,4,5,6,7</day>
    <start>19:30:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 30 Minutes</cmd>
  </job>
  <job id="26">
    <day>1,2,3,4,5,6,7</day>
    <start>19:45:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 15 Minutes</cmd>
  </job>
  <job id="27">
    <day>1,2,3,4,5,6,7</day>
    <start>19:55:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 5 Minutes</cmd>
  </job>
  <job id="28">
    <day>1,2,3,4,5,6,7</day>
    <start>19:59:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restart in 1 Minute</cmd>
  </job>
  <job id="29">
    <day>1,2,3,4,5,6,7</day>
    <start>20:00:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>#shutdown</cmd>
  </job>
  <!-- ~~~ BEC Messages  ~~~-->
  <job id="30">
    <day>1,2,3,4,5,6,7</day>
    <start>000500</start>
    <runtime>003000</runtime>
    <loop>-1</loop>
    <cmd>say -1 This message will start at 5 minutes and run every 30 minutes</cmd>
  </job>
  <job id="31">
    <day>1,2,3,4,5,6,7</day>
    <start>000600</start>
    <runtime>003000</runtime>
    <loop>-1</loop>
    <cmd>say -1 This message will start at 6 minutes and run every 30 minutes</cmd>
  </job>
  <job id="32">
    <day>1,2,3,4,5,6,7</day>
    <start>000700</start>
    <runtime>003000</runtime>
    <loop>-1</loop>
    <cmd>say -1 This message will start at 7 minutes and run every 30 minutes</cmd>
  </job>
  <job id="33">
    <day>1,2,3,4,5,6,7</day>
    <start>000800</start>
    <runtime>003000</runtime>
    <loop>-1</loop>
    <cmd>say -1 This message will start at 8 minutes and run every 30 minutes</cmd>
  </job>
</Scheduler>

 

My server is started then BEC is started by using the *** DayZServer\Bec\Bec.exe -f myconfig.cfg --dsc - why wont my server restart? Am I missing something big here?

Edited by therealunhinged

Share this post


Link to post
Share on other sites

Having an issue with Bec not logging in,.. tried v1.496, v1.601 and latest v1.608 still no luck. Everything is configured right, Weird thing is I can connect with BERCon and DaRT no problem, not sure what the deal is with this as Ive tried many typical solutions, any ideas would be helpful, maybe something Ive overlooked.

Edited by ICEMAN-FMCS

Share this post


Link to post
Share on other sites
5 hours ago, ICEMAN-FMCS said:

Having an issue with Bec not logging in,.. tried v1.496, v1.601 and latest v1.608 still no luck. Everything is configured right, Weird thing is I can connect with BERCon and DaRT no problem, not sure what the deal is with this as Ive tried many typical solutions, any ideas would be helpful, maybe something Ive overlooked.

Put a file named BEServer.cfg on /battleye directory with ur rcon password and execute bec.exe- f Config.cfg --dsc

Edited by Agusanz
.

Share this post


Link to post
Share on other sites
18 hours ago, Agusanz said:

Put a file named BEServer.cfg on /battleye directory with ur rcon password and execute bec.exe- f Config.cfg --dsc

Did this still not logging in.. everything is set correctly ive run a few "other servers" of dayz before bec is usually no problem until now.

Share this post


Link to post
Share on other sites

Anyone that can help me with an auto update script/bat for my server? 
Iv got this in my START.bat, maybe in this startup code so it does only update / not validate so i dont loose my edited files(eventx.xml etc.)
 

@echo off
TITLE DayZ SA Server - Status
COLOR 0A
:: Variables::
::DayZServer_64.exe path
set DAYZ-SA_SERVER_LOCATION="C:\dayzserver"
::Bec.exe path
set BEC_LOCATION="C:\dayzserver\battleye\Bec"
::::::::::::::

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 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 -dologs -adminlog -noFilePatching -BEpath=C:\dayZServer\battleye -profiles=C:\dayzserver\playerLogs
FOR /L %%s IN (45,-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
goto checksv

Thanks for the help

Share this post


Link to post
Share on other sites
On 26/9/2018 at 4:05 PM, headrox said:

Anyone that can help me with an auto update script/bat for my server? 
Iv got this in my START.bat, maybe in this startup code so it does only update / not validate so i dont loose my edited files(eventx.xml etc.)
 


 

Thanks for the help

There's a version for that already
https://github.com/Agusanz/AZ_Start.bat/blob/master/AZ_Start.bat

Share this post


Link to post
Share on other sites

Nice work, whats about backup batch write & load?
Backup every 3. oder 5. minute would be awesome.

If you backup fail, the script should load the newest one that worked.

Edited by K3l3g

Share this post


Link to post
Share on other sites

Im unsure if anyone may STILL be having problems with starting up their BEC tools for dayz sa server. Just one thing you all need to note is that the server file is a 64 bit program so you need to make sure that the beserver file in your battleye folder is named "BEServer_x64.cfg" NOT beserver otherwise you may encounter "No valid response/Cannot connect" issues. I had big issues trying to get bec to work until i read a post on a different site and decided to try it this way. Im now up and running with BEC Tools ver 1.608 (latest version).

Share this post


Link to post
Share on other sites
On 08/12/2018 at 5:15 PM, leegreaves said:

Im unsure if anyone may STILL be having problems with starting up their BEC tools for dayz sa server. Just one thing you all need to note is that the server file is a 64 bit program so you need to make sure that the beserver file in your battleye folder is named "BEServer_x64.cfg" NOT beserver otherwise you may encounter "No valid response/Cannot connect" issues. I had big issues trying to get bec to work until i read a post on a different site and decided to try it this way. Im now up and running with BEC Tools ver 1.608 (latest version).

 

I'm still having problems logging into BEC

Its tries repeatedly then closes the connection.

 

The Battleye has connected (so I think) because in my battleye folder I can see the beserverx64.cfg file changes its name so that the word ACTIVE is the file name and some random numbers too.

(I stated beserver_x64.cfg because I use a 64bit OS as opposed to those who use beserver.cfg with a 32 bit OS)

So that makes me think the battleeye is working?
Yet I still cannot connect to BEC.
 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×