Gamemaster tools for creating and running a game of Far Horizons.
These python utilities are designed to replace the old bash scripts in ../bash. They wire together FH's various programs and provide simpler interface for a GM running a game.
Install Depedencies
You must have python 3 installed on your system.
Debian/Ubuntu:
apt install poppler-utils ps2pdf python3-dateutil
Fedora:
dnf install poppler-utils ghostscript python3-dateutil
macOS:
brew install ghostscript poppler
pip -r requirements.txt
Note: google/gmail integration is currently not working as the code relies on broken google apis.
farhorizons.yml - configure your fh games here see farhorizons.yml.sample
generally I would put this in the game data dir. this config file
is required by all the scripts below.
signups_verify.py - checks for new registrations in a google docs spreadsheet
and verifies that the registriation is correct (15 tech points,
less than 31 characters in names, etc.)
signups_fetch.py - use after signups close. downloads registration data into a csv
for use with game_setup.py to create the game
create_map.py - Create a PDF map of the galaxy for the players.
game_setup.py - replaces Auto.pl. takes the csv generated by signups_fetch.py and
creates the game in the data directory by calling the appropriate
FH executables: NewGalaxy, MakeHomes, HomeSystem, AddSpecies
game_packet.py - tool that creates a first turn packet zip file with galaxy maps and turn report
orders_fetch.py - replaces fhprocmail. fetches orders via imap from gmail and
verifies their accuracy, then sends a confirmation email.
orders_status.py - prints out the status of all players' orders.
(errors, no orders, ready)
orders_clean.py - cleans orders before processing. removes empty lines.
turn_run.py - replaces fhtest. run this in the game directory to process a turn.
however, it doesn't save the turn results. it places them in a
tmp folder so you can verify them.
turn_confirm.py - replaces fhsave. run from the game directory. copies the
turn results generated with turn_run into the game directory.
turn_send.py - replaces fhreports. sends an email containing the turns results
to all players. also notifies them of the next deadline.
turn_inject.py - injects input (from stdin) into the beginning of all the turn reports.
turn_save.py - replaces fhclean. saves the turn into backup/ and reports directory.
To prepare a new game of FH:
-
Ensure you've installed the dependencies listed above
-
Collect signups in a csv file (see example.csv for the format)
-
Edit your
farhorizons.yml
-
Create the game:
python game_setup.py < your_signups.csv
-
Create the maps:
python create_map.py
-
(optional) Inject the game start intro text into the turns (see doc/intro.txt for the original FH intro)
python turn_inject.py < path/to/intro.txt
-
Create the first turn zip files:
python game_packet.py
Send out your game packets, and off you go!
- Add all the player's order files (with .ord extension) do your game's data directory
- Run
python turn_run.py
It will output the results from the turn in a tmp dirctory. - Investigate this temp directory and ensure everything looks good.
- (optional) If something isn't right, or you want to run it again, add the
--discard
flat to theturn_run.py
command. - Then confirm the turn with
python turn_confirm.py
- Save the turn and create backup folders with
python turn_save.py