From: JIRA (f. E. C. S. ) <ji...@pc...> - 2011-06-16 17:57:16
|
[ http://jira.pcgen.org/browse/NEWTAG-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12422#action_12422 ] Eric C. Smith commented on NEWTAG-24: ------------------------------------- Updated CHOOSE:RACE tag svn 15155 > CHOOSE:RACE > ----------- > > Key: NEWTAG-24 > URL: http://jira.pcgen.org/browse/NEWTAG-24 > Project: New Tag > Issue Type: Modify Token > Components: LST Tag > Affects Versions: 5.17.1, 5.17.2 > Reporter: Tom Parker > Assignee: Eric C. Smith > Fix For: 5.17.4 (Alpha) > > > Syntax > CHOOSE:RACE|x|y|y[x]|y[x,x]|x,y,y[x],y[x,x] > x is a Race PRIMITIVE > A PRIMITIVE is an identifier of objects, and may include any number of specifications. In the case of Race objects, there are are the three global PRIMITIVES: > x = an Race (specified by key) > x = TYPE=w (w is a TYPE identifier for a Race) > x = !TYPE=w (w is a TYPE identifier for a Race that would be prohibited) > x = ALL (allow the choice of any Race) > There is also Race specific PRIMITIVES: > RACETYPE=w (w must be a Race Type as defined by the RACE's RACETYPE token in the LST file) RACESUBTYPE=w (w must be a Race SubType as defined by the RACE's RACESUBTYPE token in the LST file) > y is a QUALIFIER > A QUALIFIER is a special keyword that identifies a subset of objects that should be returned. Valid qualifiers for Race objects are 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:RACE|Dwarf,Elf > will result in NO choices because no Race is both Dwarf and Elf. > CHOOSE:RACE|TYPE=Foo,PC > would test for any Race that has the Foo type (as defined in the Race LST file) which is ALSO already selected by the PlayerCharacter > This could also be written (probably more clearly): > CHOOSE:RACE|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:RACE|Dwarf|Elf > will result in a choice between Race Dwarf and Race Elf. > All commas (ANDs) are evaluated before pipes (ORs), so something like: > CHOOSE:RACE|Dwarf|TYPE=Foo,PC > would include Dwarf unconditionally, in addition to any Race that has the Foo type (as defined in the Race LST file) which is ALSO already selected by the PlayerCharacter > [edit] Special Case > The RACE subtoken currently allows brackets to group comma separated items in an AND format. This is equivalent to an AND function (good, because that's what the new system also uses for AND), but the old system has no prefix. This is equivalent to the ANY prefix, however, so conversion is easy. (Note as ANY is also assumed, the brackets can be dropped and solely the comma used as AND) > [edit] Conversion > CHOOSE:RACE|RACETYPE=Dragon remains unchanged. > CHOOSE:RACE|[RACETYPE=Humanoid,RACESUBTYPE=Aquatic] becomes CHOOSE:RACE|RACETYPE=Humanoid,RACESUBTYPE=Aquatic -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.pcgen.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |