Jump to content

Commandline option for server startup


HiJack
 Share

Recommended Posts

I tried to find some information on commandline options to start my dedicated server so I can refresh it automatically. It is possible to start the server with this command:

 

@start bin\x86\stable\simulator.exe --net server

 

It starts the server up but it doesn’t load a mission by itself :( Why can’t ED make a commandline option to start server with a specific mission file?

 

I tried the <-s --dostring “luastring”> option also but with no luck.

 

Anyone with more LUA skillz to figure the "luastring" part out? :helpsmilie:

 

(HJ)

Link to comment
Share on other sites

Have you tried just giving the mission name as an argument? It probably won't work, but you might try it.

 

I asked about the do things, and got this PM from c0ff:

Would it be possible to use the -c --dofile or -s --dostring options for this?

Nope.

-s/-c only affect some configuration settings (the same as autoexec.cfg)

I'm not entirely sure what it means.

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

OK, thanks Case. That means that "string" and "file" can only include settings as in other config files and not LUA commands as I thought.

 

If you use only the mission file it starts up the mission offline.

 

The server start command should be something like this:

@start bin\x86\stable\simulator.exe --nopause --net server "my mission.miz"

 

And this should start the server in unpaused mode with your network settings. Issuing the "--net server" does everything right but you need to select mission and press "Start", this should be unneccesary :D

 

(HJ)


Edited by HiJack
Link to comment
Share on other sites

Ok, that means that it will probably not work this way.

 

However, Servman has the ability to load a mission, but I suspect it is only possible if the server is already running, as if it is not there is no LUA code that gets executed.

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

Ok, that means that it will probably not work this way.

 

However, Servman has the ability to load a mission, but I suspect it is only possible if the server is already running, as if it is not there is no LUA code that gets executed.

Ah, thank you - a new idea. I know Servman is in control quite early - maybe I can come up with some sort of autoload.

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

Ah, thank you - a new idea. I know Servman is in control quite early - maybe I can come up with some sort of autoload.

That would be awesome!

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

Ah, thank you - a new idea. I know Servman is in control quite early - maybe I can come up with some sort of autoload.

 

Weeeee, yes Panzer, go Panzer go go go :thumbup:

 

I guess ServMan is loaded when using "--net server" :D


Edited by HiJack
Link to comment
Share on other sites

I tried to find some information on commandline options to start my dedicated server so I can refresh it automatically. It is possible to start the server with this command:

 

@start bin\x86\stable\simulator.exe --net server

 

It starts the server up but it doesn’t load a mission by itself :( Why can’t ED make a commandline option to start server with a specific mission file?

 

I tried the <-s --dostring “luastring”> option also but with no luck.

 

Anyone with more LUA skillz to figure the "luastring" part out? :helpsmilie:

 

(HJ)

I've tried quite many variants to get the server started - sorry to say, the variant you listed there is the one that got us closest to start.

Servman wont be able to kickstart anything until the server itself if fully operating.

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

GOOD NEWS!

c0ff was kind enough to let me in on a secret:

EDIT EDIT - first text used wrong slash, backslash - should be FORWARD slash:

"<full path to exe>" --net server/./Missions/Multiplayer/mymissionname.miz


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

Could this revelation be used to restart the server automatically if say.... the game crashes while changing missions?

The right man in the wrong place makes all the difference in the world.

Current Projects: Scripting Wiki, Something...

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD, IADScript, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Could this revelation be used to restart the server automatically if say.... the game crashes while changing missions?

Only if you combine it with AutoIT to detect the crash. If the server crashes, the process may hang (white server-window), it may crash dump (generic windows error message) etc.

But thats quite possible - I built a AutoIT script for my DCS server before the hardware died, thats was capable of detecting such crashes and start the server again.


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

that would be sweet to have. We have had a fair bit of the game server crashing on mission load. Its even done it a few times after having it up for just 5 minutes!

The right man in the wrong place makes all the difference in the world.

Current Projects: Scripting Wiki, Something...

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD, IADScript, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Wait wait! It works!!!!! No space betwen server and the paths in the commandline!

"<full path to exe>" --net server/./Missions/Multiplayer/mymissionname.miz

 

Yahoooo! My clearup scripts is due for some change :D

 

Thanks to Case, c0ff and Panzer for the interest and help!

 

(HJ)


Edited by HiJack
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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