Difference between revisions of "Command line arguments"

From Soldat Community Wiki
Jump to: navigation, search
m
m
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Command line arguments for Soldat client (Soldat.exe)=
+
=Command Line Arguments for Soldat Client (soldat.exe)=
<u>These are parameters that can be used when running Soldat.exe</u>:
+
<u>These are parameters that can be used when running soldat.exe</u>:
  
* '''''Soldat.exe -dedicated'''''  Starts a Soldat dedicated server.
+
* '''''soldat.exe -dedicated'''''  Starts a Soldat dedicated server.
  
* '''''Soldat.exe -start'''''  Starts the game without entering the menu.
 
  
* '''''Soldat.exe -dedicated''''' -start   Runs the dedicated server automatically.
+
* '''''soldat.exe -start'''''  Starts the game without entering the menu.
  
* '''''Soldat.exe -join IPnumber (port password)'''''  Runs the game and connects to IPnumber, port and password are optional.
 
  
  <u>Examples</u>: Soldat.exe -join 62.93.201.70 '''and''' Soldat.exe -join 127.0.0.1 23073 tikikaka
+
* '''''soldat.exe -join ip_address [port [password]]'''''   Runs the game and connects to ip_address (port and password are optional).
  
* '''''Soldat.exe -demo name (freecam speed notexts extract)'''''  Runs the game and plays the demo specified by name. Optional paramaters are:
+
 
 +
