Project Zomboid

Project Zomboid

Realistic Car Physics [B42]
RicksMLC 11 月 5 日 下午 8:52
Alternative strategy for installing - no file overwrites
With .class changes I prefer to override rather than overwrite the files :)

An alternative to overwriting the .class files for installing into Project Zomboid is to make a custom launcher which loads the mod .class files first.

The first thing is to copy the ProjectZomboid64.bat file, usually located in:

"C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\ProjectZomboid64.bat"

Then edit a copy of the file. I put the file in my work directory, so I have to change the directory where it runs. Change
@cd /d "%~dp0"
to change directory to the project zomboid installed directory. The default is:
REM @cd /d "%~dp0" cd "C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\"

Then add the following to change the PZ_CLASSPATH:
set GAMEPATH=C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid set MODPATH="%GAMEPATH%\..\..\workshop\content\108600\3559765660\mods\Realistic Car Physics"

Finally change the SET PZ_CLASSPATH by addeding the %MODPATH% to the front of the classpath:
SET PZ_CLASSPATH=%MODPATH%;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;./

If your installation directories are different to above you will need to adjust as appropriate.

Cheers
R