Skip to main content

Deterministic TTRPG simulation core for AI-run games - the Python surface of loom-engine. Engine-is-truth: seeded, replay-safe rules the AI narrates but cannot invent.

Reason this release was yanked:

pending release verification audit

Project description

loom-engine (Python)

The Python surface of loom-engine - a deterministic rules core for AI-run tabletop and RPG games.

pip install loom-engine-rpg   # the bare 'loom-engine' name is taken on PyPI
import loom_engine            # the import name is loom_engine

The design principle: the engine is truth. Dice, action economy, initiative, range, conditions, reactions, and validation are resolved by pure, replay-safe code. An AI narrator can describe the outcome, but it never gets to invent the roll, change the numbers, or rewrite what happened.

This package is a byte-parity port of the TypeScript engine: the same inputs produce identical results in Python (your server/backend) and TypeScript (the browser), so a server-authoritative resolution and a client one can never disagree. That parity is enforced by a shared cross-language golden-vector suite.

Modules (v2.3.0)

  • loom_engine.range_bands - grid-free Engaged/Near/Far positioning.
  • loom_engine.reaction_economy - the per-round "1 reaction per combatant" ceiling.
  • loom_engine.narration_contract - find_invented_number: reject prose that states a mechanics number the engine never produced (numerals and number-words).
  • loom_engine.ruleset - 5e + PF2e action economy, initiative ordering, conditions.

Pure stdlib, zero runtime dependencies. Compatible with the D&D 5e SRD (CC-BY-4.0) and the Pathfinder 2e Remaster ruleset (ORC License); see ../NOTICE.md. Not affiliated with or endorsed by Wizards of the Coast or Paizo.

Determinism

These modules use ordered dicts + explicit sorts for all logic (never hash() ordering). For any cross-language hashing, serialize with json.dumps(obj, sort_keys=True, separators=(',', ':')) and run with PYTHONHASHSEED=0. Floats are banned in deterministic paths.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

loom_engine_rpg-3.1.0.tar.gz (94.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

loom_engine_rpg-3.1.0-py3-none-any.whl (65.4 kB view details)

Uploaded Python 3

File details

Details for the file loom_engine_rpg-3.1.0.tar.gz.

File metadata

  • Download URL: loom_engine_rpg-3.1.0.tar.gz
  • Upload date:
  • Size: 94.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for loom_engine_rpg-3.1.0.tar.gz
Algorithm Hash digest
SHA256 60e142589697cb56a82f5cad06e2a4bad873bbd34b88fb06464ee5372bedd69f
MD5 cfe8d88030d088748ec506af730db310
BLAKE2b-256 0dfd5ac784906c7c1aaf91fd7c61a7dd3ca902315b8d4bd2a4c003d970f6287b

See more details on using hashes here.

Provenance

The following attestation bundles were made for loom_engine_rpg-3.1.0.tar.gz:

Publisher: release-pypi.yml on sadhaka/loom-engine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file loom_engine_rpg-3.1.0-py3-none-any.whl.

File metadata

  • Download URL: loom_engine_rpg-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 65.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for loom_engine_rpg-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e68fad174a8e354a58ea89ad42862f8b4ebb47e6bdf41d39ea6aad3013640fd
MD5 d6969eb2f2c72ade12d6bae89d832196
BLAKE2b-256 457e2373e045ba1d69408f5af424ea723cbd71e10cdad0ac5b901e8edd6eb4f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for loom_engine_rpg-3.1.0-py3-none-any.whl:

Publisher: release-pypi.yml on sadhaka/loom-engine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page