Jump to content

Batch file for joining your favourite servers


robbiedarza

Recommended Posts

Hello all,

 

This is a .bat file I used to use for arma 2 to join a server quickly just edited a little bit to work for arma 3 Epoch.

 

Copy and paste it into notepad and save it as start.bat

 

Just edit the server ip, port and mods to your liking.

 

 

Cheers

 

 

Robbie

@echo off
echo ===============================
echo YOUR CLAN NAME HERE
echo --------------------------------
echo by YOUR NAME HERE
echo ===============================
echo Join the server in .....
timeout 4

::Config | Edit to fit your needs
::---> ===============================================================================================================================================
:: Your Arma 3
set arma3=C:\Program Files (x86)\Steam\steamapps\common\Arma 3
:: Server IP    
set IP=1234.5678.910
:: Server Port
set PORT=2302
:: Server PASSWORD
set PASSWORD=
:: Required Mods [ Ex. @Taviana;@DayzOverwatch;@DayZ_Epoch; ]
set MODS=@Epoch;@allinarmaterrainpack;@mas;

:: DO NOT EDIT THE LINES BELOW
::===============================================================================================================================================


start ""  "%arma3%\arma3.exe" 0 0 -skipintro -mod=%MODS% -noSplash -noFilePatching -world=empty -connect=%IP% -port=%PORT%

@exit
Link to comment
Share on other sites

  • 3 weeks later...

You also can try this one, it search automaticly for the arma3.exe-path. Only set Ip, Port, Mods and Password if one needed and go...

 

echo off
::/* *******************************www.v-i-p-gaming.de******************************* */
COLOR 0E
mode con lines=30 cols=80
TITLE A3 Epoch Batch
echo.
echo Connecting to server...
echo.
echo To cancel click on the [X]....
echo.
timeout 5
echo.
SETLOCAL ENABLEEXTENSIONS
:v64_path_a3
For /F "Tokens=2* skip=2" %%A In ('REG QUERY "HKLM\SOFTWARE\Wow6432Node\Bohemia Interactive\ArmA 3" /v "MAIN"') Do (set _ARMA3PATH=%%B)
IF NOT DEFINED _ARMA3PATH (GOTO v32_path_a3) ELSE (GOTO run)
:v32_path_a3
For /F "Tokens=2* skip=2" %%C In ('REG QUERY "HKLM\SOFTWARE\Bohemia Interactive\ArmA 3" /v "MAIN"') Do (set _ARMA3PATH=%%D)
IF NOT DEFINED _ARMA3PATH (GOTO uac_PATH_A3) ELSE (GOTO run)
:uac_PATH_A3
FOR /F "tokens=2* delims=   " %%E IN ('REG QUERY "HKLM\SOFTWARE\Wow6432Node\Bohemia Interactive\ArmA 3" /v "MAIN"') DO (SET _ARMA3PATH=%%F)
IF NOT DEFINED _ARMA3PATH (GOTO exit) ELSE (GOTO run)
:run
::
::/* Set the Server-IP after the = */::
set Server_IP=123.4.567
::
::/* Set the Server-Port after the = */::
set Port=2302
::
::/* Set the Server-Password after the = */::
::/* If Server have no Password just let it empty */::
set Password=
::
::/* Set required Mods for the Server */::
set Mod=@Epoch;
::
::
::
::/* ***************************Do not edit after this line*************************** */
start ""  "%arma3%\arma3.exe" 0 0 -skipintro -mod=%Mod% -noSplash -noFilePatching -world=empty -connect=%Server_IP% -port=%Port% -password=%Password%
ENDLOCAL
:exit
@exit
::/* *******************************www.v-i-p-gaming.de******************************* */

Link to comment
Share on other sites

or you could just use the arma 3 launcher built into the game and it does all that for you. why make things complicated when that makes it easier

 

If you host more than one server nothing is easier to join different servers with differnt mods, IPs and so on... thats the reason why I don't use all these Launcher since A2 Dayz Epoch....

Just my 2 cents

Link to comment
Share on other sites

  • 2 weeks later...

Why not just use shortcuts?

 

Yea you could no problem for 1 or two servers this works great. But if you have many servers with deferent mods you need to create 10 shortcuts thats not so easy to manange :D Im using autoit with "shellexecute" to join the servers with parameters and biuld a GUI with 10 buttons  Server 1 Server 2 Server 3... thats the fastest way for me and this forum post gave me all i needed. thanks to robbie & CH!LL3R by the way. if someone needs the script with gui etc just pm me.

Link to comment
Share on other sites

Why not just use shortcuts?

it is:

  • easier to manipulate, mass-modify (such as directory/installation volume change C:, D: etc) text files
  • also easier to backup/restore launcher bat files compared to shortcuts
  • you can also version control texts showing one character difference in case you change multiple files and miss something in just one of them.

thus batch is (in my opinion too) superior. I do need the above so it helps me.

if you require none of the underlined stuff, using BAT just for the sake of it is indeed unnecessary complexity and shortcuts might be better for you.

Link to comment
Share on other sites

I wrote a funktion in c (objective) to let users decide their arma 3 installation path at first launch of the program and then use this path to join your server. You can use this to build your own launcher like we did.

 

here is the function:

;Start -> Pathfinder & Conect
Func OKButton()
	if FileExists(@UserProfileDir & "\mumys_launcher_settings.ini") then ;checks if first launch or not
		Local Const $sFilePath = @UserProfileDir & "\mumys_launcher_settings.ini"
		Local $hFileOpen = FileOpen($sFilePath, $FO_READ)
		Local $sFileRead = FileRead($hFileOpen)
		ShellExecute($sFileRead, "0 0 -skipintro -mod=XXXYOUMODSHEREXXX; -noSplash -noFilePatching -world=empty -connect=XXXYOURIPXXX -port=XXXYOURPORTXXX")
	Else
	Local Const $sMessage = "Please select you Arma 3 Installation directory"     ; Display an open dialog to select a file.
	Local $sFileSelectFolder = FileSelectFolder($sMessage, "")& "\arma3.exe" ; users just select the path so we needed to add arma3.exe 
	$hFile = FileOpen(@UserProfileDir & "\mumys_launcher_settings.ini", 2)
	FileWrite($hFile, $sFileSelectFolder)
	FileClose($hFile)
	MsgBox($MB_SYSTEMMODAL, "", "Okay we think your Arma 3 directory now is:" & @CRLF & $sFileSelectFolder)
    ShellExecute($sFileSelectFolder, "0 0 -skipintro -mod=XXXYOUMODSHEREXXX; -noSplash -noFilePatching -world=empty -connect=XXXYOURIPXXX -port=XXXYOURPORTXXX") ;your server stuff goeas here
	EndIf
	EndFunc
	;END Function Pathfinder
Link to comment
Share on other sites

You also can try this one, it search automaticly for the arma3.exe-path. Only set Ip, Port, Mods and Password if one needed and go...

 

echo off
::/* *******************************www.v-i-p-gaming.de******************************* */
COLOR 0E
mode con lines=30 cols=80
TITLE A3 Epoch Batch
echo.
echo Connecting to server...
echo.
echo To cancel click on the [X]....
echo.
timeout 5
echo.
SETLOCAL ENABLEEXTENSIONS
:v64_path_a3
For /F "Tokens=2* skip=2" %%A In ('REG QUERY "HKLM\SOFTWARE\Wow6432Node\Bohemia Interactive\ArmA 3" /v "MAIN"') Do (set _ARMA3PATH=%%B)
IF NOT DEFINED _ARMA3PATH (GOTO v32_path_a3) ELSE (GOTO run)
:v32_path_a3
For /F "Tokens=2* skip=2" %%C In ('REG QUERY "HKLM\SOFTWARE\Bohemia Interactive\ArmA 3" /v "MAIN"') Do (set _ARMA3PATH=%%D)
IF NOT DEFINED _ARMA3PATH (GOTO uac_PATH_A3) ELSE (GOTO run)
:uac_PATH_A3
FOR /F "tokens=2* delims=   " %%E IN ('REG QUERY "HKLM\SOFTWARE\Wow6432Node\Bohemia Interactive\ArmA 3" /v "MAIN"') DO (SET _ARMA3PATH=%%F)
IF NOT DEFINED _ARMA3PATH (GOTO exit) ELSE (GOTO run)
:run
::
::/* Set the Server-IP after the = */::
set Server_IP=123.4.567
::
::/* Set the Server-Port after the = */::
set Port=2302
::
::/* Set the Server-Password after the = */::
::/* If Server have no Password just let it empty */::
set Password=
::
::/* Set required Mods for the Server */::
set Mod=@Epoch;
::
::
::
::/* ***************************Do not edit after this line*************************** */
start ""  "%arma3%\arma3.exe" 0 0 -skipintro -mod=%Mod% -noSplash -noFilePatching -world=empty -connect=%Server_IP% -port=%Port% -password=%Password%
ENDLOCAL
:exit
@exit
::/* *******************************www.v-i-p-gaming.de******************************* */

 

says it cant find Arma 3 lol

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

You also can try this one, it search automaticly for the arma3.exe-path. Only set Ip, Port, Mods and Password if one needed and go...

 

