Difference between revisions of "Shadowing & Displacement"

From HLKitWiki
Jump to: navigation, search
(Basics)
(Limitations)
Line 29: Line 29:
 
The following limitations apply to shadowed and displaced picks:
 
The following limitations apply to shadowed and displaced picks:
  
* '''Combinations:''' It is not legal to have a pick that is shadowed under some circumstances, and displaced under others. Only one of the components in a component set may specify a "shadow" or "displace" element. Trying to do otherwise will cause a compilation error.
+
* '''Choose One Only:''' It is not legal to have a pick that is shadowed under some circumstances, and displaced under others. Only one of the components in a component set may specify a "shadow" or "displace" element. Trying to do otherwise will cause a compilation error.
  
 
* '''Uniqueness:''' Even if a shadowed or displaced pick is unique, it will not be merged with other picks in the shadow container; merging two unique picks with different containers is not possible. (Uniqueness is observed normally in the "owner" container.)
 
* '''Uniqueness:''' Even if a shadowed or displaced pick is unique, it will not be merged with other picks in the shadow container; merging two unique picks with different containers is not possible. (Uniqueness is observed normally in the "owner" container.)
Line 35: Line 35:
 
* '''User-ordering:''' When a pick is shadowed or displaced, it maintains a SEPARATE user-sorted order within each container to avoid conflicts. The "echo" behavior of the user-sorted order into a field value is only performed for the order within the "owner" container.
 
* '''User-ordering:''' When a pick is shadowed or displaced, it maintains a SEPARATE user-sorted order within each container to avoid conflicts. The "echo" behavior of the user-sorted order into a field value is only performed for the order within the "owner" container.
  
* '''Duplication & Moving:''' Displaced picks can't be duplicated or stacked, or moved between gizmos and the hero (since movement and stacking effectively duplicates the original pick to move or split it).
+
* '''Duplication & Moving:''' Displaced picks can't be duplicated or stacked, or moved between gizmos and the hero (since movement and stacking effectively duplicates the original pick to move or split it). '''Note:''' This only applies to displaced picks. Shadowed picks can be duplicated, moved and stacked as normal.
  
- Use of "maxlimit" on a thing is NOT compatible with displacement
+
* '''Maxlimit:''' Displaced picks can't use "maxlimit". This is because limits within a foreign container cannot be properly detected and policed by Hero Lab's engine. '''Note:''' This only applies to displaced picks. Shadowed picks can be duplicated, moved and stacked as normal.
- Limits within a foreign container cannot be properly detected and policed
+

Revision as of 15:53, 1 March 2011

Basics

Shadowing and Displacement are intended for use on picks present on gizmos. If a pick is shadowed or displaced, it effectively exists in two containers at once (the gizmo container, and usually the hero container).

This means that the pick can be found by iterators (for example, a foreach loop, a call to firstchild, or a table shown in the UI) in both containers. This is often used to add a pick on a gizmo, then have that pick also appear on the hero in some way (for example, in a list of weapons or special abilities).

Shadowing and Displacement are set up using the shadow and displace elements on a component.

Note that both displaced and shadowed picks may only be deleted through the original container they were added through. They may not be deleted by the user from a table in any other container.

What's the Difference?

(explain the shadow container / owner container here)

owner container:

container.blah goes to the owner container

bootstrapped picks appear in the owner container

Script Access

- Script transition "shadow." moves from a pick to its shadow container - The "container." transition goes to the container that "owns" the picks, while the "shadow." transition goes to the alternate (shadow) container - Script target reference "shadowed" returns whether a pick is shadowed - Script target reference "displaced" returns whether a pick is displaced

Limitations

The following limitations apply to shadowed and displaced picks:

  • Choose One Only: It is not legal to have a pick that is shadowed under some circumstances, and displaced under others. Only one of the components in a component set may specify a "shadow" or "displace" element. Trying to do otherwise will cause a compilation error.
  • Uniqueness: Even if a shadowed or displaced pick is unique, it will not be merged with other picks in the shadow container; merging two unique picks with different containers is not possible. (Uniqueness is observed normally in the "owner" container.)
  • User-ordering: When a pick is shadowed or displaced, it maintains a SEPARATE user-sorted order within each container to avoid conflicts. The "echo" behavior of the user-sorted order into a field value is only performed for the order within the "owner" container.
  • Duplication & Moving: Displaced picks can't be duplicated or stacked, or moved between gizmos and the hero (since movement and stacking effectively duplicates the original pick to move or split it). Note: This only applies to displaced picks. Shadowed picks can be duplicated, moved and stacked as normal.
  • Maxlimit: Displaced picks can't use "maxlimit". This is because limits within a foreign container cannot be properly detected and policed by Hero Lab's engine. Note: This only applies to displaced picks. Shadowed picks can be duplicated, moved and stacked as normal.