Dice Mechanic Simulator (DMS) tests game mechanics for Midnight Riders, the tabletop role-playing game (TTRPG).
Michael McMahon
Thank you for visiting us at the World Maker Faire 2018 at the location 3 tent in the games section!
Support the developers of Midnight Riders by purchasing a physical zine with our GCG Square Store, purchasing an ebook at DriveThruRPG, or developing with us on Github.
Slides from talks regarding Midnight Riders can be found in the dice-mechanic-datapacks repository.
This script can be used to balance dice based RPGs and board games.
DMS boils the game down to only the game mechanics by removing theme, characters, and storytelling.
This code is released under the GNU Affero General Public License version 3 or any later version (AGPL-3.0-or-later).
Copyright (C) 2017-2020 Michael McMahon
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.
The logic behind the game can be seen in the gamelogic.md file and is the fastest way to catch up if you are not familiar with the rules of Midnight Riders.
Goals for the project can be found in the goals.md file.
Imposter syndrome disclaimer: I want your help. No really, I do.
See the CONTRIBUTING.md file for loose guidelines on how you can help.
- GNU/Linux Installation Instructions
Python is probably already installed on your GNU/Linux system. You can check if Python is installed by running this command from a terminal:
python3 -V
Install all dependencies for Debian.
sudo bash setupdeb.sh
Configure tox testing environment.
sudo bash setuptoxtestenvironment.sh
- Mac Installation Instructions
To install the dependencies, you need homebrew which requires XCode which requires the latest macOS. Apple should serve snapshots of older XCode packages for old releases purely for this reason. If your computer cannot run the latest macOS, I would suggest dual-booting GNU/Linux using this guide or using a Virtual Machine (VM) instead of trading in for a new Mac.
Try to run the dicemechanicsim.py
and solve each dependency.
python3 dicemechanicsim.py
- Windows Installation Instructions
The easiest way to install Python (and many other common programs) for Windows is through ninite. Ninite is a website that allows you to install many programs at once without accidentally installing adware. The ninite download program can be left on your system and used as an updater in the future.
For all python files, use Notepad++ to change the end of line from UNIX / OS X Format to Windows Format.
Try to run the dicemechanicsim.py
and solve each dependency.
- If DMS is not compatible with your system...
You can setup a Debian Virtual Machine (VM) or I can upload a Debian VM that is configured with all of the dependencies for you.
Install python. Download this script. Open a terminal. Change to the directory with the script.
Run with this command:
python3 dicemechanicsim.py
View help:
python3 dicemechanicsim.py -h
Enable verbose mode:
python3 dicemechanicsim.py -v
Loop the script every two seconds (GNU/Linux or UNIX):
watch -n 2 python3 dicemechanicsim.py
Loop the script 40 times and package the results as a data pack (GNU/Linux):
bash builddatapack.sh
Alternatively, open the file in IDLE, make changes, save, and press F5 to run the script.
- The game results are recorded as a spreadsheet in csv format and as a graph in png format.
- No AI is present yet. All decisions are made randomly.
- Static choices can be selected for player 1, late game, and all players for NPC interactions.
- The simulation runs in milliseconds instead of hours. This allows for fast experimentation with rule changes instead of months of gameplay tests.
Feature requests can be found in the issues and goals.md file.
Note: Programming experience is not required to participate with data analysis.
Open the dice-mechanic-datapacks repository, download, and extract the most recent data pack for example data.
What is a CSV file? CSV stands for comma separated values. It is a very simple spreadsheet with each row being a new line and each column separated by commas.
The csv files can be opened with popular spreadsheet software such as LibreOffice Calc or Microsoft Excel. A plain text editor can also view the files quickly.
Data analysis software and programming languages can be used to parse the data.
Data is graphed within python through pandas and matplotlib.