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. 274 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.
Metadata
Release files for evennia-mob-spawner 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| evennia_mob_spawner-0.1.2.tar.gz | 74.2 kB | Without provenance | Details for evennia_mob_spawner-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| evennia_mob_spawner-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for evennia_mob_spawner-0.1.2-py3-none-any.whl |
Total release size: 152.8 kB
Release files / evennia_mob_spawner-0.1.2.tar.gz
| Download URL | evennia_mob_spawner-0.1.2.tar.gz |
|---|---|
| Size | 74.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8ef1c023e7fccf03ef9c38830a261dc17f4699ab904cd613f81a633c2685da4b
|
|
BLAKE2b-256 checksum How to use checksums |
213ab71b95739f668b8dec60159c906051a73410530f9b171931e79e65ab91bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / evennia_mob_spawner-0.1.2-py3-none-any.whl
| Download URL | evennia_mob_spawner-0.1.2-py3-none-any.whl |
|---|---|
| Size | 78.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
861203f7387f69e88fa2e5428cd7be3953a36fa21edc1988157f64f1a62f8078
|
|
BLAKE2b-256 checksum How to use checksums |
22449ba32f20045a733264887fb14fa502480fad6c2cc981f462c22d2467bc80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for evennia-mob-spawner 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.