tibia-minimap-png
v2.0.0
Published
A helper to generate PNGs that are compatible with Tibia 11’s minimap.
Downloads
65
Readme
tibia-minimap-png
Given a buffer with visual map data or pathfinding data from a Tibia 10-compatible *.map
file, tibia-minimap-png
creates a PNG buffer that is compatible with Tibia 11’s minimap.
Installation
npm install --save tibia-minimap-png
Usage
const fs = require('fs');
const { wrapColorData, wrapWaypointData } = require('tibia-minimap-png');
const buffer = fs.readFileSync('12612507.map');
const colorData = buffer.slice(0, 0x10000);
const waypointData = buffer.slice(0x10000, 0x20000);
fs.writeFileSync(
'Minimap_Color_32256_32000_7.png',
wrapColorData(colorData)
);
fs.writeFileSync(
'Minimap_WaypointCost_32256_32000_7.png',
wrapWaypointData(waypointData)
);
Author
| | |---| | Mathias Bynens |