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

@mklabs/npfm

v1.2.0

Published

Modding tools and CLI to generate CA modding pack for Total War Warhammer II

Downloads

3

Readme

npfm

Modding toolbox for Total War Warhammer II.

Installation

warning This package has been renamed to @mklabs/npfm, all previous version of npfm have been deprecated in favor of a scoped package.

# CLI installed globally
npm install @mklabs/npfm -g

# as a lib
npm install @mklabs/npfm

Description

This package aims to provide a companion CLI app to the Assembly Kit for Warhammer II.

It enables a workflow where most of your edits are done through Dave and your text editors. Whenever a file changes, npfm will trigger an update in your mod.pack

It acts as a bridge between the Assembly Kit and PackFileManager executable. It does so thanks to pfm.exe found in PackFileManager, which is a little CLI to manipulate mod packs.

You don't need to manually download PackFileManager, and won't interfere with the one you might already have installed. On install, this package will automatically download the latest PFM version, and put it in the .pfm folder.

workflow

With bob: Assembly Kit (Dave) => Export changes to binaries => bob => retail/data/mod.pack
With npfm: Assembly Kit (Dave) => Export changes to binaries => npfm => npfm_generated_mod.pack

npfm can effectively be use to feed PFM with the working_data/ directory structure and generate a pack out of it.

Documentation

CLI

Usage: npfm [command] [options]

Example:
      npfm [watch|serve|init] [options]
      npfm [install|watch|serve|init] [options]

Commands
  init        - run the init template
  create      - run a given create template
  serve       - start a development server with watch mode enabled
  pack        - generate a pack file
  pfm         - forwards the arguments and options to pfm executable
  watch       - watch files for file changes using npm-watch

Options
  -h, --help

Create a mod pack from a given directory tree structure with npfm pack.

Usage: npfm pack [destination] [options]

Options:
  -s, --src     Source files (default: **/*)
  --glob[s]     Alias for src
  --cwd         Working directory (default: ./working_data)

Example:
  # next to your working_data/ directory
  npfm pack --glob "**/*" data/retail/mod.pack

  # if not, or if your files live in another directory structure
  npfm pack --glob "script/**/*" --cwd "src/awesome_mod/"  retail/data/awesome_mod.pack

The src and cwd can be changed to generate the proper directory structure within the mod.

.npfmignore file

Similar to .gitignore or .npmignore files, you can setup a list of pattern you'd like to exclude from the produced mod.pack.

To do so, create a .npfmignore file in the current working directory:

BattleTerrain/**/*
EditorBrushes/**/*
RigidModels/**/*
Terry/**/*
Weather/**/*
campaigns/**/*
rules.bob

These globs patterns have to be relative to the provided --cwd option.

Starter Kit

TODO create template to init a new project

Credits

Huge thanks to PackFileManager authors and maintainers.

All the heavy lifting of putting exact bytes at the correct position have been done by PFM developpers.