A helper to generate PNGs that are compatible with Tibia 11’s minimap.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
chunks
scripts
tests
.editorconfig
.gitattributes
.gitignore
.nvmrc
.travis.yml
LICENSE-MIT.txt
README.md
create-chunk.js
index.js
package.json

README.md

tibia-minimap-png Build status

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

twitter/mathias
Mathias Bynens