Startup parameters: Difference between revisions

From PZwiki
(Undo revision 29090 by Nightmare (talk))
(Undo revision 29087 by Nightmare (talk))
Line 86: Line 86:
|-
|-


| -adminpassword=<passwd>
| -adminpassword  
| option to bypasses the enter-a-password prompt when creating a server.  Example: -adminpassword=YourPasswdXYZ
| option to bypasses the enter-a-password prompt when creating a server.  Example: -adminpassword YourPasswdXYZ
|-
|-


| -servername=<name>
| -servername
| You can choose a different servername by using this option when starting the server. Example: -servername=MySecondServer
| You can choose a different servername by using this option when starting the server. Example: -servername MySecondServer
|-
|-


| -ip=<ip>
| -ip <ip>
| option to handle multiple network cards. Example: -ip=127.0.0.1
| option to handle multiple network cards. Example: -ip 127.0.0.1
|-
|-


| -port=<port>
| -port <port>
| option which overrides the .ini option "DefaultPort". Example: -port=16261
| option which overrides the .ini option "DefaultPort". Example: -port 16261
|-
|-




| -steamvac=<true/false>
| -steamvac <true/false>
| option to enable/disable VAC on Steam servers. On the server command-line use -steamvac=true/false. In the server's INI file, use SteamVAC=true/false.
| option to enable/disable VAC on Steam servers. On the server command-line use -steamvac true/false. In the server's INI file, use SteamVAC=true/false.
|-
|-


| -steamport1=<port> <br> -steamport2=<port>
| -steamport1 <port> <br> -steamport2 <port>
| Steam servers require two additional ports to function (I'm guessing they are both UDP ports, but you may need TCP as well). These are in addition to the DefaultPort= setting. These can be specified in two ways: In the server's INI file as SteamPort1= and SteamPort2=. Using command-line options -steamport1 and -steamport2.
| Steam servers require two additional ports to function (I'm guessing they are both UDP ports, but you may need TCP as well). These are in addition to the DefaultPort= setting. These can be specified in two ways: In the server's INI file as SteamPort1= and SteamPort2=. Using command-line options -steamport1 and -steamport2.
|-
|-

Revision as of 01:24, 10 March 2016


ProjectZomboid64/32 accept JVM arguments in addition to game arguments. This can be used to override vmArgs in the .json file. JVM arguments must end with a --, even if there are no game arguments.


These parameters can be configured by creating a new shortcut on your desktop and then adding the appropriate option in the target line.


Example
ProjectZomboid64.exe -Xmx1024m -Xms1024m -- -nosteam

For Steam version:

  1. Choose the game shortcut in Library
  2. Right click on the game
  3. Select properties
  4. Hit "Set launch options"


Game Arguments


Client & Server

Arg Description
-nosteam Disables Steam integration on client/server.
-cachedir=<path> sets the path for the game data cache dir. Example: -cachedir=C:\Zomboid
-modfolders option to control where mods are loaded from. "-modfolders workshop,steam,mods" is the default. Any of the 3 keywords may be left out and may appear in any order.


Client

Arg Description
+connect <ip:port> Server address to connect, when joining a server using Steam. Example: +connect 127.0.0.1:16261
+password <passwd> Server password to connect, when joining a server using Steam. Example: +password ServersPassword
-debugtranslation writes possible translation issues to homedir "/Zomboid/translationProblems.txt"
-safemode safe mode ??


Server

Arg Description
-adminpassword option to bypasses the enter-a-password prompt when creating a server. Example: -adminpassword YourPasswdXYZ
-servername You can choose a different servername by using this option when starting the server. Example: -servername MySecondServer
-ip <ip> option to handle multiple network cards. Example: -ip 127.0.0.1
-port <port> option which overrides the .ini option "DefaultPort". Example: -port 16261
-steamvac <true/false> option to enable/disable VAC on Steam servers. On the server command-line use -steamvac true/false. In the server's INI file, use SteamVAC=true/false.
-steamport1 <port>
-steamport2 <port>
Steam servers require two additional ports to function (I'm guessing they are both UDP ports, but you may need TCP as well). These are in addition to the DefaultPort= setting. These can be specified in two ways: In the server's INI file as SteamPort1= and SteamPort2=. Using command-line options -steamport1 and -steamport2.


JVM Arguments


Client & Server

Arg Description
-Xmx Maximum amount of Memory. Example: -Xmx1024m ( 1024m=1Gig , 2048m=2Gig , 4096m=4Gig )
-Xms Initial/Minimum Memory allocation. Example: -Xms1024m ( 1024m=1Gig , 2048m=2Gig , 4096m=4Gig )
-Duser.home=<path> overwrites the "/Zomboid" homedir to whatever path you want. Example: -Duser.home=C:\Zomboid
-Dsoftreset option to perform a Soft Reset
-Ddebug enables debugging


Server

Arg Description
-Dorg.sqlite.lib.path=<path> visit: WINDOWS SQLITE TEMPFOLDER SPAM , Example: -Dorg.sqlite.lib.path=natives @Windows: When the Server starts a temporary sqlite file will be created in "TEMP" , but it will not deleted after stopping the Server.

A way to avoid this is by adding a JVM option -Dorg.sqlite.lib.path=natives and put a copy of the .dll called sqlitejdbc.dll in the server's natives/ directory. It will then use that one instead of extracting the .dll from the .jar file every time.