EDG

guide BEC Battleye Extended Controls Setup With Auto Restarts

9 posts in this topic

Hey guys as promised i will share my knowledge on how to install BEC Battleye Extended Controls.

1. You want to download bec at www.ibattle.org

2. Chose a folder to put bec, it may be any locations it does not matter (try to make it a separate folder then your arma server)

3. Setting up the bat files (restartserver.bat, servermonitor.bat,stopserver.bat) copy paste and name these bat files as shown in the brackets. Make sure to edit these accordingly to match your locations.

restartserver.bat

@echo off
::MAKE SURE ALL TASKS ARE REALLY STOPPED

taskkill /f /fi "status eq not responding" /im arma3server.exe
taskkill /f /im arma3server.exe
timeout 1

::IF YOU PLAY ON SAME PC AS SERVER, SOMETIMES RESTARTS GET HUNG UP BECAUSE OF IT SO MAKE SURE TO KILL CLIENTSIDE TOO, I DONT, BUT JUST IN CASE YOU DO

taskkill /f /fi "status eq not responding" /im arma3.exe
taskkill /f /im arma3.exe
timeout 1

:: KILL BATTLEYE IF IT ISN'T ALREADY
taskkill /im Bec.exe

::SHUTDOWN SERVERMONITOR IF IT IS ALREADY RUNNING - WE RESTART IT AT THE END OF THIS
taskkill /f /im cmd.exe /fi "windowtitle eq servermonitor.bat
echo Make sure all is clear

echo Restarting Battleye

::RESTARTING BATTLEYE
set becpath="C:\Servers\BEC\"
cd /d %becpath%
start "" /min "Bec.exe" -f Config.cfg
timeout 3
echo Battleye has started.. 
echo.
echo.
echo Starting ARMA 3 Server...

::RESTARTING THE ARMA 3 SERVER BE SURE TO EDIT THIS TO YOUR SERVER .EXE LOCATION -NOTE ALSO THIS IS WHERE YOU DEFINE WHERE YOU CONFIG.CFG IS
cd C:\Servers\Exile
timeout 3
start "Arma3" /min /wait arma3server.exe -mod=@exile;Kart,Mark,Heli; -servermod=@exileserver;@infiSTAR_Exile;@A3XAI; -config=C:\Servers\Exile\@ExileServer\config.cfg -port=2302 -profiles=SC -cfg=C:\Servers\Exile\@ExileServer\basic.cfg -name=SC -autoinit -enableHT
timeout 6
echo ARMA 3 Server has started

:: THIS RUNS THE SERVER MONITOR FOR YOU SO YOU DON'T FORGET
set ServerMonitorPath="C:\Servers\Exile\"
cd /d %ServerMonitorPath%
start "" "servermonitor.bat"
echo Server Monitor has started. Have Fun
timeout 5
exit 

 

servermonitor.bat

@echo off
::IMPORTANT TO NAME IT SO WE CAN KILL IT
title servermonitor.bat
:start
C:\Windows\System32\tasklist /FI "IMAGENAME eq arma3server.exe" 2>NUL | C:\Windows\System32\find /I /N "arma3server.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
echo Server is not running, will be started now 
start "" /min /wait "C:\Servers\Exile\restartserver.bat" 
timeout 30
echo Server started succesfully
goto started
:loop
cls
echo Server is already running, running monitoring loop
:started
::THE 80 REFERS TO SECONDS AND HOW OFTEN IT WILL CHECK,YOU CAN SET IT TO WHATEVER YOU WANT. I JUST DONT WANT MY SERVER DOWN FOR MUCH LONGER THAN THAT!
::New error fault kill, will check for err fault and clear it and hopefully restart, a little more promise but no guarantee :)
taskkill /f /im WerFault.exe /fi "WINDOWTITLE eq Arma 3"
C:\Windows\System32\timeout /t 80
C:\Windows\System32\tasklist /FI "IMAGENAME eq arma3server.exe" 2>NUL | C:\Windows\System32\find /I /N "arma3server.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
goto start

 

stopserver.bat

