The "Live" State

From HLKitWiki
Revision as of 23:03, 22 December 2008 by Rob (Talk | contribs)

Jump to: navigation, search

Context: HL KitAdvanced Authoring Concepts 

Overview

A variety of objects possess a "live" state. The "live" state controls whether an object behaves as if it exists (live) or does not exist (non-live). This makes it possible to automatically include objects within your data files and then dynamically have them appear or disappear, based on conditions within the portfolio that the user is constructing.

The "live" state applies equally to both visual elements and structural elements. A simple example of using the "live" state with visual elements is the various tab panels associated with each different class. All of those tabs are always defined and present, but each appears only when levels of the corresponding class have been added to the character. This is controlled via the "live" state.

For structural elements, the "live" state is primarily used to govern picks. A classic example in the Savage Worlds data files is arcane skills. Arcane skills are only possessed by a character when he has selected the corresponding arcane background. As such, the "live" state is used to control whether the arcane skills are made available.

Using Tag Expressions to Control

The "live" state of elements is always controlled via a tag expression. The object upon which the tags are tested will vary between different types of elements, but a tag expression is always employed.

The results of the tag expression dictate the "live" state of the object. If the tag expression returns "true", then the object is considered "live". If the tag expression returns "false", the object is considered "non-live".

The tag expression is evaluated at different points in time, which depend on the nature of the element. Whenever the tag expression is re-evaluated, the behavior of the object can transition if the results of the tag expression change. This means that, whenever the tag expression is re-evaluated, the object can immediately transition from "live" to "non-live", or vice versa. The implications of transitioning the live state are different for visual and structural elements, as outlined in the sections that follow.

Structural Elements

Visual Elements