pzmap2dzi is a command-line tool running on Windows to convert Project Zomboid map data into Deep Zoom format.
- Supports both python 2 and python 3
- HTML viewer for viewing the generated Deep Zoom image.
- Various plant rendering configurations (snow, flower, tree size, etc.).
- Supports multi-thread acceleration
- Supports resuming from a breakpoint
- Supports map grid and room info rendering
- Supports zombie heatmap rendering
- Supports foraging zones rendering
- Supports isometric view and top view rendering
- Supports map objects rendering (car spawn zones, special zombie spawn zones, map story zones)
- Supports game version 41.74 (unstable)
- The full output size of isometric map for game version 41.74 (unstable) is around 450GB (or 2.5TB with lossless png format) and consists of 4M files. Make sure you output to a hard drive has enough free space.
- The rending process will take a very long time, so it's better to have a high-performance CPU, hard drive, and large memory.
- The full rending took around 32 hours (or even slower with lossless png format) on an AMD 3700X with 64GB DDR4 2133 memory and a SATA3 mechanical hard drive using a 16 thread setting
- If you choose to render only top view map, output size will be around 500MB and can be done within 1 hour.
-
Install Python
-
Clone or download the project
-
Install requirements
-
Update variables in the
config.txt
file- Change the
pz_path
variable to contain the correct path where your ProjectZomboid located on your computer - Change the
out_path
variable to contain the desired output path
- Change the
-
Run the tool
Run
run.bat
to render all isometric and top view mapsOr run
run_top_view_only.bat
to render only top view maps
- Change thread numbers (default is 16 threads)
- In the
scripts/
folder, you can edit the starter command in the following files
unpack_texture.bat render_base.bat render_base_top.bat render_foraging.bat render_foraging_top.bat render_grid.bat render_grid_top.bat render_objects.bat render_room.bat render_zombie.bat render_zombie_top.bat
- Change
-m 16
to-m 4
to use only four threads.
- In the
- Do not render grid and room info
- Remove the calling of
render_grid.bat
andrender_room.bat
fromrun.bat
- Remove the calling of
- Do not render zombie heatmap
- Remove the calling of
render_zombie.bat
fromrun.bat
- Remove the calling of
- Do not render foraging zones
- Remove the calling of
render_foraging.bat
fromrun.bat
- Remove the calling of
- Do not render top view map
- Remove the calling of
render_zombie_top.bat
andrender_base_top.bat
fromrun.bat
- Remove the calling of
- Config a hotkey to elegantly stop rendering at a breakpoint so you can resume later
- Similar to the config of thread numbers, add
-s <hotkey>
to starter commands- For example,
-s "<f9>"
make the rendering process stop when you hit F9
- For example,
- To resume, run
run.bat
again
- Similar to the config of thread numbers, add
- Change base layer file format
- Edit
scripts/render_base.bat
- Change
--layer0-fmt jpg
to--layer0-fmt png
to use lossless png format for base layer
- Edit
After the rendering, you get an html
folder in your output path.
html
├── base/
├── base_top/
├── foraging/
├── foraging_top/
├── grid/
├── grid_top/
├── objects/
├── openseadragon/
├── room/
├── zombie/
├── zombie_top/
├─ chrome_allow_file(need close chrome first).bat
├─ chrome_no_sicurity.bat
├─ pzmap.html
├─ pzmap_top.html
└─ run_server.bat
Directly open pzmap.html
will NOT work, as the Cross-Origin Resource Sharing (CORS) Policies will refuse to load Deep Zoom tiles from your locale disk by default.
There are two ways to bypass CORS:
- Start a server and host your files on your drive
- run
run_server.bat
- Afterwards, you can open
http://localhost:8880/pzmap.html
to view the image
- run
- If you are using Google Chrome with the default install path, you can do one of the followings:
- open
pzmap.html
in a standalone tab with all web security disabled.- To do this, run
chrome_no_sicurity.bat
- To do this, run
- restart Chrome to allow locale HTML access to locale files.
- To do this, you close all opening Chrome tabs
- Then run
chrome_allow_file(need close chrome first).bat
- open
-
To switch floors, use the button form
Layer0
toLayer7
on top of the page -
To enable/disable the grid, use the
Grid
button- (Position of the grid will adjust according to the current floor)
-
To enable/disable room info, use the
Room
button- (Display room info of the current floor)
-
To enable/disable zombie heatmap, use the
Zombie
button -
To enable/disable foraging zones, use the
Foraging
button -
To switch between isometric view and top view, use the view switch link