@echo off
::KILL ARMA3 SERVER
taskkill /f /fi "status eq not responding" /im arma3server.exe
taskkill /f /im arma3server.exe
timeout 1
::DOUBLE CHECK KILL
taskkill /f /fi "status eq not responding" /im arma3server.exe
taskkill /f /im arma3server.exe
timeout 1
:: KILL BATTLEYE
taskkill /im Bec.exe
timeout 1

 

4. In the bec folder that you just created locate the config.cfg which is found in the config folder of bec and open it with notepad++ and edit the following highlited areas to fit your need.

# 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 = 63.251.20.138


# 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 = C:\Servers\Exile\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


#--------------------------------------------------------------------------------------------------------
[Misc]
#--------------------------------------------------------------------------------------------------------

# Auto run loadbans when ban file(s) changes. 
# 1 or True will turn it on.
# 0 or False will turn it off. 
# If this parameter is not defined it will use False as default.

AutoLoadBans = True

# Set which type of hacks that will be added to your banlist.
# 0 = none. 1 = GameHack. 2 = Battleye Hack. 3 = both GameHack & Battleye Hack. 
# value 3 is set as default if this parameter is not defined.
Ban = 3


# Set the names of your custom ban files, Separate each file with "," (comma): file1.txt, banfile2.txt, newfile.txt
# If you do not use any custom ban files. delete this option or leave this option commented.
# This option will check ban files for changes and automatic do a loadbans file when a file gets changed
# Do not specify the default bans.txt file here.
BeCustomBanFiles = bans.txt


# Set the height & width of Becs console window
ConsoleHeight	= 45
ConsoleWidth	= 165


# Only allow english chars.
AsciiNickOnly = False


# Only allow english chars to be typed on the chat. Note, Warnings must be enabled. 0 or more.
AsciiChatOnly = True


# If AsciiChatOnly is set True. you can define none english chars that will be accepted.
# You separate each char with a , "note you need to define lower and upper case of the chars."
#IgnoreChatChars	= €,£,æ,Æ,ø,Ø,å,Å,ö,ä,ü,ß


# Set the amount of warnings a player will get before kicked. -1 is disabled. 0 instant kick
# 1 == one warning on a bad word. next bad word results in kick
#Warnings = 3


# Kick players who has listed chars in their name when they connect
#DisallowPlayerNameChars	= []{}()0123456789


# Min length, kicks players who has to short name when they connect.
MinPlayerNameLength	= 3


# Max length, kicks players who has to long name when they connect.
MaxPlayerNameLength	= 16


# Set the name of your Arma3server.exe if it has been renamed from arma3server.exe to something else!
# if the exe has its original name. comment it out.
# DO NOT SET FULL PATH TO THE EXE FILE
ServerExeName = Arma3server.exe


# Set path to the file containing a list of bad words. Note, Warnings must be enabled. 0 or more.
#WordFilterFile = BadWords.txt


# Set the path to the file containing whitelisted guids.
#WhiteListFile = WhiteList.txt


# Set custom whitelist kick message. Text must be in ascii letters.  MAX 58 CHARS. BE only does ascii on messages
#WhiteListKickMsg = You are not whitelisted on this server.


# Kick people with offensive names
#NickFilterFile = BadNames.txt


# Set the path to the Scheduler.xml file.
Scheduler = Scheduler.xml


# Kick people who are idleing in the lobby, kick will happen after given time, Min time is 90 sec. use 0 to disable this function.
#KickLobbyIdlers	= 0


# If enabled. Bec will create separate chat files for each channel along with the main file.
#ChatChannelFiles = false

# Set the amount of Normal players who can connect. Set it to -1 to disable it. 
# If set to 0 it means only players who are listed in the Admins.xml, (or whatever you call it) will be able to connect to the server.
# Quick Example 1: server can holed 50 players. and you want to reserve 5 slots for admins. then set SlotLimit to 45.
# Quick Example 2: server can holed 50 players. and you want to reserve 5 slots for admins and 5 slots for friends. then set SlotLimit to 40,
# AND edit your admins.xml. ADD in all your frineds guid and remaining data, put them in group example 100. or whatever you feel likt.
# by using this method you can give some of your friends some access to some commands if you like or none. 
# in general this is works like .Whitelisting X player slots for admins and friends, while leaving the remaining Y slots for public.
SlotLimit = -1

