Entity Element (Data): Difference between revisions
New page: {{context|Kit Reference|Structural File Reference}} ==The "entity" Element== There will be times when you need to create a separate container for picks that is distinct from an actor. Fo... |
No edit summary |
||
Line 5: | Line 5: | ||
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 [[Advanced Gizmos|entities and gizmos]]. Each entity is defined through the use of a "entity" element. The complete list of attributes for this element is below. | 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 [[Advanced Gizmos|entities and gizmos]]. Each entity is defined through the use of a "entity" element. The complete list of attributes for this element is below. | ||
:{| class="infotable" | :{| class="infotable" | ||
|class="leftnormal"|id | |class="leftnormal"|id | ||
|Id – Specifies the unique id of the | |Id – Specifies the unique id of the entity. This id is used in all references to the entity. | ||
|- | |- | ||
| | |form | ||
|(Optional) | |(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. | ||
no | |||
Default: | |||
|- | |- | ||
| | |defaultthing | ||
|(Optional) | |(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. | ||
default | |||
|- | |- | ||
|} | |} | ||
The " | 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. | ||
:{| class="infotable" | :{| class="infotable" | ||
|class="leftnormal"|[[ | |class="leftnormal"|[[Bootstrap Element (Data)|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|integrity]] | ||
|An optional "integrity" element may appear as defined by the given link. This element defines an [[Integrity Script]] for the entity. | |||
|- | |- | ||
|} | |} | ||
==The " | ==The "integrity" Element{{anchor|integrity}}== | ||
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. | |||
:{| class="infotable" | :{| class="infotable" | ||
|class="leftnormal"| | |class="leftnormal"|PCDATA | ||
| | |Script – Specifies the code comprising the Integrity script. | ||
|- | |- | ||
|} | |} | ||
Line 69: | Line 40: | ||
==Example== | ==Example== | ||
The following example demonstrates what an " | The following example demonstrates what an "entity" element might look like. All default values are assumed for optional attributes. | ||
<pre> | <pre> | ||
< | <entity id="MyEntity" panel="EntityForm" defaultthing="EntityHelp"> | ||
<bootstrap thing="EntityHelp"/> | |||
<bootstrap thing="EntityInfo"/> | |||
< | </entity> | ||
< | |||
</ | |||
</pre> | </pre> |
Latest revision as of 01:19, 1 December 2008
Context: HL Kit … Kit Reference … Structural File Reference
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.
Example
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>