Skip to content

Samg381/DayZ-Map-DL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DayZ Map Downloader

Generates a .jpg of the latest Chernarus+ or Livonia Map from the iZurvive / Dayz.GG website

Choose between Satellite and Topographic format, for either Chernarus+ or Livonia, at a specified game version, with a specified resolution increasing from 1-8

Animation

Prerequisites

  • GNU/Linux (Tested on Debian 12, CentOS 7, WSL Debian 12)
  • aria2c
  • ImageMagick
  • g++

Usage

./getmap [Map] [Res] [Type] [Version]

[Map] Map name: chernarus, livonia (case sensitive - all lowercase)

[Res] Map resolution: 1-8 (8 is largest - HUGE image - see Warning below)

[Type] Map image type: sat (satellite), top (topographic)

[Version] Desired DayZ map version (must be exact, e.g. 1.19.0 - note map versions may lag behind game updates)

--

Examples:

./getmap.sh chernarus 6 sat 1.23.0 (Downlolads a satellite map of Chernarus+ from DayZ game version 1.23.0 at resolution 6)

./getmap.sh chernarus 8 top 1.25.0 (Downlolads a topographic map of Chernarus+ from DayZ game version 1.25.0 at resolution 8)

./getmap.sh livonia 4 sat 1.19.0 (Downlolads a satellite map of Livonia from DayZ game version 1.19.0 at resolution 4)

Warning

Filesize grows exponentially as [Res] increases. The highest resolution setting, 8, will generate a TWO GIGAPIXEL image.

ImageMagick (used in this application) struggles at high resolutions (beyond level 6/7 in our case) and may throw errors for a host of reasons. I have made an effort to prevent as many of these errors as possible, but some fixes can only be made by editing the ImageMagick Security Policy on your local host and raising / removing the hardware resource / filesize restrictions. This Policy.xml config is a really asinine 'feature' of ImageMagic, which behaves inconsistently, and may not fix errors, even ones that directly recommend adjustments to the configuration you have already made. Realistically, resolution 6/7 is more than enough for radars, printed maps, art, or what not.

This tool is best used on a powerful system with a fast internet connection. An NVMe SSD is strongly recommended.

Leveraging Huge Images

For usage in external radars and map applications, particularly those utilizing stb_image.h, downsizing the image may be required.

Utilities like stb_image.h are 32-bit applications. 32-bit is limited to addressing 2^32 bytes, often only 2^31 or 2^30 bytes addressable in a 32-bit image. An image of 65536 x 65536 such as the one generated by Resolution 8 is an image of 2^16 * 2^16 pixels, or 2^32 pixels. Each pixel is 3 bytes, so roughly 32^32. Relative to the (say) 2^30 bytes available in user space, that's 122^30, or 12 times larger than avaliable memory in a 32-bit program.

Practically speaking, though the exact resolution cap of stb_image.h for these map images depends on multiple factors, I have found a safe number to be ~23000x23000.

So, the best use case would be to download the largest image your system can tolerate (i.e resolution 7/8) and then downsample the image.

As ImageMagick is already installed, you could use something like:

convert DayZ_1.25.0_chernarus_map_128x128_top.jpg -resize 23000x23000 23000x23000.jpg