Skip to main content

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!)
  • YAML Prefabs let you define a game in a (mostly) human-readable fashion.
  • 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 "vanilla" mafia game (1 mafioso vs 4 townies):

from open_mafia_engine.api import Prefab

prefab = Prefab.load("Vanilla")
players = ['Alice', 'Bob', 'Charlie', 'Dave', 'Eddie']
game = prefab.create_game(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


Download files

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

Source Distribution

open-mafia-engine-0.5.0a1.tar.gz (41.8 kB view details)

Uploaded Source

Built Distribution

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

open_mafia_engine-0.5.0a1-py3-none-any.whl (57.5 kB view details)

Uploaded Python 3

File details

Details for the file open-mafia-engine-0.5.0a1.tar.gz.

File metadata

  • Download URL: open-mafia-engine-0.5.0a1.tar.gz
  • Upload date:
  • Size: 41.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.8.2 Linux/5.8.0-1033-azure

File hashes

Hashes for open-mafia-engine-0.5.0a1.tar.gz
Algorithm Hash digest
SHA256 15194fde2c5ec71ce33d0bbaa14bb6ddd407fd7de511620f4bdfc0a314dbf2de
MD5 501a49bb3c769b077187091e5c8c0eee
BLAKE2b-256 827b6a5b5e1b0245684c712f5eafbf4c1d58c29ed496b4c75ebd495368cf6d95

See more details on using hashes here.

File details

Details for the file open_mafia_engine-0.5.0a1-py3-none-any.whl.

File metadata

  • Download URL: open_mafia_engine-0.5.0a1-py3-none-any.whl
  • Upload date:
  • Size: 57.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.8.2 Linux/5.8.0-1033-azure

File hashes

Hashes for open_mafia_engine-0.5.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 aa2e85e7ca38c56d607599b8362b5705ab6df8e6470728e5cbf0525284e6068e
MD5 820702439fe7a9033bef3eabb7dbf977
BLAKE2b-256 8a238da099281f6b919819aed5f0cf06b8d6ad4c66515439e6f39c1a3d2f4ce1

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 Pingdom Monitoring Sentry Error logging StatusPage Status page