0.0.5 • Published 10 years ago

bgfiles v0.0.5

Weekly downloads
3
License
WTFPL
Repository
github
Last release
10 years ago

bgfiles

Baldur's Gate Files for node.js

Installation

npm install bgfiles

Usage

var fs = require("fs");
var bgfiles = require("bgfiles");

var buffer = fs.readFileSync("CARSOMYR.itm");
var item = bgfiles["itm"].parse(buffer);
item.header.usability.evil = true;
fs.writeFileSync("CARSOMYR.itm", bgfiles["itm"].serialize(item));

API

bgfilestype.parse(buffer)

Parse a buffer of specified type.
Returns an Object

  • type: string identifying the file type
  • buffer: Buffer object
bgfiles["sto"].parse(buffer);

bgfilestype.serialize(object)

Serialize an object of specified type into a buffer.
Returns a Buffer

  • type: string identifying the file type
  • object: Object to be serialized

Supported file types

  • 2da: 2D Array
  • ids: Identifiers
  • itm: Item
  • key: Key file
  • sto: Store
  • tlk: Talk (language) file
0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago