A small Windows tool that removes Project Zomboid's startup photosensitivity/epilepsy
warning screen by patching projectzomboid.jar in place.
Project Zomboid shows a photosensitivity warning screen every time the game starts.
There's no in-game setting to disable it — it isn't controlled by options.ini or any
Lua mod hook, because it's drawn by compiled Java code (zombie.GameWindow) that runs
before Lua even loads. This tool patches that method directly so the game skips it.
This only affects your own local projectzomboid.jar. It doesn't touch save data,
online play, or anyone else's game.
It changes exactly one method, zombie.GameWindow.doEpilepsyWarningText(), from "draw
the warning text" to "return immediately." Nothing else in the game is touched.
Concretely, the method's bytecode goes from:
getstatic TextManager.instance
getfield TextManager.font
ifnonnull L10 ; if the font is loaded, jump ahead and draw the warning
return ; otherwise, bail out early (font not ready yet)
L10: ... draws the warning text for one frame ...
to:
getstatic TextManager.instance
getfield TextManager.font
pop ; discard the font reference (same stack effect as ifnonnull)
nop
nop
return ; always take the early-return path now
L10: ... unreachable, but left in place — still valid bytecode ...
The replacement is the same number of bytes as the original (10 bytes in, 10 bytes
out), so nothing else in the class file has to shift — no other method, no constant
pool entry, no offset table. The pop instruction has the identical stack effect that
ifnonnull has (it consumes the one value on the stack either way), so this is a
minimal, surgical change rather than a rewritten method.
projectzomboid.jar is a zip file. The script:
- Opens it with .NET's
System.IO.Compression.ZipFile(built into Windows — no extra tools required). - Reads the
zombie/GameWindow.classentry into memory. - Searches for the exact 10-byte pattern above.
- If found once, patches those 10 bytes and writes the entry back.
- Recompresses and closes the archive.
Before the first patch, it copies the untouched jar to projectzomboid.jar.orig as a
backup.
The script never patches blindly. Each run it checks what's actually in the jar:
- Unpatched jar found (fresh install, or Steam just restored the original after an update / "Verify integrity of game files") → it patches it.
- Already patched → it says so and exits without touching the file.
- Neither pattern matches (most likely because a game update changed this method) →
it aborts and leaves the jar alone, rather than guessing and risking a corrupted
jar. Your
projectzomboid.jar.origbackup is still there if you need it.
This means you can just re-run the tool any time — after a Steam update, after verifying game files, whenever — and it does the right thing automatically.
- Download this repo (or just the two files:
RemoveEpilepsyWarning.batandRemoveEpilepsyWarning.ps1— they must stay in the same folder together). - Copy both files into your Project Zomboid install folder, next to
projectzomboid.jar. By default that's:<Steam library>\steamapps\common\ProjectZomboid\ - Double-click
RemoveEpilepsyWarning.bat. - That's it — launch the game normally.
- Patch: double-click
RemoveEpilepsyWarning.bat(or run the.ps1directly in PowerShell). Safe to run multiple times. - Restore the original jar:
This copies
powershell -ExecutionPolicy Bypass -File RemoveEpilepsyWarning.ps1 -Restoreprojectzomboid.jar.origback overprojectzomboid.jar. (You can also just use Steam's "Verify integrity of game files" to restore it.)
Tested against Project Zomboid 42.20.3. If a future update changes
GameWindow.doEpilepsyWarningText(), the safety check above will refuse to patch and
tell you why, rather than silently doing something wrong. If that happens, this repo
will need a small update to match the new bytecode.
- This edits a game file directly. It's a single-player/local change — no server or other players are affected — but if you're ever concerned about Steam's file integrity check flagging it, just run the restore command above, or let Steam verify the files, before doing anything that checks file integrity.
- Requires Windows and PowerShell (included with Windows 10/11). No other dependencies.
MIT — see LICENSE.