A web-based mathhammer calculator for Warhammer 40,000 10th Edition that supports importing BSData format datasets.
- Attack Outcome Calculator: Calculate expected hits, wounds, and damage
- Weapon Effectiveness Comparison: Compare different weapons against various targets
- Unit vs Unit Combat Simulation: Simulate full combat scenarios between units
- BSData Import: Import unit and weapon data from BSData repositories
- Clone the repository:
git clone <repository-url>
cd Mathhammer- Install dependencies:
pip install -r requirements.txt- Run the application:
python app.py- Open your browser to
http://localhost:5000
The tool supports importing datasets in BSData format (BattleScribe XML files):
- Place
.cat(catalog) and.gst(game system) files in thedatasets/directory - Use the web interface to import and parse the datasets
- The default dataset is from BSData/wh40k-10e
Mathhammer/
├── app.py # Flask web application
├── mathhammer/
│ ├── calculator.py # Core calculation engine
│ ├── parser.py # BSData XML parser
│ └── models.py # Data models for units/weapons
├── static/
│ ├── css/ # Stylesheets
│ └── js/ # Frontend JavaScript
├── templates/
│ └── index.html # Web interface
├── datasets/ # BSData files
└── requirements.txt # Python dependencies
- Select an attacking unit and weapon
- Select a target unit
- View calculated probabilities for hits, wounds, saves, and total damage
- Select multiple weapons to compare
- Choose a target profile
- View side-by-side effectiveness metrics
- Select two units to fight
- Configure unit sizes and special rules
- Run simulation to see expected outcomes
MIT License