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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file evennia_mob_spawner-0.1.1.tar.gz.
File metadata
- Download URL: evennia_mob_spawner-0.1.1.tar.gz
- Upload date:
- Size: 72.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0abd251b9df2f36672878a9a40c9f1b85317757be062ac41ccec9348d7896bb0
|
|
| MD5 |
f66df97570e0bd87d7866c430b412ebb
|
|
| BLAKE2b-256 |
4a64061a238a6e494364efd8db9070374e03d4abd6c0781413a0fe605b69c64c
|
File details
Details for the file evennia_mob_spawner-0.1.1-py3-none-any.whl.
File metadata
- Download URL: evennia_mob_spawner-0.1.1-py3-none-any.whl
- Upload date:
- Size: 77.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ee0673aa199bc7dfdd24fda756297d6186b86f3ba15e024c53dcbb9122c5cdc
|
|
| MD5 |
3b1c820dbb673de30b7eafb423a905ff
|
|
| BLAKE2b-256 |
66d5ae9c32ce22536914c7b218d08c7664814b41d188fa848ce574ce4816dee3
|