Difference between revisions of "Script Contexts"

From HLKitWiki
Jump to: navigation, search
(New page: {{context|Kit Reference}} ==Overview== This first step in accessing data via scripts is in identifying where that data resides within the overall data hierarchy. A separate hierarchy is ...)
 
Line 10: Line 10:
  
 
:{| class="infotable"
 
:{| class="infotable"
|class="leftnormal"|x
+
|class="leftnormal"|portfolio
 
|x
 
|x
 
|-
 
|-
|x
+
|hero
 
|x
 
|x
 
|-
 
|-
|x
+
|container
 
|x
 
|x
 
|-
 
|-
|x
+
|pick
 
|x
 
|x
 
|-
 
|-
|x
+
|field
 
|x
 
|x
 
|-
 
|-
Line 38: Line 38:
 
|-
 
|-
 
|}
 
|}
 +
#define TERM_CHILD_CONTEXT      (SCRIPT_BASE + 32)
 +
#define TERM_TRANSACT_CONTEXT  (SCRIPT_BASE + 37)
 +
#define TERM_POOL_CONTEXT      (SCRIPT_BASE + 38)
 +
#define TERM_GIZMO_CONTEXT      (SCRIPT_BASE + 39)
 +
#define TERM_PARENT_CONTEXT    (SCRIPT_BASE + 40)
 +
#define TERM_LINKAGE_CONTEXT    (SCRIPT_BASE + 41)
 +
#define TERM_ROOT_CONTEXT      (SCRIPT_BASE + 42)
 +
#define TERM_CHILDFOUND_CONTEXT (SCRIPT_BASE + 43)
 +
#define TERM_DYNALINK_CONTEXT  (SCRIPT_BASE + 44)
 +
#define TERM_GEARHOLDER_CONTEXT (SCRIPT_BASE + 45)
 +
#define TERM_SHADOW_CONTEXT    (SCRIPT_BASE + 46)
 +
#define TERM_FIRSTCHILD_CONTEXT (SCRIPT_BASE + 47)
 +
#define TERM_MASTER_CONTEXT    (SCRIPT_BASE + 50)
 +
#define TERM_MINION_CONTEXT    (SCRIPT_BASE + 51)
 +
#define TERM_ANCHOR_CONTEXT    (SCRIPT_BASE + 52)
 +
#define TERM_ORIGIN_CONTEXT    (SCRIPT_BASE + 53)
  
==Contexts Within Visual Hierarchy==
+
#define TERM_PICK_THIS          (SCRIPT_BASE + 20)
 +
#define TERM_CONTAINER_THIS    (SCRIPT_BASE + 21)
 +
#define TERM_EACHPICK_THIS      (SCRIPT_BASE + 22)
 +
#define TERM_ALTPICK_THIS      (SCRIPT_BASE + 23)
 +
#define TERM_ALTTHING_THIS      (SCRIPT_BASE + 24)
 +
#define TERM_FOCUS_THIS        (SCRIPT_BASE + 25)
 +
#define TERM_ACTOR_THIS        (SCRIPT_BASE + 26)
  
