Difference between revisions of "Command Line Switches"

From Voxel Turf Wiki
Jump to: navigation, search
m
(Update to 1.6.0)
 
Line 1: Line 1:
{{version|1.3.3}}
+
{{version|1.6.0}}
  
 
==Using Command Line Switches In Steam==
 
==Using Command Line Switches In Steam==
Line 16: Line 16:
  
 
<source>
 
<source>
TURF Client: Version 1.1.0.
+
TURF Client: Version 1.6.0-RC2.
 
(C) 2012 Liam Twigger  
 
(C) 2012 Liam Twigger  
OMP Num Threads: 8
+
OMP Num Threads: 4
 
Client Init Clock: 0
 
Client Init Clock: 0
 
Usage: client <server_address>
 
Usage: client <server_address>
Line 61: Line 61:
 
--exportChunksToObj      Rendered chunks will be generated as .obj files in the cache directory
 
--exportChunksToObj      Rendered chunks will be generated as .obj files in the cache directory
 
--S (args)              Everything after --S is passed directly as arguments to any servers started by this client.
 
--S (args)              Everything after --S is passed directly as arguments to any servers started by this client.
 +
 +
 +
Press <return> to continue
 
</source>
 
</source>
  
Line 67: Line 70:
  
 
<source>
 
<source>
TURF Server: Version 1.1.0.
+
TURF Server: Version 1.6.0-RC2.
 
(C) 2012 Liam Twigger  
 
(C) 2012 Liam Twigger  
 
  --help
 
  --help
Line 94: Line 97:
 
--timeout TIMEOUT        Sets the connection timeout in ms (Default 12000)
 
--timeout TIMEOUT        Sets the connection timeout in ms (Default 12000)
 
--genmap XSIZE YSIZE    If starting a new game, generates a new XSIZE*ZSIZE map. XSIZE and ZSIZE will be rounded to multiple of 128.
 
--genmap XSIZE YSIZE    If starting a new game, generates a new XSIZE*ZSIZE map. XSIZE and ZSIZE will be rounded to multiple of 128.
 +
--mapGenIsland VAL      VAL is either ON or OFF. If true then a generated map will be an island.
 +
--mapGenSeaMod VAL      VAL is a number. Use this number to make more or less water on the map. Higher number = more water. Values can be negative. Default: 0
 +
--mapGenHillsMod VAL    VAL is a number. Use this number to make more or less hills on the map. Lower number = more hills. Values can be negative. Default: 0
 
--loadmap FILENAME      If starting a new game, loads the map from a file in the maps/ directory
 
--loadmap FILENAME      If starting a new game, loads the map from a file in the maps/ directory
 
--flatmap                If generating a new map, make it flat
 
--flatmap                If generating a new map, make it flat
Line 108: Line 114:
 
--computePanicThresh NUM Tells the server to stop spawning entities and doing complex AI stuff if its taking longer than this to do a simulation loop
 
--computePanicThresh NUM Tells the server to stop spawning entities and doing complex AI stuff if its taking longer than this to do a simulation loop
 
--lan                    Runs the server in local Lan mode
 
--lan                    Runs the server in local Lan mode
 +
--loadBitmapMap          Loads a bitmap (.bmp) file to use for map generation. Red = height
 +
--biome BIOME            Sets the biome for the map. Values are TEMPERATE, DESERT, MESA, SNOW
 
   
 
   
 
On linux you can safely shutdown the server with SIGHUP (killall -s HUP vtserver). This will tell the server to save and shutdown orderly
 
On linux you can safely shutdown the server with SIGHUP (killall -s HUP vtserver). This will tell the server to save and shutdown orderly
 
</source>
 
</source>

Latest revision as of 07:56, 24 September 2019

This article is up to date for the current version (1.6.0) of the game.

Using Command Line Switches In Steam

LaunchOptions.jpg
  • First open Steam, then right click Voxel Turf
  • Then click "launch options". There you can add or edit launch options

These launch options will apply to the client (vtclient). For example: --borderless will run the client in borderless windowed mode.

If you want to apply server options you have to use --S, every argument past that will be passed to the server. For example: --S --timeout 20000 --g 7 will mean that any servers started by the client will have the arguments --timeout 2000 --g 7 passed to them.

Client (vtclient)

Below is the output of vtclient --help

TURF Client: Version 1.6.0-RC2.
(C) 2012 Liam Twigger 
OMP Num Threads: 4
Client Init Clock: 0
Usage: client <server_address>

Command Line Switches: (all case sensitive)
--fs                     Enables/forces fullscreen.
--windowed               Enables/forces windowed mode.
--borderless             Enables/forces borderless windowed mode.
--width WIDTH            Sets the width of the window to WIDTH.
--height HEIGHT          Sets the width of the window to HEIGHT.
--physics STATE          STATE is either ON, OFF or AUTO (case sensitive). This sets whether physics is simulated. If your playing this
                         game over LAN or singleplayer (<server> = localhost), this is recommended to be off to prevent redundant
                         calculations wasting CPU. The default is OFF.
--gameDir DIR            Sets the directory where files are loaded from
--debugDraw STATE        STATE is either ON or OFF. Physics must be on for this to have effect. This draws the physics meshes.
--mtlighting STATE       STATE is either ON or OFF. Use multithreaded chunk lighting algorithim.
--mtrendering STATE      STATE is either ON or OFF. Use multithreaded chunk graphics mesh generation algorithim.
--help                   Displays this message.
--fm                     Free Memory: Tells the program to deallocate memory on exit (as opposed to just closing and letting the OS
                         do it). The reason why the game does not deallocate memory on shutdown be default is to prevent the game from
                         loading things from swap to deallocate them, which leads to a long shutdown.
