# Spell Files

## Building a Spell

The first field is the name of the spell.

`Ghost Sound`

The spell named "Ghost Sound" is to be created.

`Silent Image.MOD`

The spell named "Silent Image" is to be modified.

`Magic Aura.COPY=Nystal's Undetectable Aura`

Copy the spell "Magic Aura" and rename to "Nystal's Undetectable Aura" in all aspects.

`Holy Smite.FORGET`

The spell "Holy Smite" is to be forgotten.

Initial Comment:

In all four versions of KEY (Spell - Potion) or KEY (Spell - Scroll) or KEY (Spell - Spell) or KEY (Spell - Staff, Wand & Ring) ), there is something like:

"Potions modifier's will work without a KEY but work much better using the KEY than the name."

First of all, most of these items are NOT RELEVANT to Spell LST, KEY is a global token... I don't know if it's valuable to state it's part of Spell (but we should be consistent with Type, which the docs also make unique to each LST file for some reason)

Second, it should be made clear that the KEY is an optional Token, BUT when used, the user MUST ALWAYS use the Key to refer to the item, the name WILL NOT WORK.

Thus in Spell LST:

- ...
- Whiz Bangy <tab> KEY:Foo
- ...

In another file:

- PRESPELL:1,Whiz Bangy
- WILL NOT WORK
- Requires:
- PRESPELL:1,Foo.

## Spell File Tag Dictionary

*** NEW 5.10.1

Tag Name: BONUS:PPCOST|x|y

Variables Used (x): Text (Spell Name)

Variables Used (y): Number (Power Points)

What it does:

It is possible to scale some spells to increase range, duration, damage, etc. Scaling uses more PPs. For every one point in extra power applied to the spell the spell's Effective Caster Level for damage purpose is raised 1 level. Maximum level applied is equal to the Caster's current level.

Example:

`BONUS:PPCOST|Blade Barrier|3`

It costs a Clr9/Good9/War9 11 PP to launch a Blade Barrier for 6d6 damage. By putting in 3 more points, the Effective Caster Level is 9d6 for a total of 14 PP. The maximum extra PP is 3 for this example. Damage can not be raised over the Caster's actual level.

`BONUS:PPCOST|Lightning Bolt|2`

It costs a Sor/Wiz 9 5 PP to launch a Lightning Bolt for 3d6 damage. By putting in 2 more points, the Effective Caster Level is 5d6 damage for a total of 7 PP. The maximum extra PP is 7 for this example getting the maximum of 10d6 damage.

*** Updated 5.13.8

Tag Name: CASTERLEVEL (Spell Variable)

What it does:

- CASTERLEVEL is a special variable for use within DESC, DURATION and TARGETAREA tags.
  - When these tags encounter text in parenthesis, they treat the text as a formula and replace it with the result of evaluating the formula.
  - When used inside parenthesis in these tags, `CASTERLEVEL` returns the caster level of the class which grants the spell.
- The value of `CASTERLEVEL` depends mostly on the "Class" granting the spell, but can be affected by "Race" or by other attributes of the spell (e.g. School, Descriptor, etc.).
- `CASTERLEVEL` can be adjusted using the BONUS:CASTERLEVEL tag. In some cases where division and multiplication are used it is recommended that the floor() function be applied.

Example:

`DESC:Electricity deals (CASTERLEVEL)d6 damage`

If the caster level is 2, the output reads:Electricity deals 2d6 damage.

`DURATION:((CASTERLEVEL/3)+1) rounds`

If the caster level is 6, the output reads:DURATION:3 rounds

`TARGETAREA:(floor((CASTERLEVEL/2)*5)+25)`

If the caster level is 7, the output reads:TARGETAREA:40 (Note that if floor() were not used formula would return 42).

`DURATION:(CASTERLEVEL) rounds`

If the caster level is 3, the output reads:DURATION:3 rounds

`DESC:Random damage in area during duration, plus (CASTERLEVEL)d4 damage`

If the caster level is 3, output reads:DESC:Random damage in area during duration, plus 3d4 damage

Tag Name: CASTTIME:x

