A module for reading Duke Nukem 3D group files.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test
.gitignore
.npmignore
.travis.yml
README.md
gulpfile.js
package-lock.json
package.json

README.md

Duke3D Group

NPM version Build Status Coverage Status Known Vulnerabilities Downloads

A module for reading Duke Nukem 3D group files.

Usage

var Group = require("duke3d-group");

// creating and writing a group to a file:
var group = new Group("TEST.GRP");
group.addFile(new Group.File("GAME.CON", Buffer.from("define MAXPLAYERHEALTH 420")));
group.addDirectory("C:\\TCs\Awesome_TC\\");
group.writeTo("C:\\TCs\\AWESOME.GRP");

// reading, interacting and extracting files with / from a group:
var group = Group.readFrom("C:\\TCs\EPICNUKE.GRP");
console.log("Number of Files: " + group.numberOfFiles());
group.extractAllFiles("C:\\TCs\\EpicNukem\\");
var conFiles = group.getFilesWithExtension("CON");
for(var i = 0; i < conFiles.length; i++) {
    console.log(conFiles[i].name);
}

Installation

To install this module:

npm install duke3d-group