--profiler               Spits out how long it takes to generate a chunk's VBO, lighting recalculations and chunk physics mesh regeneration.
--sleep MSEC             Sets how many milliseconds the game will sleep for between frames. This is a smart sleep, so that if the game
                         takes DeltaT milliseconds to render a frame, the game will sleep for (MSEC - DeltaT) milliseconds for smooth
                         operation. This command is useful for preventing the game from hogging all the CPU.
--renderItems ID         Starts the program, spits out ui BMPs for item ID, then closes. Use ALL to render all items
--sunlightMode STATE     STATE is either NORMAL, MIDDAY, MIDNIGHT, DAWN or DUSK. Renders daylight as if its stuck at this time.
--v                      Verbose output - for debuging.
--echoBlockPlacement     Whenever a block is set, a message will appear in the in-game console.
--echoItemIds            An items id will be displayed when seleceted as well as its name.
--strictLua STATE        STATE is either ON or OFF. If ON, abort if there is an error loading Lua scripts. Useful for debugging Lua scripts.
                         Default state is ON.
--login USER PASS        Logs in on start up with specified username and password
--demo                   Run in demo mode
--lan                    Run in Local LAN mode. This will only allow you to join local MP servers and will provide you with a generic profile
--vr                     Enable VR mode. This is VERY experimental
--noGpuNuke              Use this to stop the game unloading all GPU memory when it thinks its full
--timeout TIMEOUT        Sets the connection timeout in ms (Default 12000)
--pixmapFont STATE       STATE is either ON or OFF. Uses pixmap fonts instead of texture fonts.
--lagSpike TIME          If a frame takes longer than TIME ms to render, spit out profiling information to console. Default: 10000ms.
--port ID                Sets the outgoing port that the game tries to use first. If this port is not avaliable it will revert to default behaviour
--exportChunksToObj      Rendered chunks will be generated as .obj files in the cache directory
--S (args)               Everything after --S is passed directly as arguments to any servers started by this client.


Press <return> to continue

Server (vtserver)

Below is the output of vtserver --help

TURF Server: Version 1.6.0-RC2.
(C) 2012 Liam Twigger 
 --help
Usage: vtserver

Command Line Switches: (all case sensitive)
--help                   Displays this message.
--port PORT              Uses PORT as the port
--game ID                Sets the game id (default: 0)
--g ID                   Alias of --game
--gameDir DIR            Sets the directory where files are loaded from
--v                      Verbose output - for debuging.
--strictLua STATE        STATE is either ON or OFF. If ON, abort if there is an error loading Lua scripts. Useful for debugging Lua scripts.
                         Default state is ON.
--profiler               Profiling information.
--outputToFile           Redirects program output (stdout) to file serverlog.txt
--latchToClient LATCH    Do not use this. This is an argument when running the server from within the client, to the server this.
--serverName NAME        Name of the server, eg "Robbo's Turf Server"
--saveGame FILENAME      Name of the save game. Will be stored in savegames folder
--publicGame STATE       If set to ON, this server will be listed publicly online. Default is OFF.
--dedicated STATE        If set to ON, this server will be persistant if the host disconnects. Default is ON.
--maxPlayers NUMBER      Maximum number of players.
--gameMode MODE          The game mode, eg Build, Trash, Turf.
--gameModeVars { ARGS }  Various settings for the game. Format is { gm1, value ; gm2, value1, value2 ; etc }. There must be spaces around the
                         starting and finishing braces.
--timeout TIMEOUT        Sets the connection timeout in ms (Default 12000)
--genmap XSIZE YSIZE     If starting a new game, generates a new XSIZE*ZSIZE map. XSIZE and ZSIZE will be rounded to multiple of 128.
--mapGenIsland VAL       VAL is either ON or OFF. If true then a generated map will be an island.
--mapGenSeaMod VAL       VAL is a number. Use this number to make more or less water on the map. Higher number = more water. Values can be negative. Default: 0
--mapGenHillsMod VAL     VAL is a number. Use this number to make more or less hills on the map. Lower number = more hills. Values can be negative. Default: 0
--loadmap FILENAME       If starting a new game, loads the map from a file in the maps/ directory
--flatmap                If generating a new map, make it flat
--newGame STATE          STATE is either ON or OFF. Set to ON to enable
--randomSeed SEED        If generating a new map, use this seed. SEED can either be a number, or a string
--simulationPeriod T     T is the time delay between simulation frames in ms. Simulation frequency = 1000/T Hz.
                         Default: 60ms
--trustClient STATE      Trust clients' positions. STATE is ON by default, can be set to OFF for strict server authority
--singlePlayer PID       Puts the server into Singleplayer mode. It will only accept the player with id PID
--lagSpike TIME          If a loop takes longer than TIME ms to execute, spit out profiling information to all players. Default: 2500ms.
--difficulty VAL         0 = Hard, 1 = Medium, 2 = Easy. Default: 1.
--customSkinTransfers STATE          STATE is either ON or OFF. Set to OFF to disable
--wsi PATH               Adds a steam workshop item to the path of mods to load
--computePanicThresh NUM Tells the server to stop spawning entities and doing complex AI stuff if its taking longer than this to do a simulation loop
--lan                    Runs the server in local Lan mode
--loadBitmapMap          Loads a bitmap (.bmp) file to use for map generation. Red = height
--biome BIOME            Sets the biome for the map. Values are TEMPERATE, DESERT, MESA, SNOW
 
On linux you can safely shutdown the server with SIGHUP (killall -s HUP vtserver). This will tell the server to save and shutdown orderly