Skip to content

Python-Hammer/PyHammer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AOS

A small python tool to see how the units from the Age Of Sigmar tabletop wargame compare in a fight

Simulates a number of fights for a list of units then displays graphs with the results

Backend setup

Navigate to backend directory:

cd backend

Setup your virtual environment:

python -m venv .venv

then activate it:

source .venv/bin/activate

install the necessary packages 📦

pip install -e .

run, for backend testing purposes & CLI: 🚀

python main.py

to start the backend:

uvicorn main:app --reload

This will start the FastAPI dev server at http://localhost:8000. You can also visit http://localhost:8000/docs to try the automatically generated API interactively.

Setting up the frontend

Install node and npm

node -v
npm -v

Install Dependencies

cd frontend/
npm install

Start the Development Server

cd frontend/
npm run dev

This will start the Vite dev server. Open your browser and navigate to http://localhost:5173 to view the app.

Project Structure

The project uses the standard Vite + React + TypeScript setup. Key folders:

  • src/ – Main source code
  • src/pages/ – Page components
  • src/components/ – Reusable UI components
  • src/assets/ – Static assets (images, fonts, etc.)
  • src/hooks/ – React hooks to handle state-based changes
  • src/styles/ – css files

Customizing

You can add unit profiles in backend/data.

To add a unit to the simulation, insert it in the 'units' array in the main.py file

Special Weapon Rules (supported)

  • "id": "companion": Flag the weapon as "companion"
  • "id": "crit_auto_wound": Flag the weapon as "Crit Auto Wound"
  • "id": "crit_mortal": Flag the weapon as "Crit Mortal"
  • "id": "crit_2_hits": Flag the weapon as "Crit 2 Hits"
  • "id": "crit_5+": Flag the weapon as "Crit 5+"
  • "id": "add_X", "condition": Y, , "value": Z: If condition Y (charged/...) is satified, add Z to value X (attacks, rend, hit, wound)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5