A command-line tool to convert Project Zomboid map data into Deep Zoom format

Overview

pzmap2dzi

pzmap2dzi is a command-line tool running on Windows to convert Project Zomboid map data into Deep Zoom format.

Features

  • 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
  • Supports game version 41.68

Requirement

  • The full output size for game version 41.68 is around 1.1TB and consists of 1.3M files. Make sure your 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 rending took around 18 hours on an AMD 3700X with 64GB DDR4 2133 memory and a SATA3 mechanical hard drive using a 16 thread setting)

How to run

  1. Install Python

  2. Clone or download the project

  3. install requirements

    run install_requirements.bat

  4. Edit the pz_path.txt file to contain the correct path where your ProjectZomboid located on your computer

  5. Edit the out_path.txt file to contain the desired output path

  6. run the tool

    run run.bat

Change rendering configurations

  • 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_grid.bat
    render_room.bat
    render_zombie.bat
    
    • Change -m 16 to -m 4 to use only four threads.
  • Do not render grid and room info
    • Remove the calling of render_grid.bat and render_room.bat from run.bat
  • Do not render zombie heatmap
    • Remove the calling of render_zombie.bat from run.bat
  • 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
    • To resume, run run.bat again
  • Change base layer file format
    • Edit scripts/render_base.bat
    • Change --layer0-fmt png to --layer0-fmt jpg to use jpg format for base layer

How to start the HTML viewer

After the rendering, you get an html folder in your output path.

html
├── base/
├── grid/
├── openseadragon/
├── room/
├── zombie/
├─ chrome_allow_file(need close chrome first).bat
├─ chrome_no_sicurity.bat
├─ pzmap.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:

  1. 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
  2. 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
    • 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

How to use the HTML viewer

  • To switch floors, use the button form Layer0 to Layer7 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)

    Grid Example

  • To enable/disable room info, use the Room button

    • (Display room info of the current floor)

    Room Example

  • To enable/disable zombie heatmap, use the Zombie button

    Zombie Heatmap Example

You might also like...

Command line tool to interact with exist-db instances (pre-release)

xst [ĭg-zĭst′] Command line tool to interact with exist-db instances. Built on top of @existdb/node-exist. Installation Until this package is official

Aug 4, 2022

A command-line tool to manage Deno scripts installed via deno install

🏞️ nublar nublar is a command-line tool to manage your scripts installed via deno install. 🛳️ Installation deno install --allow-read --allow-write -

Dec 26, 2022

Prismatic's CLI tool for managing prismatic.io resources from the command line

@prismatic-io/prism Prism is Prismatic's CLI tool that allows you to build, deploy, and support integrations in Prismatic from the comfort of your com

Oct 4, 2022

CloudCrafter CLI is a command-line interface tool that provides templates for common cloud resources to help you get started quickly.

CloudCrafter CLI CloudCrafter CLI is a command-line interface tool that provides templates for common cloud resources to help you get started quickly.

May 5, 2023

This CLI tool allows you to convert the encrypted Akamai 2.0 sensor data payload back to its plaintext form.

Akamai 2.0 Sensor Data Decryption Tool This CLI tool allows you to convert the encrypted Akamai 2.0 sensor data payload back to its plaintext form. Us

Jan 1, 2023

Fastest way to get financial data from Plaid into your Postgres database. Go from zero to live in 5 minutes without a single line of code.

Fastest way to get financial data from Plaid into your Postgres database. Go from zero to live in 5 minutes without a single line of code.

Venice Venice is a the fastest way to get financial data from Plaid into your Postgres database. Zero to production in 5 minutes without a single line

Dec 12, 2022

A generative engine that takes various png layers on a sprite sheet format, combines them and then converts them into a .gif file

A generative engine that takes various png layers on a sprite sheet format, combines them and then converts them into a .gif file

Welcome to the Generative GIF Engine v2.0.4 🐤 [8 minute read] This python and node app generates layered-based gifs to create NFT gif art! It is fast

Jan 2, 2023

A generative engine that takes various png layers on a sprite sheet format, combines them and then converts them into a .gif file

A generative engine that takes various png layers on a sprite sheet format, combines them and then converts them into a .gif file

Welcome to the Generative Animated Engine v3.0.1 🐤 [8 minute read] This repo used to be called jalagar/Generative_Gif_Engine but because it now suppo

May 24, 2022

🔍 A view component for React Native with pinch to zoom and drag to pan functionality.

react-native-pan-pinch-view A view component for React Native with pinch to zoom and drag to pan functionality. 👋 Introduction Even though the demo s

