REST API for managing Rolemaster Unified attack resolution. The service stores attack state in MongoDB and delegates attack, critical and fumble table lookups to the RMU attack tables API.
This project is part of RMU Online: https://github.com/labcabrera/rmu-platform
|
Warning
|
This application is an independent project developed by fans of Rolemaster Unified. It is not affiliated with, endorsed by, or licensed by Iron Crown Enterprises (ICE), the owners of the Rolemaster intellectual property. All Rolemaster trademarks, game systems, and materials are the property of Iron Crown Enterprises. This software is provided for personal, non-commercial use only. If you enjoy Rolemaster, please support the official publications and content from ICE. |
The code follows a layered, ports-and-adapters style:
| Layer | Package | Responsibility |
|---|---|---|
HTTP interface |
|
FastAPI routers and Pydantic DTOs. |
Application |
|
Commands, ports and use cases. |
Domain |
|
Attack entities, value objects, services and domain exceptions. |
Infrastructure |
|
MongoDB repository, REST clients, configuration, logging and dependency container. |
-
Python 3.11+
-
MongoDB
-
RMU attack tables API, by default expected at
http://localhost:3005/v1
uv sync --all-groups
uv run uvicorn app.main:app --reload --host 0.0.0.0 --port 8000Interactive API documentation:
-
Swagger UI: http://localhost:8000/docs
-
ReDoc: http://localhost:8000/redoc
-
Health check: http://localhost:8000/health
Environment variables:
| Variable | Default | Description |
|---|---|---|
|
|
MongoDB connection string. |
|
|
MongoDB database name for legacy repository mode. |
|
Base URL of the attack tables API. |
|
|
|
HTTP timeout in seconds for attack table requests. |
|
|
Enables retry wrapper for the attack tables API client. |
|
|
Maximum retries when retry support is enabled. |
|
|
Base retry delay in seconds. |
|
empty |
Optional bearer token for the attack tables API. |
|
|
Application log level. |
|
|
Enables development debug mode. |
| Method | Path | Description |
|---|---|---|
|
|
Service metadata. |
|
|
API and MongoDB connectivity status. |
|
|
Search attacks using an optional RSQL query. |
|
|
Retrieve one attack by id. |
|
|
Create a new attack. |
|
|
Update attack modifiers. |
|
|
Delete an attack. |
|
|
Update parry value. |
|
|
Apply attack roll. |
|
|
Apply one critical roll. |
|
|
Apply fumble roll. |
|
|
Apply attack result to the tactical module. |
The main aggregate is Attack.
It is intentionally split into stable blocks:
| Block | Purpose |
|---|---|
|
Tactical input used to calculate the attack: attack type, table, size, armor, roll modifiers, situational modifiers, features and source skills. |
|
Dice roll data for the attack, criticals and fumbles. |
|
Derived modifier breakdowns and totals. |
|
Attack table entry, critical results and fumble result. |
Attack status flow:
Install dependencies:
uv sync --all-groupsRun checks:
./local-test.shRun individual commands:
uv run pytest tests/ -v
uv run ruff format app tests
uv run ruff check appBuild the image:
docker build -t labcabrera/rmu-api-attack:latest .Run locally on the RMU Docker network:
./docker-run.shReleases are created with git-flow:
./create-release.sh 0.4.0The release script:
-
starts a
release/<version>branch fromdevelop; -
updates the version in
pyproject.toml; -
refreshes
uv.lock; -
runs local checks;
-
finishes the release and pushes
main,developand tags.
| Skill | Description |
|---|---|
|
Reduces melee pace modifier. |
|
Reduces positional source penalty when attacking from flank or rear. |
|
Reduces restricted quarters penalty. |
| Status | Description |
|---|---|
|
Applies a source penalty. |
|
Reduces off-hand penalty. |
| Status | Description |
|---|---|
|
Applies an attack bonus. |
|
Applies an attack bonus. |
|
Applies a melee bonus or ranged penalty. |
|
Penalizes ranged attacks made while engaged in melee. |

