Skip to content

Latest commit

 

History

History
111 lines (73 loc) · 3.78 KB

README.md

File metadata and controls

111 lines (73 loc) · 3.78 KB

FH Gamemaster Tools

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.

Game setup

To prepare a new game of FH:

  1. Ensure you've installed the dependencies listed above

  2. Collect signups in a csv file (see example.csv for the format)

  3. Edit your farhorizons.yml

  4. Create the game: python game_setup.py < your_signups.csv

  5. Create the maps: python create_map.py

  6. (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

  7. Create the first turn zip files: python game_packet.py

Send out your game packets, and off you go!

Running a turn

  1. Add all the player's order files (with .ord extension) do your game's data directory
  2. Run python turn_run.py It will output the results from the turn in a tmp dirctory.
  3. Investigate this temp directory and ensure everything looks good.
  4. (optional) If something isn't right, or you want to run it again, add the --discard flat to the turn_run.py command.
  5. Then confirm the turn with python turn_confirm.py
  6. Save the turn and create backup folders with python turn_save.py