Oct 6, 2022
Comments
  • ModuleNotFoundError: No module named

    ModuleNotFoundError: No module named "PIL"

    trying to run this program and keep getting this :

    Unpacking textures ... Traceback (most recent call last): File "C:\Users\USER\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\USER\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "D:\pzmap2dzi-main\pzmap2dzi\texture.py", line 2, in from PIL import Image ModuleNotFoundError: No module named 'PIL' Unpacking textures done Copy html files ... 47 File(s) copied Copy html files done Render top view pz map ... Traceback (most recent call last): File "D:\pzmap2dzi-main\render_base_top.py", line 1, in from PIL import Image, ImageDraw, ImageFont ModuleNotFoundError: No module named 'PIL' Render top view pz map done Render top view zombie ... Traceback (most recent call last): File "D:\pzmap2dzi-main\render_zombie_top.py", line 1, in from PIL import Image, ImageDraw, ImageFont ModuleNotFoundError: No module named 'PIL' Render top view zombie done Render top view foraging ... Traceback (most recent call last): File "D:\pzmap2dzi-main\render_foraging_top.py", line 1, in from PIL import Image, ImageDraw, ImageFont ModuleNotFoundError: No module named 'PIL' Render top view foraging done All done

    Not sure what I'm doing wrong, I have Python 3.10.5 installed, and ran the install_requirements.bat like instructed.

    opened by digitalbarrito 2
  • A worker is stuck every time there is a error rendering

    A worker is stuck every time there is a error rendering

    I'm rendering a map collection from workshop and as far as i know, the map autor has used non utf-8 characteres in the room name, bringing this error. image

    Every time it happens, i lost an worker until there is no one left (frezze)

    Rendering only the top I found the "faulty" chunks (since they didn't render) and removed them from the project, however I think it would be very useful for the worker to abandon the rendering in case of failure.

    opened by pimenta1807 1
Owner
Min Xiang
Min Xiang
A tool to convert scw files from Supercell games to Collada (dae) format

SCW Tools This module is intended to convert .scw files from Supercell games to Collada (.dae) format. For a better understanding of SCW file structur

Jean-Baptiste Martin 3 Oct 11, 2022
An npm package for demonstration purposes using TypeScript to build for both the ECMAScript Module format (i.e. ESM or ES Module) and CommonJS Module format. It can be used in Node.js and browser applications.

An npm package for demonstration purposes using TypeScript to build for both the ECMAScript Module format (i.e. ESM or ES Module) and CommonJS Module format. It can be used in Node.js and browser applications.

Snyk Labs 57 Dec 28, 2022
javascript library to convert a list of objects to a nested json output format, depending on the names in the list

formToNestedJson javascript "library" to convert a list of objects to a nested json output format, depending on the names in the list Basic usage Give

null 2 Aug 2, 2021
Convert your Postman documentation in a github´s readme.md ready format

Postman 2 Markdown Converter For that only time you need to convert your Postman documentation in a github´s readme ready format! Features & Problems

Andres Bastias 0 Sep 18, 2022
aka Scaletor, take screenshots of a piece of a map and scale/compare with other parts of the map

scale-a-tron A quick-and-dirty map that lets you compare one area to another. Draw a shape around a region, zoom in to another place on the map, and c

Stamen Design 24 Nov 7, 2022
🦄 A command line tool to get tokens on testnets quickly!

?? faucetli A command line tool to get tokens on testnets quickly! Usage Commands Usage $ npm install -g faucetli $ faucetli COMMAND running command..

Kira 60 Jan 1, 2023
Command line tool that automatically migrates tests from protractor to playwright.

Protractor to Playwright migration tool This tool is designed to automatically migrate code from Protractor to Playwright. It is inspired by the "Migr

Amadeus IT Group 9 Nov 20, 2022
Command line tool that converts HTML to markdown.

@wcj/html-to-markdown HTML conversion tool to markdown. command line tool => @wcj/html-to-markdown-cli. Installation This package is ESM only: Node 14

小弟调调™ 11 Nov 6, 2022
📸 A command-line tool to generate code images of your local code right away from the terminal

?? rayli ?? A command-line tool to generate code images of your local code right away from the terminal Usage Commands Usage $ npm install -g rayli $

buidler's hub 45 Nov 4, 2022
🦄 A command line tool to get tokens on testnets quickly!

?? faucetli ?? A command line tool to get tokens on testnets quickly! Usage Commands Usage $ npm install -g faucetli $ faucetli COMMAND running comman

buidler's hub 56 May 11, 2022