Jump to content

Command line options


Recommended Posts

Despite running a few searches, I was unable to find any good listing of command line options I can apply to Lock On, if there are any. If possible, I'd love to start up the server with a mission already selected. (Boot straight to server unpause.)

 

Can anyone get me pointed in the right direction?

 

EDIT: Courtesy of Panzertard's latest ServMon script, I've found what I needed for the moment:

 

--net "server/./Missions/Multiplayer/MP Caucasus Battle 16x16.miz"

 

Any other known commands would be great, however!


Edited by aaron886
Link to comment
Share on other sites

These are the command line options.

launch.jpg

 

There are some interesting options to replay tracks and things like that.

There are only 10 types of people in the world: Those who understand binary, and those who don't.

Link to comment
Share on other sites

Excellent thank you! A strange problem with the "--net <mission>" syntax though... when the server starts, the mission is clearly running, but the loading screen image doesn't go away; it just sits on top of everything, blocking all but a 1-pixel border. It doesn't actually seem to be a multiplayer mission, as I cannot bring up the aircraft-selection screen.

Link to comment
Share on other sites

Once again by banging my head against the proverbial wall for an extra half hour, I answer my own question. Apologies! I still can't seem to get to the aircraft selection screen though, as if the application I started is only capable of spectating.

Link to comment
Share on other sites

As for aircraft selection - make sure your mission is really MP capable.

Create / modify a mission - make sure it uses 'Client' instead of 'Player' / 'Pilot #1'.

 

1. Create / Use a CMD file within your ".\Eagle Dynamics\LockOn Flaming Cliffs 2" folder. There might be a Multiplayer.bat there already perhaps?

2. Edit the CMD-file to look something like this:

@start bin\x86\stable\simulator.exe --net "server/./Missions/Multiplayer/MyTestMission.miz"

3. Create a SHORTCUT of the CMD file, and put it in the Windows startup-folder (start-menu for All-Users).

It cannot be the CMD - it must be a shortcut. The CMD MUST be stored in the root folder of FC2.

 

Q: Why use shortcut and not the CMD directly in Startup/Desktop?

A: This tells Windows that working directory should be "FC2" root folder - and not your Startup-folder (or desktop for those who put it on the desktop).

