Qualified CDOMObject Proposals

From PCGen Wiki
Revision as of 00:00, 29 March 2009 by Tom Parker (talk | contribs) (CHOOSE Proposals for Qualified CDOMObject Proposals)
Jump to: navigation, search

CHOOSE Proposals for Qualified CDOMObject Proposals

CHOOSE:TEMPLATE

SUBTOKEN: TEMPLATE (new)

Syntax

CHOOSE:TEMPLATE|x|y|y[z]|y[z,z]|x,y,y[z],y[z,z]


x is a Template PRIMITIVE

A PRIMITIVE is an identifier of objects, and may include any number of specifications. In the case of Template objects, there are are the three global PRIMITIVES:

x = an Template (specified by key)
x = TYPE=w (w is a TYPE identifier for a Template)
x = !TYPE=w (w is a TYPE identifier for a Template that would be prohibited)
x = ALL (allow the choice of any Template)


y is a QUALIFIER.

A QUALIFIER is a special keyword that identifies a subset of objects that should be returned. Valid qualifiers for Template objects are any of the Global Qualifiers.


A comma represents "AND", meaning multiple items are evaluated independently and then any item that appears in ALL of the items is added to the list.

CHOOSE:TEMPLATE|Mindless,Undead

will result in NO choices because no Template is both Mindless and Undead.

CHOOSE:TEMPLATE|TYPE=Foo,PC
would test for any Template that has the Foo type (as defined in the Template LST file) which is ALSO already selected by the PlayerCharacter

This could also be written (probably more clearly):
CHOOSE:TEMPLATE|PC[TYPE=Foo]


A pipe represents "OR", meaning multiple items are evaluated independently and then any item that appears in any of the items is added to the list:

CHOOSE:TEMPLATE|Mindless|Undead

will result in a choice between Template Mindless and Template Undead.

All commas (ANDs) are evaluated before pipes (ORs), so something like:

CHOOSE:TEMPLATE|Mindless|TYPE=Foo,PC
would include Mindless unconditionally, in addition to any Template that has the Foo type (as defined in the Template LST file) which is ALSO already selected by the PlayerCharacter

Conversion

None, TEMPLATE is a new Subtoken for CHOOSE

CHOOSE:LANG

SUBTOKEN: LANGUAGE (deprecated) SUBTOKEN: LANG (new)

Syntax

CHOOSE:LANG|x|y|y[z]|y[z,z]|x,y,y[z],y[z,z]


x is a Language PRIMITIVE

A PRIMITIVE is an identifier of objects, and may include any number of specifications. In the case of Language objects, there are are the three global PRIMITIVES:

x = an Language (specified by key)
x = TYPE=w (w is a TYPE identifier for a Language)
x = !TYPE=w (w is a TYPE identifier for a Language that would be prohibited)
x = ALL (allow the choice of any Language)

y is a QUALIFIER

A QUALIFIER is a special keyword that identifies a subset of objects that should be returned. Valid qualifiers for Language objects are the global QUALIFIERS:

