A mapping utility designed for Minecraft that annotates an image file with transparent text labels, and saves it as a single image.
Waylay is written in Python 3 using the PythonMagick bindings for ImageMagick.
waylay.py map waypoints calibration
You must specify 3 arguments: an image file; a waypoints file; and a calibration file. The final output is written to map.png
Being a mapping utility for Minecraft, there are a few operating assumptions throughout waylay.
- The positive quadrant is to the SE.
- X spans the horizontal axis, and Z spans the vertical axis
Thus, a positive xz pair lies to the SE quadrant wrt origin.
- Waypoints take the form of Rei's Minimap waypoint files
A map file may be any input format, but for best results, stick with those that have an alpha channel.
The file generated by the Rei's Minimap mod may be used as-is. For reference, a line in the file is formatted as follows:
name:x:y:z:true:color
- name - the text label
- x - x-coordinate
- y - y-coordinate (unused)
- z - z-coordinate
- true - if the waypoint is "on"; currently saved, but unused
- color - a 6 hex-digit RGB color
There needs to be some relation between the text overlay and the map; the waypoints that make up the overlay are specified in world coordinates, whereas the image file is referenced by pixel coordinates, where the top-left corner is the origin. A minimum of two calibration points is needed to calculate this scaling. Each point is defined as follows:
imagepxl_x:imagepxl_z:world_x:world_z
- imagepxl_x - the x-coordinate of the pixel location
- imagepxl_z - the z-coordinate of the pixel location
- world_x - the cooresponding world x-coordinate
- world_z - the cooresponding world z-coordinate
More than two points are recommended for precise scaling.