npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

novaparse

v0.1.12

Published

An EV Nova file parser for NovaJS

Downloads

89

Readme

NovaParse

An EV Nova data file and plug-in parser built for NovaJS, this project parses a directory containing Nova Data and Plug-ins subdirectories according to the NovaDataInterface.

In contrast to how EV Nova parsed files, NovaParse separates Plug-ins into their own namespaces to prevent ID conflicts. Each plug-in placed directly in the Plug-ins directory has access to its own IDs and to the global Nova Files IDs, but does not have access to IDs defined in other plug-ins. Creating a subdirectory inside the Plug-ins directory creates a shared namespace, and any plug-ins placed into that directory will have access to each other's IDs (in addition to the Nova Files ids), allowing plug-in packs like Extra Outfits and ARPIA2 to work correctly.

Prerequisites

git, npm

Installing

For deployment, get it from npm with

npm install --save novaparse

Usage

Reading Nova data and Nova plug-ins

// TypeScript
import { NovaParse } from "novaparse";

// Determines whether NovaParse should throw errors when a parse fails
// or should provide a default value for each failed resource parse.
var strict = false;

// should contain "Plug-ins" and "Nova Files" subdirectories
var parser = new NovaParse("/nova/source/folder", strict);

This loads all Nova Files contained in /nova/source/folder/Nova\ Files/ and then loads all Nova Plug-ins in /nova/source/folder/Plug-ins/, possibly overwriting IDs in Nova Files. Plug-ins are loaded in reverse alphabetical order, so a plug-in of earlier alphabetical order may overwrite a resource in Nova Files that was previously overwritten by a plug-in of later alphabetical order.

Getting data out of the parser

NovaParse implements GameDataInterface of NovaDataInterface, which defines how data can be accessed from it. In short,

  • (await NovaDataInterface.ids)["ResourceType"] gets the list of available IDs for resources of "ResourceType"
  • await NovaDataInterface.data["ResourceType"].get("GlobalID") gets the "ResourceType" resource of id "GlobalID".

The global IDs of Nova Files all start with nova: and end with their corresponding ID. Global IDs of things in the Plug-ins directory start with the name of the Plug-in or directory and end with a colon and their ID.

Development

To set up development, download the repository and run

npm install

to install dependencies.

To build the project for deployment, use

npm run build

This command must be run prior to publishing to npm.

Running Tests

Tests can be run with npm run test

To run an individual test, run npm run test-only ./test/path/to/test.ts

Contributing

Pull requests are welcome if you find bugs, but more type definitions need to be written before new data types can be implemented. The next large project is parsing the snd resource, which contains all the Nova sounds.