Skip to content

About

A JavaScript library for creating, loading and modifying Jujutsu Shenanigans movesets. A port of dnd-ed/pythonshenanigans.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

jsslogo
the ssssnakiest way to build jjs movesets

jsshenanigans on npm

Important

This library is a JavaScript port of PythonShenanigans, which is itself inspired by FormunaGit/libjjs. When publishing code that uses this library, please credit "itzdanti and JSShenanigans contributors (jsshenanigans, https://github.com/dnd-ed/jsshenanigans)", "itzdanti and PythonShenanigans contributors (pythonshenanigans, https://github.com/dnd-ed/pythonshenanigans)", and "Formuna (libjjs, https://github.com/FormunaGit/libjjs)".

How?

TL;DR, character codes are generated by compressing JSON through zstd and base64-encoding it.

The way character codes are generated is by taking the original JSON and compressing it through zstd and then base64-encoding it. This is very easy to reverse, and can be used to create custom movesets externally without the need for Roblox or JJS.

Decoding a code with base64 and zstd gives the original JSON. From there, a script can modify the JSON to create a custom moveset.

Usage

First, install the library using npm install @dnd-ed/jsshenanigans.

Then, in a JavaScript file, import the library as jss and create a character:

import * as jss from "@dnd-ed/jsshenanigans";

const character = new jss.Character();

From here, you can create skills using character.create.skill().

character.create.skill("Super Cool Skill", { cooldown: 5 });

Nodes live in their own module, so import them too:

import * as nodes from "@dnd-ed/jsshenanigans/nodes";

character.create.skill("Punch", [nodes.HITBOX({ damage: 5 })]);

Check out demo/demo.js for a full example.

TypeScript

The library ships type declarations, so TypeScript and editors with a language server get full autocomplete for every builder.

Features

  • Support for every documented node, condition and property, including PARTICLE, LOOK and SETMELEE
  • Support for all skill types
  • Exports as a JJS-valid character code
    • I recommend you paste it into JJS to check if it's working, then copy the character block's export
  • Branch support
  • Variable names for animations, easing styles/directions, effects, etc
  • Custom nodes
    • Domain node
  • Fake rigs
    • Fake rig animations

Docs and editor

Both live in docs/ — a Next.js + Fumadocs site that is statically exported and deployed to GitHub Pages by .github/workflows/docs.yml.

The editor doubles as a test: running jss in a browser needs a zstd backend, so the site registers a WebAssembly one with register_backend.

Requirements

Node.js 22.15+ (it ships zstd in node:zlib). No required runtime dependencies.

zstd backends

The codec picks a backend automatically:

  1. node:zlib --- the default, native, and the only one that can compress.
  2. fzstd --- an optional, pure-JS fallback. It can only decompress, so it is used for reading codes when node:zlib is unavailable.

Set JSSHENANIGANS_ZSTD_BACKEND (e.g. to "fzstd") to prefer a specific one. Run npm run bench to compare the installed backends; node:zlib is several times faster, which is why it stays the default.

License

MIT. See LICENSE and NOTICE.md.

About

A JavaScript library for creating, loading and modifying Jujutsu Shenanigans movesets. A port of dnd-ed/pythonshenanigans.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages