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

rimworld-mod-maker

v0.0.11

Published

A TypeScript library for RimWorld modding

Readme

RimWorld Mod Maker

A TypeScript framework for programmatically creating RimWorld mods.

✨ Features

  • Write mods easily with TypeScript / JavaScript
  • Compile-time type checking saves development time
  • Component-based design improves readability

🔮 Future Features

  1. 📚 Expanded support for more Defs
  2. ⚡ Dynamic libraries based on JavaScript
  3. 🩹 Built-in patch support

📖 Example

Here’s a minimal working example of defining a custom weapon mod:

To get started, first install the rimworld-mod-maker package:

bun add rimworld-mod-maker

Then, create an index.ts file with the following content:

import {
    // This is entry point of the library
    defineMod,
    // Components
    GraphicComponent, ItemComponent, MeleeWeaponComponent, RangedWeaponComponent, MeleeAttackComponent, RangedAttackComponent, GenericWeaponComponent,
    // Some fixed types
    GraphicType, VerbClass,
    // Vanilla defs for reference
    VanillaDamageDef, VanillaThingDef, VanillaToolCapacityDef
} from "rimworld-mod-maker";

// Define your mod
defineMod({
    id: "demo-mod",
    name: "Demo Mod",
    author: "Xiaoeyun",
    description: "A demo mod created using rimworld-mod-maker.",
    version: "1.0.0",
    supportedVersions: ["1.6"],

    iconPath: "./assets/icon.png",
    previewPath: "./assets/preview.png",

    pretty: true,
    clean: true,
    output: "../../DemoMod",
}, ctx => {
    // You can define contents here

    ctx.defineWeapon({
        name: "MyFourthWeapon",
        label: "Blue Archiver Role",
        description: "A simple ranged weapon created for demonstration purposes.",
    }, [
        ItemComponent({ mass: 3.0 }),
        GraphicComponent(ctx.bundleTextures("./assets/ranagedWeapon.png"), GraphicType.Single),
        GenericWeaponComponent(),
        RangedWeaponComponent(),
        RangedAttackComponent({
            verbClass: VerbClass.Verb_Shoot,
            defaultProjectile: VanillaThingDef.Bullet_AutocannonTurret,
            hasStandardCommand: true,
            warmupTime: 10,
            range: 50,
            burstShotCount: 150,
            rpm: 1800,
            muzzleFlashScale: 25,
        }),
        MeleeAttackComponent([
            {
                label: "Stab",
                capacities: [VanillaToolCapacityDef.Stab],
                power: 3,
                cooldown: 2.5,
            }
        ])
    ])
});

Contribute to the project

  1. requirements:

    • Bun v1.1.30 or higher
    • Python 3.8 or higher (for tools)
  2. To install dependencies:

bun install
  1. To build the project:
bun run build

🛠 Toolset

Our toolset is designed to save you time and reduce repetitive work:

  • dumper.py
    Extracts XML definitions directly from the RimWorld game data directory and generates TypeScript type files (src/defs/vanilla.ts).
    python tools/dumper.py

📂 Project Structure

  • defs/ – various RimWorld definition types
  • components/ – modular definition components
  • utils.ts – Utility functions and type definitions
  • xml.ts – Utilities for XML generation and manipulation
  • io.ts – File operation helpers