New FREQ Example

From PCGen Wiki
Jump to: navigation, search

Template

TITLE

A _meaningful_ title, for example the LST syntax you are affecting, or the benefit to PCGEN you are providing

BENEFIT FOR USER

Often our freqs are in code/lst speak, we also need to know, _what_ is this actually providing to the user of PCGEN

LST SYNTAX

The complete LST Syntax if appropriate

OS SYNTAX

The complete OS Syntax if appropriate

DESCRIPTION

The rest

Example

TITLE

Add BONUS:SPELL (Calculate spell range)

BENEFIT FOR USER

This freq will allow users to view the range of a spell they cast on an OS Sheet. It will calculate the range correctly using the appropriate caster levels.

LST SYNTAX

BONUS:SPELL=name|RANGE|formula where formula could equal something like =5*CL+100 (where CL equals Class Level)

OS SYNTAX

SPELL.RANGE

DESCRIPTION

The Range could be evaluated - something like BONUS:SPELL=name|RANGE|formula for spell's range (something like 5*CL+100 since CL gets the class level). This would require adding RANGEEVAL to the SPELLMEM tokens, and for that token return getTotalBonusTo("SPELL="+aSpell.name()","RANGE",true)