Setup for Automatic Random Number Assignment (Czar)

This describes what the Production Czar should do to set things up so that the auto-assignment stuff in numbers-use works. You should have already read that material and the material in numbers-generate.

First, you want to edit custom.sty to say what kinds of 'numbers' things you're using. Read the comments there about this; it's something like

	\def\usenumbers{
		{itemnum}
		{badgenum}
	}
if you have 'itemnum' stuff and 'badgenum' stuff. It's pretty easy. As numbers-use says, this makes macros \itemnum{ }{ } and \badgenum{ }{ } exist. It also looks for files itemnum-assign.tex and badgenum-assign.tex when you latex any game document; if it finds them it uses them to assign numbers as they specify. If it doesn't find them, that's ok, it just means that everything is "UNASSIGNED".

Make sure you add whatever macros you create this way to the macro glossary.

Then, when you run numbers, you'll want to continue past the generate stage (either generating new numbers or staying with what's there already, which will be read in; it will offer an intelligent default) and say Yes to the assign stage (this will be the default there). It will read through all the .tex files that are under the main game directory (environment variable $GAME), skipping $GAME/Charsheets/Extracts, $GAME/LaTeX/Numbers, and any subdirectories named DVI, CVS, or RCS.

numbers-use has told you how \itemnum should be used in the .tex files. When this or other things go wrong, numbers will angst to you about it. For instance, it will angst if it reads in itemnum.* files and doesn't know their flags, or the values used, or if the format has been mucked with (remember, GMs should edit those files only by adding a note to the right of a number they've manually allocated). It will angst if a unique id has its properties defined more than once, or if it doesn't have its properties defined at all, or if its defined with an unrecognized flag or value, or if there aren't any numbers with that combination of flags and values, or if it's run out of the numbers that have that combo. All such angst is both to standard output and is saved in LaTeX/Numbers/itemnum-angst. When the script finishes it will either remind you there was angst (it's probably scrolled off) or announce it was angst-free. In the former case, you should go through itemnum-angst and deal with all the woes it lists, then re-run the assignment until you don't get any angst. Angst is never fatal, but it means that some things aren't working out right, so you want to get rid of it. (You certainly want to get rid of it before handout!)

If you change your encoding mechanics --- that is, if itemnum-spec changes --- you'll need to run numbers and both re-generate and then re-assign numbers. There might be some manual allocations marked in itemnum.*, so make sure to save that information before overwriting them by re-generating. (If itemnum.* exist numbers will suggest not generating, and won't let you do so until you get rid of them (presumably after saving any valuable information there).)

Remember that itemnum-assign.tex, and therefore all the latex in the game, only knows as much about \itemnum's as was in .tex files the last time you ran numbers and re-assigned. So if new \itemnum's are put in, they'll be UNASSIGNED, and if the properties of old \itemnum's are changed, they'll have invalid numbers, until you re-assign.

Re-assigning without re-generating will preserve all your manual allocations, and will try to preserve old AUTO allocations. That means if the AUTO-allocated id is still marked with those same properties in one of the .tex files, its number will be left alone. If its properties have changed, it will angst about this, throw out the old AUTO allocation, and make a new one. If some numbers are obsolete and no longer appear in .tex files at all, it will list them and ask if you want to purge them (you probably do), thus dropping the old AUTO allocation.