Difference between revisions of "Pick Target References"

From HLKitWiki
Jump to: navigation, search
(New page: {{context|Kit Reference|Target References}} Picks are going to be the most prevalent object type within any set of data files, so it's no surprise that picks have the largest and most var...)
 
Line 7: Line 7:
 
:{| class="infotable"
 
:{| class="infotable"
 
|class="leftnormal"|livename
 
|class="leftnormal"|livename
|
+
|(Right, String)
 
|-
 
|-
 
|idstring
 
|idstring
|
+
|(Right, String)
 
|-
 
|-
 
|valid
 
|valid
|
+
|(Right, Number)
 
|-
 
|-
 
|isuser
 
|isuser
|
+
|(Right, Number)
 
|-
 
|-
 
|ispick
 
|ispick
|
+
|(Right, Number)
 
|-
 
|-
 
|isroot
 
|isroot
|
+
|(Right, Number)
 
|-
 
|-
 
|isgizmo
 
|isgizmo
|
+
|(Right, Number)
 
|-
 
|-
 
|isunique
 
|isunique
|
+
|(Right, Number)
 
|-
 
|-
 
|shadowed
 
|shadowed
|
+
|(Right, Number)
 
|-
 
|-
 
|displaced
 
|displaced
|
+
|(Right, Number)
 
|-
 
|-
 
|autonomous
 
|autonomous
|
+
|(Right, Number)
 
|-
 
|-
 
|isminion
 
|isminion
|
+
|(Right, Number)
 
|-
 
|-
 
|ismaster
 
|ismaster
|
+
|(Right, Number)
 
|-
 
|-
 
|countme
 
|countme
|
+
|(Right, Number)
 
|-
 
|-
 
|uniqcount
 
|uniqcount
|
+
|(Right, Number)
 
|-
 
|-
 
|assign[''tag'']
 
|assign[''tag'']
Line 129: Line 129:
 
|-
 
|-
 
|pulltags[
 
|pulltags[
|
+
|(Right, Number)
 
|-
 
|-
 
|pushtags[
 
|pushtags[
|
+
|(Right, Number)
 
|-
 
|-
 
|forward
 
|forward
|
+
|(Right, Number)
 
|-
 
|-
 
|setidentity[''grp'']
 
|setidentity[''grp'']
Line 150: Line 150:
 
|-
 
|-
 
|shareidentity[
 
|shareidentity[
|
+
|(Right, Number)
 
|-
 
|-
 
|pullidentity[
 
|pullidentity[
|
+
|(Right, Number)
 
|-
 
|-
 
|tagnames[''tmpl'',''spl'']
 
|tagnames[''tmpl'',''spl'']
Line 168: Line 168:
 
|-
 
|-
 
|prereqok
 
|prereqok
|
+
|(Right, Number)
 
|-
 
|-
 
|prereqnum
 
|prereqnum
|
+
|(Right, Number)
 
|-
 
|-
 
|prereqmsg[
 
|prereqmsg[
|
+
|(Right, String)
 
|-
 
|-
 
|isgear
 
|isgear
|
+
|(Right, Number)
 
|-
 
|-
 
|isgearheld
 
|isgearheld
|
+
|(Right, Number)
 
|-
 
|-
 
|gearcount
 
|gearcount
|
+
|(Right, Number)
 
|-
 
|-
 
|gearpath[
 
|gearpath[
|
+
|(Right, String)
 
|-
 
|-
 
|isgearlist
 
|isgearlist
|
+
|(Right, Number)
 
|-
 
|-
 
|gearlist[
 
|gearlist[
|
+
|(Right, String)
 
|-
 
|-
 
|isholdable
 
|isholdable
|
+
|(Right, Number)
 
|-
 
|-
 
|stackable
 
|stackable
|
+
|(Right, Number)
 
|-
 
|-
 
|islinkage[
 
|islinkage[
|
+
|(Right, Number)
 
|-
 
|-
 
|isbootstrap[
 
|isbootstrap[
|
+
|(Right, Number)
 
|-
 
|-
 
|creation
 
|creation
|
+
|(Right, Number)
 
|-
 
|-
 
|setfocus
 
|setfocus
|
+
|(Right, Number)
 
|-
 
|-
 
|ispanel
 
|ispanel
|
+
|(Right, Number)
 
|-
 
|-
 
|panelactive
 
|panelactive
|
+
|(Right, Number)
 
|-
 
|-
 
|sourcenames[
 
|sourcenames[
|
+
|(Right, String)
 
|-
 
|-
 
|sourcerefs[
 
|sourcerefs[
|
+
|(Right, String)
 
|-
 
|-
 
|dynareg[
 
|dynareg[
|
+
|(Right, Number)
 
|-
 
|-
 
|hasminion[
 
|hasminion[
|
+
|(Right, Number)
 
|-
 
|-
 
|}
 
|}

Revision as of 01:52, 6 December 2008

Context: HL KitKit Reference … Target References 

Picks are going to be the most prevalent object type within any set of data files, so it's no surprise that picks have the largest and most varied assortment of target references. The complete list of target references for picks is presented in the table below.

NOTE! When a pick is accessed from within a visual script, all operations are restricted to read-only behavior. Any attempts to modify a pick from within a visual script will fail.

livename (Right, String)
idstring (Right, String)
valid (Right, Number)
isuser (Right, Number)
ispick (Right, Number)
isroot (Right, Number)
isgizmo (Right, Number)
isunique (Right, Number)
shadowed (Right, Number)
displaced (Right, Number)
autonomous (Right, Number)
isminion (Right, Number)
ismaster (Right, Number)
countme (Right, Number)
uniqcount (Right, Number)
assign[tag] (Right, Number) Assigns the indicated tag to the container. The tag must be specified using the standard "group.id" syntax. The tag is verified to exist during compilation of the script. Always returns a value of zero.

Example: perform this.assign[skill.appraise]

delete[tmpl] (Right, Number) Deletes all tags from the container that match the tag template tmpl. The template must use the standard "group.id" syntax and may contain a wildcard. If the template employs a wildcard, all tags matching the template are deleted. If the template specifies an explicit tag, and the tag has been assigned to the container multiple times, the tag is deleted only once, thereby providing detailed control to authors when needed. Always returns a value of zero.

Example: perform this.delete[skill.craft?]

assignstr[str] (Right, Number) This target reference is identical to "assign", except that the str parameter is a string expression that is evaluated within the script. This allows the tag to be dynamically determined via the script instead of being hard-wired at compilation. Always returns a value of zero.

Example: perform this.assignstr[skill.appraise]

deletestr[str] (Right, Number) This target reference is identical to "delete", except that the str parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation. Always returns a value of zero.

Example: perform this.deletestr["skill.craft?"]

tagis[tmpl] (Right, Number) Returns non-zero if any tags assigned to the container match the tag template tmpl, else zero if no tags match. The template must use the standard "group.id" syntax and may contain a wildcard.

Example: this.tagis[skill.?]

tagcount[tmpl] (Right, Number) Returns the number of tags assigned to the container that match the tag template tmpl. The template must use the standard "group.id" syntax and may contain a wildcard.

Example: result = this.tagcount[skill.?]

tagvalue[tmpl] (Right, Number) Returns the value of a tag assigned to the container that matches the tag template tmpl. The rules associated with tag values in tag expressions apply. The template must use the standard "group.id" syntax and may contain a wildcard.

Example: result = this.tagvalue[spelllevel.wizard?]

tagmin[tmpl] (Right, Number) Returns the minimum value of all tags assigned to the container that match the tag template tmpl. The rules associated with tag values in tag expressions apply. The template must use the standard "group.id" syntax and may contain a wildcard.

Example: result = this.tagmin[spelllevel.wizard?]

tagmax[tmpl] (Right, Number) Returns the maximum value of all tags assigned to the container that match the tag template tmpl. The rules associated with tag values in tag expressions apply. The template must use the standard "group.id" syntax and may contain a wildcard.

Example: result = this.tagmax[spelllevel.wizard?]

tagunique[tmpl] (Right, Number) Returns the number of unique tags assigned to the container that match the tag template tmpl. If a tag is assigned multiple times, it is only counted once. The template must use the standard "group.id" syntax and may contain a wildcard.

Example: result = this.tagunique[skill.?]

tagexpr[expr] (Right, Number) Returns non-zero if the tags assigned to the container match the tag expression expr, else zero is returned. The expr parameter must be a valid tag expression.

Example: result = this.tagexpr[class.wizard & (val:spelllevel.wizard? > 5)]

tagcountstr[str] (Right, Number) This target reference is identical to "tagcount", except that the str parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation.

Example: result = this.tagcountstr["skill.?"]

tagvaluestr[str] (Right, Number) This target reference is identical to "tagvalue", except that the str parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation.

Example: result = this.tagvaluestr["spelllevel.wizard?"]

tagminstr[str] (Right, Number) This target reference is identical to "tagmin", except that the str parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation.

Example: result = this.tagminstr["spelllevel.wizard?"]

tagmaxstr[str] (Right, Number) This target reference is identical to "tagmax", except that the str parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation.

Example: result = this.tagmaxstr["spelllevel.wizard?"]

taguniquestr[str] (Right, Number) This target reference is identical to "tagunique", except that the str parameter is a string expression that is evaluated within the script. This allows the tag template to be dynamically determined via the script instead of being hard-wired at compilation.

Example: result = this.taguniquestr["skill.?"]

tagsearch[str] (Right, Number) This target reference is identical to "tagexpr", except that the str parameter is a string expression that is evaluated within the script. This allows the tag expression to be dynamically determined via the script instead of being hard-wired at compilation.

Example: result = this.tagsearch["class.wizard & (val:spelllevel.wizard? > 5)"]
NOTE! Using "tagsearch" is MUCH slower in performance than using "tagexpr", since the tagexpr must be parsed and compiled every time the script is evaluated. Be sure to use "tagexpr" whenever possible.

tagmatch[refgrp,match,ref] (Right, Number) Returns non-zero if any tags within a reference context also exist within a match context, else zero. This allows tags from one context to be verified to exist within another context, making tag-based comparisons between two objects possible. For more details, please check here.

Example: result = hero.tagmatch[NeedStatus,HasStatus,initial]

intersect[init,curr] (Right, Number) Returns non-zero if tags within the initial script context also exist within the currently transitioned context, else zero. All of the tags that belong to the init tag group within the initial script context are compared against the tags that belong to the curr tag group within the current context. If any of those tags possess the identical tag id, then a match is returned (i.e. non-zero). The same tag group may be used for both contexts, and both contexts must be objects that possess tags (i.e. container, pick, or thing).

Example: result = this.interset[MyGroup,AltGroup]

pulltags[ (Right, Number)
pushtags[ (Right, Number)
forward (Right, Number)
setidentity[grp] (Right, Number) Assigns to the container the identity tag from the tag group grp that corresponds to the initial context of the script. The identity tag id is dictated by the initial context of the script. For more details, please check here.

Example: result = this.setidentity[groupid]

isidentity[grp] (Right, Number) As the counterpart of "setidentity", this target reference returns non-zero if the indicated identity tag has been assigned to the container and zero if not. The identity tag sought must be from the tag group grp and the tag id is dictated by the initial context of the script. For more details, please check here.

Example: result = this.isidentity[groupid]

countidentity[grp] (Right, Number) Similar to "isidentity", this target reference returns the count of the identity tags assigned to the container. The identity tag sought must be from the tag group grp and the tag id is dictated by the initial context of the script. For more details, please check here.

Example: result = this.countidentity[groupid]

shareidentity[ (Right, Number)
pullidentity[ (Right, Number)
tagnames[tmpl,spl] (Right, String) Generates and returns a list of tags within the container. Only tags that match the tag template tmpl are included in the list. The generated string appends the names of the tags together, inserting the splicing string spl between each name if there is more than one. A container with no tags matching the template will return the empty string.

Example: result = this.tagnames[Weapon.?,"+"]

tagabbrevs[tmpl,spl] (Right, String) Works identically to "tagnames", except that the generated string is comprised of the abbreviations for all matching tags instead of their names.

Example: result = this.tagabbrevs[Weapon.?,"+"]

tagids[tmpl,spl] (Right, String) Works identically to "tagnames", except that the generated string is comprised of the unique ids for all matching tags instead of their names.

Example: result = this.tagids[Weapon.?,"+"]

prereqok (Right, Number)
prereqnum (Right, Number)
prereqmsg[ (Right, String)
isgear (Right, Number)
isgearheld (Right, Number)
gearcount (Right, Number)
gearpath[ (Right, String)
isgearlist (Right, Number)
gearlist[ (Right, String)
isholdable (Right, Number)
stackable (Right, Number)
islinkage[ (Right, Number)
isbootstrap[ (Right, Number)
creation (Right, Number)
setfocus (Right, Number)
ispanel (Right, Number)
panelactive (Right, Number)
sourcenames[ (Right, String)
sourcerefs[ (Right, String)
dynareg[ (Right, Number)
hasminion[ (Right, Number)