Skip to main content

evennia-mob-spawner

A declarative YAML-driven mob spawn system for Evennia.

Spawn rules — what typeclass spawns where, how many, how often — are expressed as data; a persistent script maintains the population against the running game's database. The library is the spawn equivalent of evennia-world-builder: world-builder owns static content (rooms, exits, fixtures, immortal NPCs); this library owns refreshing populations (mobs that die, respawn, and self-heal).

Status

Working. The full pipeline — Reader → Loader → Validator → Deployer — is implemented. One persistent script per rule-set file maintains populations across restarts and content rebuilds without losing cooldown state. Six admin commands (ms_load, ms_status, ms_stop, ms_restart, ms_delete, ms_spawn_report), each gated to the process that can correctly answer for it. 232 tests green, live-verified on a two-process sharded deployment against a real consumer game. See docs/progress.md for the running milestone log.

Is this for me?

This library is useful if you are building an Evennia game that:

  • Wants to express mob population rules as data (typeclass + area tag + cooldown + cap) rather than as Python builders.
  • Wants population maintenance to self-heal across server restarts and content rebuilds without losing cooldown state.
  • Wants rule files to live in a separate content repo (e.g. alongside your declarative world content), iterated locally and deployed from GitHub.

If your game's mob spawning is a few hand-coded scripts that rarely change, you do not need this library.

Install

pip install evennia-mob-spawner

Editable install for development against a checkout:

git clone https://github.com/FullCircleMUD/evennia-mob-spawner.git
cd evennia-mob-spawner
python -m venv venv
# Activate the venv (platform-specific)
pip install -e .
python runtests.py

Compatibility with evennia-shards

The library is shards-compatible but does not require shards. If evennia-shards is installed alongside, the ms_load / ms_validate commands automatically carry the active multi-tenant context across their run_async worker-thread dispatch — the Script rows created in the worker get stamped with the running process's shard_id and become correctly scoped under the auto-filter. If shards isn't installed, the library falls back to an identity passthrough at import time and behaves identically to a non-sharded deployment. No configuration needed either way; the integration is a try-import in commands.py using shards' preserve_tenant_context helper. See docs/shards-compatibility.md.

Co-installed, the pairing also requires shard as the first declared level and confines ms_load to the shard it is running as. See docs/interoperability.md.

Learn more

  • CLAUDE.md — load-bearing principles and orientation for working in the repository.
  • docs/INDEX.md — index of design documents.
  • docs/architecture.md — the spawn system's mechanisms and the library / consumer ownership boundary; the first architectural pass.

License

BSD 3-Clause. See LICENSE.

Download files

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

Source Distribution

evennia_mob_spawner-0.1.0.tar.gz (68.5 kB view details)

Uploaded Source

Built Distribution

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

evennia_mob_spawner-0.1.0-py3-none-any.whl (73.0 kB view details)

Uploaded Python 3

File details

Details for the file evennia_mob_spawner-0.1.0.tar.gz.

File metadata

  • Download URL: evennia_mob_spawner-0.1.0.tar.gz
  • Upload date:
  • Size: 68.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for evennia_mob_spawner-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5dfef605ebb45601c0ff69d1729c53e0483fbe9bf17b51ad8aa44a89b8b736a3
MD5 7fa4444e6ee535948db5f0b1a1a5ef15
BLAKE2b-256 c074f6da5967f571495284b958dd4cfafbeee486e9676ecb215be6a02318acf7

See more details on using hashes here.

File details

Details for the file evennia_mob_spawner-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for evennia_mob_spawner-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d91fcf8868bbb4efb209188cbb13c896e5f19ea7fd8c56cbed6e6d4fb83767f0
MD5 e657407c30573c86da6c2d25dab73164
BLAKE2b-256 a424cd386407705462f0ec1d8fa5e075781b0ee5d9f4a987efbc4c65dfd284a1

See more details on using hashes here.

Supported by

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