Creating your own Character Sheet Templates

PCGen searches for keywords found between the pipe characters. These tokens are always in all caps with no spaces between them and the pipes. PCGen will create a file with the name of the character's name followed by the extension of the template chosen. If the csheet.html template is chosen, and the character's name is Bob, then PCGen will generate Bob.html. The character sheet templates must all have a name that starts with "csheet", and can be followed by any extension. Various html templates come with PCGen and demonstrate most of the tokens available with PCGen. A listing of the tokens follows:

 
Ability related  
STATx where x = 0 (Strength), 1 (Dexterity), 2 (Constitution), 3 (Intelligence), 4 (Wisdom) or 5 (Charisma)
STATx.MOD is the modifier for the stat where x is 0 to 5
ACMOD is your total AC adjustment due to size, dexterity, AC bonuses (Monks and Dwarven Defenders) and Monk bonuses due Wisdom.
TOTALAC is your total AC after all adjustments
FLATAC is your flat-footed armour class
BASEAC is your base AC (normally 10)
ACABILITYMOD is your AC adjustment due to dexterity, AC bonuses (Monks and Dwarven Defenders), and Monk bonuses due to wisdom.
ACSIZEMOD is your AC adjustment due to size
EQUIP.AC AC bonus from equipped equipment
MAXDEX max dexterity bonus from all armor
ACCHECK sum for armorcheck penalty
SPELLFAIL sum for SPELLFAILURE
ARMORx.type where x is the 0-based index in the character's armor list and type is one of NAME, TOTALAC (total bonus to AC including base and magical adjustments), FLATAC (Flat Footed AC), BASEAC (just the armor's non-magical armor adjustment), MAXDEX the armor's max dex adjustment to AC, ACCHECK (Armor Check penalty for armor on relevant skills), SPELLFAIL ( percentage failure of arcane spells).
Weapon and Attack related  
INITIATIVEMOD is your adjustment to initiative - including dexterity mod and +4 if you have the Improved Initiative feat
ATTACK.MELEE is your melee attack bonuses (base
attack bonus + race modifier + race,feat,equipment)
ATTACK.RANGED is your ranged attack bonuses (base
attack bonus + race modifier + race,feat,equipment)
ATTACK.UNARMED is your unarmed attack bonuses (base
attack bonus + race modifier + race,feat,equipment)
ATTACK.MELEE.TOTAL as ATTACK.MELEE, but includes Str modifier
ATTACK.RANGED.TOTAL as ATTACK.RANGED, but includes Dex modifier
ATTACK.UNARMED.TOTAL as ATTACK.UNARMED, but includes Str Bonus
ATTACK.MELEE.BASE just the base attack value with no modifiers.
ATTACK.RANGED.BASE just the base attack value with no modifiers.
ATTACK.UNARMED.BASE just the base attack value with no modifiers.
DAMAGE.UNARMED unarmed damage value (includes Str?)
WEAPONx.type where x is the 0-based index on the character's weapon list. type is one of NAME (which matches the entry from the WEAPONPROF.LST file), LONGNAME (a more descriptive name), ATTACKS (the number of attacks), CRIT (critical range of weapon), MULT (multiplier of critical), RANGE (range of weapon in feet), TYPE (type of damage the weapon does), HIT (weapon's modified bonus to hit from character's total to hit bonus), TOTALHITy (the weapon's adjusted to hit bonuses for all attacks, or for attack #y if y is a specified - so TOTALHIT would list all attacks, TOTALHIT0 would display just the first attacks' full bonus), DAMAGE (the amount of damage the weapon does) and SIZE (size of the weapon), MAGICHIT (weapon's magical bonus to hit), MAGICDAMAGE (weapon's magical bonus to damage), BASEDAMAGE (weapon's unadjusted damage), FEAT (bonus to hit based on feats).
WEAPONP.type, WEAPONO.type or WEAPONH.type same as WEAPONx.type where WEAPONP is the primary weapon (marked as Primary in the Hand selection), WEAPONO is the Off-Hand, and WEAPONH is the Unarmed Strike weapon (in order to have this option available you must have chosen at least 1 of the Unarmed Strike item in the Items tab)
WEAPONPROFS is a comma delimited list of weapon proficiencies.
General Information and Equipment   
RACE, VISION, NAME, PLAYERNAME, AGE, HEIGHT, WEIGHT, GENDER, HANDED, MOVEMENT, HP, ALIGNMENT and ALIGNMENT.SHORT are also available and print out the corresponding value
CLASSx, CLASSABBx, CLASSx.LEVEL display the xth class' name, abbreviated name, and level respectively.
CLASSLIST displays a comma delimited list of all your classes
SIZE outputs your size (based on your race)
EXP.CURRENT, EXP.NEXT outputs your current experience points, and the experience points required for you to gain the next level.
TOTALLEVELS outputs an integer of your total levels
DOMAINx, DOMAINx.POWER, DEITY display the xth domain's name, it granted POWER, or the character's DEITY.
WEIGHT.LIGHT, WEIGHT.MEDIUM and WEIGHT.HEAVY display the max weight for that load category for the character.
BIO, DESC, COLOR.EYE, COLOR.SKIN, COLOR.HAIR, LENGTH.HAIR, PERSONALITY1, PERSONALITY2 SPEECHTENDENCY, INTERESTS, PHOBIAS, RESIDENCE, LOCATION and CATCHPHRASE These are all entered on the Trait tab
LANGUAGES is a comma delimited list of known languages
POOL.CURRENT, POOL.COST POOL.CURRENT is remaining the remaining stat pool. POOL.COST is the original cost of creating the character if it was done in Purchase Mode.
MISC.FUNDS, MISC.COMPANIONS, MISC.MAGIC, GOLD These all refer to the free-form entries in the Misc tab and are printed exactly as they appear in those text fields. GOLD will output the amount of gold displayed in the Items tab.
EQx.type where x is the equipment number and type is one of LONGNAME (for the longer version of the item name; NAME (for the short version which matches an entry in the weaponprof.lst file); COST (for the cost in gold of the item); WT (weight in lbs. of the item); QTY (the number of the item owned); EQUIPPED (Y = yes, N = No)
TOTAL.WEIGHT, TOTAL.LOAD, TOTAL.CAPACITY for the total weight (in pounds) of equipment the character is carrying, the kind of LOAD (Light, Medium, Heavy or Overload), or Carrying Capacity (in pounds) of the character.
Features and Skills  
FEATLIST, FEATx or FEATx.DESC where FEATLIST will list all your feats (comma delimited) or FEATx will print the name of the Feat at position x in the character's list of Feats (e.g. FEAT0 is the first Feat) and FEATx.DESC will print the description of that Feat.
VFEATLIST, VFEATx or VFEATx.DESC where VFEATLIST will list all your virtual feats (comma delimited), or VFEATx will print the name of the Feat at position x in the character's list of Virtual Feats (e.g. VFEAT0 is the first Virtual Feat) and VFEATx.DESC will print the description of that Feat.
SKILLx, SKILLx.RANK, SKILLx.MOD, SKILLx.TOTAL, SKILLx.ABMOD, SKILLx.MISC, SKILLx.ABILITY, SKILLx.UNTRAINED, SKILLx.EXCLUSIVE print the value of the Skill at position x in the character's skill list. the values are Name, rank, modifier, total, ability modifier, misc bonuses (total - rank - ability mod), ability stat, if the skill is usable Untrained, and if the skill is Exclusive, respectively.
SKILLLISTMODS displays a list of all skills with a non zero adjustment
SKILL.Name_of_skill.RANK, SKILL.Name_of_skill.MOD, SKILL.Name_of_skill.TOTAL enables to display RANK, MOD or TOTAL for a specific skill, i.e. SKILL.Alchemy.TOTAL would display the total bonus on your Alchemy skill check
Saves and Hit Points  
REFLEX, FORTITUDE and WILL (each can be alone or with .TOTAL, .BASE, .RACE or .MAGIC) the unmodified tokens (REFLEX, WILL and FORTITUDE) give the character's full bonus except from stat to the check, .TOTAL (e.g. FORTITUDE.TOTAL) gives everything including the stat bonus to the check, .BASE gives only the class-based adjustment, .RACE gives any racial adjustments and .MAGIC gives all bonuses except from class or race (e.g. WILL.MAGIC).
HP displays characters max. hitpoints
Spell related  
SPELLLISTBOOKx.y gives a comma delimited list of spells known to spellcaster class number x for level y (if any).
SPELLLISTCASTx.y indicates how many spells you can cast for spellcaster class number x for level y.
SPELLLISTCLASSx indicates spellcast classname where x is a 0 index array
SPELLLISTTYPEx indicates the type (ie. Arcane or Divine) of spell class x
SPELLLISTDCx.y indicates your DC casting that level of spell for the indicated class (x = class num, y = level of spell).
SPELLLISTKNOWNx.y indicates how many spells you can know for spellcaster class number x for level y. For Clerics with domains, this does not include domain spells
SPELLMEMv.x.y.z.LABEL where v is the classnumber of the spell you wish to display; x is the book number of the spell (usually 0 so it's the first non-Default spellbook for classes which memorize spells, it's automatically the Default spellbook for class which do not memorize spells); y is the level of the spell; z is the number of the spell and LABEL is one of: NAME, TIMES, RANGE, COMPONENTS, CASTINGTIME, DURATION, EFFECT, EFFECTTYPE, SAVEINFO, SCHOOL, SUBSCHOOL, or SR. If y (the book number) is -1, then you really want to list spells from the Default spellbook. This is added for an easy way to list the details of all a character's known spells.
Specials  
SPECIALABILITYx print the name of the character's xth SpecialAbility.
SPECIALLIST is a comma delimited list of special abilities
RACE.ABILITYLIST a comma delimited list of racial special abilities.
PROHIBITEDLIST is a comma delimited list of prohibitions (e.g. a Specialist Wizard must choose some prohibited schools. The selected school will be displayed in this list)
Star Wars  
DEFENSE and DEFENSE.CLASSx total defense for the character, or just the class component for class #x.
WOUNDPOINTS displays your wound points
REPUTATION The reputation of the character
Loose Ends...  
VAR.VariableName Displays the value of a defined variable. You can also append .INTVAL as an optional argument, which displays the result with no decimal points (as an integer), default is with one decimal place of precision. Also .MINVAL should be included if instead of the default maximum of multiple defines, you want the minimum.

eg. |VAR.Turn Undead.MINVAL.INTVAL|

%filter where filter is a comma delimited list of Classname=level pairs (where Classname is a valid Class name and level is the minimum level of the class for the filter). Classname could also be SPELLLISTCLASSx=level where x is the xth spellcasting class of the character. a token of |%| turns off all filters, and only 1 filter is active at a time (they can't be nested). I've modified the csheet.html and statblock.html files accordingly so the Cleric section only displays for Clerics, and the Spellbook sections only show up for spellcasters. This way you can add more than 3 spellcasting sections without it making other character sheets longer than necessary.
FOR.min,max,perLine,phrase, startLine,endLine,exists where min is the minimum index (e.g. 0) and max is the maximum index (exclusive) and perLine is how many phrases will be repeated before the endLine is printed. The phrase is the code that is parsed for tokens (use \'s instead of |'s, and the % within the tokens will be replaced with the actual value of the index). The startLine will be printed at the beginning of the for loop and after the endLine. The endLine will be printed every perLine times through the loop. The loop will break when no more items are found before the natural end of the loop (max) if exists is 1. The csheet.htm has examples of these loops. If exists is 2 and the charactersheet is currently within a filter, PCGen will not print anything else until the end of the filter |%| is reached or another filter is begun. Nested for loops is not supported currently. Note:FOR. loop on party sheets (psheet*.*) can only loop on character numbers, so \\%.NAME\\ is valid. If you have a FOR. loop involving the characters within the party for-loop, you must enclose the character for-loop in \\. This is an example that will produce a list of all the party member's skills:
<table>
|FOR.0,10,1,[td]\\%.FOR.0,100,1,\SKILL%\,
(,),2\\,<tr>,</tr>,1|
</table>
DFOR.min,maxDown,stepNexLine, totalMax,stepInLine,phrase, startLine,endLine,exists where This is very similar to the FOR loop, except this allows for stepping across the table (in the same line) independent of stepping down. The initial value is min, the values going down are found by adding stepNextLine to min once for each line. To find the value within the same line, this starting value (min for the first line, min + stepNextLine for the next, etc.) has stepInLine added to it, this is done as may times until totalMax is passed. Likewise, stepNextLine is added to min each line until maxDown is passed. An example that would produce a 2 column row table of all skills is the following:

|DFOR.0,(COUNT[SKILLS]+1)/2,1,COUNT[SKILLS], (COUNT[SKILLS]+1)/2,<td>\SKILL%\</td> <td>\SKILL%.TOTAL\</td><td>\SKILL%.RANK\</td> <td>\SKILL%.ABILITY\</td><td>\SKILL%.MOD\,<tr align="center">,</tr>,0|

Note that exists (the ending 0 in the DFOR. loop) should always be 0. The same logic that handles the FOR loop handles the DFOR loop, so the exists flag can be set (though it can be left out).

Note: On the yahoogroups page for PCGen more and more users have been adding their own customized character sheets. Check 'em out!