cff29546 / pzmap2dzi

A command-line tool to convert Project Zomboid map data into Deep Zoom format
MIT License
47 stars 15 forks source link

pzmap2dzi

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

Features

Requirement

How to run

  1. Install Python

  2. Clone or download the project

  3. Install requirements

    • If your python version is 2.7, install VCForPython27 first. You can find it here or here

    • run install_requirements.bat

  4. Update variables in the conf/conf.yaml file

    • Change the pz_root variable to ProjectZomboid game location on your computer
    • Change the output_path variable to the desired output path
    • Change the mod_root variable to steam workshop path if you want to render a mod map
    • Add desired mod maps to mod_maps list (For more infor about how to add mod maps see adding mod maps)
    • See examples for more config details
  5. Run the tool

    Run run.bat to render all isometric and top view maps

Change rendering configurations

See conf/conf.yaml and run.bat for more detials.

How to start the HTML viewer

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

html
├── base/
├── base_top/
├── foraging/
├── foraging_top/
├── objects/
├── mod_maps/
├── openseadragon/
├── room/
├── zombie/
├── zombie_top/
├─ chrome.bat
├─ chrome_allow_file(need close chrome first).bat
├─ chrome_no_sicurity.bat
├─ pzmap.html
├─ pzmap.js
├─ run_server.bat
├─ server.py
└─ server_config.txt

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 need close all opening Chrome tabs
      • Then run chrome_allow_file(need close chrome first).bat

How to use the HTML viewer