Entity Element (Data)
The "entity" Element
There will be times when you need to create a separate container for picks that is distinct from an actor. For example, a customizable weapon or vehicle can have its own set of picks that tailor that specific object. These objects are referred to as entities and gizmos. Each entity is defined through the use of a "entity" element. The complete list of attributes for this element is below.
id Id – Specifies the unique id of the entity. This id is used in all references to the entity. form (Optional) Id – Specifies the unique id of the form that will be used to edit the contents of all gizmos based on this entity. If empty, there is no ability for the user to directly edit the contents of the gizmo. Default: Empty. defaultthing (Optional) Id – Specifies the unique id of a thing to be used as the "default" within the context of the entity. All tables assume a "default" thing of the "actor" pick. However, if you define tables for manipulating picks within a gizmo, attempts to use the "actor" pick will fail. This attribute allows you to specify an alternate pick to be used as the default and must designate a pick that always exists within the gizmo (i.e. a thing that is bootstrapped into it). If empty, no suitable default is setup, but you won't always need one. Default: Empty.
The "entity" element also possesses child elements that pertain to its handling. The list of these child elements is below and must appear in the order shown. Click on the link to access the details for each element.
bootstrap Zero or more "bootstrap" elements may appear as defined by the given link. This element specifies any things that are automatically bootstrapped into every gizmo derived from the entity. integrity An optional "integrity" element may appear as defined by the given link. This element defines an Integrity Script for the entity.
The "integrity" Element
The "integrity" element defines an Integrity Script for the entity that imposes rules for the ensuring the user can only save changes to a valid gizmo. The complete list of attributes for this element is below.
PCDATA Script – Specifies the code comprising the Integrity script.
The following example demonstrates what an "entity" element might look like. All default values are assumed for optional attributes.
<entity id="MyEntity" panel="EntityForm" defaultthing="EntityHelp"> <bootstrap thing="EntityHelp"/> <bootstrap thing="EntityInfo"/> </entity>