Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Duke3D Group

NPM version Build Status Coverage Status Known Vulnerabilities Dependencies Downloads Install Size Contributors Pull Requests Welcome

A module for reading and writing Duke Nukem 3D group files.

Usage

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

// creating and writing a group to a file:
const 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:
const epicNukeGroup = Group.readFrom("C:\\TCs\EPICNUKE.GRP");
console.log("Number of Files: " + epicNukeGroup.numberOfFiles());
epicNukeGroup.extractAllFiles("C:\\TCs\\EpicNukem\\");
const conFiles = epicNukeGroup.getFilesWithExtension("CON");
for(let i = 0; i < conFiles.length; i++) {
    console.log(conFiles[i].name);
}

Installation

To install this module:

npm install duke3d-group

About

A module for reading Duke Nukem 3D group files.

Topics

Resources

Packages

No packages published