Calculator for helping analyze shooting and fighting attacks in Kill Team (2021 edition). Heavily inspired by kt2.doit-cms.ru and hoping to improve on it.
Live at jmegner.github.io/KT21Calculator.
For reference, here's ktcalc's announcement reddit thread and follow-up thread for fight support. Check out Kill Team Resources repo for other calculators/simulators and more.
Features that would be nice for me to get around to implementing ...
- mass analysis tab
- have option for user to select a relevant operative profile (ex: Necron Immortal with Gauss Blaster and Starfire Core) instead of individually selecting parameters.
- fight section
- transition from uninjured to injured (degraded WS) between rounds
- fnp: this one is messy, so is low priority
- "daemonic energies", special rule on the balefire acolyte's dagger...Basically it does 2 mortal wounds per retained crit in melee
- maybe if you use an "advanced" param and flip back to basic, still show the used advanced param.
Basically, this is a React SPA web app mostly written in TypeScript. There is some Rust compiled down to wasm for some stuff where I needed more performance. I use GitHub Actions to test, build, and deploy the web app upon every git-push to main branch. I do my development in vscode.
List of notable technologies/libs/whatever used...
- TypeScript
- NodeJS and npm
- React
- React-Bootstrap
- Create-React-App (but heavily considering using Vite or Remix in future).
- Jest for general JS/TS testing.
- Testing Library for react-oriented testing.
- GitHub Actions for CI/CD.
- Visual Studio Code (vscode)
- For the Deadzone calculator, which is Monte Carlo, I got 10x speed from using wasm.
- Rust.
- wasm-pack to build Rust into wasm.
- wasm-bindgen
Dev setup...
- You'll need to install NodeJS+npm for building and running.
- Install rust and wasm-pack to build rust into wasm.
- Might have to do
rustup target add wasm32-unknown-unknownas well.
- Might have to do
- For debugging and otherwise having a nice experience, this project is set up for vscode as the IDE.
- Initially, you'll have to do a
npm cito install npm packages with exact versions of previous development. - Do a
npm run buildto build the wasm and React stuff. - Do a
npm startto build the TypeScript stuff and run. - For debugging non-tests with vscode, be sure to do
npm startbefore launching the debugger. For debugging tests, you can just launch one of vscode's test-oriented debug profiles. - To run tests, do
npm testfor normal watch-mode testing that sticks around. Donpm run testqthat does a single run of tests (like doingtestand then hittingqto quit).
My thanks to Redux maintainer Mark Erikson for his advice and help. I decided not to use Redux just yet, but look forward to using it.