Difference between revisions of "Secondary Tag Expression"

From HLKitWiki
Jump to: navigation, search
 
Line 3: Line 3:
 
The role of the Secondary tag expression is very different from most other tag expressions. It is always used in conjunction with a portal that adds a pick to a container, such as a dynamic table or chooser. Instead of being processed as part of the portal, the tag expression is attached to the pick. When the pick is selected and added to the container, the Secondary tag expression is also added to the new pick. At that point, the tag expression becomes part of the pick for the rest of the pick's existence.
 
The role of the Secondary tag expression is very different from most other tag expressions. It is always used in conjunction with a portal that adds a pick to a container, such as a dynamic table or chooser. Instead of being processed as part of the portal, the tag expression is attached to the pick. When the pick is selected and added to the container, the Secondary tag expression is also added to the new pick. At that point, the tag expression becomes part of the pick for the rest of the pick's existence.
  
Once added to the pick, the Secondary tag expression behaves just like a [[Container Tag Expression|Container tag expression]]. In fact, the name of the mechanism derives from its use, as it becomes a secondary container tag expression. T
+
Once added to the pick, the Secondary tag expression behaves just like a [[Container Tag Expression|Container tag expression]]. In fact, the name of the mechanism derives from its use, as it becomes a secondary container tag expression. The Secondary tag expression must be satisfied in order for the pick to remain "live". If the tag expression stops being satisfied, the pick becomes non-live and is treated as if it no longer exists within the container.
  
 +
The Secondary tag expression is always applied against the container to which the pick was added. The tag expression is compared against all of the tags possessed by the container, which includes the effects of all dynamically assigned and deleted tags. The Secondary tag expression is invoked every evaluation cycle at the timing specified. This means that the pick can transition between live and non-live in dynamic fashion, depending on changes that occur with the container.
 +
 +
It's also valid to omit the timing for a Secondary tag expression and use default timing. The default timing is Setup/5000. However, you can setup whatever you want as the default timing for the Secondary tag expression within the [[Behavior Element (Data)|definition file]].
  
 
As a concrete example, consider the D&D 4th Edition game system. If the character selects the appropriate feats to multi-class, he may then choose powers from the new class. However, after those powers are added, what happens if the user deletes the multi-class feat? The separate table for selecting the additional powers disappears, so there is no way for the user to delete the powers. The easy solution is to assign a Secondary tag expression to the table of multi-class powers that ensures all powers added require that the character be multi-classed. This way, if the multi-class feat is deleted, all of those powers that rely on the feat will fail the Secondary tag expression and be treated as if they were never selected.
 
As a concrete example, consider the D&D 4th Edition game system. If the character selects the appropriate feats to multi-class, he may then choose powers from the new class. However, after those powers are added, what happens if the user deletes the multi-class feat? The separate table for selecting the additional powers disappears, so there is no way for the user to delete the powers. The easy solution is to assign a Secondary tag expression to the table of multi-class powers that ensures all powers added require that the character be multi-classed. This way, if the multi-class feat is deleted, all of those powers that rely on the feat will fail the Secondary tag expression and be treated as if they were never selected.
 
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.
 
 
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.
 

Latest revision as of 04:39, 7 December 2008

Context: HL KitKit Reference … Tag Expression Types 

The role of the Secondary tag expression is very different from most other tag expressions. It is always used in conjunction with a portal that adds a pick to a container, such as a dynamic table or chooser. Instead of being processed as part of the portal, the tag expression is attached to the pick. When the pick is selected and added to the container, the Secondary tag expression is also added to the new pick. At that point, the tag expression becomes part of the pick for the rest of the pick's existence.

Once added to the pick, the Secondary tag expression behaves just like a Container tag expression. In fact, the name of the mechanism derives from its use, as it becomes a secondary container tag expression. The Secondary tag expression must be satisfied in order for the pick to remain "live". If the tag expression stops being satisfied, the pick becomes non-live and is treated as if it no longer exists within the container.

The Secondary tag expression is always applied against the container to which the pick was added. The tag expression is compared against all of the tags possessed by the container, which includes the effects of all dynamically assigned and deleted tags. The Secondary tag expression is invoked every evaluation cycle at the timing specified. This means that the pick can transition between live and non-live in dynamic fashion, depending on changes that occur with the container.

It's also valid to omit the timing for a Secondary tag expression and use default timing. The default timing is Setup/5000. However, you can setup whatever you want as the default timing for the Secondary tag expression within the definition file.

As a concrete example, consider the D&D 4th Edition game system. If the character selects the appropriate feats to multi-class, he may then choose powers from the new class. However, after those powers are added, what happens if the user deletes the multi-class feat? The separate table for selecting the additional powers disappears, so there is no way for the user to delete the powers. The easy solution is to assign a Secondary tag expression to the table of multi-class powers that ensures all powers added require that the character be multi-classed. This way, if the multi-class feat is deleted, all of those powers that rely on the feat will fail the Secondary tag expression and be treated as if they were never selected.