Difference between revisions of "Restriction Tag Expression"

From HLKitWiki
Jump to: navigation, search
(New page: {{context|Kit Reference|Tag Expression Types}} The role of the Restriction tag expression is to further limit the set of things or picks that are made available for selection. determine ...)
 
Line 1: Line 1:
 
{{context|Kit Reference|Tag Expression Types}}
 
{{context|Kit Reference|Tag Expression Types}}
  
The role of the Restriction tag expression is to further limit the set of things or picks that are made available for selection.
+
The role of the Restriction tag expression is to further limit the set of things or picks that are made available for selection through a portal. It is always used in conjunction with a [[Candidate Tag Expression|Candidate tag expression]] and ensures that an item is only ever added to a table a single time. The Restriction tag expression is tested against all objects that are valid candidates for selection. If any of those objects also satisfies the Restriction tag expression '''and''' already exists as a pick within the target container, they are precluded from being added a second time and dropped from the selection list. This makes it possible to limit the user to only add an item once without having to designate the thing as unique.
  
determine whether a pick or thing should be included in a choose form. The choose form contains the list of picks/things from which the user can select when adding items to a portal (i.e. dynamic table, chooser, or thing-based menu). If the tag expression is satisfied, then the pick/thing is shown within the list of options and can be added by the user. Otherwise, the pick/thing is omitted from the available list.
+
The Restriction tag expression is always applied against the pick/thing itself. The tag expression is compared against all of the tags possessed by the object. For picks, this includes the effects of all dynamically assigned and deleted tags. The Restriction tag expression is only invoked when the user triggers the portal to display the list of options to choose from. Consequently, the tags used for picks are the final set of tags after evaluation completes. This also means that picks can dynamically change their state and change whether they appear as valid choices within a given portal.
  
The Candidate tag expression is always applied against the pick/thing itself. The tag expression is compared against all of the tags possessed by the object. For picks, this includes the effects of all dynamically assigned and deleted tags. The Candidate tag expression is only invoked when the user triggers the portal to display the list of options to choose from. Consequently, the tags used for picks are the final set of tags after evaluation completes. This also means that picks can dynamically change their state and change whether they appear as valid choices within a given portal.
+
The best example of where the Restriction tag expression comes in handy is with the d20 System. In d20, many feats can be added via multiple mechanisms. There is the standard list of feats, plus various classes provide bonus feat selections. If a feat is added via one mechanism, then it needs to be precluded from being added via the other mechanisms. By using the Restriction tag expression, feats can be easily dropped from the other lists if they've already been added via any of the mechanisms.
 
+
 
+
 
+
The "restriction" element defines a Restriction Tag Expression for the portal that further limits the set of things/picks that are available for selection. This tag expression is compared against all picks that already exist within the container. Any object that exists within the restricted list is precluded from being selected again, resulting in it being omitted from the list of available choices. The complete list of attributes for this element is below.
+

Revision as of 04:15, 7 December 2008

Context: HL KitKit Reference … Tag Expression Types 

The role of the Restriction tag expression is to further limit the set of things or picks that are made available for selection through a portal. It is always used in conjunction with a Candidate tag expression and ensures that an item is only ever added to a table a single time. The Restriction tag expression is tested against all objects that are valid candidates for selection. If any of those objects also satisfies the Restriction tag expression and already exists as a pick within the target container, they are precluded from being added a second time and dropped from the selection list. This makes it possible to limit the user to only add an item once without having to designate the thing as unique.

The Restriction tag expression is always applied against the pick/thing itself. The tag expression is compared against all of the tags possessed by the object. For picks, this includes the effects of all dynamically assigned and deleted tags. The Restriction tag expression is only invoked when the user triggers the portal to display the list of options to choose from. Consequently, the tags used for picks are the final set of tags after evaluation completes. This also means that picks can dynamically change their state and change whether they appear as valid choices within a given portal.

The best example of where the Restriction tag expression comes in handy is with the d20 System. In d20, many feats can be added via multiple mechanisms. There is the standard list of feats, plus various classes provide bonus feat selections. If a feat is added via one mechanism, then it needs to be precluded from being added via the other mechanisms. By using the Restriction tag expression, feats can be easily dropped from the other lists if they've already been added via any of the mechanisms.