0.5.3 • Published 4 months ago

mudlet-map-binary-reader v0.5.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Mudlet Map Binary Reader

NPM

Reads Mudlet's map binary file (v20 only!). Can output .js/.json files needed for Mudlet Map Reader. Mudlet map JSON format export is also available.

API until version 1.0.0 is subject to change! Use with caution.

I am no Node developer, so any hints and suggestions are more then welcome.

TODOs and plans

  • Convert to .ts
  • Document map model
  • Document classes
  • Add Mudlet's JSON exporter
  • Correct QFont read
  • Add test
  • Add linting

Usage example

const { MudletMapReader } = require("mudlet-map-binary-reader");

const inputFile = "map.dat"
const outputDirectory = "output";

let mapModel = MudletMapReader.read(inputFile);

// Export to map renderer format and save to .js and .json files https://github.com/Delwing/js-mudlet-map-renderer
let { mudletMap, colors } = MudletMapReader.export(mapModel, outputDirectory);

// Export as Mudlet Json map
const outputFile = 'file.json'
let mudletJsonFormat = MudletMapReader.exportJson(mapModel, outputFile)

//Modify and save binary
mapModel.rooms[1].name = "Funny name!"
MudletMapReader.write(mapModel, inputFile)
0.5.3

4 months ago

0.5.2

2 years ago

0.5.1

2 years ago

0.5.0

2 years ago

0.3.2

2 years ago

0.4.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.0.4

2 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago