Adding Items to Tables

From HLKitWiki
Revision as of 15:30, 19 November 2008 by Rob (Talk | contribs)

Jump to: navigation, search

[Context: HL KitBasic Concepts and TerminologyManipulation of Visual ElementsWorking With Tables]

One of the most common mechanisms you'll be using is dynamic tables, as they allow the user to add new items to the character. Whether it be for skills, abilities, powers, spells, gear, or something else, a major part of character creation involves selecting an assortment of options from a list to customize the character. Dynamic tables are the mechanism the Kit uses to accomplish that task.

Dynamic tables are actually two tables in one. First, there is the table in which the selected items are displayed, and this works as outlined previously. However, there is a second table involved, which is the means through which available items are presented to the user for selection.

The selection table behaves very similarly to the table used for showing the chosen items. It uses the same component for filtering the list of items shown. However, it has a separate tag expression for that purpose, which is called the "candidate" tag expression. The Candidate tag expression is distinct because there are often times when you'll want to be more restrictive in deciding which items can be added to the table. For example, consider a table of special abilities. Many abilities will be user-selectable, while a number of them will only be added to the character as the result of another choice, such as racial abilities being automatically added only when the corresponding race is chosen. The list of abilities possessed by the character and shown as selected must include these racial abilities, while the list of abilities that the user can freely choose from must not. To handle this distinction, two separate tag expressions are required, although they will sometimes be identical.


picks or things


actually two separate tables - one for display and one for selection candidate tagexpr add template add item script titlebar script description script