Board index

PCGen


IT IS ALIVE!!!

Tag syntax rationalisation

Where PCGen Program (JAVA) is discussed by the developers

Tag syntax rationalisation

Postby Li-aung Yip » Sat Jul 11, 2015 9:27 am

This is a running list of places I have noticed inconsistent tag syntax; that is, where two different tags do similar things using dis-similar syntax. This makes the tag file format harder for a new user to learn, because the user has to remember more information about special cases and quirks, to write a LST file.

Following the "principle of least surprise" would make the LST file syntax easier to learn. The same effect should map to the same syntax, every time. This may also simplify the parser's code complexity, as reducing multiple syntaxes down to one syntax allows the parser to be simplified.




1: PRESIZE and PREBASESIZE use different syntax for the creature sizes.

PRESIZE uses the abbreviated size category name (S, M, L...) while PREBASESIZE uses the full size category name (Small, Medium, Large...).

I would suggest that PREBASESIZE be changed to use the abbreviated size category name (S, M, L...). This would make the LST tag more compact, and also reduces the chance of confusing behaviour in the case of size names containing "funny characters" like a space, "Really Huge" or a symbol, "Colossal+".


IRC: layip. GitHub: https://github.com/LiaungYip .
User avatar
Li-aung Yip
 
Posts: 21
Joined: Sat Jun 20, 2015 2:24 pm

Re: Tag syntax rationalisation

Postby LegacyKing » Sat Jul 11, 2015 2:59 pm

Already happened. Just not documented. The PREBASESIZE and PRESIZE now use whatever the actual KEY is set to be.

Also a correction is needed. PREABILITY:N,CATEGORY=Category_Name,ANY is not valid. ANY has been removed as a PRExxx should be using type or a specific name. ANY is too broad and was removed.

EDIT:
See: http://jira.pcgen.org/browse/NEWTAG-423 - Eliminate use of ANY for Category in PREABILITY


Andrew Maitland
PCGen Content SB
- Data Chimp
- Quicksilver Tracker Monkey
User avatar
LegacyKing
Site Admin
 
Posts: 689
Joined: Fri Oct 11, 2013 12:35 pm
Location: California, US

Re: Tag syntax rationalisation

Postby Li-aung Yip » Sat Jul 11, 2015 3:39 pm

The PREBASESIZE and PRESIZE now use whatever the actual KEY is set to be.


By the `KEY`, do you mean the `SIZENAME` or the `ABB` or the `DisplayName`?

Code: Select all
SIZENAME:F   ABB:F   DISPLAYNAME:Fine   BONUS:ITEMCOST|TYPE=Ammunition,TYPE=Armor,TYPE=Shield,TYPE=Weapon|0.5
SIZENAME:F      BONUS:ITEMWEIGHT|TYPE=Ammunition,TYPE=Armor,TYPE=Shield,TYPE=Weapon|0.1   BONUS:ITEMWEIGHT|TYPE=Goods|0.25
SIZENAME:F      BONUS:ACVALUE|TYPE.Armor,TYPE.Shield|0.5   BONUS:COMBAT|AC|8|TYPE=Size   BONUS:COMBAT|TOHIT|8|TYPE=SIZE   BONUS:COMBAT|TOHIT.GRAPPLE|-24|TYPE=Size
SIZENAME:F      BONUS:ITEMCAPACITY|TYPE=Goods|0.25
SIZENAME:F      BONUS:SKILL|Hide|16|TYPE=SIZE
SIZENAME:F      BONUS:LOADMULT|TYPE=SIZE|0.125|PRELEGSGTEQ:4





Also a correction is needed. PREABILITY:N,CATEGORY=Category_Name,ANY is not valid. ANY has been removed as a PRExxx should be using type or a specific name. ANY is too broad and was removed.


In relation to latest previous Pull Request #337?

I will fix in next commit.


IRC: layip. GitHub: https://github.com/LiaungYip .
User avatar
Li-aung Yip
 
Posts: 21
Joined: Sat Jun 20, 2015 2:24 pm
Top

Re: Tag syntax rationalisation

Postby LegacyKing » Sat Jul 11, 2015 4:38 pm

KEY is the "SIZENAME:"


Andrew Maitland
PCGen Content SB
- Data Chimp
- Quicksilver Tracker Monkey
User avatar
LegacyKing
Site Admin
 
Posts: 689
Joined: Fri Oct 11, 2013 12:35 pm
Location: California, US
Top

Re: Tag syntax rationalisation

Postby Nylanfs » Sat Jul 11, 2015 6:47 pm

Maybe show him the existing doc trackers?


Paul "Yes that Paul" Grosse
PCGen BoD - PR Silverback
ICQ: 14397299
Forums: Nylan (or Nylanfs)
User avatar
Nylanfs
 
Posts: 348
Joined: Thu Sep 11, 2014 6:06 pm
Location: Elkhart, Indiana, United States
Top

Re: Tag syntax rationalisation

Postby Nylanfs » Mon Jul 13, 2015 3:53 pm

@Li-aung Yip, these are the existing documentation trackers. There are probably several that will clarify some of what you are seeing.

http://jira.pcgen.org/browse/DOCS-321?j ... %3D%20Open


Paul "Yes that Paul" Grosse
PCGen BoD - PR Silverback
ICQ: 14397299
Forums: Nylan (or Nylanfs)
User avatar
Nylanfs
 
Posts: 348
Joined: Thu Sep 11, 2014 6:06 pm
Location: Elkhart, Indiana, United States
Top

Re: Tag syntax rationalisation

Postby Li-aung Yip » Wed Jul 15, 2015 1:24 pm

Nylanfs wrote:@Li-aung Yip, these are the existing documentation trackers. There are probably several that will clarify some of what you are seeing.

http://jira.pcgen.org/browse/DOCS-321?j ... %3D%20Open


The number of open tickets for the DOC section is intimidating.


IRC: layip. GitHub: https://github.com/LiaungYip .
User avatar
Li-aung Yip
 
Posts: 21
Joined: Sat Jun 20, 2015 2:24 pm
Top

Re: Tag syntax rationalisation

Postby Distant Scholar » Wed Jul 15, 2015 3:19 pm

Li-aung Yip wrote:The number of open tickets for the DOC section is intimidating.


Don't look at the number of open tickets for CODE then; you wouldn't want a heart attack.

There are more "No active monkey" NEWSOURCE tickets than open DOC tickets. :-)

Edit: Come to think of it, I should probably get to knocking some of those down. But not today; it's my birthday. :-)


Douglas Limmer
PCGen Data Chimp ... I think
User avatar
Distant Scholar
 
Posts: 91
Joined: Thu Oct 30, 2014 2:47 pm
Location: Texas Hill Country
Top


Return to Developers - Code Monkeys

Who is online

Users browsing this forum: No registered users and 1 guest

cron