# Set the message people will get when they try to connect and is not whitelisted. Text must be in ascii letters.
SlotLimitKickMsg = The Server has reached its player limit.


# The amount of time Bec will wait for the server to start up.
Timeout = 30


#--------------------------------------------------------------------------------------------------------
[Reporter]
#--------------------------------------------------------------------------------------------------------
# Reporter account. Fill in the username and password for your reporter account.
# GameHacks, BattlEye Hacks will be reported to a database. all players who connect will also be checked against this database.

# Set the Username for your account
#User = alfred


# Set the Password for your account
#Password = 123456


#--------------------------------------------------------------------------------------------------------
[ChatRestriction]
#--------------------------------------------------------------------------------------------------------
# Set max amount of chat lines a player is allowed to send for each channel. 
# Going passed the number will result in kick. -1 is disabled, 0 instant kick.
# If the number is higher than 0 players will be sent warnings.

Lobby = -1 
Global = -1
Side = -1
Group = -1
Vehicle	= -1
Command	= -1
Commander = -1
Direct = -1


#--------------------------------------------------------------------------------------------------------
[ChatSpam]
#--------------------------------------------------------------------------------------------------------

# Set max amount of chat lines per channel allowed within given time frame.
# Set the values to 0 to disable this function(s)

# Quick Example:
# Lobby = 5
# Lobby_Time_Lower = 10
# Lobby_Time_Upper = 15

# If the time between each new chatlines from a player is less than CHANNEL_Time_Lower the spam counter increases by + 1. 
# Consider the CHANNEL (Lobby) as the spam counter.
# When a player has (CHANNEL - 1) in spam counting. a warning will be sent to whom it may concern.
# If the time between each new chatline from the player is Greater than CHANNEL_Time_Lower and Less than CHANNEL_Time_Upper the spam counter stay as it is.
# If the time since the last chatline is greater then CHANNEL_Time_Upper the spam counter is reset to 1.
# To get optimal result play around a bit with the values on your server.

Lobby = 0
Lobby_Time_Lower = 0
Lobby_Time_Upper = 0

Global = 0
Global_Time_Lower = 0
Global_Time_Upper = 0

Side = 0
Side_Time_Lower	= 0
Side_Time_Upper	= 0

Group = 2
Group_Time_Lower = 1
Group_Time_Upper = 3

Vehicle	= 0
Vehicle_Time_Lower = 0
Vehicle_Time_Upper = 0

Command = 0
Command_Time_Lower = 0
Command_Time_Upper = 0

Commander = 0
Commander_Time_Lower = 0
Commander_Time_Upper = 0

Direct = 0
Direct_Time_Lower = 0
Direct_Time_Upper = 0


 

5. Edit or create a Scheduler.xml file in the config folder of the bec folder. This one here is based on a 6 hour restart. Change the info in this file to sooth your needs especially the location to the stopserver.bat at the bottom.

Scheduler.xml

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

<Scheduler>

<!-- this job will start after 10 minutes and run forever with a 1 hour and 30 minutes interval between the jobs -->
<job id='0'>
<day>1,2,3,4,5,6,7</day>
<start>003000</start>
<runtime>003000</runtime>
<loop>-1</loop>
<cmd>say -1 THIS SERVER RESTARTS EVERY 6 HOURS - TYPE !UPTIME IN SIDE CHAT TO SEE THE SERVER UPTIME</cmd>
</job>

<!-- this job will start after 30 seconds and will only run once. note that the runtime tag is ignored when loop is 0 -->
<job id='1'>
<day>1,2,3,4,5,6,7</day>
<start>003200</start>
<runtime>003000</runtime>
<loop>-1</loop>
<cmd>say -1 TEAMSPEAK IP  -- NSGTS3.COM</cmd>
</job>

<!-- this job will start after 15 seconds and will run every 25 sec. total times the message will be show is 6 times -->
<job id='2'>
<day>1,2,3,4,5,6,7</day>
<start>003500</start>
<runtime>003000</runtime>
<loop>-1</loop>
<cmd>say -1 THERE IS NO STEALING IN SAFE ZONES</cmd>
</job>


<!-- this job will start at 06:00:00 (6 am) and will only run once a day at set time -->
<job id='3'>
<day>1,2,3,4,5,6,7</day>
<start>003300</start>
<runtime>003000</runtime>
<loop>0</loop>
<cmd>say -1 STAY UP TO DATE JOIN OUR WEBSITE WWW.NIGHTSTALKEGAMING.COM</cmd>
</job>

<!-- this job will start at 07:00:00 (7 am) and will repeat itself every 20 min for 3 more time. in total 4 times. will run at set time for defined days -->
<job id='4'>
<day>1,2,3,4,5,6,7</day>
<start>000400</start>
<runtime>003000</runtime>
<loop>-1</loop>
<cmd>say -1 WELCOME TO NIGHT STALKER GAMING</cmd>
</job>

<!-- this job will start at 08:00:00 (8 am) and will repeat itself every 15 min forever for defined days -->
<job id='5'>
<day>1,2,3,4,5,6,7</day>
<start>050000</start>
<runtime>050000</runtime>
<loop>0</loop>
<cmd>say -1 RESTART IN ONE HOUR</cmd>
</job>
<job id='6'>
<day>1,2,3,4,5,6,7</day>
<start>053000</start>
<runtime>053000</runtime>
<loop>0</loop>
<cmd>say -1 RESTART IN 30 MINUTES -- RESTART IN 30 MINUTES</cmd>
</job>
<job id='7'>
<day>1,2,3,4,5,6,7</day>
<start>055000</start>
<runtime>055000</runtime>
<loop>0</loop>
<cmd>say -1 RESTART IN 10 MINUTES - START PREPARING TO LOG OUT</cmd>
</job>
<job id='8'>
<day>1,2,3,4,5,6,7</day>
<start>055500</start>
<runtime>055500</runtime>
<loop>0</loop>
<cmd>say -1 RESTART IN 5 MINUTES - START PREPARING TO LOG OUT</cmd>
</job>
<job id='9'>
<day>1,2,3,4,5,6,7</day>
<start>055800</start>
<runtime>055800</runtime>
<loop>0</loop>
<cmd>say -1 RESTART IN 2 MINUTES - SAVE GEAR AND LOG OUT</cmd>
</job>
<job id='10'>
<day>1,2,3,4,5,6,7</day>
<start>055900</start>
<runtime>060000</runtime>
<loop>0</loop>
<cmd>say -1 RESTART IN 1 MINUTE - SAVE GEAR AND LOG OUT</cmd>
</job>
<job id='11'>
<day>1,2,3,4,5,6,7</day>
<start>060000</start>
<runtime>060000</runtime>
<loop>0</loop>
<cmd>C:\Servers\Exile\stopserver.bat</cmd>
</job>

</Scheduler>

 

6. Make sure that you have beserver.cfg set up in the battleye folder that the server uses. Some use the SC folder and others use the battleye folder, in this case it is the SC folder.

BEServer.cfg

RConPassword yourpasswordhere
MaxPing 600

 

So that pretty much sums it up. With this set up you will have server messages and auto restarts. There might be a couple tweeks her and there as i am not perfect but this really works well. You will notice that there are multiple startserver.bat windows that will multiply on your desktop, its no big deal i have not yet figured out how to make there only be one. ENJOY :)

IMPORTANT i suggest that you go to your exile_server_config and edit the following!!! It is not a need but you don't need this turned on as you have already a auto restart set up, and why risk having both interfere with one another.

class RCON
	{
		/*
			Note that for this to work you need to have serverCommandPassowrd defined in config.cfg and BE enabled
		*/

		// This needs to match config.cfg serverCommandPassword
		serverPassword = "server123!";

		// Autolocks server until its ready to accept players
		useAutoLock = 0;

		// Server will autoLock at that time before restart (minutes)
		restartAutoLock = 0;

		/*
			Number of hours and minutes of your restart period.

			Examples:

			{4, 0} = Every 4 hours
			{1, 30} = Every one and a half hour (who the hell would do this?)
		*/
		restartTimer[] = {0, 0};

		/*
			Kicks players before restart to prevent gear loss.
			We strongely recommend to use this!

			0 = off
			1 = on
		*/
		useAutoKick = 0;

		/*
			Number of minutes before the server kicks players that did
			not disconnect before the restart. Should at least be two
			minutes!
		*/
		kickTime = 0;

		/*
			Self-explanatory

			0 = off
			1 = on
		*/
		useRestartMessages = 0;

		/*
			Number of minutes before the restart to inform your players.

			Only use full minutes here. Value like 5.5 have not been tested.
		*/
		restartWarningTime[] = {15, 10, 5, 3}; 
	};
};

 

