Skip to content

A helper to generate PNGs that are compatible with Tibia 11’s minimap.

License

Notifications You must be signed in to change notification settings

tibiamaps/tibia-minimap-png

Repository files navigation

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

About

A helper to generate PNGs that are compatible with Tibia 11’s minimap.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published