Windows cannot find simulator-files in the startup-folder (or on the desktop), it must look for these files within the FC2 folder structure.`

 

Additional hints for people who visit this post later:

- FC2/DCS needs a mission to load when it goes into server-mode. It cannot load into server-mode without a mission. It will then instead ask you to input a mission, requiring user input.

- You must set up all the server-options before you launch the mission, and then quit FC2/DCS to save the server settings. You must *quit* the server - otherwise a successful save may not happen if the server crashes.


Edited by Panzertard

The mind is like a parachute. It only works when it's open | The important thing is not to stop questioning

Link to comment
Share on other sites

Also be advised that you can do something like:

@start /d "C:\Program Files\Eagle Dynamics\LockOn Flaming Cliffs 2" bin\x86\stable\simulator.exe --nopause %1

 

to provide the path to the executable.

There are only 10 types of people in the world: Those who understand binary, and those who don't.

Link to comment
Share on other sites

  • 1 year later...

I noticed this is an OLD posting yet it does talk of command line options for servers.. so I will ask here for 1.2.4 version update..

 

On a remote box.. all I want is to make a .bat file or windows shortcut that would run multiplayer as a server without a gui attached... I noticed someone mentioned adding an autoexec.cfg someplace with "options.graphics.render3D = false" to accomplish this.

 

So what would a whole command line look like..

 

simulator.exe --net login to dcs servers.. start a server with a certain map.. and let it just go on its way without a 3d gui and seen on the servers listing?

 

My missions end fine and load next map in cycle already and loop back per triggers.. I just need to get the first one loaded in this respect.

 

The biggest issue I have at present..is the GUI running.. when not attended it defaults on a 3d screen which generates heat.. and gets the fans kicking. I usually just set it to f10 screen if im around and the cpu / gpu usages drops to near nil.. which makes for a silent cool running server..

 

I am assuming using one of the server addon mods will allow me to kick/ban admin from another machine anyways.. so why do I need the GUI running on the server machine? SLMod seemed easy to install.. wish it had the gui turnoff also included..sigh (hint or help)


Edited by Fuby
Link to comment
Share on other sites

I noticed this is an OLD posting yet it does talk of command line options for servers.. so I will ask here for 1.2.4 version update..

 

On a remote box.. all I want is to make a .bat file or windows shortcut that would run multiplayer as a server without a gui attached... I noticed someone mentioned adding an autoexec.cfg someplace with "options.graphics.render3D = false" to accomplish this.

 

So what would a whole command line look like..

 

simulator.exe --net login to dcs servers.. start a server with a certain map.. and let it just go on its way without a 3d gui and seen on the servers listing?

 

My missions end fine and load next map in cycle already and loop back per triggers.. I just need to get the first one loaded in this respect.

 

The biggest issue I have at present..is the GUI running.. when not attended it defaults on a 3d screen which generates heat.. and gets the fans kicking. I usually just set it to f10 screen if im around and the cpu / gpu usages drops to near nil.. which makes for a silent cool running server..

 

I am assuming using one of the server addon mods will allow me to kick/ban admin from another machine anyways.. so why do I need the GUI running on the server machine? SLMod seemed easy to install.. wish it had the gui turnoff also included..sigh (hint or help)

 

The

options.graphics.render3D = false

only helps relieving the server with the display part, so the graphics card used does not matter anymore.

 

I warmly recommend you use Slmod for the remote administration _in game_

 

Below is some (very dirty) Autoit code that will launch the server, update it if a new version pops out, start a mission, and restart the whole thing if "dcs.exe" dies on you (handy with a remote "taskkill /F /IM dcs.exe" for a hot restart of DCS). You'll need to adapt the paths to fit your system, obviously.

 

 

#NoTrayIcon


$log_file = "autostartserver.log"
#include <date.au3>

Sleep(30000)
_update()
restartServer()
While 1
Sleep(1000)
If Not ProcessExists("dcs.exe") Then
	_update()
	restartServer()
EndIf
WEnd

Func restartServer()
$func = "restartServer"
__log("starting exe", $func)
ShellExecute("E:\DCS World\bin\DCS.exe", "--net-mode gui", "E:\DCS World")
if @error Then
	__log("erreur lors du démarrage de DCS.exe", $func)
	exit 1
EndIf
WinWaitActive("DCS", "")
__log("fenêtre DCS active, déplacement de la fenêtre", $func)
Sleep(30000)
WinMove("DCS", "", 0, 0)
__log("fenêtre déplacée, c'est parti pour les clics", $func)
Sleep(1000)
MouseClick("left", 669, 423, 1)
Sleep(10000)
MouseClick("left", 350, 759, 1)
Sleep(1000)
MouseClick("left", 776, 351, 1)
Sleep(1000)
MouseClick("left", 753, 756, 1)
__log("fini avec les clics", $func)
EndFunc   ;==>restartServer

Func _update()
$func = "update"
AdlibRegister("launcher_killer")
__log("lancement de DCS_updater.exe", $func)
ShellExecute("E:\DCS World\bin\DCS_updater.exe", "update", "E:\DCS World\")
if @error Then
	__log("erreur lors du démarrage de DCS_updater.exe", $func)
	exit 1
EndIf
If WinWait("DCS UPDATE", "New version is available. Update?", 15) <> 0 Then
	__log("une mise à jour est disponible", $func)
	__log("activation de la première fenêtre", $func)
	WinActivate("DCS UPDATE")
	Sleep(1000)
	Send("{ENTER}")
	__log("mise en attente", $func)
	While ProcessExists("DCS_updater.exe") <> 0
		If WinExists("DCS Update") Then
			__log("l'update est terminée et s'est bien passée", $func)
			WinActivate("DCS Update")
			Sleep(1000)
			Send("{ENTER}")
		EndIf
		Sleep(2000)
	WEnd
else
	__log("pas de mise à jour disponible", $func)
EndIf
While ProcessExists("launcher.exe")
	sleep(250)
WEnd
AdlibUnRegister("launcher_killer")
__log("fin du processus de mise à jour automatique", $func)
EndFunc   ;==>_update


Func launcher_killer()
If ProcessExists("launcher.exe") Then
	__log("mise à mort de launcher.exe", "launcher_killer")
	ProcessClose("launcher.exe")
EndIf
EndFunc   ;==>launcher_killer

Func __log($msg, $func, $TimeStamp = True)
$hFile = FileOpen($log_file, 1)
If $hFile <> -1 Then
	$msg = _Now() & ' - ' & $func & ' - ' & $msg & @CRLF
	FileWriteLine($hFile, $msg)
	FileClose($hFile)
EndIf
EndFunc   ;==>__log

 

 

Once the server is running, you can choose which mission you want to fly with Slmod ("-admin load").

 

Cheers ! :beer:

Link to comment
Share on other sites

The
options.graphics.render3D = false

only helps relieving the server with the display part, so the graphics card used does not matter anymore.

 

I warmly recommend you use Slmod for the remote administration _in game_

 

Below is some (very dirty) Autoit codeOnce the server is running, you can choose which mission you want to fly with Slmod ("-admin load").

 

Cheers ! :beer:

 

Appreciate your time.. yes, all I want to do is relieve the server box of the gui overhead..

 

Also, I changed the paths and ran your code..or tried to as some .bat file.. did nothing but disappear..

 

thanks anyways..

 

I also know of SLmod and it installs easily.. but again..thats for after a server is running.. and used for other user admin from another computer for a remote mainly.. It will be used...

 

but im still looking for a command line to launch the server..log into DCS (seems needed?) and run the first map I name.."IF" this is possible at all...

 

EDIT: I have now figured you entered a "autoit" code for a program called "autoit".. which I don't use.. but appreciate the script if that's my last resort.. I hope this is not so..


Edited by Fuby
Link to comment
Share on other sites

 

EDIT: I have now figured you entered a "autoit" code for a program called "autoit".. which I don't use.. but appreciate the script if that's my last resort.. I hope this is not so..

 

It's actually pretty efficient. You can compile your code into an .exe in one click, and then put the .exe in the Windows auto-start, which means the server will autostart AND launch the first mission it finds every time the computer starts (+ auto restart & auto update thingies).

 

It also means you can remotely restarts dcs.exe OR the whole computer with the assurance that you'll get a running server in the end whatever happens.

 

I do not quite understand why you would consider a script such a bad solution. As far as I know, there is _no_ command line option that lets you run the server and launch a mission at the samed time, due to the onlin log-in being mandatory.

 

Anyway, have fun ! :beer:

 

EDIT:

 

but im still looking for a command line to launch the server..log into DCS (seems needed?) and run the first map I name.."IF" this is possible at all...

 

This is exactly what my script does ...

Link to comment
Share on other sites

I do not quite understand why you would consider a script such a bad solution.

 

As far as I know, there is _no_ command line option that lets you run the server and launch a mission at the samed time, due to the onlin log-in being mandatory.

 

 

 

Oh no.. I didn't say I wouldn't want to.. I have used automated scripting programs since 3.1 at one time or the other.. appreciate it..

 

I been looking for the answer to my questions.. which you just stated.. NO Command Line option for this... now that I know there isn't any.. other options must be found..;-)

 

Would be nice to find a list of the command line options.. hard program to get everything together..

Link to comment
Share on other sites

Would be nice to find a list of the command line options.. hard program to get everything together..

 

Indeed ... do not hesitate to come to me should you decide to use the script I made and need help tailoring it to your specific needs.

Link to comment
Share on other sites

Indeed ... do not hesitate to come to me should you decide to use the script I made and need help tailoring it to your specific needs.

 

I did install Autoit 3.. http://www.autoitscript.com/site/autoit/downloads/

 

I think the script fails on the mouse click locations..

 

WinWaitActive("DCS", "")

__log("fenêtre DCS active, déplacement de la fenêtre", $func)

Sleep(30000)

WinMove("DCS", "", 0, 0)

__log("fenêtre déplacée, c'est parti pour les clics", $func)

Sleep(1000)

MouseClick("left", 669, 423, 1) ;"the connect button"

Sleep(10000)

MouseClick("left", 350, 759, 1) ;"the new server button"

Sleep(1000)

MouseClick("left", 776, 351, 1) ;"the map to load highlighted Note: this one may vary as to map position in list"

Sleep(1000)

MouseClick("left", 753, 756, 1) ;"the start button"

 

 

I see them move the cursor come login info.. but they click in wrong locations..;-)

 

I use a 1920 x 1080 screen and DCS opens full screen fine through your script.. Im stuck there as I do not know how to locate the location it wishes to press at..

 

EDIT: found a tool to find position.. M&S Utility http://www.softpedia.com/dyn-postdownload.php?p=76369&t=4&i=1

Worked fine after that.. logged it in and set the map choice. thanks for the script and idea...

 

Question .. can you add an Esc key press then an F10 press and then another Esc key press to your script after load.. so I can copy paste it into mine..;-) That would put the graphics card in low mode for me.. or at least my fans on it..lol

 

 

 

For anyones reference .. this is 1920 x1080 full screen settings:

WinMove("DCS", "", 0, 0)

__log("fenêtre déplacée, c'est parti pour les clics", $func)

Sleep(1000)

MouseClick("left", 1103, 563, 1)

Sleep(10000)

MouseClick("left", 658, 1025, 1)

Sleep(1000)

MouseClick("left", 1476, 840, 1)

Sleep(1000)

MouseClick("left", 1412, 1002, 1)

 

Second Post EDIT: although the cursor postion utility above is nice to have..

I now found that Autoit has one in the windows start menu for it.. (Windows Info)...

 

I also figured the esc f10 esc addition to go below last mouseclick..

 

Sleep(30000)

Send("{ESC}")

Sleep(1000)

Send("{F10}")

Sleep(1000)

Send("{ESC}")

 

You will find DCS and your graphics card will appreciate your server sitting on the 2d screen much more than the 3D screen..

 

 

worked great.. thanks again!


Edited by Fuby
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...