Edited by EDG
3 people like this

Share this post


Link to post
Share on other sites

hey im hosting with FPSPlayers and they dont allow .bat files so how can i do this without using that .bat file?

Share this post


Link to post
Share on other sites
Advertisement

Hey my BEC screen closes down after server is started and I don think it works, this happens with no logs. any idea what the cause is?

Share this post


Link to post
Share on other sites
Quote
On 2/28/2016 at 3:52 PM, Aggro said:

Hey my BEC screen closes down after server is started and I don think it works, this happens with no logs. any idea what the cause is?

 

I too am getting this issue, did you fix it at all? any help would be great!

Share this post


Link to post
Share on other sites

Posted (edited)

This is because you need to add a Rcon port to the BEServer.cfg, i will paste mine below but i have found a big issue with BEC, basicly once you put that Rcon port into that file and what happened's is that BEServer.cfg will become active and look like this "BEServer_active_1ed5.cfg" BUT you won;t be able to join the server after because you will just keep getting different script restrictions and i have been adding them for 5 hours and still can not connect to the server!!!!

This is what you need to do to get BEC working;

This is Config.cfg for BEC

[Bec]
Ip = 127.0.0.1
Port = 2315
BePath = Path to Battleye folder
Admins = Admins.xml 
Commands = Commands.xml

[Misc]
AsciiChatOnly = True
Timeout = 60
KickLobbyIdlers = 500
Scheduler = Scheduler.xml

This is my path to Battleye 

C:\Servers\Exile_Main\SC\BattlEye

With the port, this needs to be your Rcon port but make sure it's outside of the Arma used ports from 2302 - 2305 (You can't use these port's hence mine is 2315).

Now go ahead and edit the BEServer.cfg;

RConPassword Password
RConPort 2315
MaxPing 600

But in your start up command line the -profiles=<location> is where your Battleye is being loaded from so mine is -profiles=SC

Once you have done all that BEC will connect but as i said once BEC connects and your BEServer.cfg becomes active you will have Scrip Restriction errors and if you give me some time i am trying to work a fix out for it now.

Also if you are still having no luck you can come and chat to me on my TS and i will guide you through it ;)

I will update once i have a fix but if anyone else has one please let me know.

Thanks

 

Here is my working BEC

4cbcce68f6.png

Edited by Brit

Share this post


Link to post
Share on other sites
19 hours ago, ShockWave said:

Can i set "LOCK SERVER" in restart phase

Yup, set the command:

#lock

As one of your scheduled commands.

Like this:

<job id="48">

<start>14:45:00</start>

<runtime>000000</runtime>

<day>1,2,3,4,5,6,7</day>

<loop>0</loop>

<cmd>#lock</cmd>

</job>

 

Edited by kuplion

Share this post


Link to post
Share on other sites

Autoinit is supported only for persistent missions! -.- 

cd C:\Users\Administrator\Desktop\ServerExile\DevEx - 19.09
timeout 3
start "Arma3" /min /wait arma3server.exe -mod=@exile;@a3_dms;@Anti-Theft_Server;@a3_zcp_exile;@enigma_exile_deploybik;@exilez;@SA_AdvancedTowing;@XG_killboard -servermod=@exileserver;@Ryanzombies -config=C:\Users\Administrator\Desktop\ServerExile\DevEx - 19.09\SC\config.cfg -port=2302 -profiles=SC -name=SC -autoinit -enableHT
timeout 6
echo ARMA 3 Server has started

 

 

 

Config.cfg

 

persistent                            = 1;   

 

 

 

Share this post


Link to post
Share on other sites

Hi, thanks for the guide.

I Have followed the steps and now can not get my server to show on LAN like before?

Any one have any Idea?

 

Cheers

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.