Simple CDOMObject Proposals

From PCGen Wiki
Jump to: navigation, search

CHOOSE Proposals for Simple CDOMObjects

CHOOSE:PCSTAT

SUBTOKEN: PCSTAT (new)
SUBTOKEN: STAT (deprecated by this proposal)

Reason for deprecation: The Challenge with the existing CHOOSE:STAT is that it is negative. Meaning, CHOOSE:STAT|STR means to allow a choice of any STAT except STR. This seems a bit weird, and I would like to get away from this.

Syntax

CHOOSE:PCSTAT|x|x

x is a PRIMITIVE

A PRIMITIVE is an identifier of objects, and may include any number of specifications.

In the case of PCStat objects, the only valid PRIMITIVES are the four global PRIMITIVES:

x = a Stat abbreviation (STR, INT, etc.)
x = TYPE=w (w is a TYPE identifier for a Stat) - note that none of our STATs actually use TYPE: but this works anyway :)
x = !TYPE=w (w is a TYPE identifier for a Stat that would be prohibited)
x = ALL (allow the choice of any STAT)

Since we can easily add other things later (at least a lot easier than the old CHOOSE system), I would like to start simple on this one. :)

Conversion

CHOOSE:STAT
becomes
CHOOSE:PCSTAT|ALL

CHOOSE:STAT|STR
becomes
CHOOSE:PCSTAT|INT|WIS|DEX|CON|CHA

Note that this latter replacement is "deterministic" as the Stats can only be defined in the Game Mode.

CHOOSE:CHECK

SUBTOKEN: CHECK (new)

Syntax

CHOOSE:CHECK|x|x

x is a Check PRIMITIVE

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

x = an Check (specified by key)
x = TYPE=w (w is a TYPE identifier for a Check) - note that none of our Checks have TYPE today, but this will still work in theory
x = !TYPE=w (w is a TYPE identifier for a Check that would be prohibited)
x = ALL (allow the choice of any Check)


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:CHECK|Will,Fortitude

will result in NO choices because no Check is both Will and Fortitude.


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:CHECK|Will|Fortitude

will result in a choice between Check Will and Check Fortitude.

Conversion

None, CHECK is a new Subtoken for CHOOSE\

CHOOSE:SIZE

SUBTOKEN: SIZE (new)

Syntax

CHOOSE:SIZE|x|x

x is a SizeAdjustment PRIMITIVE

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

x = an SizeAdjustment (specified by key)
x = TYPE=w (w is a TYPE identifier for a SizeAdjustment) - note that none of our SizeAdjustments have TYPE today, but this will still work in theory
x = !TYPE=w (w is a TYPE identifier for a SizeAdjustment that would be prohibited)
x = ALL (allow the choice of any SizeAdjustment)


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:SIZE|Small,Colossal

will result in NO choices because no SizeAdjustment is both Small and Colossal.


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:SIZE|Small|Colossal

will result in a choice between SizeAdjustment Small and SizeAdjustment Colossal.

Conversion

None, SIZE is a new Subtoken for CHOOSE

CHOOSE:ALIGNMENT

SUBTOKEN: ALIGNMENT (new)

Syntax

CHOOSE:ALIGNMENT|x|x

x is a PCAlignment PRIMITIVE

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

x = an PCAlignment (specified by key)
x = TYPE=w (w is a TYPE identifier for a PCAlignment) - note that none of our PCAlignments have TYPE today, but this will still work in theory
x = !TYPE=w (w is a TYPE identifier for a PCAlignment that would be prohibited)
x = ALL (allow the choice of any PCAlignment)


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:ALIGNMENT|LG,CN

will result in NO choices because no PCAlignment is both LG and CN.


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:ALIGNMENT|LG|CN

will result in a choice between PCAlignment LG and PCAlignment CN.

Conversion

None, ALIGNMENT is a new Subtoken for CHOOSE