* '''''soldat.exe -joinurl server_url'''''  Runs the game and connects to server_url, which should have a format of Soldat URI (soldat://ip_address:port/password).
 +
 
 +
  <u>Examples</u>:
 +
  soldat.exe -join 62.93.201.70
 +
  soldat.exe -join 127.0.0.1 23073 tikikaka
 +
  soldat.exe -joinurl soldat://127.0.0.1:23073/tikikaka
 +
 
 +
 
 +
* '''''soldat.exe -demo name (freecam speed notexts extract)'''''  Runs the game and plays the demo specified by name. Optional parameters are:
 
** freecam (0/1) - the user can freely change the camera (default 1)
 
** freecam (0/1) - the user can freely change the camera (default 1)
 
** speed (0-...%)- how quick the playback will be specified in percents (default 100%)
 
** speed (0-...%)- how quick the playback will be specified in percents (default 100%)
Line 19: Line 26:
 
** The sound can be extracted with a program like "Total Recorder". Please note that this can take time and is not recommended on slower systems. For better results specify lower speed (like 50%).
 
** The sound can be extracted with a program like "Total Recorder". Please note that this can take time and is not recommended on slower systems. For better results specify lower speed (like 50%).
  
   <u>Examples</u>: Soldat.exe -demo demo12 '''and''' Soldat.exe -demo demo19 1 200 1 0
+
   <u>Examples</u>:
 +
  soldat.exe -demo demo12
 +
  soldat.exe -demo demo19 1 200 1 0
  
* '''''Soldat.exe -mod xxx'''''  Starts the game with a Soldat mod located in Soldat\mods\xxx
 
  
 +
* '''''soldat.exe -mod xxx'''''  Starts the game with a Soldat mod located in Soldat\mods\xxx
  
 
=Commands Line Arguments for Soldatserver=
 
=Commands Line Arguments for Soldatserver=
Line 32: Line 41:
 
''<u>Usage</u>: ./soldatserver -d''<br>
 
''<u>Usage</u>: ./soldatserver -d''<br>
 
Starts your server as a Daemon (runs in the background, even when you log off). Linux only.
 
Starts your server as a Daemon (runs in the background, even when you log off). Linux only.
 +
  
 
* '''-pid'''<br>
 
* '''-pid'''<br>
 
''<u>Usage</u>: ./soldatserver -pid soldatserver.pid''<br>
 
''<u>Usage</u>: ./soldatserver -pid soldatserver.pid''<br>
 
Sets the Process ID file name. Located in the /logs/ folder (soldatserver.pid by default).
 
Sets the Process ID file name. Located in the /logs/ folder (soldatserver.pid by default).
 +
  
 
* '''-m'''<br>
 
* '''-m'''<br>
 
''<u>Usage</u>: ./soldatserver -m xx.txt''<br>
 
''<u>Usage</u>: ./soldatserver -m xx.txt''<br>
 
Sets the default mapslist file to xx.txt (mapslist.txt by default).
 
Sets the default mapslist file to xx.txt (mapslist.txt by default).
 +
  
 
* '''-c'''<br>
 
* '''-c'''<br>
 
''<u>Usage</u>: ./soldatserver -c x.ini''<br>
 
''<u>Usage</u>: ./soldatserver -c x.ini''<br>
 
Sets the default configuration file to x.ini (Soldat.ini by default).
 
Sets the default configuration file to x.ini (Soldat.ini by default).
 +
  
 
* '''-p'''<br>
 
* '''-p'''<br>
 
''<u>Usage</u>: ./soldatserver -p 23073''<br>
 
''<u>Usage</u>: ./soldatserver -p 23073''<br>
 
Start the server on a specific port.
 
Start the server on a specific port.
 +
  
 
* '''-l'''<br>
 
* '''-l'''<br>
 
''<u>Usage</u>: ./soldatserver -l 12''<br>
 
''<u>Usage</u>: ./soldatserver -l 12''<br>
 
Limits the number of players that can join the server.
 
Limits the number of players that can join the server.
 +
  
 
* '''-k'''<br>
 
* '''-k'''<br>
 
''<u>Usage</u>: ./soldatserver -k "my clan only"''<br>
 
''<u>Usage</u>: ./soldatserver -k "my clan only"''<br>
 
Sets a password that will be required by anyone who tries to join.
 
Sets a password that will be required by anyone who tries to join.
 +
 +
  
 
* '''-b'''<br>
 
* '''-b'''<br>
Line 61: Line 78:
 
Binds the server to a specific IP Address. Use with caution! You cannot bind to an IP that isn't assigned to your network card!
 
Binds the server to a specific IP Address. Use with caution! You cannot bind to an IP that isn't assigned to your network card!
  
* '''-a'''<br>
 
''<u>Usage</u>: ./soldatserver -a #''<br>
 
Enable/Disable All-Seeing Eye registration. #: 1 = enabled, 0 = disabled.
 
  
 
* '''-s'''<br>
 
* '''-s'''<br>
 
''<u>Usage</u>: ./soldatserver -s #''<br>
 
''<u>Usage</u>: ./soldatserver -s #''<br>
 
Enable/Disable the SoldatServer Scripting Engine. #: 1 = enabled, 0 = disabled.
 
Enable/Disable the SoldatServer Scripting Engine. #: 1 = enabled, 0 = disabled.
 +
  
 
* '''-safe'''<br>
 
* '''-safe'''<br>
 
''<u>Usage</u>: ./soldatserver -safe #''<br>
 
''<u>Usage</u>: ./soldatserver -safe #''<br>
 
Enable/Disable Safe Mode for Scripts (On by default). #: 1 = enabled, 0 = disabled.
 
Enable/Disable Safe Mode for Scripts (On by default). #: 1 = enabled, 0 = disabled.
 +
  
 
* '''-lock'''<br>
 
* '''-lock'''<br>
 
''<u>Usage</u>: ./soldatserver -lock #''<br>
 
''<u>Usage</u>: ./soldatserver -lock #''<br>
 
Enable/Disable Locked Mode (Off by default). When Locked Mode is enabled, admins will not be able to type /loadcon, /password or /maxplayers.  #: 1 = enabled, 0 = disable$
 
Enable/Disable Locked Mode (Off by default). When Locked Mode is enabled, admins will not be able to type /loadcon, /password or /maxplayers.  #: 1 = enabled, 0 = disable$
 +
  
 
* '''-disallow'''<br>
 
* '''-disallow'''<br>
 
''<u>Usage</u>: ./soldatserver -disallow "GetURL,ReadFile"''<br>
 
''<u>Usage</u>: ./soldatserver -disallow "GetURL,ReadFile"''<br>
 
Disable certain script functions from being used by scripts. Note that this will cause any scripts that use these functions to crash with an "unknown identifier GetURL" error.
 
Disable certain script functions from being used by scripts. Note that this will cause any scripts that use these functions to crash with an "unknown identifier GetURL" error.
 +
  
 
* '''-debug'''<br>
 
* '''-debug'''<br>
Line 86: Line 104:
 
<nowiki>#</nowiki>: 0 = No Debug, 1 = Lobby Debug, 2 = Advanced Debug, 3 = Script Core Debug
 
<nowiki>#</nowiki>: 0 = No Debug, 1 = Lobby Debug, 2 = Advanced Debug, 3 = Script Core Debug
 
If you find a bug and report it, please use Debug Mode 2. It helps us alot.
 
If you find a bug and report it, please use Debug Mode 2. It helps us alot.
 +
  
 
* '''-ns'''<br>
 
* '''-ns'''<br>
 
''<u>Usage</u>: ./soldatserver -ns 192.168.2.1''<br>
 
''<u>Usage</u>: ./soldatserver -ns 192.168.2.1''<br>
 
Set the Nameserver your Soldat Server will use to resolve the Lobby DNS. Only use this if you know what you are doing! The server should automatically detect what Nameserver your computer uses!
 
Set the Nameserver your Soldat Server will use to resolve the Lobby DNS. Only use this if you know what you are doing! The server should automatically detect what Nameserver your computer uses!
 +
  
 
* '''-ls'''<br>
 
* '''-ls'''<br>
 
''<u>Usage</u>: ./soldatserver -ls #''<br>
 
''<u>Usage</u>: ./soldatserver -ls #''<br>
 
Set the maximum number of scripts which can be loaded by this server.
 
Set the maximum number of scripts which can be loaded by this server.

Latest revision as of 13:07, 5 May 2018

Command Line Arguments for Soldat Client (soldat.exe)

These are parameters that can be used when running soldat.exe:

  • soldat.exe -dedicated Starts a Soldat dedicated server.


  • soldat.exe -start Starts the game without entering the menu.


  • soldat.exe -join ip_address [port [password]] Runs the game and connects to ip_address (port and password are optional).


  • soldat.exe -joinurl server_url Runs the game and connects to server_url, which should have a format of Soldat URI (soldat://ip_address:port/password).
 Examples:
 soldat.exe -join 62.93.201.70
 soldat.exe -join 127.0.0.1 23073 tikikaka
 soldat.exe -joinurl soldat://127.0.0.1:23073/tikikaka


  • soldat.exe -demo name (freecam speed notexts extract) Runs the game and plays the demo specified by name. Optional parameters are:
    • freecam (0/1) - the user can freely change the camera (default 1)
    • speed (0-...%)- how quick the playback will be specified in percents (default 100%)
    • notexts (0/1) - no texts, menus or cursor will be displayed during playback (default 0)
    • extract (0/1) - extracts the demo to BMP files (default 0). Later they can be used to make an AVI file in a program like "Bmp2Avi".
    • The sound can be extracted with a program like "Total Recorder". Please note that this can take time and is not recommended on slower systems. For better results specify lower speed (like 50%).
 Examples:
 soldat.exe -demo demo12
 soldat.exe -demo demo19 1 200 1 0


  • soldat.exe -mod xxx Starts the game with a Soldat mod located in Soldat\mods\xxx

Commands Line Arguments for Soldatserver

When running your server from the command line, you can take advantage of what is known as command line arguments.

This is, basically, sending data to the binary on-the-fly from the interpreter (shell), such as MS-DOS or bash.

  • -d

Usage: ./soldatserver -d
Starts your server as a Daemon (runs in the background, even when you log off). Linux only.


  • -pid

Usage: ./soldatserver -pid soldatserver.pid
Sets the Process ID file name. Located in the /logs/ folder (soldatserver.pid by default).


  • -m

Usage: ./soldatserver -m xx.txt
Sets the default mapslist file to xx.txt (mapslist.txt by default).


  • -c

Usage: ./soldatserver -c x.ini
Sets the default configuration file to x.ini (Soldat.ini by default).


  • -p

Usage: ./soldatserver -p 23073
Start the server on a specific port.


  • -l

Usage: ./soldatserver -l 12
Limits the number of players that can join the server.


  • -k

Usage: ./soldatserver -k "my clan only"
Sets a password that will be required by anyone who tries to join.


  • -b

Usage: ./soldatserver -b "72.232.225.66"
Binds the server to a specific IP Address. Use with caution! You cannot bind to an IP that isn't assigned to your network card!


  • -s

Usage: ./soldatserver -s #
Enable/Disable the SoldatServer Scripting Engine. #: 1 = enabled, 0 = disabled.


  • -safe

Usage: ./soldatserver -safe #
Enable/Disable Safe Mode for Scripts (On by default). #: 1 = enabled, 0 = disabled.


  • -lock

Usage: ./soldatserver -lock #
Enable/Disable Locked Mode (Off by default). When Locked Mode is enabled, admins will not be able to type /loadcon, /password or /maxplayers. #: 1 = enabled, 0 = disable$


  • -disallow

Usage: ./soldatserver -disallow "GetURL,ReadFile"
Disable certain script functions from being used by scripts. Note that this will cause any scripts that use these functions to crash with an "unknown identifier GetURL" error.


  • -debug

Usage: ./soldatserver -debug #
Enable/Disable Debug Mode (See Debug_Mode in soldat.ini). #: 0 = No Debug, 1 = Lobby Debug, 2 = Advanced Debug, 3 = Script Core Debug If you find a bug and report it, please use Debug Mode 2. It helps us alot.


  • -ns

Usage: ./soldatserver -ns 192.168.2.1
Set the Nameserver your Soldat Server will use to resolve the Lobby DNS. Only use this if you know what you are doing! The server should automatically detect what Nameserver your computer uses!


  • -ls

Usage: ./soldatserver -ls #
Set the maximum number of scripts which can be loaded by this server.