From aec21f70933e230383e431173f8e6465af6f1eaf Mon Sep 17 00:00:00 2001 From: Greelan <53196309+Greelan@users.noreply.github.com> Date: Sat, 1 Jan 2022 21:05:08 +1100 Subject: [PATCH] Add ability for user to add custom Java and server arguments Revert "Add IP binding parameter" This reverts commit 9211cd66efab522a5814aeec151aeef21d6580a3. Add ability for user to add custom args Add ability for user to add custom arguments Update to all both java and server arguments --- project-zomboid.kvp | 6 +++--- project-zomboidconfig.json | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/project-zomboid.kvp b/project-zomboid.kvp index 310c3df..7b1dd47 100644 --- a/project-zomboid.kvp +++ b/project-zomboid.kvp @@ -17,9 +17,9 @@ App.BaseDirectory=./project-zomboid/380870/ App.ExecutableWin=380870\jre64\bin\java.exe App.ExecutableLinux=380870/ProjectZomboid64 App.WorkingDir=380870 -App.LinuxCommandLineArgs=-Dzomboid.steam={{SteamInt}} -Duser.home=./ -Xmx{{MaxMemory}}m -- -App.WindowsCommandLineArgs=-Djava.awt.headless=true -Dzomboid.znetlog=1 -Dzomboid.steam={{SteamInt}} -Duser.home=./ -Xmx{{MaxMemory}}m -XX:+UseZGC -XX:-CreateCoredumpOnCrash -XX:-OmitStackTraceInFastThrow -Djava.library.path=natives/;natives/win64/;. -cp java/*;java/ zombie.network.GameServer -statistic 0 -- -App.CommandLineArgs={{$PlatformArgs}} -port {{$ApplicationPort1}} -steamport1 {{$ApplicationPort2}} -steamport2 {{$ApplicationPort3}} {{$FormattedArgs}} +App.LinuxCommandLineArgs=-Dzomboid.steam={{SteamInt}} -Duser.home=./ -Xmx{{MaxMemory}}m {{CustomJavaArgs}} -- +App.WindowsCommandLineArgs=-Djava.awt.headless=true -Dzomboid.znetlog=1 -Dzomboid.steam={{SteamInt}} -Duser.home=./ -Xmx{{MaxMemory}}m -XX:+UseZGC -XX:-CreateCoredumpOnCrash -XX:-OmitStackTraceInFastThrow -Djava.library.path=natives/;natives/win64/;. {{CustomJavaArgs}} -cp java/*;java/ zombie.network.GameServer -statistic 0 -- +App.CommandLineArgs={{$PlatformArgs}} -port {{$ApplicationPort1}} -steamport1 {{$ApplicationPort2}} -steamport2 {{$ApplicationPort3}} {{CustomServerArgs}} {{$FormattedArgs}} App.AppSettings={} App.EnvironmentVariables={"PATH":"./jre64/bin:%PATH%","LD_LIBRARY_PATH":"./linux64:./natives:./:./jre64/lib/amd64:%LD_LIBRARY_PATH%","LD_PRELOAD":"./jre64/lib/libjsig.so","PZ_CLASSPATH":"java/*;java/","SteamAppId":"108600"} App.CommandLineParameterFormat=-{0} {1} diff --git a/project-zomboidconfig.json b/project-zomboidconfig.json index 56faaf7..a7e72e3 100644 --- a/project-zomboidconfig.json +++ b/project-zomboidconfig.json @@ -54,5 +54,29 @@ "ParamFieldName": "MaxMemory", "IncludeInCommandLine": false, "DefaultValue": "4096" + }, + { + "DisplayName": "Additional Java Startup Parameters", + "Category": "Server Settings", + "Description": "Additional Java arguments (not server arguments) as startup parameters that are not otherwise set by AMP. Use with care. Example: -Ddebug", + "Keywords": "custom,java,arguments,parameters", + "FieldName": "CustomJavaArgs", + "InputType": "text", + "IsFlagArgument": false, + "ParamFieldName": "CustomJavaArgs", + "IncludeInCommandLine": false, + "DefaultValue": "" + }, + { + "DisplayName": "Additional Server Startup Parameters", + "Category": "Server Settings", + "Description": "Additional server arguments (not Java arguments) as startup parameters that are not otherwise set by AMP. Use with care. Example: -ip 192.168.1.10", + "Keywords": "custom,server,arguments,parameters", + "FieldName": "CustomServerArgs", + "InputType": "text", + "IsFlagArgument": false, + "ParamFieldName": "CustomServerArgs", + "IncludeInCommandLine": false, + "DefaultValue": "" } ]