echo off
::/* *******************************www.v-i-p-gaming.de******************************* */
COLOR 0E
mode con lines=30 cols=80
TITLE A3 Epoch Batch
echo.
echo Connecting to server...
echo.
echo To cancel click on the [X]....
echo.
timeout 5
echo.
SETLOCAL ENABLEEXTENSIONS
:v64_path_a3
For /F "Tokens=2* skip=2" %%A In ('REG QUERY "HKLM\SOFTWARE\Wow6432Node\Bohemia Interactive\ArmA 3" /v "MAIN"') Do (set _ARMA3PATH=%%B)
IF NOT DEFINED _ARMA3PATH (GOTO v32_path_a3) ELSE (GOTO run)
:v32_path_a3
For /F "Tokens=2* skip=2" %%C In ('REG QUERY "HKLM\SOFTWARE\Bohemia Interactive\ArmA 3" /v "MAIN"') Do (set _ARMA3PATH=%%D)
IF NOT DEFINED _ARMA3PATH (GOTO uac_PATH_A3) ELSE (GOTO run)
:uac_PATH_A3
FOR /F "tokens=2* delims=   " %%E IN ('REG QUERY "HKLM\SOFTWARE\Wow6432Node\Bohemia Interactive\ArmA 3" /v "MAIN"') DO (SET _ARMA3PATH=%%F)
IF NOT DEFINED _ARMA3PATH (GOTO exit) ELSE (GOTO run)
:run
::
::/* Set the Server-IP after the = */::
set Server_IP=123.4.567
::
::/* Set the Server-Port after the = */::
set Port=2302
::
::/* Set the Server-Password after the = */::
::/* If Server have no Password just let it empty */::
set Password=
::
::/* Set required Mods for the Server */::
set Mod=@Epoch;
::
::
::
::/* ***************************Do not edit after this line*************************** */
start ""  "%arma3%\arma3.exe" 0 0 -skipintro -mod=%Mod% -noSplash -noFilePatching -world=empty -connect=%Server_IP% -port=%Port% -password=%Password%
ENDLOCAL
:exit
@exit
::/* *******************************www.v-i-p-gaming.de******************************* */

Hey Chiller this is great! Any chance of an updated version that looks for arma3battleye.exe and puts the 0 1 after it which prevents having to do the restart in arma since 1.44?

 

Thanks :)

Link to comment
Share on other sites

  • 1 month later...

Or a simple link on desktop or homepage:

steam://run/107410//-mod=@Epoch;%20-connect=85.93.88.164%20-port=2302

Just adjust ip and port for your server. This is our servers ip and port

 

 

Cool thanks for sharing, I will try that soon! 

Link to comment
Share on other sites

  • 2 months later...

so here is a strange issue im having, im tired of having to launch arma 3 launcher then enabling mods and then having to goto remote button, entering ip and port and joining a server.

so i found a batch file to launch, like the one in this forum.

 

@echo off
echo ===============================
echo YOUR CLAN NAME HERE
echo --------------------------------
echo by YOUR NAME HERE
echo ===============================
echo Join the server in .....
timeout 4

::Config | Edit to fit your needs
::---> ===============================================================================================================================================
:: Your Arma 3
set arma3=D:\Games\Steam\steamapps\common\Arma 3
:: Server IP    
set IP=185.38.151.16
:: Server Port
set PORT=2342
:: Server PASSWORD
set PASSWORD=
:: Required Mods [ Ex. @Taviana;@DayzOverwatch;@DayZ_Epoch; ]
set MODS=@ZombiesandDemons;

:: DO NOT EDIT THE LINES BELOW
::===============================================================================================================================================


start ""  "%arma3%\arma3.exe" 0 1 -skipintro -mod=%MODS% -noSplash -connect=%IP% -port=%PORT%

@exit

 

 

when i launch this bat it goes to the arma 3 logo splash screen, and just sits there. never goes past this screen. and no idea why.

 

any ideas?

Link to comment
Share on other sites

ok so everyone knows, i found the issue

start ""  "%arma3%\arma3.exe" 0 0 -skipintro -mod=%Mod% -noSplash -noFilePatching -world=empty -connect=%Server_IP% -port=%Port% -password=%Password%

has to be changed to

 

start ""  "%arma3%\arma3battleye.exe" 2 1 -skipintro -mod=%Mod% -noSplash -noFilePatching -world=empty -connect=%Server_IP% -port=%Port% -password=%Password%

this apparently is the new way to connect to a battleye enabled server.

 

Link to comment
Share on other sites

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
  • Advertisement
  • Discord

×
×
  • Create New...