The visual hierarchy has a separate set of contexts that are managed by the Kit. The following table describes each of these contexts.
+
There are also quite a few specialized contexts within the structural hierarchy. Each of these contexts actually maps to one of the basic contexts above, but it is considered distinct due to added restrictions or limitations on what can be done within the context.
  
 
:{| class="infotable"
 
:{| class="infotable"
|class="leftnormal"|x
+
|class="leftnormal"|portfolio
 
|x
 
|x
 
|-
 
|-
Line 69: Line 91:
 
|-
 
|-
 
|x
 
|x
 +
|x
 +
|-
 +
|}
 +
 +
==Contexts Within Visual Hierarchy==
 +
 +
The visual hierarchy has a separate set of contexts that are managed by the Kit. The following table describes each of these contexts.
 +
 +
:{| class="infotable"
 +
|class="leftnormal"|scene
 +
|x
 +
|-
 +
|layout
 +
|x
 +
|-
 +
|template
 +
|x
 +
|-
 +
|portal
 +
|x
 +
|-
 +
|value
 +
|x
 +
|-
 +
|table
 +
|x
 +
|-
 +
|chosen
 +
|x
 +
|-
 +
|hero
 +
|x
 +
|-
 +
|container
 
|x
 
|x
 
|-
 
|-
Line 78: Line 134:
  
 
:{| class="infotable"
 
:{| class="infotable"
|class="leftnormal"|x
+
|class="leftnormal"|state
 
|x
 
|x
 
|-
 
|-

Revision as of 23:03, 3 December 2008

Context: HL KitKit Reference 

Overview

This first step in accessing data via scripts is in identifying where that data resides within the overall data hierarchy. A separate hierarchy is maintained for both structural information (e.g. actors, picks, gizmos, minions, etc.) and visual information (e.g. panels, layouts, templates, etc.). Each different layer within the hierarchy is considered a distinct "context".

Contexts Within Structural Hierarchy

Within the structural hierarchy, there are a variety of contexts managed by the Kit. The following table identifies these contexts and provides a brief description of what each represents.

portfolio x
hero x
container x
pick x
field x
x x
x x
x x
x x
  1. define TERM_CHILD_CONTEXT (SCRIPT_BASE + 32)
  2. define TERM_TRANSACT_CONTEXT (SCRIPT_BASE + 37)
  3. define TERM_POOL_CONTEXT (SCRIPT_BASE + 38)
  4. define TERM_GIZMO_CONTEXT (SCRIPT_BASE + 39)
  5. define TERM_PARENT_CONTEXT (SCRIPT_BASE + 40)
  6. define TERM_LINKAGE_CONTEXT (SCRIPT_BASE + 41)
  7. define TERM_ROOT_CONTEXT (SCRIPT_BASE + 42)
  8. define TERM_CHILDFOUND_CONTEXT (SCRIPT_BASE + 43)
  9. define TERM_DYNALINK_CONTEXT (SCRIPT_BASE + 44)
  10. define TERM_GEARHOLDER_CONTEXT (SCRIPT_BASE + 45)
  11. define TERM_SHADOW_CONTEXT (SCRIPT_BASE + 46)
  12. define TERM_FIRSTCHILD_CONTEXT (SCRIPT_BASE + 47)
  13. define TERM_MASTER_CONTEXT (SCRIPT_BASE + 50)
  14. define TERM_MINION_CONTEXT (SCRIPT_BASE + 51)
  15. define TERM_ANCHOR_CONTEXT (SCRIPT_BASE + 52)
  16. define TERM_ORIGIN_CONTEXT (SCRIPT_BASE + 53)
  1. define TERM_PICK_THIS (SCRIPT_BASE + 20)
  2. define TERM_CONTAINER_THIS (SCRIPT_BASE + 21)
  3. define TERM_EACHPICK_THIS (SCRIPT_BASE + 22)
  4. define TERM_ALTPICK_THIS (SCRIPT_BASE + 23)
  5. define TERM_ALTTHING_THIS (SCRIPT_BASE + 24)
  6. define TERM_FOCUS_THIS (SCRIPT_BASE + 25)
  7. define TERM_ACTOR_THIS (SCRIPT_BASE + 26)

There are also quite a few specialized contexts within the structural hierarchy. Each of these contexts actually maps to one of the basic contexts above, but it is considered distinct due to added restrictions or limitations on what can be done within the context.

portfolio x
x x
x x
x x
x x
x x
x x
x x
x x

Contexts Within Visual Hierarchy

The visual hierarchy has a separate set of contexts that are managed by the Kit. The following table describes each of these contexts.

scene x
layout x
template x
portal x
value x
table x
chosen x
hero x
container x

General Contexts

In addition to the structural and visual contexts, the Kit supports contexts that are outside of the the normal hierarchy. These general contexts are described in the table below.

state x
x x
x x
x x
x x
x x
x x
x x
x x