Variables Used (x): Text (Casting time)

What it does:

Reports the time it takes to cast this spell.

Example:

`CASTTIME:1 Round`

This spell takes 1 round to cast.

.MOD Example (Appending):

Initial Spell: `<spell name> <tab> CASTTIME:1 Round`

Modified By: `<spell name>.MOD <tab> CASTTIME:10 Minute Ritual`

Is Equivalent To: `<spell name> <tab> CASTTIME:1 Round|10 Minute Ritual`

The output sheet will display "1 Round, 10 Minute Ritual" on the output sheet.

*** Updated 5.11.11

Tag Name: CLASSES:x,x=y|x,x=y

Variables Used (x): Text (Class name)

Variables Used (x): ALL (All classes)

Variables Used (x): TYPE.Text (Class type)

Variables Used (x): .CLEARALL

Variables Used (y): Number (Spell level)

What it does:

- This indicates that this spell is the indicated level for the named class.
- Sub-classes may be listed as part of this tag but MUST also be included in a `SPELLLIST` tag in the appropriate class file object. For example, if the "Enchanter" subclass is included as part of a `CLASSES` tag in a spell, there must be an "Enchanter" subclass defined in a loaded class file.
- `.CLEARALL` will clear all classes or class/level pairs from the `CLASSES` tag.
- This tag can be qualified with PRExxx statements but all such PRExxx statements must be enclosed within square-brackets ([]) instead of the usual pipe-delineation (|).

Examples:

`CLASSES:Wizard=5|Enchanter=3|Druid=6`

Indicates this spell is 5th Lvl Wizard, 3rd Lvl Enchanter, and 6th Lvl Druid.

`CLASSES:Wizard,Sorcerer=5|Cleric=4`

Indicates this spell is 5th Lvl Wizard, 5th Lvl Sorcerer, and 4th Lvl Cleric.

`CLASSES:ALL=4`

Indicates this spell is 4th Lvl for all classes.

`CLASSES:TYPE.Divine=3`

Indicates this spell is 3rd Lvl for divine classes.

`CLASSES:ALL=4[PREDEITY:Java]`

Indicates this spell is 4th Lvl for all classes, but is only available for followers of Java.

`CLASSES:Wizard,Sorcerer=5|Cleric=4[PRECLASS:1,Magician=1]`

Indicates this spell is 5th Lvl Wizard, 5th Lvl Sorcerer, but will only be added to the spell list of a character with one level of the Magician prestige class. This is especially useful if you need to create spell lists for prestige classes that add caster levels to existing levels but do not otherwise have a spell progression.

`Misdirection.MOD <tab> CLASSES:Circle Walker=2`

Indicates this spell is modified to 2nd Level for Circle Walker classes.

.MOD Example (Appending):

Initial Spell: `<spell name> <tab> CLASSES:Wizard=4`

Modified By: `<spell name>.MOD <tab> CLASSES:Cleris=3`

Is Equivalent To: `<spell name> <tab> CLASSES:Wizard=4|Cleric=3`

The associated spell is a 4th level Wizard spell and a 3rd level Cleric spell.

*** Updated 5.11.12

Tag Name: COMPS:x

Variables Used (x): Text (V, S, M, DF)

What it does:

Lists the types of spell components required for this spells (Verbal, Somatic, etc).

Example:

`COMPS:V S`

This spell has "Verbal" and "Somatic" components.

`SpellFoo <tab> COMPS:.CLEAR <tab> COMPS:V <tab> COMPS:S`

The spell SpellFoo has its COMPS cleared and "Verbal" and "Somatic" components added.

.MOD Example (Appending):

Initial Spell: `<spell name> <tab> COMPS:V S`

Modified By: `<spell name>.MOD <tab> COMPS:M`

Is Equivalent To: `<spell name> <tab> COMPS:V S|M`

The associated spell's spell components include "Verbal", "Somatic", and "Material" components.

*** Updated 6.3.0

Tag Name: COST:x

Variables Used (x): Number (Component Cost)

Variables Used (x): .CLEAR

What it does:

- This tag identifies the cost of the spell's components.
- `.CLEAR` is used to clear the cost of a spell's components.

Example:

`COST:300`

.MOD Example (Overwriting):

Initial Spell: `<spell name> <tab> COST:300`

Modified By: `<spell name>.MOD <tab> COST:150`

Is Equivalent To: `<spell name> <tab> COST:150`

The associated spell components cost 150 gp.

*** New 5.11.6

Tag Name: CT:x

Variables Used (x): Number (Casting Threshold)

What it does:

- This roll is applied/accumulated toward the Casting Threshold of the spell that the mage is casting.
- `CT` must be in integer >= 0

Example:

`CT:41`

This spell takes 41+ points to cast.

.MOD Example (Overwriting):

Initial Spell: `<spell name> <tab> CT:25`

Modified By: `<spell name>.MOD <tab> CT:35`

Is Equivalent To: `<spell name> <tab> CT:35`

The casting threshold of the associated spell is 35.

*** Updated 5.11.13

Tag Name: DESCRIPTOR:x|x

Variables Used (x): Text (Spell type)

Variables Used (x): .CLEAR

What it does:

- Reports what types the spell is and is used for specialist wizards to determine their favored school's bonus spells.
- `.CLEAR` is used to clear all descriptors from a spell and can be followed by new descriptors to replace those cleared.

Example:

`DESCRIPTOR:Sonic|Acid|Evil`

This spell is of the "Sonic", "Acid" & "Evil" types.

`DESCRIPTOR:.CLEAR|Fire`

This clears the spell list and replaces it with the "Fire" type.

.MOD Example (Appending):

Initial Spell: `<spell name> <tab> DESCRIPTOR:Sonic|Acid`

Modified By: `<spell name>.MOD <tab> DESCRIPTOR:Evil`

Is Equivalent To: `<spell name> <tab> DESCRIPTOR:Sonic|Acid|Evil`

The associated spell has the descriptors "Acid", "Evil", and "Sonic".

*** Updated 5.11.11

Tag Name: DOMAINS:x,x=y|x,x=y

Variables Used (x): Text (Domain name)

Variables Used (x): .CLEARALL

Variables Used (y): Number (Spell level)

What it does:

- This indicates that this spell is the indicated level for the named domain.
- `.CLEARALL` will clear all classes or class/level pairs from the `CLASSES` tag.
- This tag can now be qualified with `PRExxx` statements. Please note that you must enclose the `PRExxx` statement with [ ] instead of the usual Pipe delineation.

Examples:

`DOMAINS:Charm=2|Beauty=3`

Indicates that this is a 2nd level spell for the Charm domain, and 3rd level for the Beauty domain.

`DOMAINS:Fire=3|Magic=4[PREALIGN:2,5,8]`

Indicates that this is a 3rd level spell for the Fire domain, and 4th level for the Magic domain, but is only available to evil characters.

`DOMAINS:Charm=2|Beauty=3[PRECLASS:Supermodel=1]`

Indicates that this is a 2nd level spell for the Charm domain, and 3rd level for the Beauty domain, but will only be added to the spell list of a character with a level of the Supermodel prestige class.

`Binding.MOD <tab> DOMAINS:Fate=8`

Indicates that this is an 8th level spell for the Fate domain.

Deprecated Syntax:

`DOMAINS:.CLEAR` replaced by `DOMAINS:.CLEARALL.`

This is done due to the past side-effects between the `CLASSES` and `DOMAINS` tags. Note that any single `.CLEAR` is equivalent to both `.CLEARALL` tags due to this old interaction.

.MOD Example (Appending):

Initial Spell: `<spell name> <tab> DOMAINS:Charm=2`

Modified By: `<spell name>.MOD <tab> DOMAINS:Beauty=3`

Is Equivalent To: `<spell name> <tab> DOMAINS:Charm=2|Beauty=3`

The associated spell is a 2nd level spell for the Charm domain and 3rd level for the Beauty domain.

Tag Name: DURATION:x

Variables Used (x): Text (Spell duration)

What it does:

- Reports the duration of the spell.
- Formulas can be parsed and the results replaced in the output by enclosing the variables and formulas within parentheses.
- CASTERLEVEL, a variable specifically designed for this purpose, is commonly used though other variables can be used as well.
- Because anything within parentheses is assumed to be a formula to be parsed, text containing parentheses must substitute brackets [ ] in place of parentheses.

Example:

`DURATION:1 Round/Level`

This spell lasts for one round per level.

`DURATION:(CASTERLEVEL) rounds`

If CASTERLEVEL is equal to 3 then this outputs: "3 rounds".

.MOD Example (Appending):

Initial Spell: `<spell name> <tab> DURATION:1 Round/Level`

Modified By: `<spell name>.MOD <tab> DURATION:(CASTERLEVEL) rounds`

Is Equivalent To: `<spell name> <tab> DURATION:1 Round/Level|(CASTERLEVEL) rounds`

For a 3rd level spellcaster the associated spell appears on the output sheet with a duration of "1 Round/Level, 3 rounds".

*** Updated before 5.12.0

Tag Name: ITEM:x

Variables Used (x): Text (Item type)

What it does:

Tells PCGen what types of items this spell can be used to make (Potions, wands, wondrous items, etc).

Most often this is used to indicate the spell can be made into a potion.

Brackets can be used to prevent the spell from being used in the specified item.

Example:

`ITEM:Potion`

This spell can be used in a potion.

`ITEM:[Scroll]`

This spell can NOT be used in a scroll.

.MOD Example (Appending):

Initial Spell: `<spell name> <tab> ITEM:Scroll`

Modified By: `<spell name>.MOD <tab> ITEM:Potion`

Is Equivalent To: `<spell name> <tab> ITEM:Scroll|Potion`

The associated spell can be used to make scrolls and potions.

*** NEW 5.10.1

Tag Name: PPCOST:x

Variables Used (x): Number

What it does:

This is a point pool cost to purchase/cast the spell works with SKILLTOTAL=>skill name)

Example:

`PPCOST:9`

This spell costs 9 points to use.

.MOD Example (Overwriting):

Initial Spell: `<spell name> <tab> PPCOST:3`

Modified By: `<spell name>.MOD <tab> PPCOST:6`

Is Equivalent To: `<spell name> <tab> PPCOST:6`

The associated spells costs "6" power points.

*** Updated 5.13.6

Tag Name: RANGE:x

Variables Used (x): Text (Spell range)

What it does:

Reports the range that the spell has.

Example:

`RANGE:Medium (100' + 5/lv)`

This spell has a range of 100 feet plus 5 feet per level.

`RANGE:.CLEAR <tab> RANGE:Personal`

This clears the previous range and replaces with "Personal" range.

.MOD Example (Appending):

Initial Spell: `<spell name> <tab> RANGE:Personal`

Modified By: `<spell name>.MOD <tab> RANGE:Medium (100' + 5/lvl)`

Is Equivalent To: `<spell name> <tab> RANGE:Personal|Medium (100' + 5/lvl)`

The associated spell can be used as a personal spell or at medium range.

Tag Name: SAVEINFO:x

Variables Used (x): Text (Spell save)

What it does:

Reports whether or not there is a save for the spell, and if so what it is.

Example:

`SAVEINFO:Will Negates`

A successful Will save will negate the spell effects.

.MOD Example (Appending):

Initial Spell: `<spell name> <tab> SAVEINFO:Will negates`

Modified By: `<spell name>.MOD <tab> SAVEINFO:Reflex for half`

Is Equivalent To: `<spell name> <tab> SAVEINFO:Will negates|Reflex for half`

A successful Reflex save will half the spell effect and a successful Will save negates.

*** Updated 5.13.6

Tag Name: SCHOOL:x|x

Variables Used (x): Text (Spell School Name)

What it does:

This is a pipe-delimited (|) list of Schools the spell belongs to and is used for specialist wizards to determine their favored school's bonus spells.

.CLEAR - this CAN be chained, e.g. SCHOOL:.CLEAR|x|x|.

Example:

`SCHOOL:Divination`

This spell belongs to the "Divination" school.

`SCHOOL:Enchantment|Illusion`

This spell belongs to the "Enchantment" and "Illusion" schools.

`Summon Monster VII.MOD <tab> CLASSES:Channeler=7 <tab> SCHOOL:.CLEAR <tab> SCHOOL:Greater Conjuration`

For the Class Channeler of level 7 the spell Summon Monster VII is modified, moving it from whatever schools it was in to just "Greater Conjuration".

`SCHOOL:.CLEAR <tab> SCHOOL:Illusion`

This clears the schools list and replaces it with the "Illusion" school.

.MOD Example (Appending):

Initial Spell: `<spell name> <tab> SCHOOL:Enchantment`

Modified By: `<spell name>.MOD <tab> SCHOOL:Illusion`

Is Equivalent To: `<spell name> <tab> SCHOOL:Enchantment|Illusion`

This spell belongs to the "Enchantment" and "Illusion" schools.

*** New 5.13.x

Tag Name: SPELLPOINTCOST:x|y=z|y=z

Variables Used (x): Number (Total cost)

Variables Used (y): Text (Spell effect)

Variables Used (z): Number (Spell effect cost)

What it does:

- This establishes the additional spell point cost for spell enhancements.
- This is a pipe-delimited (|) list of spell effects and spell effect costs.

Example:

`SPELLPOINTCOST:Evoke Fire=4|Range=1|Area of Effect=1|Duration=1`

Enhancing the "Evoke Fire" effect would cost 4 spell points, the "Range", "Area of Effect", and "Duration" one point each.

`SPELLPOINTCOST:4`

Enhancing the spell costs a total of 4 spell points.

.MOD Example (Appending):

Initial Spell: `<spell name> <tab> SPELLPOINTCOST:Evoke Fire=4`

Modified By: `<spell name>.MOD <tab> SPELLPOINTCOST:Range=1`

Is Equivalent To: `<spell name> <tab> SPELLPOINTCOST:Evoke Fire=4|Range=1`

Enhancing the "Evoke Fire" effect would cost 4 spell points and the "Range" one point.

*** Updated 5.11.13

Tag Name: SPELLRES:x

Variables Used (x): Text (Yes, No or free-form text)

What it does:

- Indicates whether the character can try to resist the spell based on their Spell Resistance (SR).
- There is NO JOINING IN THIS TOKEN... the following are NOT LEGAL (or you won't get what you expect): SPELLRES:For Good Creatures|Limited or SPELLRES:.CLEAR|No

Example:

`SPELLRES:Yes`

This spell is susceptible to spell resistance.

`SPELLRES:For Good Creatures`

This spell is susceptible to Good Creatures.

`SPELLRES:.CLEAR`

This clears the Spell resistance setting.

.MOD Example (Appending):

Initial Spell: `<spell name> <tab> SPELLRES:YES`

Modified By: `<spell name>.MOD <tab> SPELLRES:`

Is Equivalent To: `<spell name> <tab> SPELLRES:`

Tag Name: STAT:x

Variables Used (x): Text (stat abbreviation)

What it does:

- Used to tell PCGen what attribute/stat to use for determining bonus spells and maximum level the character can cast.
- Used in conjunction with the `SPELLSTAT:SPELL` tag in the *_class.lst file.

Example:

`STAT:CHA`

When used in conjunction with the `SPELLSTAT:SPELL` tag in a class file, a spell with this tag will use the charisma modifier to determine bonus spells and maximum level the character can cast.

.MOD Example (Overwriting):

Initial Spell: `<spell name> <tab> STAT:CHA`

Modified By: `<spell name>.MOD <tab> STAT:INT`

Is Equivalent To: `<spell name> <tab> STAT:INT`

This spell will now use the intelligence modifier to determine bonus spells and maximum level the character can cast

*** Updated 5.11.13

Tag Name: SUBSCHOOL:x|x

Variables Used (x): Text (Spell Sub-School Name)

What it does:

This is a | (pipe) delimited list of Sub-Schools the spell belongs to and is used for specialist wizards to determine their favored school's bonus spells.

.CLEAR - this CAN be chained, e.g. SUBSCHOOL:.CLEAR|x|x|.

Example:

`SUBSCHOOL:Charm`

This spell belongs to the "Charm" sub-school.

`SUBSCHOOL:Creation|Calling`

This spell belongs to the "Creation" and "Calling" subschools.

`Wall of Force.MOD <tab> SUBSCHOOL:Force`

This spell belongs to the "Force" sub-school.

`SUBSCHOOL:.CLEAR|Charm`

This clears the subschools list and replaces with "Charm" sub-school.

.MOD Example (Appending):

Initial Spell: `<spell name> <tab> SUBSCHOOL:Creation`

Modified By: `<spell name>.MOD <tab> SUBSCHOOL:Calling`

Is Equivalent To: `<spell name> <tab> SUBSCHOOL:Creation|Calling`

This spell belongs to the "Creation" and "Calling" subschools.

*** Updated 6.3.0

Tag Name: TARGETAREA:x

Variables Used (x): Text (Target area)

Variables Used (x): .CLEAR

What it does:

- Reports the Target, Area, or Effects that the spell has.
- Formulas can be parsed and the results replaced in the output by enclosing the variables and formulas within parentheses.
- CASTERLEVEL, a variable specifically designed for this purpose, is commonly used though other variables can be used as well.
- Because anything within parentheses is assumed to be a formula to be parsed, text containing parentheses must substitute brackets [ ] in place of parentheses.
- `.CLEAR` is used to clear the target, area, or effects that a spell has.

Example:

`TARGETAREA:Cone`

Spell has a cone area of effect.

`TARGETAREA:(CASTERLEVEL*10) ft. cube`

If CASTERLEVEL is equal to 3 then this outputs: "30 ft. cube".

.MOD Example (Overwriting):

Initial Spell: `<spell name> <tab> TARGETAREA:(CASTERLEVEL*5) ft. cube`

Modified By: `<spell name>.MOD <tab> TARGETAREA:(CASTERLEVEL*10) ft. cube`

Is Equivalent To: `<spell name> <tab> TARGETAREA:(CASTERLEVEL*10) ft. cube`

The target area is now equal to cube 10 times the casterlevel in ft.

*** Updated 5.11.13

Tag Name: VARIANTS:x|x

Variables Used (x): Text (Spell Variant)

What it does:

- This is a | (pipe) delimited list of the names of variations of the spell.
- Optional Tag. Not all spells have variants.
- Used when creating custom magic items (such as scrolls and wands). User must select one of the variants when creating such an item.

.CLEAR - this CAN be chained, e.g. TAG:.CLEAR|x|x|.

Example:

`VARIANTS:Blast|Spell`

Names the two variations of the spell.

`VARIANTS:Acorn Grenades|Holly Berry Bombs`

Names the two variants of the spell Fire seeds.

`VARIANTS:.CLEAR`

Removes all variants of the spell.

`VARIANTS:.CLEAR|Acorn Grenades|Holly Berry Bombs`

Removes all variants of the spell Fire seeds.

.MOD Example (Appending):

Initial Spell: `<spell name> <tab> VARIANTS:Acorn Grenades`

Modified By: `<spell name>.MOD <tab> VARIANTS:Holly Berry Bombs`

Is Equivalent To: `<spell name> <tab> VARIANTS:Acorn Grenades|Holly Berry Bombs`

Names the two variants of the spell Fire seeds.

Tag Name: XPCOST:x

Variables Used (x): Number (Spell XP Cost)

What it does:

Denotes how much the spell costs to cast, used for determining potion, wand, etc costs.

XPCOST must be an integer >= 0

Example:

`XPCOST:1250`

Spell costs 1250 Experience points to cast.

.MOD Example (Overwriting):

Initial Spell: `<spell name> <tab> XPCOST:1250`

Modified By: `<spell name>.MOD <tab> XPCOST:750`

Is Equivalent To: `<spell name> <tab> XPCOST:750`

Spell costs 750 Experience points to cast.