ASPECT tag for Abilities and Feats

From PCGen
Jump to: navigation, search

This will be implemented under the following code FREQ:
ASPECT tag for Abilities and Feats

Current Status: 19 September: Implementation completed.

This specifically addresses the need to model powers in 4e with ability objects. Powers use a format with a number of structured elements not unlike spells, such as Duration, Range, Attack, Hit, Miss, Sustain, etc.. The problem being that Ability Objects don't have tags to hold these stat values, other than maybe cramming them all in the DESC.

Rather than creating a number of specific tags for this purpose I propose we create one tag that has the versatility to hold all the stats. Basically all these stats need the same thing (hold a text string). This is conceptually similar to the QUALITY tag we made for use in equipment

LST Token, Ability object

Tag Name: ASPECT:x|y|z|z

Variables Used (x): Text (Name of the aspect)
Variables Used (y): Text (Value of the aspect)
Variables Used (z): Number or formula (Optional, values to replace % in y)

What it does:

Determines that the feat or ability has the aspect and sets it's value in that feat or ability.
Can be used multiple times within an ability but each time it should be a new aspect (name).
The text in the y variable can use %z for replacing numerical values set by the z variable, %1 is replaced by the first z, %2 is replaced by the second z, etc..
The y text can also use other special variables, also usable in the DESC tag:

%CHOICE - Will replace the first associated choice in the object.
%LIST - Will substitute all choices comma separated into that parameter.
%NAME - The OUTPUTNAME or name of the object this DESC tag is in.

ASPECT tags can be modified by .MODing the feat or ability and inserting a new ASPECT tag, Since each aspect name can hold only one value per ability .MODing a new ASPECT tag will overwrite the only value of the aspect by that name in the feat


ASPECT:Action Type|Standard Action
ASPECT:Attack Type|Melee weapon
ASPECT:Target|One creature
ASPECT:Attack|Strength vs. AC

And using variable substitution:

ASPECT:Attack Type|Ranged %1|PowerRange
ASPECT:Effect|Double damage to %CHOICE creatures

Here's how the Lance of Faith cleric power could be modeled:

Lance of Faith
DESC:A brilliant ray of light sears your foe with golden radiance
ASPECT:Action Type|Standard Action
ASPECT:Attack Type|Ranged %1|LanceofFaithRange
ASPECT:Target|One creature
ASPECT:Attack|Wisdom vs. Reflex
ASPECT:Hit|1%d8 + 2% radiant damage, and one ally you can see gains a +2 power bonus to his or her next attack roll against the target|LanceofFaithDamageDie|WIS

OS Token

Output: In the GUI when selecting an ability all the aspects are displayed in a string in the information pane. For example, here is how the first 4 examples above might appear in the info pane:

Aspects: Action Type: Standard Action, Attack Type: Melee weapon, Target:

One creature, Attack: Strength vs. AC

On the OS we'll need some new tokens to support this tag. There are a number of feat and ability tokens which use the same format but target different groups of abilities. This is the list of tokens which will need to be revised:


These tokens all have DESC as a variable, the new variables will be used in the same location in the token that DESC is used. Each will have the following additions:

ASPECT - Will output a text string of all the aspects associated with the ability in the same format as the GUI uses as described above.

ASPECT.<number> - Will output the name/value of the aspect of that number on a 0 based index.

ASPECT.<text> - Will output the value of the named aspect.

ASPECTCOUNT - Outputs the total number of Aspects associated with the ability.

HASASPECT.<text> - Reports a Boolean result on the named aspect.

Examples using the Lance of Faith example from above:


Outputs: "Action Type: Standard Action, Attack Type: Ranged 5, Target: One creature, Attack: Wisdom vs. Reflex, Hit: 2d8 + 4 radiant damage, and one ally you can see gains a +2 power bonus to his or her next attack roll against the target"


Outputs: "ActionType: Standard Action"

ABILITY.Power.0.ASPECT.Attack Type

Outputs: "Ranged 5"


Outputs: "5"


Outputs: "N"