metaparadox: Self Portrait (Default)
2025-03-22 08:19 pm

Getting GameTeX to Work on Windows 10 (and 11?)

This post is a follow-up to this post I made ages ago, so you'll want to look at that first if you want to know more about GameTeX and what it's for.

So, I finally got around to attempting to get GameTeX working on a PC. I usually use a Mac, so I didn't have to think about the tricky endeavor it would be to get it running on a Windows machine. But since then I've started working on a team LARP writing project with people who use PCs and are willing to try GameTeX, so I figured I'd better learn how to do it so I can teach them and not immediately scare them away with the technical stuff.

So I've boiled it down into a series of steps. I'm not sure every step is strictly necessary to get this working, but completing all the steps got my copy of GameTeX working on my Windows 10 PC (an all-in-one rescued from a free table at the dump!) This should also work with Windows 11, but I haven't tested it, as I can't upgrade my PC to 11.
  1. Install LaTeX if you haven't already using the MiKTeX distribution (https://miktex.org/). MiKTeX comes with TeXworks as an editor, but you can also download and install TeXstudio.
  2. Download GameTeX or SGSTeX (as mentioned in the first post) and extract the folder from the zip.
  3. Rename game.cls with a string of text without spaces or characters other than dashes, for example: "yourgamename". This will be your game class name.
  4. Open the cls file and replace game with yourgamename in the line: \def\gameclassname{"game"}
  5. Go into the LaTeX sub-folder and create a file named yourgamename_path.cls in a text editor. The only line in the file should be this (replace "yourusername" with your username on your pc and yourgamename with the class name for your game): 
    \edef\gamepath{"/Users/yourusername/Documents/GitHub/yourgamename-LARP"}
  6. Open the MiKTeX console. Click on Settings and go to the Directories tab. Check to see that you have the following (If you don't, something weird is probably going on and you might want to try to uninstall and reinstall MiKTeX.):
  7. PathPurposesAttributes
    C:\Users\yourusername\AppData\Roaming\MiKTeXConfigUser
    C:\Users\yourusername\AppData\Local\MiKTeXDataUser
    C:\Users\yourusername\AppData\Local\Programs\MiKTeXInstallUse
  8. Go into your Documents folder and create the folder named texmf. Inside it create the folder named tex. Inside that folder create the folder named latex. Inside that create a folder named Games.
  9. Open Command Prompt as administrator (this might work without running as administrator if you’re using Windows 11.) Then type the following (with your actual username) and hit enter: mklink /D "C:\Users\yourusername\Documents\texmf\tex\latex\Games\yourgamename" "C:\Users\yourusername\Documents\GitHub\yourgamename-LARP"
  10. Go back to the MiKTeX console Directories tab. Click the plus button and add:  
  11. C:\Users\yourusername\Documents\texmfGenericUse
  12. Type "environment variables" into the search bar on your PC and click the option that says "Edit the system environment variables". Click the Environment Variables button. In your user variables, click the New button. Name it yourgamename (same as the game class value you defined above), and use the following for the environment variable value (with your username): C:\Users\yourusername\Documents\GitHub\yourgamename-LARP
  13. Then create another environment variable with the New button and name it TEXINPUTS. Use the following for the value (the period and semicolons are important!): .;$yourgamename\LaTeX;
  14. If you end up making more games, you'll need to append their environment variables to this one's value like this (the period and semicolons are important!): .;$yourgamename\LaTeX;$Game-Two\LaTeX;
  15. Refresh the filename database from MiKTeX Console. Click Tasks and choose Refresh file name database. You will need to do this for each game you create, because MiKTeX needs to know where the class files are before you can typeset a file. Otherwise you'll get an error that says it can't find the yourgamename.cls file.
  16. Restart your computer or log out and back in.
  17. Open the Bluesheets folder and open README.tex in your TeX editor. Make sure the game class name is changed to the one you created for the game (there will be a comment showing you where to swap it in). Make the tex editor is exporting a pdf (in TeXworks I use pdfLaTeX+MakeIndex+BibTeX). Click the button that typesets a page and see if it produces a pdf. If a window pops up saying you need to install an additional package, say yes. If this works, you're done! If not, feel free to reach out with questions.
metaparadox: Self Portrait (Default)
2020-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.