bgfiles
Baldur's Gate Files for node.js
Installation
npm install bgfiles
Usage
var fs = ;var bgfiles = ; var buffer = fs;var item = bgfiles"itm";itemheaderusabilityevil = true;fs;
API
bgfiles[type].parse(buffer)
Parse a buffer of specified type.
Returns an Object
type
: string identifying the file typebuffer
: Buffer object
bgfiles"sto";
bgfiles[type].serialize(object)
Serialize an object of specified type into a buffer.
Returns a Buffer
type
: string identifying the file typeobject
: Object to be serialized
Supported file types
2da
: 2D Arrayids
: Identifiersitm
: Itemkey
: Key filesto
: Storetlk
: Talk (language) file