Project Zomboid

Project Zomboid

Multi-Cpu Enhance
4Zeta  [开发者] 10 月 16 日 上午 2:58
B42 Installation Instruction (Windows OS)
"Replace the contents of ProjectZomboid64.json and ProjectZomboid64.bat in C:\Program Files (x86)Steam\steamapps\common\ProjectZomboid with the following text in any text editor and hit save. The mod must also be activated in-game."



ProjectZomboid64.bat
@setlocal enableextensions @cd /d "%~dp0" SET _JAVA_OPTIONS= :: Set up classpath for Project Zomboid SET PZ_CLASSPATH=.\guava-23.0.jar;commons-compress-1.27.1.jar;commons-io-2.18.0.jar;istack-commons-runtime.jar;jassimp.jar;javacord-3.8.0-shaded.jar;javax.activation-api.jar;jaxb-api.jar;jaxb-runtime.jar;lwjgl.jar;lwjgl-natives-windows.jar;lwjgl-glfw.jar;lwjgl-glfw-natives-windows.jar;lwjgl-jemalloc.jar;lwjgl-jemalloc-natives-windows.jar;lwjgl-opengl.jar;lwjgl-opengl-natives-windows.jar;lwjgl_util.jar;sqlite-jdbc-3.48.0.0.jar;trove-3.0.3.jar;uncommons-maths-1.2.3.jar;imgui-binding-1.86.11-8-g3e33dde.jar;commons-codec-1.10.jar;javase-3.2.1.jar;totp-1.0.jar;core-3.2.1.jar;./ :: Detect system hardware specifications for /f "tokens=2 delims==" %%a in ('wmic OS get TotalVisibleMemorySize /value') do set /a total_mem=%%a/1024 for /f "tokens=2 delims==" %%a in ('wmic cpu get NumberOfCores /value') do set /a num_cores=%%a for /f "tokens=2 delims==" %%a in ('wmic cpu get NumberOfLogicalProcessors /value') do set /a num_threads=%%a :: Set memory allocation based on available RAM if %total_mem% GTR 16000 ( SET MEM_MAX=10240m SET MEM_MIN=4096m ) else if %total_mem% GTR 12000 ( SET MEM_MAX=8192m SET MEM_MIN=2048m ) else if %total_mem% GTR 8000 ( SET MEM_MAX=6144m SET MEM_MIN=2048m ) else ( SET MEM_MAX=4096m SET MEM_MIN=1024m ) :: Set thread pool and garbage collection settings based on CPU if %num_cores% LEQ 2 ( set GC_THREADS=1 set CONCURRENT_THREADS=1 set FJ_PARALLELISM=2 ) else if %num_cores% LEQ 4 ( set GC_THREADS=2 set CONCURRENT_THREADS=2 set FJ_PARALLELISM=4 ) else if %num_cores% LEQ 8 ( set GC_THREADS=4 set CONCURRENT_THREADS=2 set FJ_PARALLELISM=6 ) else ( set GC_THREADS=6 set CONCURRENT_THREADS=3 set FJ_PARALLELISM=8 ) :: Launch Project Zomboid with multi-core optimizations echo Starting Project Zomboid with multi-core optimizations... echo CPU: %num_cores% cores, %num_threads% threads echo RAM: %total_mem% MB (Allocated: %MEM_MAX%) echo Concurrent threads: %FJ_PARALLELISM% ".\jre64\bin\java.exe" ^ -verbose:class ^ -Djava.awt.headless=true ^ -Dzomboid.steam=1 ^ -Dzomboid.znetlog=1 ^ -XX:-CreateCoredumpOnCrash ^ -XX:-OmitStackTraceInFastThrow ^ -XX:+UseParallelGC ^ -XX:ZCollectionInterval=120 ^ -XX:ConcGCThreads=%CONCURRENT_THREADS% ^ -XX:+UnlockExperimentalVMOptions ^ -XX:+AlwaysPreTouch ^ -XX:+UseNUMA ^ -XX:+DisableExplicitGC ^ -Xmx%MEM_MAX% ^ -Xms%MEM_MIN% ^ -Djava.library.path=./win64/;./ ^ -Dguava.library.path=. ^ -Djogl.disable.openglcore=false ^ -XX:+OptimizeStringConcat ^ -Dzomboid.multithreading=true ^ -Dzomboid.thread.model=worksteal ^ -Dzomboid.thread.priority=high ^ -Dzomboid.threadpool.size=%num_cores% ^ -Djava.util.concurrent.ForkJoinPool.common.parallelism=%FJ_PARALLELISM% ^ -cp %PZ_CLASSPATH% ^ zombie.gameStates.MainScreenState %1 %2 :: Fallback launch with reduced memory settings if the main launch fails IF %ERRORLEVEL% NEQ 0 ( echo Main launch failed, attempting with reduced memory settings... ".\jre64\bin\java.exe" ^ -verbose:class ^ -Djava.awt.headless=true ^ -Dzomboid.steam=1 ^ -Dzomboid.znetlog=1 ^ -XX:-CreateCoredumpOnCrash ^ -XX:-OmitStackTraceInFastThrow ^ -XX:+UseParallelGC ^ -Xmx3072m ^ -Xms1024m ^ -Djava.library.path=./win64/;./ ^ -Dguava.library.path=. ^ -Dzomboid.multithreading=true ^ -Dzomboid.threadpool.size=2 ^ -cp %PZ_CLASSPATH% ^ zombie.gameStates.MainScreenState %1 %2 ) PAUSE
-----------------------------------------------------------------------------------------------------------------------------

ProjectZomboid64.json

{ "mainClass": "zombie/gameStates/MainScreenState", "classpath": [ ".", "commons-compress-1.27.1.jar", "commons-io-2.18.0.jar", "istack-commons-runtime.jar", "jassimp.jar", "guava-23.0.jar", "javacord-3.8.0-shaded.jar", "javax.activation-api.jar", "jaxb-api.jar", "jaxb-runtime.jar", "lwjgl.jar", "lwjgl-natives-windows.jar", "lwjgl-glfw.jar", "lwjgl-glfw-natives-windows.jar", "lwjgl-jemalloc.jar", "lwjgl-jemalloc-natives-windows.jar", "lwjgl-opengl.jar", "lwjgl-opengl-natives-windows.jar", "lwjgl_util.jar", "sqlite-jdbc-3.48.0.0.jar", "trove-3.0.3.jar", "uncommons-maths-1.2.3.jar", "imgui-binding-1.86.11-8-g3e33dde.jar", "commons-codec-1.10.jar", "javase-3.2.1.jar", "totp-1.0.jar", "core-3.2.1.jar" ], "vmArgs": [ "-Djava.awt.headless=true", "-Xmx8192m", "-Xms4096m", "-XX:+UseParallelGC", "-XX:ParallelGCThreads=4", "-XX:+UseNUMA", "-XX:+AlwaysPreTouch", "-XX:+DisableExplicitGC", "-Dzomboid.steam=1", "-Dzomboid.znetlog=1", "-Djava.library.path=win64/;.", "-XX:-CreateCoredumpOnCrash", "-XX:-OmitStackTraceInFastThrow", "-Djogl.disable.openglcore=false", "-XX:+OptimizeStringConcat" ], "windows": { "6.1": { "vmArgs": [ "-XX:+UseParallelGC", "-XX:G1NewSizePercent=20", "-XX:G1ReservePercent=20", "-XX:MaxGCPauseMillis=50", "-XX:G1HeapRegionSize=32m" ] }, "10.0.17134": { "vmArgs": [ "-XX:+UseParallelGC", "-XX:ZCollectionInterval=120", "-XX:ConcGCThreads=2", "-XX:+UnlockExperimentalVMOptions" ] } } }
最后由 4Zeta 编辑于; 12 月 10 日 上午 7:17
< >
正在显示第 1 - 15 条,共 24 条留言
ivmakk 10 月 22 日 上午 6:57 
Tested on B42.12.3 - works fine too.
shid aint launching anymore
ivmakk 10 月 28 日 上午 5:36 
引用自 gorilla ina coupe
shid aint launching anymore
Are you on B42? You can verify the integrity of game files to restore the original configs if you didn’t make backups before applying.
最后由 ivmakk 编辑于; 10 月 28 日 上午 5:38
引用自 ivmakk
引用自 gorilla ina coupe
shid aint launching anymore
Are you on B42? You can verify the integrity of game files to restore the original configs if you didn’t make backups before applying.

im a ll confused I changed nothing and now it launches.
lol
3DM45T3R 10 月 28 日 下午 7:06 
How to perform and install for Linux?
GueSopirmalam 10 月 29 日 上午 12:46 
My game cannot launch after i put the JSON files into my project zomboid folder, pls help
引用自 GueSopirmalam
My game cannot launch after i put the JSON files into my project zomboid folder, pls help

i had the same issue and no idea what fixed it, make sure file names and what you copy is correct
GueSopirmalam 11 月 1 日 上午 2:30 
引用自 gorilla ina coupe
引用自 GueSopirmalam
My game cannot launch after i put the JSON files into my project zomboid folder, pls help

i had the same issue and no idea what fixed it, make sure file names and what you copy is correct
i did it exactly like the instructions said up there
GueSopirmalam 11 月 1 日 上午 2:34 
引用自 Eddie # LP
I created a script to make it easier to set up the configurations.
https://gist.github.com/luiz-lp/6b8c149a696027bfa538ec18aa5729a0
i have to put this in my Project Zomboid directory folder ??
Mustang 11 月 3 日 上午 10:22 
getting this when trying to access the links in the main post.
--
http://(https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3459875383)) has been flagged as being potentially malicious. For your safety, Steam will not open this URL in your web browser. The site could contain malicious content or be known for stealing user credentials.
--
ivmakk 11 月 3 日 下午 2:10 
引用自 Mustang
http://(https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3459875383)) has been flagged as being potentially malicious. For your safety, Steam will not open this URL in your web browser. The site could contain malicious content or be known for stealing user credentials.
Try the left part that starts from "gist.github"

@4Zeta could you update the the link the the 1st thread message? It seems when copied from Discord it got pasted incorrectly — keep only the original link and remove the duplicated broken part "[)](https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3459875383)"
最后由 ivmakk 编辑于; 11 月 3 日 下午 2:11
RayPlayST 11 月 5 日 上午 3:07 
ProjectZomboid64.JSON
del:
"-Djogl.disable.openglcore=false",
"-XX:+OptimizeStringConcat"
B42.12.3 OK
Loc' 11 月 10 日 下午 3:23 
引用自 RayPlayST
ProjectZomboid64.JSON
del:
"-Djogl.disable.openglcore=false",
"-XX:+OptimizeStringConcat"
B42.12.3 OK

Hey, why delete those line ?
TankyDada 11 月 12 日 下午 5:09 
how do i download this mod, idk where and how to start do i just subscribe then activate the mod in the game?
最后由 TankyDada 编辑于; 11 月 12 日 下午 5:12
4Zeta  [开发者] 11 月 13 日 上午 12:26 
@TankyDada follow the thread in the description
< >
正在显示第 1 - 15 条,共 24 条留言
每页显示数: 1530 50