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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rutan/rpgmaker-vxace-web-game-manifest

v0.0.0

Published

Manifest schema and utilities for RPG Maker VX Ace Web.

Downloads

40

Readme

@rutan/rpgmaker-vxace-web-game-manifest

Manifest schema and utilities for RPG Maker VX Ace Web.

Overview

This package defines the game manifest format used by RPG Maker VX Ace Web and provides helpers for parsing, validating, cloning, and resolving manifest records.

The manifest is shared by the converter and the browser runtime. It stores game metadata, resource lookup records, pack file metadata, and font records so the runtime can resolve VX Ace-style asset paths in a browser environment.

Installation

npm install @rutan/rpgmaker-vxace-web-game-manifest

Usage

Parse and Use a Manifest

GameManifest is the easiest API for runtime-style lookups.

import { GameManifest } from '@rutan/rpgmaker-vxace-web-game-manifest';

const response = await fetch('/game/manifest.json');
const json = await response.json();

const manifest = GameManifest.fromJson('game', json);
const title = manifest.metadata.title;
const screen = manifest.screen;

const image = manifest.resolveAsset('Graphics/Characters/Hero', 'image');
if (image) {
  console.log(image.logicalPath, image.data);
}

GameManifest.fromJson() validates the input JSON and throws a GameManifestJsonParseError when the manifest is invalid.

Safe Parsing

Use safeParseGameManifestJson when you want to report validation issues without throwing.

import { safeParseGameManifestJson } from '@rutan/rpgmaker-vxace-web-game-manifest';

const result = safeParseGameManifestJson(json);
if (!result.ok) {
  for (const issue of result.error) {
    console.error(issue.message);
  }
} else {
  console.log(result.manifest.id);
}

Create an Empty Manifest

createEmptyGameManifestJson creates a schema-valid empty manifest. Converter tools can use this as a starting point before adding resources and fonts.

import { createEmptyGameManifestJson } from '@rutan/rpgmaker-vxace-web-game-manifest';

const manifest = createEmptyGameManifestJson('game', {
  id: 'author-name:game-name',
  metadata: {
    title: 'My Game',
    screen: {
      width: 544,
      height: 416,
    },
    input: {
      virtualGamepad: 'normal',
    },
  },
});

API

GameManifest

Wrapper class for validated manifest JSON.

Important methods and properties:

  • GameManifest.fromJson(gameDir, json): Parse and validate unknown JSON.
  • GameManifest.fromManifestJson(gameDir, manifest): Wrap an already typed manifest object.
  • GameManifest.empty(gameDir): Create an empty manifest wrapper.
  • manifest.metadata: Manifest metadata.
  • manifest.screen: Runtime screen size.
  • manifest.fonts: Font records.
  • manifest.packs: Pack records.
  • manifest.toJson(): Clone the underlying manifest JSON.
  • manifest.resolveAsset(path, expectedType): Resolve an image, audio, movie, or font asset request.
  • manifest.resolveResource(path): Resolve any resource request.
  • manifest.fontExists(name): Check whether a font family exists.
  • manifest.resolveFontFamilies(names): Resolve font family aliases to available families.
  • manifest.getPack(packId): Get pack metadata by pack id.

Parsing Helpers

  • parseGameManifestJson(json): Parse and validate unknown JSON. Throws on validation errors.
  • safeParseGameManifestJson(json): Parse and validate unknown JSON. Returns { ok: true, manifest } or { ok: false, error }.

Creation and Clone Helpers

  • createDefaultMetadata(): Create default metadata.
  • createEmptyGameManifestJson(gameDir, options): Create an empty manifest.
  • cloneGameManifestJson(manifest): Deep clone a manifest object.

Resolution Helpers

  • resolveAsset(manifest, gameDir, requestedPath, expectedType): Resolve an asset by VX Ace-style path.
  • resolveResource(manifest, gameDir, requestedPath): Resolve any resource by VX Ace-style path.
  • toPublicUrl(gameDir, relativePath): Build an encoded public URL for a manifest resource path.
  • fontExists(fonts, name): Check whether a font family exists.
  • resolveFontFamilies(fonts, names): Resolve requested font families.
  • buildFontFamilyLookup(fonts): Build the normalized font family lookup map.

Path Resolution

VX Ace game scripts usually reference assets without file extensions and expect Windows-style case-insensitive paths. The manifest lookup helpers normalize paths so the browser runtime can reproduce that behavior.

Resolution normalizes requested paths by:

  • converting backslashes to slashes
  • removing leading ./ or /
  • removing the game directory prefix when present
  • normalizing Unicode to NFC
  • matching lookup keys case-insensitively
  • resolving extensionless requests through manifest candidates

When an extension is provided, resolveAsset prefers candidates with the same extension. If no exact extension match is found, it can still fall back to the first candidate of the expected asset type. resolveResource requires the extension to match when an extension is provided.

Manifest IDs

Manifest id values are used by the runtime as stable game identifiers, including browser save data namespacing. They should be unique and should not change between releases of the same game.

Valid IDs use this pattern:

^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$

Examples:

  • author-name:game-name
  • com.example.my-game

License

MIT License.