Jump to content
Sign in to follow this  
Khemitude

Setting Combined Operations using a custom Batch file

Recommended Posts

I'm trying to create a batch file that will Load certain mods depending on the campaign I pick in the command prompt, its all working except for the fact I don't know how to set it up so it uses combined operations as at the minute its just launching operation arrowhead without the arma 2 files.

Heres what I've gotten so far:

ECHO OFF

CLS

SET "s_start_in=J:\Games\Steam\"

SET "s_game_exe=J:\Games\Steam\steam.exe"

SET "s_startup_options=-applaunch 33930 -skipIntro -noSplash -noFilePatching -cpucount=8 -exThreads=7 -mod=;expansion;expansion\beta;expansion\beta\expansion;@JSRS;@okt_NoBlurBeta"

ECHO.

ECHO. ARMA 2 : OPERATION ARROWHEAD

ECHO. #####################################################################

ECHO.

ECHO. a - ARMA 2 : OPERATION ARROWHEAD

ECHO. b - Lions of Kandhar

ECHO. c - The Afghan War Diary

ECHO. d - Operation Gothic Serpent

ECHO. e - Ghost Recon: Island Thunder

ECHO. f - Six Days in Fallujah

ECHO.

ECHO. #####################################################################

ECHO.

SET /P M=Select Campaign:

ECHO.

CD /D %s_start_in%

IF %M%==a START "" "%s_game_exe%" %s_startup_options%

IF %M%==b START "" "%s_game_exe%" %s_startup_options%;@CBA_CO;@INKO;@McTierOne;@ONS-OA;@SGW_Afghan;@mad_build;@mad_resh

IF %M%==c START "" "%s_game_exe%" %s_startup_options%;@ad_helos;@OFrP

IF %M%==d START "" "%s_game_exe%" %s_startup_options%;@ad_helos;@fallujah1_2

IF %M%==e START "" "%s_game_exe%" %s_startup_options%;@icebreakr_lingor_units_v13;@lingor

IF %M%==f START "" "%s_game_exe%" %s_startup_options%;@fallujah1_2

EXIT

Edited by Khemitude

Share this post


Link to post
Share on other sites

You need to point to the arma2 files at the start of your modline, i.e. mod=J:\Games\Arma2;expansion;expansion\beta......

I believe @JSRS should always be at the end of the modline and that it needs @CBA_CO, which should be at the start of the custom mods, to work properly, so you'll probably need to remove JSRS from the startup_options and add it to the end of each profile.

You could just use Arma II Launcher instead though, which might be easier ;) http://www.militarygaming.org/files/file/1-arma2-launcher-by-spirited-machine/

Share this post


Link to post
Share on other sites

Whoops yep I meant to put CBA in the top mod line but forgot, I've tried adding the location of it but then when loading into game, it still hasn't loaded it but its also not loading any of the other mods specified either in that case, though in the expasions bit along with the usual expansion that are checked are "ca" and "arma".

So to clarify when using the batch file without the location of arma 2, it all loads into game fine and in the expansion menu there is all the mods i've specified activated. But when adding the location of arma 2 none of the mods specified are loaded but neither is the arma 2 stuff either but going into the expansions menu there is now "ca" and "arma" along with the regular operation arrowhead and dlc stuff.

I kinda want to use my own batch file as i can tweak and add what not very easily.

So heres what I have now, also going to take a quick screenshot to show you what i mean in the menu, note ill be using set "b" so ill be trying to load the Lions of Kandhar mod list

ECHO OFF

CLS

SET "s_start_in=J:\Games\Steam\"

SET "s_game_exe=J:\Games\Steam\steam.exe"

SET "s_startup_options=-applaunch 33930 -skipIntro -noSplash -noFilePatching -cpucount=8 -exThreads=7 -mod=C:\Games\arma 2;expansion;expansion\beta;expansion\beta\expansion;@CBA_CO;@okt_NoBlurBeta"

ECHO.

ECHO. ARMA 2 : OPERATION ARROWHEAD

ECHO. #####################################################################

ECHO.

ECHO. a - ARMA 2 : OPERATION ARROWHEAD

ECHO. b - Lions of Kandhar

ECHO. c - The Afghan War Diary

ECHO. d - Operation Gothic Serpent

ECHO. e - Ghost Recon: Island Thunder

ECHO. f - Six Days in Fallujah

ECHO.

ECHO. #####################################################################

ECHO.

SET /P M=Select Campaign:

ECHO.

CD /D %s_start_in%

IF %M%==a START "" "%s_game_exe%" %s_startup_options%;@JSRS

IF %M%==b START "" "%s_game_exe%" %s_startup_options%;@INKO;@McTierOne;@ONS-OA;@SGW_Afghan;@mad_build;@mad_resh;@JSRS

IF %M%==c START "" "%s_game_exe%" %s_startup_options%;@ad_helos;@OFrP;@JSRS

IF %M%==d START "" "%s_game_exe%" %s_startup_options%;@ad_helos;@fallujah1_2;@JSRS

IF %M%==e START "" "%s_game_exe%" %s_startup_options%;@icebreakr_lingor_units_v13;@lingor;@JSRS

IF %M%==f START "" "%s_game_exe%" %s_startup_options%;@fallujah1_2;@JSRS

EXIT

Screenshots:

Before adding in C:\games\arma 2

After adding it in:

---------- Post added at 21:21 ---------- Previous post was at 20:30 ----------

DERP! Forgot the first quotation mark before "-mod=" So it was reading "-mod=C:\Games\arma" and stopping there because of the space between arma and 2.... all working fine now.

Christ that's embarrassing.... after all that I was tearing my hair out trying to figure why it would work.

Edited by Khemitude
Added screenshots

Share this post


Link to post
Share on other sites

Cool, glad you figured it out :)

I know what you mean about tweaking easily, it can be a bit laborious using ArmA II Launcher (and PwS is even worse for SP/Offline missions). I like your idea and might move away from Arma II Launcher and use it myself ;)

Share this post


Link to post
Share on other sites

Indeed I took one look at the launcher that you mentioned and it sent my head spinning it's so unintuitive. Your more than welcome to use my code just don't forget to add the quotation mark like I did :D

Share this post


Link to post
Share on other sites

Yeah, the main advantage with the launchers is you don't have to worry about checking the mod folder names and making sure you don't make any spelling/syntax mistakes but it's probably still quicker using a batch file compared to having to drag and drop the mods into the right positions. ArmA II Launcher can be nice for quickly disabling/enabling mods to test though and can even use groups so that you can toggle a bunch of mods with one click, so it has it's pros and cons ;)

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
Sign in to follow this  

×