HoldLimit Tag Expression

From HLKitWiki
Revision as of 01:04, 12 May 2009 by Rob (Talk | contribs) (Created page with '{{context|Kit Reference|Tag Expression Types}} The role of the HoldLimit tag expression is to determine whether a piece of gear can be held by another piece of gear. By default,...')

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

Context: HL KitKit Reference … Tag Expression Types 

The role of the HoldLimit tag expression is to determine whether a piece of gear can be held by another piece of gear. By default, any piece of gear can be held within gear designated as a "holder". With the HoldLimit tag expression, the set of gear that can be held by a holder is further restricted. Only a piece of gear that also satisfies the HoldLimit tag expression is allowed to be held by the holder.

The primary use of the HoldLimit tag expression is to leverage the containment mechanism to associate weapon options with the various weapons. For example, a laser sight might confer bonuses to the use of a gun, but that laser sight can be moved between different weapons. Through the use of the HoldLimit tag expression, the gun can be restricted to only hold laser sights and other similar weapon options. The user can then move the laser sight gear from one gun to another, with a script being used on the laser sight to automatically apply the appropriate bonus to the gun the laser sight is attached to.

The HoldLimit tag expression is only applied against tags that are assigned directly to a thing at definition, including any component tags. Any tags that are assigned dynamically after the gear is added to the character are ignored. Consequently, the tag expression is evaluated against each piece of gear when the user brings up the menu to move the gear to a new holder. Once a piece of gear is assigned to a holder, no further evaluation is performed, unless the user chooses to move the gear again.