ANY: This means any item in the brackets should be returned (this is implied, so that CHOOSE:LANG|Foo,TYPE=Bar is equivalent to CHOOSE:LANG|ANY[Foo,TYPE=Bar]

PC: This means any Language which has already been taken by the PlayerCharacter.

!PC: This means any Language which has NOT already been taken by the PlayerCharacter.

QUALIFIED: This means any Language for which the PC qualifies (meets the PRExxx on the Language or has QUALIFY:LANG|x for that Language)

Note that for a QUALIFIER, ALL is the implied PRIMITIVE, so:

CHOOSE:LANG|PC[ALL]
is equivalent to
CHOOSE:LANG|PC


A comma represents "AND", meaning multiple items are evaluated independently and then any item that appears in ALL of the items is added to the list.

CHOOSE:LANG|Common,Goblin

will result in NO choices because no Language is both Common and Goblin.

CHOOSE:LANG|TYPE=Foo,PC
would test for any Language that has the Foo type (as defined in the Language LST file) which is ALSO already selected by the PlayerCharacter

This could also be written (probably more clearly):
CHOOSE:LANG|PC[TYPE=Foo]


A pipe represents "OR", meaning multiple items are evaluated independently and then any item that appears in any of the items is added to the list:

CHOOSE:LANG|Common|Goblin

will result in a choice between Language Common and Language Goblin.

All commas (ANDs) are evaluated before pipes (ORs), so something like:

CHOOSE:LANG|Common|TYPE=Foo,PC
would include Common unconditionally, in addition to any Language that has the Foo type (as defined in the Language LST file) which is ALSO already selected by the PlayerCharacter

Conversion

CHOOSE:LANGAUGE|Spoken becomes CHOOSE:LANG|TYPE=Spoken


CHOOSE:EQUIPMENT

SUBTOKEN: EQUIPTYPE (deprecated) SUBTOKEN: EQUIPMENT (new)

Syntax

CHOOSE:EQUIPMENT|x|y|y[z]|y[z,z]|x,y,y[z],y[z,z]


x is a Equipment PRIMITIVE

A PRIMITIVE is an identifier of objects, and may include any number of specifications. In the case of Equipment objects, there are are the three global PRIMITIVES:

x = an Equipment (specified by key)
x = TYPE=w (w is a TYPE identifier for a Equipment)
x = !TYPE=w (w is a TYPE identifier for a Equipment that would be prohibited)
x = ALL (allow the choice of any Equipment)

y is a QUALIFIER

A QUALIFIER is a special keyword that identifies a subset of objects that should be returned. Valid qualifiers for Equipment objects are the global QUALIFIERS:

ANY: This means any item in the brackets should be returned (this is implied, so that CHOOSE:EQUIPMENT|Foo,TYPE=Bar is equivalent to CHOOSE:EQUIPMENT|ANY[Foo,TYPE=Bar]

PC: This means any Equipment which has already been taken by the PlayerCharacter.

!PC: This means any Equipment which has NOT already been taken by the PlayerCharacter.

QUALIFIED: This means any Equipment for which the PC qualifies (meets the PRExxx on the Equipment or has QUALIFY:EQUIPMENT|x for that Equipment)

Note that for a QUALIFIER, ALL is the implied PRIMITIVE, so:

CHOOSE:EQUIPMENT|PC[ALL]
is equivalent to
CHOOSE:EQUIPMENT|PC


A comma represents "AND", meaning multiple items are evaluated independently and then any item that appears in ALL of the items is added to the list.

CHOOSE:EQUIPMENT|Longsword,Pike

will result in NO choices because no Equipment is both Longsword and Pike.

CHOOSE:EQUIPMENT|TYPE=Foo,PC
would test for any Equipment that has the Foo type (as defined in the Equipment LST file) which is ALSO already selected by the PlayerCharacter

This could also be written (probably more clearly):
CHOOSE:EQUIPMENT|PC[TYPE=Foo]


A pipe represents "OR", meaning multiple items are evaluated independently and then any item that appears in any of the items is added to the list:

CHOOSE:EQUIPMENT|Longsword|Pike

will result in a choice between Equipment Longsword and Equipment Pike.

All commas (ANDs) are evaluated before pipes (ORs), so something like:

CHOOSE:EQUIPMENT|Longsword|TYPE=Foo,PC
would include Longsword unconditionally, in addition to any Equipment that has the Foo type (as defined in the Equipment LST file) which is ALSO already selected by the PlayerCharacter

Conversion

CHOOSE:EQUIPTYPE|Melee.Simple becomes CHOOSE:EQUIPMENT|TYPE=Melee.Simple


CHOOSE:FEAT

SUBTOKEN: FEATADD (deprecated) SUBTOKEN: FEATLIST (deprecated) SUBTOKEN: FEATSELECT (deprecated) SUBTOKEN: FEAT (new)

Syntax

CHOOSE:FEAT|x|y|y[z]|y[z,z]|x,y,y[z],y[z,z]


x is a Feat PRIMITIVE

A PRIMITIVE is an identifier of objects, and may include any number of specifications. In the case of Feat objects, there are are the three global PRIMITIVES:

x = an Feat (specified by key)
x = TYPE=w (w is a TYPE identifier for a Feat)
x = !TYPE=w (w is a TYPE identifier for a Feat that would be prohibited)
x = ALL (allow the choice of any Feat)


y is a QUALIFIER

A QUALIFIER is a special keyword that identifies a subset of objects that should be returned. Valid qualifiers for Feat objects are the global QUALIFIERS:

ANY: This means any item in the brackets should be returned (this is implied, so that CHOOSE:FEAT|Foo,TYPE=Bar is equivalent to CHOOSE:FEAT|ANY[Foo,TYPE=Bar]

PC: This means any Feat which has already been taken by the PlayerCharacter.

!PC: This means any Feat which has NOT already been taken by the PlayerCharacter.

QUALIFIED: This means any Feat for which the PC qualifies (meets the PRExxx on the Feat or has QUALIFY:FEAT|x for that Feat)

Note that for a QUALIFIER, ALL is the implied PRIMITIVE, so:

CHOOSE:FEAT|PC[ALL]
is equivalent to
CHOOSE:FEAT|PC


A comma represents "AND", meaning multiple items are evaluated independently and then any item that appears in ALL of the items is added to the list.

CHOOSE:FEAT|Dodge,Toughness

will result in NO choices because no Feat is both Dodge and Toughness.

CHOOSE:FEAT|TYPE=Foo,PC
would test for any Feat that has the Foo type (as defined in the Feat LST file) which is ALSO already selected by the PlayerCharacter

This could also be written (probably more clearly):
CHOOSE:FEAT|PC[TYPE=Foo]


A pipe represents "OR", meaning multiple items are evaluated independently and then any item that appears in any of the items is added to the list:

CHOOSE:FEAT|Dodge|Toughness

will result in a choice between Feat Dodge and Feat Toughness.

All commas (ANDs) are evaluated before pipes (ORs), so something like:

CHOOSE:FEAT|Dodge|TYPE=Foo,PC
would include Dodge unconditionally, in addition to any Feat that has the Foo type (as defined in the Feat LST file) which is ALSO already selected by the PlayerCharacter

Conversion

CHOOSE:FEATADD|Dodge|Toughness becomes CHOOSE:FEAT|Dodge|Toughness ADD:FEAT|%LIST

CHOOSE:FEATLIST|TYPE=Fighter becomes CHOOSE:FEAT|PC[TYPE=Fighter]

CHOOSE:FEATSELECT|TYPE=Fighter becomes CHOOSE:FEAT|TYPE=Fighter


CHOOSE:ABILITY

SUBTOKEN: ABILITY (new)

Syntax

CHOOSE:ABILITY|w|x|y|y[z]|y[z,z]|x,y,y[z],y[z,z]


w is an Ability Category (e.g. FEAT) as defined in the Ability Category LST file.

x is a Ability PRIMITIVE

A PRIMITIVE is an identifier of objects, and may include any number of specifications. In the case of Ability objects, there are are the three global PRIMITIVES:

x = an Ability (specified by key)
x = TYPE=w (w is a TYPE identifier for a Ability)
x = !TYPE=w (w is a TYPE identifier for a Ability that would be prohibited)
x = ALL (allow the choice of any Ability)


y is a QUALIFIER

A QUALIFIER is a special keyword that identifies a subset of objects that should be returned. Valid qualifiers for Ability objects are the global QUALIFIERS:

ANY: This means any item in the brackets should be returned (this is implied, so that CHOOSE:ABILITY|FEAT|Foo,TYPE=Bar is equivalent to CHOOSE:ABILITY|FEAT|ANY[Foo,TYPE=Bar]

PC: This means any Ability which has already been taken by the PlayerCharacter.

!PC: This means any Ability which has NOT already been taken by the PlayerCharacter.

QUALIFIED: This means any Ability for which the PC qualifies (meets the PRExxx on the Ability or has QUALIFY:ABILITY|x for that Ability)

Note that for a QUALIFIER, ALL is the implied PRIMITIVE, so:

CHOOSE:ABILITY|FEAT|PC[ALL]
is equivalent to
CHOOSE:ABILITY|FEAT|PC


A comma represents "AND", meaning multiple items are evaluated independently and then any item that appears in ALL of the items is added to the list.

CHOOSE:ABILITY|FEAT|Dodge,Toughness

will result in NO choices because no Ability is both Dodge and Toughness.

CHOOSE:ABILITY|FEAT|TYPE=Foo,PC
would test for any Ability that has the Foo type (as defined in the Ability LST file) which is ALSO already selected by the PlayerCharacter

This could also be written (probably more clearly):
CHOOSE:ABILITY|FEAT|PC[TYPE=Foo]


A pipe represents "OR", meaning multiple items are evaluated independently and then any item that appears in any of the items is added to the list:

CHOOSE:ABILITY|FEAT|Dodge|Toughness

will result in a choice between Ability Dodge and Ability Toughness.

All commas (ANDs) are evaluated before pipes (ORs), so something like:

CHOOSE:ABILITY|FEAT|Dodge|TYPE=Foo,PC
would include Dodge unconditionally, in addition to any Ability that has the Foo type (as defined in the Ability LST file) which is ALSO already selected by the PlayerCharacter

Conversion

Current CHOOSE:ABILITY format does not change (backwards compatible)