@kobold/core
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

kobold

@kobold/core

NPM

Core logic for extracting data from SqPack repositories.

NOTE: If you intend to read data from Final Fantasy XIV, It's strongly recommended you make use of the @kobold/xiv utility package to automate much of the below.

Getting Started

const kobold = new Kobold()

// Add "repositories" - these are the top-level groupings of files, often associated
// with expansions and similar
kobold.addRepository({
	name: 'ffxiv',
	path: 'C:\\path\\to\\sqpack\\ffxiv',
	default: true,
})

// Add "categories" - these are the _types_ of content expected within the SqPacks,
// spanning multiple repositories, such as "exd"
kobold.addCategory('exd', 0x0A)

// Load the file!
const fileBuffer = kobold.loadFileRaw('exd/root.exl')

// Or, load it into a file class to be parsed
class ExcelList extends File {
	constructor({data}: {data: Buffer}) {
		super()

		// ... parse the data ...
	}
}

const rootList = kobold.loadFile('exd/root.exl', ExcelList)

Package Sidebar

Install

npm i @kobold/core

Weekly Downloads

32

Version

0.0.2

License

MIT

Unpacked Size

35.8 kB

Total Files

43

Last publish

Collaborators

  • supamiu
  • ackwell