This is a simple 5e encounter simulator. It is showcased in the following Youtube video: https://www.youtube.com/watch?v=A8FNVkFuhXI
The simulator calculates the "average" game using probabilities, which means it runs slightly differently than an actual game of 5e:
This does result in slightly different outcomes than if the simulator used statistics (running the simulation a large number of times, using random dice rolls, and measuring the result). For example, if a creature has 10 hit points and becomes the target of an attack dealing 10 damage that has 50% chance to hit, it will be shown to have taken 5 damage, when in the actual game, it would have taken either 0, or 10, never 5.
It might change in the future, but for now, the reason this approach was chosen is that:
1) A probabilities-based approach makes the visualization easier. 2) A statistics-based approach is more computationally intensive.
npm i
npm run dev
public
: images to be displayed on the websitesrc
components
: UI elementscreatureForm
: the dialog which is shown when clicking adding/updating a creaturesimulation
: the components for showing the simulation's results on the home pageutils
: general form elementsdata
: list of monsters & PC templates to populate the UImodel
: type definitions, enums, and the core of the simulationpages
: HTTP URL endpointsstyles
: global CSSTo contribute, fork this repository and make pull requests.
This project's main goals are to:
Contributions that are likely to get accepted:
Contribution checklist:
npm run build
src/data
are updated to reflect your changesCommon reasons why a pull request might be denied:
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
The license only covers commits on the main
branch made after June 2nd, 2023, and only the contents of the src
and styles
directories, with the exception of:
src/data
directory src/components/utils/logo.tsx
filesrc/components/utils/logo.module.scss
file.BattleSim is unofficial Fan Content permitted under the Fan Content Policy. Not approved/endorsed by Wizards. Portions of the materials used are property of Wizards of the Coast. ©Wizards of the Coast LLC.