Open Mafia Engine - a framework for mafia/werewolf games.
Project description
Open Mafia Engine
The Open Mafia Engine is a flexible, open-source game engine for Mafia-like games.
See the Wikipedia article for information on what Mafia/Werewolf is.
The Open Mafia Engine actually allows a much broader type of game to be played, with custom roles and very intricate "setups". Most of these custom roles come from either "real-life" games or online forums such as MafiaScum and Bay12Games Mafia Subforum.
Features
- Event-based architecture, which allows for very complex interactions.
- Many built-in abilities, victory conditions, etc. (This is a lie, but we're working on it!)
- Games are defined declaratively or using an parametrized GameBuilder.
- Open source & extensible, with a plugin system in the works.
Installing
Install the latest stable version via pip:
pip install open_mafia_engine
See the dev docs to install for local development (using Poetry).
Getting started
This example starts a 5-player "test" mafia game (1 mafioso vs 4 townies):
import open_mafia_engine.api as mafia
builder = mafia.GameBuilder.load("test")
players = ['Alice', 'Bob', 'Charlie', 'Dave', 'Eddie']
game = builder.build(players)
Actually running commands in the engine is pretty complicated for now. We're working to improve the experience.
See playground.py
in the repository for an example game.
Project details
Release history Release notifications | RSS feed
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
Hashes for open-mafia-engine-0.5.0a4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b206293648f3658544d4b23c61653a03b0006d55a0365af0a8304e0a7169697 |
|
MD5 | e470fa2915e0f912ebbe8d16c937ff67 |
|
BLAKE2b-256 | 32c90fb07ba008d9b403ee0061a9930074eddbd20c468c61d1cc3ba6f7933f00 |
Hashes for open_mafia_engine-0.5.0a4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f732b0a71fc34be606dd8b660ca38768d9554a2579b4892ba9200631d6b6d6d |
|
MD5 | 2dfa7b500d3b770f74b63920fce94053 |
|
BLAKE2b-256 | 4c9e84ec3300afb5415f5936dc2e3ebb4ce9ac393104e96e5aae62852041eebe |