metaparadox: Self Portrait (Default)
Olivia Montoya ([personal profile] metaparadox) wrote2020-07-10 08:03 pm

Getting GameTeX to Work on Newer Macs (Also General Info)

EDIT: I've made some minor updates to this post as of 3-22-25. Apparently there was a major typo (*facepalm*). Also, there's a follow-up post here about getting GameTeX working on PCs.

This is a very niche post, so it's most likely to prove useful to people googling this specific issue, but since I had such a nightmare with it, I want to share my solution with the Internet to make it easier for people to get into writing LARPs (live action roleplaying games) with GameTeX.

Some Basics on GameTeX and MIT Assassins' Guild Style LARPs:

If you aren't familiar (most people even in LARP circles aren't), GameTeX uses LaTeX (https://en.wikipedia.org/wiki/LaTeX) for writing and typesetting LARPs in the MIT Assassins' Guild style. It's written by Ken Clary, and available here: http://web.mit.edu/kenclary/Public/Guild/GameTeX/ and in a forked version here that was created for the Stanford Gaming Society, though it is now probably out of date since GameTeX was updated recently: https://github.com/dwhalen/SGSTeX

It is mostly used by the MIT Assassins' Guild, but has also been imported to the Stanford Gaming Society, which is where I learned how to use it. People tend to learn how to write this style of game in intense LARP-writing bootcamps known as "Guild Camp", after the MIT Assassins' Guild. It has a pretty high learning curve, but is intensely rewarding once you get the hang of it.

MIT Assassins' Guild games using the ruleset typically used with GameTeX are more "crunchy" (to use TTRPG parlance) than, say, American freeform games (where characters and relationships are workshopped and the focus is roleplay and emotions) and make use of more abstraction in mechanics than boffer LARPs (where foam swords are used to physically act out combat). This ruleset usually involve combat using combat ratings ("Darkwater" combat) rather than physical contact, involve lots of item cards and envelopes, and stuff like using playing card decking to represent lockpicking). Games written by Assassins' Guild members tend to have higher amounts of character death than those written at Stanford.

This style of games can also be described as "litform" (using pre-written character sheets and separate sheets for world and faction info and mechanics) and "secrets and powers" (LARPs built around characters having secrets in their backstory that other characters may want to discover and powers to use in game to advance character goals).

Here's some other standard features of MIT style games:
  • Bluesheets - Information about setting and factions
  • Greensheets - Information about mechanics
  • Whitesheets - Occasionally used for in-game sheets like puzzles or contracts
  • Memory Packets - Sometimes referred to as contingency envelopes. Folded packets or envelopes containing memories, timed events, or other new knowledge introduced to a character that are opened according to a trigger condition (for example, a packet that is opened when the character hears someone say the word "banana"). Booklets of memory packets are also a possibility, each one having a different trigger.
  • Research Notebooks - These booklets can be in-game (notebooks) or out of game (green notebooks) and start with the first page open. Each page will have some condition for opening subsequent pages, often representing characters researching something or following trails of clues.
  • Item Cards - Represent items, or may be used as a label on a physrep (item with a physical representation; a prop). Item envelopes or folded item cards with a trigger for usage are also possible.
  • Ability Cards - Double sided cards with descriptions of abilities. One side shows the description for the player whose character has the ability, and the other side represents what the character the ability is used on/near can see or experience.
GameTeX makes it possible to write this style of game such that you can use macros to swap out things like names, pronouns, etc. across all the documents in the game by editing them in a single file, and then you can export all the necessary documents to PDF so they can be printed. Given that there tends to be about as much content in an MIT style game as in a novel, this is very helpful. The exported PDFs are personalized for each player, and can easily be assembled and distributed to players.

Here's a guide for writing this style of game: https://jakebeal.github.io/Unpublished/MITAssassinsGuild-Gamewriting.pdf

Getting GameTeX to Work on Newer Macs:

Now that I've got your interest, here's how I got GameTeX to work on my new Macbook Pro. It was a frustrating process that took days, but here's what worked for me.

First of all, do a full install of LaTeX on your Mac, which you can get here: https://tug.org/mactex/

Also download an editor for LaTeX. I use TeXShop. https://pages.uoregon.edu/koch/texshop/

Next, download GameTeX or clone the SGSTeX fork from Github. I used SGSTeX.

Here's where things get tricky. For each game you write, you're going to need to do the following:
  1. Name the folder your game is located in. Something like "My-LARP" with no spaces.
  2. Go into the LaTeX folder and open game.cls.
  3. Change "game" in \def\gameclassname{game} to your game name (no spaces). Then change the game.cls filename to whatever you changed "game" to be.
  4. If you're using SGSTeX, make a file titled yourgamename_path.cls (where "yourgamename" is what you replaced "game" with) and paste \edef\gamepath{"path_to_game"} in where path_to_game is the path to your game on your Mac. Mine looks something like: /Users/olivia/Documents/GitHub/My-LARP
  5. If you're not using SGSTeX, you'll want to either make sure that you follow this section from the GameTeX documentation (if you make further games after this, you'll need to edit TEXINPUTS further according to GameTeX documentation):
  6. Your Environment File: In short, to be able to use GameTeX, add the
    following lines to your .bash_environment file (these lines should
    also work in a Mac's .zshrc file):
      export <gameclassname>=<pathtoyourgame>
      export TEXINPUTS=.:$<gameclassname>/LaTeX/:

    You could also replace this line in yourgamename.cls:
      \edef\gamepath{\string${\gameclassname}}}

    With this line (and then make the cls file with the path):
    \IfFileExists{\gameclassname_path.cls}{\input{\gameclassname_path.cls}}{\edef\gamepath{\string${\gameclassname}}

  7. Open up Finder. Hold down the Option key and click the Go menu. Select "Library".
  8. If there isn't one already, create a folder titled "texmf".
  9. Inside that folder, create two folders titled "tex" and "latex".
  10. *deep breath* Open Terminal and navigate to the "tex" folder you created. (Use command "ls" to list files in your current directory and "cd name-of-folder-here" to change the current directory to a folder in the current directory.)
  11. Type the following into Terminal, replacing the path with your own path to your game folder (the period at the end is important): ln -s /Users/olivia/Documents/GitHub/My-LARP .
  12. Repeat steps 8-9 for the "latex" folder.
  13. You (hopefully) should now be able to open any .tex file in your game folders and typeset a pdf from it.
This is just the basics to get GameTeX set up. Once you start writing a game, you'll probably run into lots of errors and bugs you'll need to figure out. GameTeX has lots of idiosyncrasies. If you have any further problems, feel free to contact me to ask questions. Even if I don't know the answer, I can probably direct you to someone who does know the answer.