Token Name: x<Mathematical Operator>x
Variables Used (x): Number (Operand - can both be either numbers or valid numeric tokens.).
Variables Used (Mathematical Operator): Text (Operator).
What it does:
Example:
TOTALLEVELS+15
Displays the total number of levels plus 15.
(COMBAT.AC.TOTAL-3).INTVAL
Displays the integer portion of the Combat Armor Class minus 3.
SKILL.Spot.RANKS*SKILL.Listen.RANKS
Displays the number of spot ranks multiplied by the number of listen ranks.
(SKILLPOINTS.UNUSED/2).TRUNC
Displays the integer and fist decimal place of the unused skill points divided by 2.
(VAR.RangeMod-2).INTVAL.SIGN
Displays the integer portion preceded with a sign (+ or -) for the result of the Range Modifier minus 2.
Token Name: |%x|
Variables Used (x): Text (Filter Option).
What it does:
Example:
|%WEAPON.3|
The filter will stop all output (until this filter is ended or the next filter started) unless the character has at least 3 weapons.
Token Name: BONUSLIST.w,x,y,z
Variables Used (w): Text (The type of bonus to be displayed).
Variables Used (x): Text (The subtype of bonus to be displayed).
Variables Used (y): Text (Optional Bonus Value Seperator - Defaults to a space " ").
Variables Used (z): Text (Optional Bonus Delimiter - Defaults to a comma-space ", ").
What it does:
Displays the list of bonuses by type and value associated with the tags involved.
Example:
BONUSLIST.COMBAT.AC
Would list all COMBAT.AC bonuses as a comma-space delimited list.
Token Name: BR
What it does:
Adds a carriage return to the output. Normally only used on text output sheets and inside manualwhitespace sections.
Example:
2|BR|3
Then the output would
look like:
2
3
Token Name: COUNT[x]
Variables Used (x): Text (Count Type).
What it does:
Example:
BONUS:HP|CURRENTMAX|3*COUNT[FEATNAME=Toughness]
The count token is used in this example to calculate the total bonus.
FOR,%num,0,COUNT[SKILLS],1,1
{Statements}
ENDFOR
The {statements} would be processed for each of the skills the character has.
FOR,%spell,0,COUNT[SPELLSINBOOK0.0.0],1,1
{Statements}
ENDFOR
The {statements} would be processed for each of the 0th level spells in the 1st classes 1st spellbook (known) that the character has.
Token Name: CSHEETTAG2.x
Variables Used (x): Symbol (Replacement symbol for the default "\").
What it does:
Changes the delimiter used by embedded DFOR/FOR loops to the character specified.
Example:
CSHEETTAG2.~
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
This would change the field delimiter from the default "\" character for "~". This allows the FOR/DFOR loop to be used in RTF output which does not allow the "\" character to be used
Token Name: DFOR.r,s,t,u,v,w,x,y,z
Variables Used (r): Number (The initial value).
Variables Used (s): Number (Limit for new line progression).
Variables Used (t): Number (Value added once per line).
Variables Used (u): Number (Limit for in line progression).
Variables Used (v): Number (Value added in line until totalMax is passed).
Variables Used (w): Text (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).
Variables Used (x): Text (The text that will be printed at the beginning of the for loop and after the Variable "y").
Variables Used (y): Text (The text that will be printed every time through the loop).
Variables Used (z): Number (The loop will break when no more items are found before the natural end of the loop (max) if exists is 1. 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. 0 means it will always loop to the natural end of the loop.).
What it does:
Example:
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
Produces a 2 column row table of all skills.
Token Name: DIR.x
Variables Used (x): Text (Directory Option).
What it does:
Displays File output paths.
Example:
DIR.PCGen
Would display "D:\RPG\PCGen\system
" if PCGen was installed
in "D:\RPG\PCGen
".
DIR.TEMPLATES
Would display "D:\RPG\PCGen\outputsheets\d20\fantasy
" if PCGen was installed
in "D:\RPG\PCGen
".
DIR.PCG
Would display "D:\RPG\PCGen\characters
" if PCGen was installed
in "D:\RPG\PCGen
".
DIR.html
Would display "D:\RPG\PCGen\outputsheets\d20\fantasy\htmlxml
" if PCGen was installed
in "D:\RPG\PCGen
".
DIR.TEMP
Would display "C:\Temp
" if that was the Operating System's temp directory.
Token Name: EXPORT.x
Variables Used (x): Text (Export Option).
What it does:
Displays character export details.
Example:
EXPORT.DATE
Displays the date of export.
Token Name: FOR.%v,w,x,y,z
FOR.%v,w,x,y,z
{Statements}
ENDFOR
Variables Used (v): Text (Variable Name).
Variables Used (w): Number (The initial value).
Variables Used (x): Number (Limit for new line progression - You may use a number, COUNT token, STRLEN token or any valid csheet token).
Variables Used (y): Number (Value added once per line).
Variables Used (z): Number (The loop will break when no more items are found before the natural end of the loop (max) if exists is 1. 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).
What it does:
Example:
FOR,%test,0,20-STRLEN[SKILL.%skill],1,0
{Statements}
ENDFOR
Counts from 0 to 20 minus the sting length of the skill name.
Token Name: FOR.t,u,v,w,x,y,z
Variables Used (t): Number (The initial value).
Variables Used (u): Number (Limit for new line progression).
Variables Used (v): Number (Value added once per line).
Variables Used (w): Text (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).
Variables Used (x): Text (The text that will be printed at the beginning of the for loop and after the Variable "y").
Variables Used (y): Text (The text that will be printed every time through the loop).
Variables Used (z): Number (The loop will break when no more items are found before the natural end of the loop (max) if exists is 1. 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).
What it does:
Example:
<table>
|FOR.0,10,1,[td]\\%.FOR.0,100,1,\SKILL%\,(,),2\\,<tr>,</tr>,1|
</table>
Produces a list of all the party member's skills.
Token Name: IIF(x.y.x)
IIF Conditional Statement
{True Statements}
ELSE
{False Statements}
ENDIF
Variables Used (x): Text (Condition to be evaluated).
Variables Used (y): Text (Operator).
What it does:
Token Name: IIF(EVEN)
What it does:
True if the variable is an even number (frequently used to control grey/white shading by line).
Example:
IIF(EVEN:%spell)
Would be true if the spell line was even.
Token Name: IIF(UNEVEN)
What it does:
True if the variable is an uneven number.
Example:
IIF(VAR.IF(VAR("COUNT[SKILLTYPE=Strength]")>0;1;0):1)
Evaluates to true if number of skills with type of Strength are greater than 0 Notice the use of semi-colon where a comma should normally be used. This is because the comma is a delimeter at a higher level. Byngl
Token Name: IIF(HASEQUIP)
What it does:
True if the character has the listed equipment.
Example:
IIF(HASEQUIP:Dagger)
Would be true if character had a dagger.
Token Name: IIF(HASFEAT)
What it does:
True if the character has the listed feat.
Example:
IIF(HASFEAT:Sneak Attack)
Would be true if character has the Sneak Attack Feat.
Token Name: IIF(HASSA)
What it does:
True if the character has the listed Special Ability.
Example:
IIF(HASSA:Greater Rage)
Would be true if character has the Greater Rage Special Ability.
Token Name: IIF(HASVAR)
What it does:
True if the user has taken a class that defined the named (often used to determine whether or not to display special abilities).
Example:
IIF(HASVAR:BasePowerPoints)
Would be true if character has a class with Base Power Points.
Token Name: IIF(SKILL.x.UNTRAINED)
Variables Used (x): Number (The array number of the skill).
What it does:
True if Skill x is usable untrained.
Example:
IIF(SKILL.%skill.UNTRAINED)
Would be true if the current skill is usable untrained.
Token Name: IIF(SKILL.UNTRAINED,x,y)
Variables Used (x): Text (Result if usable untrained).
Variables Used (y): Text (Result if usable trained).
What it does:
Example:
IIF(SKILL%.UNTRAINED,YES,NO)
Prints out "YES" if the skill is usable untrained or "NO" if not usable untrained.
Token Name: IIF(SKILL.ACP,w,x,y,z)
Variables Used (w): Text (Result if the skill is not affected by ACP).
Variables Used (x): Text (Result if the skill is affected by ACP).
Variables Used (y): Text (Result if the skill is only affected by ACP if the user is untrained).
Variables Used (z): Text (Result if the skill has the special weight penalty like Swim).
What it does:
Tests for armor check penalty (ACP) interaction with this skill.
Example:
IIF(SKILL%.ACP,NOT,IS,UNTRAINED,SWIM)
Prints out "YES" if the skill is not effected by ACP, "NO" if the skill is effected by ACP, "UNTRAINED" if the skill is effected by ACP only if the character is untrained , "SWIM" if the skill is effected by ACP only if it has a special weight penalty.
Token Name: IIF(SPELLCASTER:x)
Variables Used (x): Text (Caster Type - Possible values include Wizard or Arcane).
What it does:
True if character is a spell caster of type specified.
Example:
IIF(SPELLCASTER:Wizard)
Would be true if the character is a Wizard.
Token Name: IIF(SPELLCASTER:x=PREPARE)
Variables Used (x): Number (The array number of the spellcaster class).
What it does:
True if the characters spellcaster class x has to prepare spells.
Example:
IIF(SPELLCASTER:0=PREPARE)
Would be true if the character's 1st class prepares spells.
IIF(SPELLCASTER:0=!PREPARE)
Would be true if the character's 1st class does not prepare spells.
Token Name: IIF(WEAPON.x.CATEGORY:y)
Variables Used (x): Number (The array number of the weapon).
Variables Used (y): Text (Weapon Type - Possible values include: Melee, Ranged, Exotic, Non-Standard-Melee).
What it does:
True if the weapon x is part of the category y.
Example:
IIF(WEAPON.%weap.CATEGORY:Ranged)
True if the current weapon is part of the Ranged category.
Token Name: IIF(x:y)
Variables Used (x): Text (Any valid token).
Variables Used (x): Text (Condition variable).
What it does:
True if the token is equal to the value.
Example:
IIF(COMBAT.AC.TOTAL:20)
Would be true if the combat AC total was 20.
Token Name: MANUALWHITESPACE
MANUALWHITESPACE
{Statements}
ENDMANUALWHITESPACE
What it does:
Marks a section where the author does not want white space added to the output sheet. If white space is desired the |BR| tag can be used, or a sheet format specific entry such as can be used in the sheet definition.
Within a manual whitespace section, all whitespace in the output sheet i.e. all newlines, spaces, tabs, etc. disappears. Whitespace inside the text of returned from a OS token is preserved however. All leading and trailing whitespace is trimmed, as is normally done.
Example:
|MANUALWHITESPACE|
1
|PLAYERNAME|
2 3<br>
4
|ENDMANUALWHITESPACE|
Where |PLAYERNAME| in this case is "Chuck Pint". Then the output would
look like:
1 Chuck Pint23<br>4
Token Name: OIF(x,y,z)
Variables Used (x): Text (Condition to be evaluated).
Variables Used (y): Text (Value returned if True).
Variables Used (z): Text (Value returned if False).
What it does:
Example:
OIF(HASFEAT:Armor Proficiency (Light),YES,NO)
If the character has the Light Armor proficiency, then returns "YES". Otherwise it returns "NO".
Token Name: PIPE
What it does:
Inserts a pipe ("|") character.
Example:
Pipe|PIPE|Example
Would display "Pipe|Example".
Token Name: SUB#.
What it does:
Limits the length of the string written to the output sheet to no more than # characters. For it to work it as to be the first subtoken.
Example:
SUB10.SPELLMEM.0.0.0.0.COMPONENTS
Would limit the output from the above tag to no more than 10 characters.
Token Name: TEXT.x.
Variables Used (x):LOWER, LOWERCASE, SENTENCE, SENTENCECASE, TITLE, TITLECASE, UPPER, UPPERCASE or NUMSUFFIX
What it does:
Alters the output of the following tag by either changing the case of the result, or generating a numeric suffix for the result. For it to work it as to be the first subtoken.
LOWER, LOWERCASE - Output the tag result in lower case. e.g. the vitamins are in my fresh brussels sprouts
SENTENCE, SENTENCECASE - Output the tag result in sentence case. e.g. The vitamins are in my fresh brussels sprouts
TITLE, TITLECASE - Output the tag result in title case. e.g. The Vitamins Are In My Fresh Brussels Sprouts
UPPER, UPPERCASE - Output the tag result in upper case. e.g. THE VITAMINS ARE IN MY FRESH BRUSSELS SPROUTS
NUMSUFFIX - Output a numeric suffix appropriate for the tag result. e.g th or rd
Example:
TEXT.LOWER.SPELLMEM.%class.0.%level.%spell.NAME
Would output the name for the spell in lower case.
TEXT.NUMSUFFIX.22
Would output a suffix of nd rather than the value 22.
Token Name: VAR.x
Variables Used (x): Text (Any defined variable name).
What it does:
Example:
VAR.Turn Undead.MINVAL.INTVAL
Would return 2.
VAR.Turn Undead.INTVAL
Would return 4.
VAR.Turn Undead.MINVAL
Would return 2.0.
VAR.Turn Undead
Would return 4.0.