Existence Tag Expression

From HLKitWiki
Revision as of 04:16, 7 December 2008 by Rob (Talk | contribs) (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 through a po...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.